com.ibm.ecm.json
Class JSONResponse
- java.lang.Object
- java.util.AbstractMap<K,V>
- java.util.HashMap
- com.ibm.json.java.JSONObject
- com.ibm.ecm.json.JSONResponse
All implemented interfaces:
JSONArtifact, java.io.Serializable, java.lang.Cloneable, java.util.Map
Direct known subclasses:
JSONClassDefinitionResponse, JSONContentClassesResponse, JSONItemAttributesResponse, JSONPrivilegesResponse, JSONResultSetResponse, JSONViewoneBootstrapResponse
- public class JSONResponse
- extends JSONObject
Since:
2.0.2
See Also:
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary
Constructor and Description |
---|
JSONResponse()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addErrorMessage(JSONMessage message)
Adds an error message JSON to the response JSON.
|
|
addInfoMessage(JSONMessage message)
Adds an information message JSON to the response JSON.
|
|
addWarningMessage(JSONMessage message)
Adds a warning message JSON to the response JSON.
|
|
hasErrors()
Determines if the JSONResponse has errors.
|
Methods inherited from class com.ibm.json.java.JSONObject |
---|
isValidObject, isValidType, parse, parse, parse, put, serialize, serialize, serialize, serialize, serialize, serialize, toString |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail
JSONResponse
- public JSONResponse()
Method Detail
addErrorMessage
- public void addErrorMessage(JSONMessage message)
Adds an error message JSON to the response JSON. Errors generally are returned if the service did not perform any
part of the action.
Parameters:
message
- The JSON for the error message. addWarningMessage
- public void addWarningMessage(JSONMessage message)
Adds a warning message JSON to the response JSON. Warnings generally differ from errors in that the service has
performed some portion of the action but could not complete all of the action as requested.
Parameters:
message
- The JSON for the warning message. addInfoMessage
- public void addInfoMessage(JSONMessage message)
Adds an information message JSON to the response JSON. Information messages are returned for many services when
completing normally. They typically appear in the message bar at the bottom of the screen.
Parameters:
message
- The JSON for the information message. hasErrors
- public boolean hasErrors()
Determines if the JSONResponse has errors.
Returns:
Returns true if the JSONResponse has errors and false if it does not.