Add ErrorResponse to policy framework exceptions
[policy/models.git] / models-errors / src / main / java / org / onap / policy / models / errors / concepts / ErrorResponseInfo.java
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.policy.models.base;
-
-import javax.ws.rs.core.Response;
+package org.onap.policy.models.errors.concepts;
 
 /**
- * Interface implemented bu Policy framework model exceptions to allow uniform reading of status codes and cascaded
- * messages.
+ * Interface implemented by Policy framework model exceptions to allow uniform reading of error responses.
  *
  * @author Liam Fallon (liam.fallon@est.tech)
  */
-public interface PfModelExceptionInfo {
-
-    /**
-     * Get the status code associated with an exception.
-     * @return the status code
-     */
-    public Response.Status getStatusCode();
-
-    /**
-     * Get the messages for all the cascaded exceptions in an exception.
-     *
-     * @return the cascaded message
-     */
-    public String getCascadedMessage();
-
-    /**
-     * Get the object associated with an exception.
-     *
-     * @return the object associated with an exception
-     */
-    public Object getObject();
+public interface ErrorResponseInfo {
 
     /**
-     * Get the stack trace of the exception as a string.
+     * Get the error response.
      *
-     * @return the stack trace of this message as a string
+     * @return the error response
      */
-    public String getStackTraceAsString();
+    public ErrorResponse getErrorResponse();
 }