Class OMRSAPIResponse
- java.lang.Object
-
- org.odpi.openmetadata.repositoryservices.rest.properties.OMRSAPIResponse
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AttributeTypeDefListResponse,AttributeTypeDefResponse,AuditLogReportResponse,AuditLogSeveritiesResponse,BooleanResponse,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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringactionDescriptionprotected StringexceptionCausedByprotected StringexceptionClassNameprotected StringexceptionErrorMessageprotected StringexceptionErrorMessageIdprotected String[]exceptionErrorMessageParametersprotected Map<String,Object>exceptionPropertiesprotected StringexceptionSystemActionprotected StringexceptionUserActionprotected intrelatedHTTPCode
-
Constructor Summary
Constructors Constructor Description OMRSAPIResponse()Default constructorOMRSAPIResponse(OMRSAPIResponse template)Copy/clone constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object objectToCompare)Compare the values of the supplied object with those stored in the current object.StringgetActionDescription()Return the description of the activity in progress when the exception occurred.StringgetExceptionCausedBy()Return the name of any nested exception that may indicate the root cause of the exception.StringgetExceptionClassName()Return the name of the Java class name to use to recreate the exception.StringgetExceptionErrorMessage()Return the error message associated with the exception.StringgetExceptionErrorMessageId()Return the formal message identifier for the error message.String[]getExceptionErrorMessageParameters()Return the parameters that were inserted in the error message.Map<String,Object>getExceptionProperties()Return the additional properties stored by the exceptions.StringgetExceptionSystemAction()Return the description of the action taken by the system as a result of the exception.StringgetExceptionUserAction()Return the action that a user should take to resolve the problem.intgetRelatedHTTPCode()Return the HTTP Code to use if forwarding response to HTTP client.inthashCode()Create a hash code for this element type.voidsetActionDescription(String actionDescription)Set up the description of the activity in progress when the exception occurred.voidsetExceptionCausedBy(String exceptionCausedBy)Set up the name of any nested exception that may indicate the root cause of the exception.voidsetExceptionClassName(String exceptionClassName)Set up the name of the Java class name to use to recreate the exception.voidsetExceptionErrorMessage(String exceptionErrorMessage)Set up the error message associated with the exception.voidsetExceptionErrorMessageId(String exceptionErrorMessageId)Set up the formal message identifier for the error message.voidsetExceptionErrorMessageParameters(String[] exceptionErrorMessageParameters)Set up the list of parameters inserted in to the error message.voidsetExceptionProperties(Map<String,Object> exceptionProperties)Set up the additional properties stored by the exceptions.voidsetExceptionSystemAction(String exceptionSystemAction)Set up the description of the action taken by the system as a result of the exception.voidsetExceptionUserAction(String exceptionUserAction)Set up the action that a user should take to resolve the problem.voidsetRelatedHTTPCode(int relatedHTTPCode)Set up the HTTP Code to use if forwarding response to HTTP client.StringtoString()Standard toString method.
-
-
-
Field Detail
-
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
-
-
Constructor Detail
-
OMRSAPIResponse
public OMRSAPIResponse()
Default constructor
-
OMRSAPIResponse
public OMRSAPIResponse(OMRSAPIResponse template)
Copy/clone constructor- Parameters:
template- object to copy
-
-
Method Detail
-
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.
-
equals
public boolean equals(Object objectToCompare)
Compare the values of the supplied object with those stored in the current object.
-
-