getCode()
:
String
The status code is the unique identifier for the message and can be used by client programs to check for a specific status and to generate a localized message.
getDetails()
:
Map
Returns the optional details for this StatusItem.
getMessage()
:
String
Returns the default human readable message for this Status.
isError()
:
boolean
Returns whether this Status Item represents and error.
setMessage(message
:
String)
:
void
Sets the default human readable message for this Status.
addDetail
Add an additional detail to this StatusItem.
Parameters:
key
-
the key for the detail.
value
-
the detail value.
getCode
The status code is the unique identifier for the message and can be used by
client programs to check for a specific status and to generate a localized
message.
Returns:
the status code.
getDetails
Returns the optional details for this StatusItem.
Returns:
the optional details for this StatusItem.
getMessage
Returns the default human readable message for this Status.
Note: Custom code and client programs must not use this message to identify
a specific status. The getCode() must be used for that purpose. The actual
message can change from release to release.
Returns:
the default human readable message for this Status.
getParameters
Returns the parameters to construct a custom message.
Returns:
the parameters to construct a custom message.
getStatus
Returns the status.
isError
isError()
:
boolean
Returns whether this Status Item represents and error.
Returns:
true is this item represents an error, false otherwise.
setCode
Method to set the status code.
The status code is the unique identifier for the message and can be used by
client programs to check for a specific status and to generate a localized
message.
Parameters:
code
-
the status code.
setMessage
setMessage(message
:
String)
:
void
Sets the default human readable message for this Status.
Parameters:
message
-
the default human readable message for this Status.
setParameters
setParameters(parameters
:
Object...)
:
void
Sets the parameters for a custom message.
Parameters:
parameters
-
the parameters for a custom message.
setStatus
setStatus(status
:
Number)
:
void
Set the status.