java.lang.Object
org.odpi.openmetadata.repositoryservices.rest.properties.OMRSAPIResponse
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AttributeTypeDefListResponse, AttributeTypeDefResponse, AuditLogReportResponse, AuditLogSeveritiesResponse, BooleanResponse, ClassificationResponse, CohortMembershipResponse, ConnectionResponse, EntityDetailResponse, EntitySummaryResponse, InstanceGraphResponse, MetadataCollectionIdResponse, OMRSAPIPagedResponse, RelationshipResponse, TypeDefGalleryResponse, TypeDefListResponse, TypeDefResponse, VoidResponse

public abstract class OMRSAPIResponse extends Object implements Serializable
OMRSAPIResponse provides a common header for OMRS managed rest to the OMRS REST API. It manages information about OMRS exceptions. If no exception has been raised exceptionClassName is null.
See Also:
  • Field Details

    • relatedHTTPCode

      protected int relatedHTTPCode
    • actionDescription

      protected String actionDescription
    • exceptionClassName

      protected String exceptionClassName
    • exceptionCausedBy

      protected String exceptionCausedBy
    • exceptionErrorMessage

      protected String exceptionErrorMessage
    • exceptionErrorMessageId

      protected String exceptionErrorMessageId
    • exceptionErrorMessageParameters

      protected String[] exceptionErrorMessageParameters
    • exceptionSystemAction

      protected String exceptionSystemAction
    • exceptionUserAction

      protected String exceptionUserAction
    • exceptionProperties

      protected Map<String,Object> exceptionProperties
  • Constructor Details

    • OMRSAPIResponse

      public OMRSAPIResponse()
      Default constructor
    • OMRSAPIResponse

      public OMRSAPIResponse(OMRSAPIResponse template)
      Copy/clone constructor
      Parameters:
      template - object to copy
  • Method Details

    • getExceptionClassName

      public String getExceptionClassName()
      Return the name of the Java class name to use to recreate the exception.
      Returns:
      String name of the fully-qualified java class name
    • setExceptionClassName

      public void setExceptionClassName(String exceptionClassName)
      Set up the name of the Java class name to use to recreate the exception.
      Parameters:
      exceptionClassName - - String name of the fully-qualified java class name
    • getExceptionCausedBy

      public String getExceptionCausedBy()
      Return the name of any nested exception that may indicate the root cause of the exception.
      Returns:
      exception class name
    • setExceptionCausedBy

      public void setExceptionCausedBy(String exceptionCausedBy)
      Set up the name of any nested exception that may indicate the root cause of the exception.
      Parameters:
      exceptionCausedBy - exception class name
    • getActionDescription

      public String getActionDescription()
      Return the description of the activity in progress when the exception occurred.
      Returns:
      string description
    • setActionDescription

      public void setActionDescription(String actionDescription)
      Set up the description of the activity in progress when the exception occurred.
      Parameters:
      actionDescription - string description
    • getRelatedHTTPCode

      public int getRelatedHTTPCode()
      Return the HTTP Code to use if forwarding response to HTTP client.
      Returns:
      integer HTTP status code
    • setRelatedHTTPCode

      public void setRelatedHTTPCode(int relatedHTTPCode)
      Set up the HTTP Code to use if forwarding response to HTTP client.
      Parameters:
      relatedHTTPCode - - integer HTTP status code
    • getExceptionErrorMessage

      public String getExceptionErrorMessage()
      Return the error message associated with the exception.
      Returns:
      string error message
    • setExceptionErrorMessage

      public void setExceptionErrorMessage(String exceptionErrorMessage)
      Set up the error message associated with the exception.
      Parameters:
      exceptionErrorMessage - - string error message
    • getExceptionErrorMessageId

      public String getExceptionErrorMessageId()
      Return the formal message identifier for the error message. This is incorporated in the error message. This is provided both for automated processing and to enable the error message to be reformatted in a different language.
      Returns:
      string identifier
    • setExceptionErrorMessageId

      public void setExceptionErrorMessageId(String exceptionErrorMessageId)
      Set up the formal message identifier for the error message. This is incorporated in the error message. This is provided both for automated processing and to enable the error message to be reformatted in a different language.
      Parameters:
      exceptionErrorMessageId - string identifier
    • getExceptionErrorMessageParameters

      public String[] getExceptionErrorMessageParameters()
      Return the parameters that were inserted in the error message. These are provided both for automated processing and to enable the error message to be reformatted in a different language.
      Returns:
      list of strings
    • setExceptionErrorMessageParameters

      public void setExceptionErrorMessageParameters(String[] exceptionErrorMessageParameters)
      Set up the list of parameters inserted in to the error message. These are provided both for automated processing and to enable the error message to be reformatted in a different language.
      Parameters:
      exceptionErrorMessageParameters - list of strings
    • getExceptionSystemAction

      public String getExceptionSystemAction()
      Return the description of the action taken by the system as a result of the exception.
      Returns:
      - string description of the action taken
    • setExceptionSystemAction

      public void setExceptionSystemAction(String exceptionSystemAction)
      Set up the description of the action taken by the system as a result of the exception.
      Parameters:
      exceptionSystemAction - - string description of the action taken
    • getExceptionUserAction

      public String getExceptionUserAction()
      Return the action that a user should take to resolve the problem.
      Returns:
      string instructions
    • setExceptionUserAction

      public void setExceptionUserAction(String exceptionUserAction)
      Set up the action that a user should take to resolve the problem.
      Parameters:
      exceptionUserAction - - string instructions
    • getExceptionProperties

      public Map<String,Object> getExceptionProperties()
      Return the additional properties stored by the exceptions.
      Returns:
      property map
    • setExceptionProperties

      public void setExceptionProperties(Map<String,Object> exceptionProperties)
      Set up the additional properties stored by the exceptions.
      Parameters:
      exceptionProperties - property map
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class Object
      Returns:
      print out of variables in a JSON-style
    • equals

      public boolean equals(Object objectToCompare)
      Compare the values of the supplied object with those stored in the current object.
      Overrides:
      equals in class Object
      Parameters:
      objectToCompare - supplied object
      Returns:
      boolean result of comparison
    • hashCode

      public int hashCode()
      Create a hash code for this element type.
      Overrides:
      hashCode in class Object
      Returns:
      int hash code