diff options
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/BPMNFailureException.java')
-rw-r--r-- | mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/BPMNFailureException.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/BPMNFailureException.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/BPMNFailureException.java index 97d46bd6f1..0d2b9be93a 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/BPMNFailureException.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/BPMNFailureException.java @@ -20,6 +20,8 @@ package org.onap.so.apihandlerinfra.exceptions; +import org.springframework.http.HttpStatus; + public class BPMNFailureException extends ApiException { private static final String bpmnFailMessage = "Request Failed due to BPEL error with HTTP Status = $HTTPSTATUS"; @@ -35,6 +37,12 @@ public class BPMNFailureException extends ApiException { super(bpmnFailMessage.replaceAll("\\$HTTPSTATUS", message), httpResponseCode, messageID); } + public Builder(String message, int httpResponseCode, String messageID, HttpStatus originalHttpResponseCode) { + super(bpmnFailMessage.replaceAll("\\$HTTPSTATUS", message), httpResponseCode, messageID, + originalHttpResponseCode); + } + + public BPMNFailureException build() { return new BPMNFailureException(this); } |