dw.system
Class StatusItem
dw.system.StatusItem
A StatusItem holds all the status information. Multi StatusItems are bundled
together into a Status.
Properties
code
:
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.
details
:
Map
(Read Only)
The optional details for this StatusItem.
message
:
String
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.
parameters
:
List
The parameters to construct a custom message.
status
:
Number
The status.
Constructor Summary
StatusItem()
Constructs a new OK StatusItem.
StatusItem(status
:
Number)
Constructs a new StatusItem with the given status.
StatusItem(status
:
Number, code
:
String)
Constructs a new StatusItem with the given status and code.
StatusItem(status
:
Number, code
:
String, message
:
String, parameters
:
Object...)
Constructs a new StatusItem with the given values.
Method Summary
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.
getParameters()
:
List
Returns the parameters to construct a custom message.
isError()
:
boolean
Returns whether this Status Item represents and error.
setMessage(message
:
String)
:
void
Sets the default human readable message for this Status.
setParameters(parameters
:
Object...)
:
void
Sets the parameters for a custom message.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Constructor Detail
StatusItem
public StatusItem(status
:
Number)
Constructs a new StatusItem with the given status.
Parameters:
status
-
either Status.OK or Status.ERROR.
StatusItem
Constructs a new StatusItem with the given status and code.
Parameters:
status
-
either Status.OK or Status.ERROR.
code
-
a string representing a more detailed status code, e.g. "IMPEX-120".
StatusItem
Constructs a new StatusItem with the given values.
Parameters:
status
-
Status.OK or Status.ERROR.
code
-
a string representing a more detailed status code, e.g. "IMPEX-120".
message
-
a default human readable message
parameters
-
a list of parameters to construct a custom message
Method Detail
addDetail
Add an additional detail to this StatusItem.
Parameters:
key
-
the key for the detail.
value
-
the detail value.
getCode
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.
Returns:
the status code.
getDetails
getDetails()
:
Map
Returns the optional details for this StatusItem.
Returns:
the optional details for this StatusItem.
getMessage
getMessage()
:
String
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
getParameters()
:
List
Returns the parameters to construct a custom message.
Returns:
the parameters to construct a custom message.
isError
isError()
:
boolean
Returns whether this Status Item represents and error.
Returns:
true is this item represents an error, false otherwise.
setCode
setCode(code
:
String)
:
void
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.
Parameters:
status
-
either Status.OK or Status.ERROR.
© Copyright 2000-2024, salesforce.com inc. All rights reserved. Various trademarks held by their respective owners.