com.ibm.ecm.json

Class JSONContentClassesResponse

  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
  6. extended bycom.ibm.ecm.json.JSONContentClassesResponse
All implemented interfaces:
JSONArtifact, java.io.Serializable, java.lang.Cloneable, java.util.Map

  1. public class JSONContentClassesResponse
  2. extends JSONResponse
This class structures the JSON used to represent a response returned for a getContentClasses request.

There are two ways to use this class:

  1. In plug-in response filters for getContentClasses. This class is actually the JSONObject passed to the response filter, so it can be immediately cast, as in:
     JSONContentClassesResponse jsonContentClassesResponse = (JSONContentClassesResponse) jsonResponse;
     
  2. In a plug-in provided repository type, to format the response JSON appropriately for the getContentClasses request.
Since:
2.0.4
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
JSONContentClassesResponse()

Method Summary

Modifier and Type Method and Description
  1. void
addContentClassDefinition(java.lang.String id,java.lang.String name,java.lang.String description,boolean allowsInstances)
Add a content class definition to the list of content classes
  1. void
setParentClassDefinition(java.lang.String id,java.lang.String name,java.lang.String description,boolean allowsInstances)
Add a definition of the parent class.
Methods inherited from class com.ibm.ecm.json.JSONResponse
addErrorMessage, addInfoMessage, addWarningMessage, hasErrors
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

JSONContentClassesResponse

  1. public JSONContentClassesResponse( )

Method Detail

addContentClassDefinition

  1. public void addContentClassDefinition( java.lang.String id,
  2. java.lang.String name,
  3. java.lang.String description,
  4. boolean allowsInstances)
Add a content class definition to the list of content classes
Parameters:
id - the symbolic name of the class
name - the display name of the class
description - a description of the class (or null if no description)
allowsInstances - true if the class can have subclasses

setParentClassDefinition

  1. public void setParentClassDefinition( java.lang.String id,
  2. java.lang.String name,
  3. java.lang.String description,
  4. boolean allowsInstances)
Add a definition of the parent class. This would be used primarily in cases where the getContentClasses request was made to obtain a list of the subclasses.
Parameters:
id - the symbolic name of the parent class
name - the display name of the parent class
description - a description of the parent class, or null if no description
allowsInstances - true if the class can have subclasses