diff options
Diffstat (limited to 'dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/errormng/RequestError.java')
-rw-r--r-- | dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/errormng/RequestError.java | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/errormng/RequestError.java b/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/errormng/RequestError.java new file mode 100644 index 0000000..00fe3f2 --- /dev/null +++ b/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/errormng/RequestError.java @@ -0,0 +1,65 @@ +package org.onap.sdc.dcae.errormng; + +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.List; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RequestError { + private PolicyException policyException; + private ServiceException serviceException; + private OkResponseInfo okResponseInfo; + private List<ServiceException> serviceExceptions; + + public PolicyException getPolicyException() { + return policyException; + } + + public ServiceException getServiceException() { + return serviceException; + } + + public OkResponseInfo getOkResponseInfo() { + return okResponseInfo; + } + + public void setPolicyException(PolicyException policyException) { + this.policyException = policyException; + } + + void setServiceException(ServiceException serviceException) { + this.serviceException = serviceException; + } + + void setOkResponseInfo(OkResponseInfo okResponseInfo) { + this.okResponseInfo = okResponseInfo; + } + + public List<ServiceException> getServiceExceptions() { + return serviceExceptions; + } + + void setServiceExceptions(List<ServiceException> serviceExceptions) { + this.serviceExceptions = serviceExceptions; + } + + String getFormattedMessage() { + return getError().getFormattedErrorMessage(); + } + + String getMessageId() { + return getError().getMessageId(); + } + + String[] getVariables() { + return getError().getVariables(); + } + + String getText() { + return getError().getText(); + } + + AbstractSdncException getError() { + return null != serviceException ? serviceException : null != policyException ? policyException : okResponseInfo; + } +}
\ No newline at end of file |