com.ibm.ecm.json

Class JSONResponse

  1. java.lang.Object
  2. extended byjava.util.AbstractMap<K,V>
  3. extended byjava.util.HashMap
  4. extended bycom.ibm.json.java.JSONObject
  5. extended bycom.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

  1. public class JSONResponse
  2. extends JSONObject
This class structures the json_post request parameter, a typical convention for request parameters in JSON form to IBM Content Navigator.
Since:
2.0.2
See Also:
Serialized Form

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
  1. void
addErrorMessage(JSONMessage message)
Adds an error message JSON to the response JSON.
  1. void
addInfoMessage(JSONMessage message)
Adds an information message JSON to the response JSON.
  1. void
addWarningMessage(JSONMessage message)
Adds a warning message JSON to the response JSON.
  1. boolean
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

  1. public JSONResponse()

Method Detail

addErrorMessage

  1. 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

  1. 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

  1. 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

  1. public boolean hasErrors()
Determines if the JSONResponse has errors.
Returns:
Returns true if the JSONResponse has errors and false if it does not.