diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java')
-rw-r--r-- | openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java index d7c5c63506..d6f5848478 100644 --- a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java +++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/errors/ErrorCodeAndMessage.java @@ -17,49 +17,43 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.common.errors; - +import javax.ws.rs.core.Response; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import javax.ws.rs.core.Response; - /** - * This class represents an error object to be returned in failed REST instead of just returning one - * of HTTP fail statuses. + * This class represents an error object to be returned in failed REST instead of just returning one of HTTP fail statuses. */ @Getter @Setter @NoArgsConstructor public class ErrorCodeAndMessage { - /** - * the HTTP status code. - */ - private Response.Status status; - - /** - * Error code no. if available. - */ - private String errorCode; - - /** - * the error message to be displayed. - */ - private String message; - - /** - * Instantiates a new Error code and message. - * - * @param status the status - * @param errorCode the error code - */ - public ErrorCodeAndMessage(Response.Status status, ErrorCode errorCode) { - this.status = status; - this.message = errorCode.message(); - this.errorCode = errorCode.id(); - } + /** + * the HTTP status code. + */ + private Response.Status status; + /** + * Error code no. if available. + */ + private String errorCode; + /** + * the error message to be displayed. + */ + private String message; + + /** + * Instantiates a new Error code and message. + * + * @param status the status + * @param errorCode the error code + */ + public ErrorCodeAndMessage(Response.Status status, ErrorCode errorCode) { + this.status = status; + this.message = errorCode.message(); + this.errorCode = errorCode.id(); + } } |