From b6b7bef8bdcad15af01ac88a038dd763ce59f68f Mon Sep 17 00:00:00 2001 From: xg353y Date: Tue, 11 Apr 2017 13:30:42 +0200 Subject: [MSO-8] Update the maven dependency Update the maven depenency for sdc-distribution-client to cooperate with the sdc changes. Change-Id: I2da936e5c40cb68c7181bb78307192dd5655b5dc Signed-off-by: xg353y --- .../apihandler/camundabeans/CamundaVIDRequest.java | 10 ++++---- .../mso/apihandler/common/CamundaClient.java | 28 +++++----------------- .../mso/apihandler/common/CommonConstants.java | 12 +++++----- .../mso/apihandler/common/ValidationException.java | 11 +++++---- 4 files changed, 24 insertions(+), 37 deletions(-) (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java') diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java index 5cf859d537..00e52ab7e4 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java @@ -52,7 +52,7 @@ public class CamundaVIDRequest { private CamundaInput requestId; @JsonProperty(CommonConstants.REQUEST_ID_HEADER) - private CamundaInput attMsoRequestId; + private CamundaInput msoRequestId; @JsonProperty(CommonConstants.IS_BASE_VF_MODULE_VARIABLE) @@ -122,13 +122,13 @@ public class CamundaVIDRequest { } @JsonProperty(CommonConstants.REQUEST_ID_HEADER) - public CamundaInput getAttMsoRequestId() { - return attMsoRequestId; + public CamundaInput getMsoRequestId() { + return msoRequestId; } @JsonProperty(CommonConstants.REQUEST_ID_HEADER) - public void setAttMsoRequestId(CamundaInput attMsoRequestId) { - this.attMsoRequestId = attMsoRequestId; + public void setMsoRequestId(CamundaInput msoRequestIdp) { + this.msoRequestId = msoRequestIdp; } @JsonProperty(CommonConstants.IS_BASE_VF_MODULE_VARIABLE) diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java index dd83d24c9e..d893a12b24 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java @@ -7,9 +7,9 @@ * 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 - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,7 +38,7 @@ public class CamundaClient extends RequestClient{ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH); public CamundaClient() { - super(CommonConstants.CAMUNDA); + super(CommonConstants.CAMUNDA); } @@ -141,8 +141,8 @@ public class CamundaClient extends RequestClient{ if(schemaVersion == null){ schemaVersion = ""; } - - + + try{ CamundaRequest camundaRequest = new CamundaRequest(); CamundaInput camundaInput = new CamundaInput(); @@ -221,7 +221,6 @@ public class CamundaClient extends RequestClient{ try{ CamundaVIDRequest camundaRequest = new CamundaVIDRequest(); - BpmnRequest bpmnRequest = new BpmnRequest(); CamundaInput serviceInput = new CamundaInput(); CamundaInput host = new CamundaInput(); CamundaInput requestIdInput= new CamundaInput(); @@ -253,26 +252,11 @@ public class CamundaClient extends RequestClient{ vfModuleTypeInput.setValue(vfModuleType); networkTypeInput.setValue(networkType); - bpmnRequest.setRequestId(requestIdInput); - bpmnRequest.setIsBaseVfModule(isBaseVfModuleInput); - bpmnRequest.setRecipeTimeout(recipeTimeoutInput); - bpmnRequest.setRequestAction(requestActionInput); - bpmnRequest.setServiceInstanceId(serviceInstanceIdInput); - bpmnRequest.setVnfId(vnfIdInput); - bpmnRequest.setVfModuleId(vfModuleIdInput); - bpmnRequest.setVolumeGroupId(volumeGroupIdInput); - bpmnRequest.setNetworkId(networkIdInput); - bpmnRequest.setServiceType(serviceTypeInput); - bpmnRequest.setVnfType(vnfTypeInput); - bpmnRequest.setVfModuleType(vfModuleTypeInput); - bpmnRequest.setNetworkType(networkTypeInput); - //bpmnRequest.setRequestDetails(requestDetailsInput); - serviceInput.setValue(requestDetails); camundaRequest.setServiceInput(serviceInput); camundaRequest.setHost(host); camundaRequest.setRequestId(requestIdInput); - camundaRequest.setAttMsoRequestId(requestIdInput); + camundaRequest.setMsoRequestId(requestIdInput); camundaRequest.setIsBaseVfModule(isBaseVfModuleInput); camundaRequest.setRecipeTimeout(recipeTimeoutInput); camundaRequest.setRequestAction(requestActionInput); diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java index 3a9ad60ac2..187e0ed0a6 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java @@ -26,11 +26,11 @@ public final class CommonConstants { public static final String DEFAULT_BPEL_AUTH = "admin:admin"; public static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f"; - public static final String REQUEST_ID_HEADER = "att-mso-request-id"; - public static final String REQUEST_TIMEOUT_HEADER = "att-mso-service-request-timeout"; - public static final String SCHEMA_VERSION_HEADER = "att-mso-schema-version"; - public static final String SERVICE_INSTANCE_ID_HEADER = "att-mso-service-instance-id"; - public static final String ACTION_HEADER = "att-mso-action"; + public static final String REQUEST_ID_HEADER = "mso-request-id"; + public static final String REQUEST_TIMEOUT_HEADER = "mso-service-request-timeout"; + public static final String SCHEMA_VERSION_HEADER = "mso-schema-version"; + public static final String SERVICE_INSTANCE_ID_HEADER = "mso-service-instance-id"; + public static final String ACTION_HEADER = "mso-action"; public static final String CAMUNDA_SERVICE_INPUT = "bpmnRequest"; public static final String CAMUNDA_ROOT_INPUT = "variables"; @@ -45,7 +45,7 @@ public final class CommonConstants { public static final int BPEL = 0; public static final int CAMUNDA = 1; public static final String CAMUNDA_HOST = "host"; - public static final String SDNC_UUID_HEADER = "att-mso-sdnc-request-id"; + public static final String SDNC_UUID_HEADER = "mso-sdnc-request-id"; public static final String REQUEST_ID_VARIABLE = "requestId"; public static final String IS_BASE_VF_MODULE_VARIABLE = "isBaseVfModule"; diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ValidationException.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ValidationException.java index 0136a2d3b7..eb7a01210f 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ValidationException.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ValidationException.java @@ -7,9 +7,9 @@ * 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 - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,12 +26,13 @@ public class ValidationException extends Exception { /** * This class simply extends Exception (without addition additional functionality) * to provide an identifier for RequestsDB related exceptions on create, delete, query. - * + * * **/ private static final long serialVersionUID = 1L; private static final String validationFailMessage = "No valid $ELEMENT is specified"; + private static final String invalidElementMessage = "$ELEMENT is not valid in the $VERSION version"; public ValidationException (String msg) { super (validationFailMessage.replaceAll ("\\$ELEMENT", msg)); @@ -40,5 +41,7 @@ public class ValidationException extends Exception { public ValidationException (String msg, Exception cause) { super (validationFailMessage.replaceAll ("\\$ELEMENT", msg), cause); } - + public ValidationException(String msg, String version) { + super(invalidElementMessage.replaceAll("\\$ELEMENT", msg).replaceAll("\\$VERSION", version)); + } } -- cgit 1.2.3-korg