com.linkedin.restli.common
Class ErrorResponse

java.lang.Object
  extended by com.linkedin.data.template.RecordTemplate
      extended by com.linkedin.restli.common.ErrorResponse
All Implemented Interfaces:
com.linkedin.data.template.DataTemplate<com.linkedin.data.DataMap>, java.lang.Cloneable

public class ErrorResponse
extends com.linkedin.data.template.RecordTemplate

A generic ErrorResponse


Constructor Summary
ErrorResponse()
          Initialize an empty ErrorResponse.
ErrorResponse(com.linkedin.data.DataMap data)
          Initialize an ErrorResponse based on the given DataMap.
 
Method Summary
 com.linkedin.data.DataMap getErrorDetails()
           
 java.lang.String getExceptionClass()
          Get the exception class of the ErrorResponse.
 java.lang.String getExceptionClass(com.linkedin.data.template.GetMode mode)
          Returns the exception class of the ErrorResponse.
 java.lang.String getMessage()
          Get the message of the ErrorResponse.
 java.lang.String getMessage(com.linkedin.data.template.GetMode mode)
          Returns the message of the ErrorResponse.
 int getServiceErrorCode()
          Get the service error code of the ErrorResponse.
 java.lang.Integer getServiceErrorCode(com.linkedin.data.template.GetMode mode)
          Returns the service error code of the ErrorResponse.
 java.lang.String getStackTrace()
          Get the stack trace of the ErrorResponse.
 java.lang.String getStackTrace(com.linkedin.data.template.GetMode mode)
          Returns the stack trace of the ErrorResponse.
 int getStatus()
          Get the status of the ErrorResponse.
 java.lang.Integer getStatus(com.linkedin.data.template.GetMode mode)
          Returns the status of the ErrorResponse.
 boolean hasErrorDetails()
           
 boolean hasExceptionClass()
           
 boolean hasMessage()
           
 boolean hasServiceErrorCode()
           
 boolean hasStackTrace()
           
 boolean hasStatus()
           
 void removeErrorDetails()
          Remove the error details from this ErrorResponse.
 void removeExceptionClass()
          Remove the exception class from this ErrorResponse.
 void removeMessage()
          Remove the message from this ErrorResponse.
 void removeServiceErrorCode()
          Remove the service error code from this ErrorResponse.
 void removeStackTrace()
          Remove the stack trace from this ErrorResponse.
 void removeStatus()
          Remove the status value from this ErrorResponse.
 void setErrorDetails(com.linkedin.data.DataMap value)
          Set the error details.
 void setExceptionClass(java.lang.String value)
          Set the exception class.
 void setMessage(java.lang.String value)
          Set the message.
 void setServiceErrorCode(int value)
          Set the service error code.
 void setStackTrace(java.lang.String value)
          Set the stack trace.
 void setStatus(int value)
          Set the status.
 
Methods inherited from class com.linkedin.data.template.RecordTemplate
clone, contains, copy, data, equals, hashCode, obtainDirect, obtainWrapped, putDirect, putDirect, putDirect, putWrapped, putWrapped, remove, schema, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorResponse

public ErrorResponse()
Initialize an empty ErrorResponse.


ErrorResponse

public ErrorResponse(com.linkedin.data.DataMap data)
Initialize an ErrorResponse based on the given DataMap.

Parameters:
data - a DataMap
Method Detail

hasStatus

public boolean hasStatus()
Returns:
true if the ErrorResponse has a http status value, and false otherwise

removeStatus

public void removeStatus()
Remove the status value from this ErrorResponse.


getStatus

public java.lang.Integer getStatus(com.linkedin.data.template.GetMode mode)
Returns the status of the ErrorResponse. If the value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
an Integer
See Also:
GetMode

getStatus

public int getStatus()
Get the status of the ErrorResponse. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
an int

setStatus

public void setStatus(int value)
Set the status.

Parameters:
value - status

hasServiceErrorCode

public boolean hasServiceErrorCode()
Returns:
true if the ErrorResponse has a service error code, and false otherwise.

removeServiceErrorCode

public void removeServiceErrorCode()
Remove the service error code from this ErrorResponse.


getServiceErrorCode

public java.lang.Integer getServiceErrorCode(com.linkedin.data.template.GetMode mode)
Returns the service error code of the ErrorResponse. If the value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
an Integer
See Also:
GetMode

getServiceErrorCode

public int getServiceErrorCode()
Get the service error code of the ErrorResponse. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
an int

setServiceErrorCode

public void setServiceErrorCode(int value)
Set the service error code.

Parameters:
value - service error code

hasMessage

public boolean hasMessage()
Returns:
true if the ErrorResponse has a message value, and false otherwise.

removeMessage

public void removeMessage()
Remove the message from this ErrorResponse.


getMessage

public java.lang.String getMessage(com.linkedin.data.template.GetMode mode)
Returns the message of the ErrorResponse. If the value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
a String
See Also:
GetMode

getMessage

public java.lang.String getMessage()
Get the message of the ErrorResponse. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
a String

setMessage

public void setMessage(java.lang.String value)
Set the message.

Parameters:
value - message

hasExceptionClass

public boolean hasExceptionClass()
Returns:
true if the ErrorResponse has an exception class, and false otherwise.

removeExceptionClass

public void removeExceptionClass()
Remove the exception class from this ErrorResponse.


getExceptionClass

public java.lang.String getExceptionClass(com.linkedin.data.template.GetMode mode)
Returns the exception class of the ErrorResponse. If the value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
a String
See Also:
GetMode

getExceptionClass

public java.lang.String getExceptionClass()
Get the exception class of the ErrorResponse. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
a String

setExceptionClass

public void setExceptionClass(java.lang.String value)
Set the exception class.

Parameters:
value - exception class

hasStackTrace

public boolean hasStackTrace()
Returns:
true if the ErrorResponse has a stack trace, and false otherwise.

removeStackTrace

public void removeStackTrace()
Remove the stack trace from this ErrorResponse.


getStackTrace

public java.lang.String getStackTrace(com.linkedin.data.template.GetMode mode)
Returns the stack trace of the ErrorResponse. If the value is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
a String
See Also:
GetMode

getStackTrace

public java.lang.String getStackTrace()
Get the stack trace of the ErrorResponse. If the value is not found, act in accordance with GetMode.STRICT.

Returns:
a String

setStackTrace

public void setStackTrace(java.lang.String value)
Set the stack trace.

Parameters:
value - stack trace

hasErrorDetails

public boolean hasErrorDetails()
Returns:
true if the ErrorResponse has error details, and false otherwise.

removeErrorDetails

public void removeErrorDetails()
Remove the error details from this ErrorResponse.


getErrorDetails

public com.linkedin.data.DataMap getErrorDetails()
Returns:
the error details

setErrorDetails

public void setErrorDetails(com.linkedin.data.DataMap value)
Set the error details.

Parameters:
value - error details