summaryrefslogtreecommitdiffstats
path: root/common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main')
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIVersion.java2
-rw-r--r--common/src/main/java/org/onap/so/constants/OrchestrationRequestFormat.java2
-rw-r--r--common/src/main/java/org/onap/so/logger/ErrorCode.java2
-rw-r--r--common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java2
-rw-r--r--common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java11
-rw-r--r--common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java13
-rw-r--r--common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java3
-rw-r--r--common/src/main/java/org/onap/so/utils/Components.java5
-rw-r--r--common/src/main/java/org/onap/so/utils/CryptoUtils.java4
9 files changed, 33 insertions, 11 deletions
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
index 3a59b2b337..4f06b787f7 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
@@ -23,7 +23,7 @@ package org.onap.so.client.aai;
import org.onap.so.client.graphinventory.GraphInventoryVersion;
public enum AAIVersion implements GraphInventoryVersion {
- V13("v13"), V14("v14"), V15("v15"), V16("v16"), V17("v17");
+ V13("v13"), V14("v14"), V15("v15"), V16("v16"), V17("v17"), V18("v18"), V19("v19");
public static final AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1];
private final String value;
diff --git a/common/src/main/java/org/onap/so/constants/OrchestrationRequestFormat.java b/common/src/main/java/org/onap/so/constants/OrchestrationRequestFormat.java
index ccfd2f4de6..641bbb28c7 100644
--- a/common/src/main/java/org/onap/so/constants/OrchestrationRequestFormat.java
+++ b/common/src/main/java/org/onap/so/constants/OrchestrationRequestFormat.java
@@ -21,5 +21,5 @@
package org.onap.so.constants;
public enum OrchestrationRequestFormat {
- DETAIL, STATUSDETAIL
+ DETAIL, STATUSDETAIL, SIMPLE
}
diff --git a/common/src/main/java/org/onap/so/logger/ErrorCode.java b/common/src/main/java/org/onap/so/logger/ErrorCode.java
index 7fb9522b7c..a57ed99f2b 100644
--- a/common/src/main/java/org/onap/so/logger/ErrorCode.java
+++ b/common/src/main/java/org/onap/so/logger/ErrorCode.java
@@ -25,7 +25,7 @@ public enum ErrorCode {
AvailabilityError(200),
DataError(300),
SchemaError(400),
- BusinessProcesssError(500),
+ BusinessProcessError(500),
UnknownError(900);
private int value;
diff --git a/common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java b/common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java
index 6a20932666..41c4b4bfae 100644
--- a/common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java
+++ b/common/src/main/java/org/onap/so/logger/ScheduledTasksMDCSetup.java
@@ -50,7 +50,7 @@ public class ScheduledTasksMDCSetup extends MDCSetup {
}
public void errorMDCSetup(ErrorCode errorCode, String errorDescription) {
- MDC.put(ONAPLogConstants.MDCs.ERROR_CODE, errorCode.toString());
+ MDC.put(ONAPLogConstants.MDCs.ERROR_CODE, String.valueOf(errorCode.getValue()));
MDC.put(ONAPLogConstants.MDCs.ERROR_DESC, errorDescription);
}
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
index 121fd4a1a5..33678b336f 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
@@ -33,7 +33,12 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
+import com.fasterxml.jackson.annotation.JsonTypeName;
/**
@@ -63,7 +68,9 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"policyException", "serviceException"})
@XmlRootElement(name = "requestError")
-@JsonRootName(value = "requestError")
+@JsonTypeName("requestError")
+@JsonTypeInfo(include = As.WRAPPER_OBJECT, use = Id.NAME)
+@JsonInclude(Include.NON_NULL)
public class RequestError {
protected PolicyException policyException;
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java
index 61192c3147..250c5df5ce 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestInfo.java
@@ -55,6 +55,8 @@ public class RequestInfo implements Serializable {
protected boolean suppressRollback;
@JsonProperty("requestorId")
protected String requestorId;
+ @JsonProperty("applicationId")
+ protected String applicationId;
/**
* Gets the value of the callbackUrl property.
@@ -201,12 +203,21 @@ public class RequestInfo implements Serializable {
this.requestorId = requestorId;
}
+ public String getApplicationId() {
+ return applicationId;
+ }
+
+ public void setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ }
+
@Override
public String toString() {
return "RequestInfo [billingAccountNumber=" + billingAccountNumber + ", callbackUrl=" + callbackUrl
+ ", correlator=" + correlator + ", orderNumber=" + orderNumber + ", productFamilyId=" + productFamilyId
+ ", orderVersion=" + orderVersion + ", source=" + source + ", instanceName=" + instanceName
- + ", suppressRollback=" + suppressRollback + ", requestorId=" + requestorId + "]";
+ + ", suppressRollback=" + suppressRollback + ", requestorId=" + requestorId + ", applicationId="
+ + applicationId + "]";
}
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
index f2976136e9..cbbc7f61c1 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
@@ -31,6 +31,8 @@ package org.onap.so.serviceinstancebeans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -55,6 +57,7 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "serviceException")
@JsonRootName(value = "serviceException")
+@JsonInclude(Include.NON_EMPTY)
public class ServiceException extends ExceptionType {
diff --git a/common/src/main/java/org/onap/so/utils/Components.java b/common/src/main/java/org/onap/so/utils/Components.java
index d8d703affc..5af8c5aa56 100644
--- a/common/src/main/java/org/onap/so/utils/Components.java
+++ b/common/src/main/java/org/onap/so/utils/Components.java
@@ -6,10 +6,11 @@ import org.onap.logging.filter.base.ONAPComponents;
import org.onap.logging.filter.base.ONAPComponentsList;
public enum Components implements ONAPComponentsList {
- OPENSTACK, UNKNOWN, ASDC_CONTROLLER, APIH;
+ OPENSTACK, UNKNOWN, ASDC_CONTROLLER, APIH, SDNC_ADAPTER;
+
public static Set<Components> getSOInternalComponents() {
- return EnumSet.of(ASDC_CONTROLLER, APIH);
+ return EnumSet.of(ASDC_CONTROLLER, APIH, SDNC_ADAPTER);
}
@Override
diff --git a/common/src/main/java/org/onap/so/utils/CryptoUtils.java b/common/src/main/java/org/onap/so/utils/CryptoUtils.java
index 640660e97c..ff69e3e4b1 100644
--- a/common/src/main/java/org/onap/so/utils/CryptoUtils.java
+++ b/common/src/main/java/org/onap/so/utils/CryptoUtils.java
@@ -91,7 +91,7 @@ public final class CryptoUtils {
return CryptoUtils.encrypt(message, CLOUD_KEY);
} catch (GeneralSecurityException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_GENERAL_EXCEPTION.toString(),
- ErrorCode.BusinessProcesssError.getValue(), "Exception in encryptPassword ", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in encryptPassword ", e);
return null;
}
}
@@ -101,7 +101,7 @@ public final class CryptoUtils {
return CryptoUtils.decrypt(message, CLOUD_KEY);
} catch (GeneralSecurityException e) {
logger.error(LoggingAnchor.THREE, MessageEnum.RA_GENERAL_EXCEPTION.toString(),
- ErrorCode.BusinessProcesssError.getValue(), "Exception in encryptPassword ", e);
+ ErrorCode.BusinessProcessError.getValue(), "Exception in encryptPassword ", e);
return null;
}
}