From 958824f40ab0e80fd0b695b0b6692e0285b30b22 Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Fri, 9 Aug 2019 16:58:37 +0530 Subject: Removed unrequired semicolon from groovy Removed unrequired semicolon from groovy. Issue-ID: SO-2212 Signed-off-by: subhash kumar singh Change-Id: Ie97c560db89dcd15d424c11473a312e9d684cbd8 --- .../so/bpmn/common/scripts/ExternalAPIUtil.groovy | 34 +++++++++++----------- .../onap/so/bpmn/common/scripts/SDNCAdapter.groovy | 22 +++++++------- .../bpmn/common/scripts/SDNCAdapterRestV1.groovy | 34 +++++++++++----------- .../bpmn/common/scripts/SDNCAdapterRestV2.groovy | 22 +++++++------- 4 files changed, 56 insertions(+), 56 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src') diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy index 64567a349e..5525c2642b 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -40,11 +40,11 @@ class ExternalAPIUtil { String Prefix="EXTAPI_" - private static final Logger logger = LoggerFactory.getLogger( ExternalAPIUtil.class); + private static final Logger logger = LoggerFactory.getLogger( ExternalAPIUtil.class) - private final HttpClientFactory httpClientFactory; - private final MsoUtils utils; - private final ExceptionUtil exceptionUtil; + private final HttpClientFactory httpClientFactory + private final MsoUtils utils + private final ExceptionUtil exceptionUtil public static final String PostServiceOrderRequestsTemplate = "{\n" + @@ -107,22 +107,22 @@ class ExternalAPIUtil { // } public String setTemplate(String template, Map valueMap) { - logger.debug("ExternalAPIUtil setTemplate", true); - StringBuffer result = new StringBuffer(); + logger.debug("ExternalAPIUtil setTemplate", true) + StringBuffer result = new StringBuffer() - String pattern = "<.*>"; - Pattern r = Pattern.compile(pattern); - Matcher m = r.matcher(template); + String pattern = "<.*>" + Pattern r = Pattern.compile(pattern) + Matcher m = r.matcher(template) - logger.debug("ExternalAPIUtil template:" + template, true); + logger.debug("ExternalAPIUtil template:" + template, true) while (m.find()) { - String key = template.substring(m.start() + 1, m.end() - 1); - logger.debug("ExternalAPIUtil key:" + key + " contains key? " + valueMap.containsKey(key), true); - m.appendReplacement(result, valueMap.getOrDefault(key, "\"TBD\"")); + String key = template.substring(m.start() + 1, m.end() - 1) + logger.debug("ExternalAPIUtil key:" + key + " contains key? " + valueMap.containsKey(key), true) + m.appendReplacement(result, valueMap.getOrDefault(key, "\"TBD\"")) } - m.appendTail(result); - logger.debug("ExternalAPIUtil return:" + result.toString(), true); - return result.toString(); + m.appendTail(result) + logger.debug("ExternalAPIUtil return:" + result.toString(), true) + return result.toString() } /** diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy index f013fa8698..db39358ccd 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -22,9 +22,9 @@ package org.onap.so.bpmn.common.scripts -import org.onap.so.logger.LoggingAnchor; +import org.onap.so.logger.LoggingAnchor import org.onap.so.bpmn.core.UrnPropertiesReader -import org.onap.so.logger.ErrorCode; +import org.onap.so.logger.ErrorCode import java.text.SimpleDateFormat @@ -39,7 +39,7 @@ import static org.apache.commons.lang3.StringUtils.* // SDNC Adapter Request/Response processing public class SDNCAdapter extends AbstractServiceTaskProcessor { - private static final Logger logger = LoggerFactory.getLogger( SDNCAdapter.class); + private static final Logger logger = LoggerFactory.getLogger( SDNCAdapter.class) def Prefix="SDNCA_" @@ -77,7 +77,7 @@ public class SDNCAdapter extends AbstractServiceTaskProcessor { } catch (IOException ex) { logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Unable to encode username password string", "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) } // TODO Use variables instead of passing xml request - Huh? @@ -238,9 +238,9 @@ public class SDNCAdapter extends AbstractServiceTaskProcessor { def sdnccallbackreq=execution.getVariable("sdncAdapterCallbackRequest") logger.debug("sdncAdapterCallbackRequest :" + sdnccallbackreq) if (sdnccallbackreq==null){ - execution.setVariable("callbackResponseReceived",false); + execution.setVariable("callbackResponseReceived",false) }else{ - execution.setVariable("callbackResponseReceived",true); + execution.setVariable("callbackResponseReceived",true) } } @@ -303,10 +303,10 @@ public class SDNCAdapter extends AbstractServiceTaskProcessor { } public String generateCurrentTimeInUtc(){ - final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - final String utcTime = sdf.format(new Date()); - return utcTime; + final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") + sdf.setTimeZone(TimeZone.getTimeZone("UTC")) + final String utcTime = sdf.format(new Date()) + return utcTime } public void toggleSuccessIndicator(DelegateExecution execution){ diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy index 449f4e3222..c30d807bf3 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -53,7 +53,7 @@ import org.onap.so.utils.TargetEntity class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { - private static final Logger logger = LoggerFactory.getLogger( SDNCAdapterRestV1.class); + private static final Logger logger = LoggerFactory.getLogger( SDNCAdapterRestV1.class) ExceptionUtil exceptionUtil = new ExceptionUtil() @@ -88,7 +88,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = getProcessKey(execution) + ': mso:adapters:sdnc:rest:endpoint URN mapping is not defined' logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -109,7 +109,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = getProcessKey(execution) + ': no sdncRequestId in ' + requestType logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -124,7 +124,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = getProcessKey(execution) + ': no bpNotificationUrl in ' + requestType logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -141,7 +141,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -157,7 +157,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { logger.debug(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined") logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined", "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) } else { try { def encodedString = utils.getBasicAuth(basicAuthValue, UrnPropertiesReader.getVariable("mso.msoKey", execution)) @@ -166,7 +166,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { logger.debug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter") logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter", - "BPMN", ErrorCode.UnknownError.getValue(), ex); + "BPMN", ErrorCode.UnknownError.getValue(), ex) } } @@ -176,7 +176,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String timeout = jsonUtil.getJsonValue(request, requestType + ".bpTimeout") // in addition to null/empty, also need to verify that the timer value is a valid duration "P[n]T[n]H|M|S" - String timerRegex = "PT[0-9]+[HMS]"; + String timerRegex = "PT[0-9]+[HMS]" if (timeout == null || timeout.isEmpty() || !timeout.matches(timerRegex)) { logger.debug(getProcessKey(execution) + ': preProcessRequest(): null/empty/invalid bpTimeout value. Using "mso.adapters.sdnc.timeout"') timeout = UrnPropertiesReader.getVariable("mso.adapters.sdnc.timeout", execution) @@ -197,7 +197,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = 'Caught exception in ' + method + ": " + e logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } } @@ -221,7 +221,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String sdncAdapterRequest = execution.getVariable(prefix + 'sdncAdapterRequest') logger.debug("SDNC Rest Request is: " + sdncAdapterRequest) - URL url = new URL(sdncAdapterUrl); + URL url = new URL(sdncAdapterUrl) HttpClient httpClient = new HttpClientFactory().newJsonClient(url, TargetEntity.SDNC_ADAPTER) httpClient.addAdditionalHeader("X-ONAP-RequestID", execution.getVariable("mso-request-id")) @@ -245,7 +245,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = 'Unsupported HTTP method "' + sdncAdapterMethod + '" in ' + method + ": " + e logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -259,7 +259,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = 'Caught exception in ' + method + ": " + e logger.debug(msg, e) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } } @@ -330,7 +330,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { } // Note: the mapping function handles a null or empty responseCode - int mappedResponseCode = Integer.parseInt(exceptionUtil.MapSDNCResponseCodeToErrorCode(responseCode)); + int mappedResponseCode = Integer.parseInt(exceptionUtil.MapSDNCResponseCodeToErrorCode(responseCode)) exceptionUtil.buildWorkflowException(execution, mappedResponseCode, "Received " + responseType + " from SDNCAdapter:" + info) } catch (Exception e) { @@ -370,7 +370,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = 'Caught exception in ' + method + ": " + e logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } } @@ -396,12 +396,12 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor { String msg = 'Caught exception in ' + method + ": " + e logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } } public Logger getLogger() { - return logger; + return logger } } diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy index 62c7bb5adf..ba5145d19b 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory * any non-final response received from SDNC. */ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { - private static final Logger logger = LoggerFactory.getLogger( SDNCAdapterRestV2.class); + private static final Logger logger = LoggerFactory.getLogger( SDNCAdapterRestV2.class) ExceptionUtil exceptionUtil = new ExceptionUtil() @@ -87,7 +87,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { String msg = getProcessKey(execution) + ': mso:adapters:sdnc:rest:endpoint URN mapping is not defined' logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -108,7 +108,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { String msg = getProcessKey(execution) + ': no sdncRequestId in ' + requestType logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -123,7 +123,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { String msg = getProcessKey(execution) + ': no bpNotificationUrl in ' + requestType logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -134,7 +134,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } @@ -153,7 +153,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { logger.debug(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined") logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined", "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) } else { try { def encodedString = utils.getBasicAuth(basicAuthValue, UrnPropertiesReader.getVariable("mso.msoKey", execution)) @@ -162,7 +162,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { logger.debug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter") logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter", - "BPMN", ErrorCode.UnknownError.getValue(), ex); + "BPMN", ErrorCode.UnknownError.getValue(), ex) } } @@ -172,7 +172,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { String timeout = jsonUtil.getJsonValue(request, requestType + ".bpTimeout") // in addition to null/empty, also need to verify that the timer value is a valid duration "P[n]T[n]H|M|S" - String timerRegex = "PT[0-9]+[HMS]"; + String timerRegex = "PT[0-9]+[HMS]" if (timeout == null || timeout.isEmpty() || !timeout.matches(timerRegex)) { logger.debug(getProcessKey(execution) + ': preProcessRequest(): null/empty/invalid bpTimeout value. Using "mso.adapters.sdnc.timeout"') timeout = UrnPropertiesReader.getVariable("mso.adapters.sdnc.timeout", execution) @@ -193,7 +193,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { String msg = 'Caught exception in ' + method + ": " + e logger.debug(msg) logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", - ErrorCode.UnknownError.getValue()); + ErrorCode.UnknownError.getValue()) exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg) } } @@ -297,6 +297,6 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 { } public Logger getLogger() { - return logger; + return logger } } -- cgit 1.2.3-korg From 4c9570a7af8a5241372a22bf22993883e2a1dc75 Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Fri, 9 Aug 2019 18:55:17 +0530 Subject: Remove unwanted semicolon Remove unwanted semicolon. Issue-ID: SO-2212 Signed-off-by: subhash kumar singh Change-Id: Iadffb2affff8597a8eb8258041b37cb8bf701f20 --- .../common/scripts/ExternalAPIUtilFactory.groovy | 2 +- .../scripts/ActivateSDNCNetworkResource.groovy | 14 ++++---- .../CompareModelofE2EServiceInstance.groovy | 10 +++--- .../scripts/Create3rdONAPE2EServiceInstance.groovy | 6 ++-- .../scripts/CreateCustomE2EServiceInstance.groovy | 10 +++--- .../scripts/CreateSDNCNetworkResource.groovy | 32 ++++++++--------- .../scripts/CreateVFCNSResource.groovy | 40 +++++++++++----------- .../scripts/DeActivateSDNCNetworkResource.groovy | 10 +++--- .../scripts/Delete3rdONAPE2EServiceInstance.groovy | 4 +-- .../scripts/DeleteCustomE2EServiceInstance.groovy | 10 +++--- 10 files changed, 69 insertions(+), 69 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src') diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy index e7f46464ee..549267eec1 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Nokia. * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy index 30b5cc8567..c78d42e13d 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory * flow for SDNC Network Resource Activate */ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { - private static final Logger logger = LoggerFactory.getLogger( ActivateSDNCNetworkResource.class); + private static final Logger logger = LoggerFactory.getLogger( ActivateSDNCNetworkResource.class) String Prefix = "ACTSDNCRES_" @@ -135,7 +135,7 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { ${msoUtils.xmlEscape(statusDescription)} - """; + """ setProgressUpdateVariables(execution, body) } @@ -148,12 +148,12 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { String customizeResourceParam(String networkInputParametersJson) { List> paramList = new ArrayList() - JSONObject jsonObject = new JSONObject(networkInputParametersJson); + JSONObject jsonObject = new JSONObject(networkInputParametersJson) Iterator iterator = jsonObject.keys() while (iterator.hasNext()) { String key = iterator.next() HashMap hashMap = new HashMap() - hashMap.put("name", key); + hashMap.put("name", key) hashMap.put("value", jsonObject.get(key)) paramList.add(hashMap) } @@ -186,7 +186,7 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion() String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName() String globalCustomerId = resourceInputObj.getGlobalSubscriberId() - String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid(); + String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid() String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid() String modelName = resourceInputObj.getResourceModelInfo().getModelName() @@ -478,4 +478,4 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { } logger.info("exited send sync Resp") } -} \ No newline at end of file +} diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy index 608bf66da9..80781d4e4b 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -19,9 +19,9 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -package org.onap.so.bpmn.infrastructure.scripts; +package org.onap.so.bpmn.infrastructure.scripts -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.* import org.apache.commons.lang3.* import org.camunda.bpm.engine.delegate.BpmnError @@ -55,7 +55,7 @@ import groovy.json.* * @param - WorkflowException */ public class CompareModelofE2EServiceInstance extends AbstractServiceTaskProcessor { - private static final Logger logger = LoggerFactory.getLogger( CompareModelofE2EServiceInstance.class); + private static final Logger logger = LoggerFactory.getLogger( CompareModelofE2EServiceInstance.class) String Prefix="CMPMDSI_" private static final String DebugFlag = "isDebugEnabled" @@ -128,7 +128,7 @@ public class CompareModelofE2EServiceInstance extends AbstractServiceTaskProcess execution.setVariable("operationType", "CompareModel") } catch (BpmnError e) { - throw e; + throw e } catch (Exception ex){ msg = "Exception in preProcessRequest " + ex.getMessage() logger.info(msg) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy index 8bb48a203b..ced1b928fc 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -72,7 +72,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso JsonUtils jsonUtil = new JsonUtils() - private static final Logger logger = LoggerFactory.getLogger( Create3rdONAPE2EServiceInstance.class); + private static final Logger logger = LoggerFactory.getLogger( Create3rdONAPE2EServiceInstance.class) public void checkSPPartnerInfo (DelegateExecution execution) { logger.info(" ***** Started checkSPPartnerInfo *****") @@ -312,7 +312,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso // Put TP Link info into serviceParameters JSONObject inputParameters = new JSONObject(execution.getVariable(Prefix + "ServiceParameters")) if(inputParameters.has("remote-access-provider-id")) { - Map crossTPs = new HashMap(); + Map crossTPs = new HashMap() crossTPs.put("local-access-provider-id", inputParameters.get("remote-access-provider-id")) crossTPs.put("local-access-client-id", inputParameters.get("remote-access-client-id")) crossTPs.put("local-access-topology-id", inputParameters.get("remote-access-topology-id")) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy index 2abee7caaa..cae629fdf0 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy @@ -7,7 +7,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -39,7 +39,7 @@ import org.onap.so.client.aai.AAIObjectType import org.onap.so.client.aai.AAIResourcesClient import org.onap.so.client.aai.entities.uri.AAIResourceUri import org.onap.so.client.aai.entities.uri.AAIUriFactory -import org.onap.so.logger.ErrorCode; +import org.onap.so.logger.ErrorCode import org.onap.so.logger.LoggingAnchor import org.onap.so.logger.MessageEnum import org.slf4j.Logger @@ -56,7 +56,7 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor String Prefix="CRESI_" ExceptionUtil exceptionUtil = new ExceptionUtil() JsonUtils jsonUtil = new JsonUtils() - private static final Logger logger = LoggerFactory.getLogger( CreateCustomE2EServiceInstance.class); + private static final Logger logger = LoggerFactory.getLogger( CreateCustomE2EServiceInstance.class) public void preProcessRequest (DelegateExecution execution) { @@ -154,7 +154,7 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor //execution.setVariable("serviceInputParams", jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams")) //execution.setVariable("failExists", true) } catch (BpmnError e) { - throw e; + throw e } catch (Exception ex){ msg = "Exception in preProcessRequest " + ex.getMessage() logger.debug(msg) @@ -332,7 +332,7 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor }catch(Exception e){ logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occured Processing prepareInitServiceOperationStatus.", "BPMN", - ErrorCode.UnknownError.getValue(), "Exception is:\n" + e); + ErrorCode.UnknownError.getValue(), "Exception is:\n" + e) execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage()) } logger.trace("finished prepareInitServiceOperationStatus") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy index bcd33530b1..4b3c1aa7b4 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory */ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { - private static final Logger logger = LoggerFactory.getLogger( CreateSDNCNetworkResource.class); + private static final Logger logger = LoggerFactory.getLogger( CreateSDNCNetworkResource.class) String Prefix="CRESDNCRES_" ExceptionUtil exceptionUtil = new ExceptionUtil() @@ -120,20 +120,20 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { } String customizeResourceParam(String networkInputParametersJson) { - List> paramList = new ArrayList(); - JSONObject jsonObject = new JSONObject(networkInputParametersJson); - Iterator iterator = jsonObject.keys(); + List> paramList = new ArrayList() + JSONObject jsonObject = new JSONObject(networkInputParametersJson) + Iterator iterator = jsonObject.keys() while (iterator.hasNext()) { - String key = iterator.next(); - HashMap hashMap = new HashMap(); - hashMap.put("name", key); + String key = iterator.next() + HashMap hashMap = new HashMap() + hashMap.put("name", key) hashMap.put("value", jsonObject.get(key)) paramList.add(hashMap) } - Map>> paramMap = new HashMap(); - paramMap.put("param", paramList); + Map>> paramMap = new HashMap() + paramMap.put("param", paramList) - return new JSONObject(paramMap).toString(); + return new JSONObject(paramMap).toString() } private List getMetaDatum(String customerId, @@ -347,7 +347,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion() String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName() String globalCustomerId = resourceInputObj.getGlobalSubscriberId() - String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid(); + String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid() String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid() String modelName = resourceInputObj.getResourceModelInfo().getModelName() @@ -357,7 +357,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { //here convert json string to xml string String netowrkInputParameters = XML.toString(new JSONObject(customizeResourceParam(networkInputParametersJson))) // 1. prepare assign topology via SDNC Adapter SUBFLOW call - String sdncTopologyCreateRequest = ""; + String sdncTopologyCreateRequest = "" String modelType = resourceInputObj.getResourceModelInfo().getModelType() @@ -641,7 +641,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { ${msoUtils.xmlEscape(statusDescription)} - """; + """ setProgressUpdateVariables(execution, body) @@ -674,7 +674,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { ${msoUtils.xmlEscape(statusDescription)} - """; + """ setProgressUpdateVariables(execution, body) } @@ -724,7 +724,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { try { String operationStatus = "finished" // RESTResponse for main flow - String vnfid=execution.getVariable("resourceInstanceId"); + String vnfid=execution.getVariable("resourceInstanceId") String resourceOperationResp = """{"operationStatus":"${operationStatus}","vnf-id":"${vnfid}"}""".trim() logger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp) sendWorkflowResponse(execution, 202, resourceOperationResp) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy index 433a8d0bb9..901964f465 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -25,7 +25,7 @@ package org.onap.so.bpmn.infrastructure.scripts import org.onap.so.client.HttpClientFactory import org.onap.so.client.aai.AAIObjectType import org.onap.so.client.aai.entities.uri.AAIResourceUri -import org.onap.so.client.aai.entities.uri.AAIUriFactory; +import org.onap.so.client.aai.entities.uri.AAIUriFactory import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.delegate.DelegateExecution import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor @@ -44,7 +44,7 @@ import org.onap.so.utils.TargetEntity * flow for VFC Network Service Create */ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { - private static final Logger logger = LoggerFactory.getLogger( CreateVFCNSResource.class); + private static final Logger logger = LoggerFactory.getLogger( CreateVFCNSResource.class) ExceptionUtil exceptionUtil = new ExceptionUtil() @@ -77,7 +77,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { String globalSubscriberId = jsonUtil.getJsonValue(resourceInput, "globalSubscriberId") logger.info("globalSubscriberId:" + globalSubscriberId) //set local globalSubscriberId variable - execution.setVariable("globalSubscriberId", globalSubscriberId); + execution.setVariable("globalSubscriberId", globalSubscriberId) String serviceType = execution.getVariable("serviceType") logger.info("serviceType:" + serviceType) @@ -110,9 +110,9 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { "operationId":"${operationId}", "nodeTemplateUUID":"${nodeTemplateUUID}" }""" - execution.setVariable("nsOperationKey", nsOperationKey); + execution.setVariable("nsOperationKey", nsOperationKey) execution.setVariable("nsParameters", nsParameters) - execution.setVariable("nsServiceModelUUID", nsServiceModelUUID); + execution.setVariable("nsServiceModelUUID", nsServiceModelUUID) String vfcAdapterUrl = UrnPropertiesReader.getVariable("mso.adapters.vfc.rest.endpoint", execution) @@ -128,7 +128,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { execution.setVariable("vfcAdapterUrl", vfcAdapterUrl) } catch (BpmnError e) { - throw e; + throw e } catch (Exception ex){ msg = "Exception in preProcessRequest " + ex.getMessage() logger.info(msg) @@ -143,9 +143,9 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { public void createNetworkService(DelegateExecution execution) { logger.trace("createNetworkService ") String vfcAdapterUrl = execution.getVariable("vfcAdapterUrl") - String nsOperationKey = execution.getVariable("nsOperationKey"); - String nsServiceModelUUID = execution.getVariable("nsServiceModelUUID"); - String nsParameters = execution.getVariable("nsParameters"); + String nsOperationKey = execution.getVariable("nsOperationKey") + String nsServiceModelUUID = execution.getVariable("nsServiceModelUUID") + String nsParameters = execution.getVariable("nsParameters") String nsServiceName = execution.getVariable("nsServiceName") String nsServiceDescription = execution.getVariable("nsServiceDescription") String locationConstraints = jsonUtil.getJsonValue(nsParameters, "locationConstraints") @@ -163,7 +163,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { Response apiResponse = postRequest(execution, vfcAdapterUrl + "/ns", reqBody) String returnCode = apiResponse.getStatus () String aaiResponseAsString = apiResponse.readEntity(String.class) - String nsInstanceId = ""; + String nsInstanceId = "" if(returnCode== "200" || returnCode == "201"){ nsInstanceId = jsonUtil.getJsonValue(aaiResponseAsString, "nsInstanceId") } @@ -177,8 +177,8 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { public void instantiateNetworkService(DelegateExecution execution) { logger.trace("instantiateNetworkService ") String vfcAdapterUrl = execution.getVariable("vfcAdapterUrl") - String nsOperationKey = execution.getVariable("nsOperationKey"); - String nsParameters = execution.getVariable("nsParameters"); + String nsOperationKey = execution.getVariable("nsOperationKey") + String nsParameters = execution.getVariable("nsParameters") String nsServiceName = execution.getVariable("nsServiceName") String nsServiceDescription = execution.getVariable("nsServiceDescription") String reqBody ="""{ @@ -192,7 +192,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { Response apiResponse = postRequest(execution, url, reqBody) String returnCode = apiResponse.getStatus() String aaiResponseAsString = apiResponse.readEntity(String.class) - String jobId = ""; + String jobId = "" if(returnCode== "200"|| returnCode == "201"){ jobId = jsonUtil.getJsonValue(aaiResponseAsString, "jobId") } @@ -207,7 +207,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { logger.trace("queryNSProgress ") String vfcAdapterUrl = execution.getVariable("vfcAdapterUrl") String jobId = execution.getVariable("jobId") - String nsOperationKey = execution.getVariable("nsOperationKey"); + String nsOperationKey = execution.getVariable("nsOperationKey") String url = vfcAdapterUrl + "/jobs/" + jobId Response apiResponse = postRequest(execution, url, nsOperationKey) String returnCode = apiResponse.getStatus() @@ -225,9 +225,9 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { */ public void timeDelay(DelegateExecution execution) { try { - Thread.sleep(5000); + Thread.sleep(5000) } catch(InterruptedException e) { - logger.error("Time Delay exception" + e.getMessage()); + logger.error("Time Delay exception" + e.getMessage()) } } @@ -252,7 +252,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { getAAIClient().connect(nsUri,relatedServiceUri) logger.info("NS relationship to Service added successfully") }catch(Exception e){ - logger.error("Exception occured while Creating NS relationship."+ e.getMessage()); + logger.error("Exception occured while Creating NS relationship."+ e.getMessage()) throw new BpmnError("MSOWorkflowException") } } @@ -268,7 +268,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { Response apiResponse = null try{ - URL url = new URL(urlString); + URL url = new URL(urlString) // Get the Basic Auth credentials for the VFCAdapter, username is 'bpel', auth is '07a7159d3bf51a0e53be7a8f89699be7' // user 'bepl' authHeader is the same with mso.db.auth @@ -282,7 +282,7 @@ public class CreateVFCNSResource extends AbstractServiceTaskProcessor { logger.debug("response code:"+ apiResponse.getStatus() +"\nresponse body:"+ apiResponse.readEntity(String.class)) }catch(Exception e){ - logger.error("VFC Aatpter Post Call Exception:" + e.getMessage()); + logger.error("VFC Aatpter Post Call Exception:" + e.getMessage()) exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VFC Aatpter Post Call Exception") } diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy index 097a1be291..8e560cc09d 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory * flow for SDNC Network Resource Activate */ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor { - private static final Logger logger = LoggerFactory.getLogger( DeActivateSDNCNetworkResource.class); + private static final Logger logger = LoggerFactory.getLogger( DeActivateSDNCNetworkResource.class) String Prefix = "DEACTSDNCRES_" ExceptionUtil exceptionUtil = new ExceptionUtil() @@ -96,7 +96,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor execution.setVariable("mso-request-id", requestId) execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId()) } catch (BpmnError e) { - throw e; + throw e } catch (Exception ex){ msg = "Exception in preProcessRequest " + ex.getMessage() logger.debug(msg) @@ -127,7 +127,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion() String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName() String globalCustomerId = resourceInputObj.getGlobalSubscriberId() - String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid(); + String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid() String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid() String modelName = resourceInputObj.getResourceModelInfo().getModelName() @@ -418,7 +418,7 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor ${msoUtils.xmlEscape(statusDescription)} - """; + """ setProgressUpdateVariables(execution, body) } diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy index 64ae3dfbef..da486bb1c3 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy @@ -6,7 +6,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -60,7 +60,7 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso JsonUtils jsonUtil = new JsonUtils() - private static final Logger logger = LoggerFactory.getLogger( Delete3rdONAPE2EServiceInstance.class); + private static final Logger logger = LoggerFactory.getLogger( Delete3rdONAPE2EServiceInstance.class) public void checkSPPartnerInfoFromAAI (DelegateExecution execution) { logger.info(" ***** Started checkSPPartnerInfo *****") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy index a9b1fdaac3..2a65ae97a2 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy @@ -8,7 +8,7 @@ * ================================================================================ * Modifications Copyright (c) 2019 Samsung * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -22,9 +22,9 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.bpmn.infrastructure.scripts; +package org.onap.so.bpmn.infrastructure.scripts -import static org.apache.commons.lang3.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.* import org.apache.commons.lang3.* import org.camunda.bpm.engine.delegate.BpmnError @@ -38,7 +38,7 @@ import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.bpmn.core.UrnPropertiesReader import org.slf4j.Logger import org.slf4j.LoggerFactory -import org.springframework.web.util.UriUtils; +import org.springframework.web.util.UriUtils import groovy.json.* @@ -52,7 +52,7 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor ExceptionUtil exceptionUtil = new ExceptionUtil() JsonUtils jsonUtil = new JsonUtils() VidUtils vidUtils = new VidUtils() - private static final Logger logger = LoggerFactory.getLogger( DeleteCustomE2EServiceInstance.class); + private static final Logger logger = LoggerFactory.getLogger( DeleteCustomE2EServiceInstance.class) public void preProcessRequest (DelegateExecution execution) { execution.setVariable("prefix",Prefix) -- cgit 1.2.3-korg