com.ibm.ecm.json
Class JSONResultSetRow
- java.lang.Object
- java.util.AbstractMap<K,V>
- java.util.HashMap
- com.ibm.json.java.JSONObject
- com.ibm.ecm.json.JSONResultSetRow
All implemented interfaces:
JSONArtifact, java.io.Serializable, java.lang.Cloneable, java.util.Map
- public class JSONResultSetRow
- 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> |
Field Summary
Modifier and Type | Field and Description |
---|---|
|
PRIV_ADD_LINK
Privilege constant on an item indicating that links can be added to the item
|
|
PRIV_ADD_TO_FOLDER
Privilege constant on folders indicating that the folder can have items added to it
|
|
PRIV_ADDDOC
Privilege constant indicating that documents can be added
|
|
PRIV_ADDITEM
Privilege constant indicating non-document items can be added
|
|
PRIV_ADDNOTES
Privilege constant indicating indicating that notes can be added to an item
|
|
PRIV_CANCELCHECKOUTDOC
Privilege constant indicating that the document checkout can be cancelled.
|
|
PRIV_CHANGE_CLASS
Privilege constant indicating that the content class of the item can be changed.
|
|
PRIV_CHECKINDOC
Privilege constant indicating that the document can be checked in.
|
|
PRIV_CHECKINOUTDOC
Privilege constant indicating that the document supports checkin and checkout.
|
|
PRIV_CHECKOUTDOC
Privilege constant indicating that the document can be checked out.
|
|
PRIV_DECLARE
Privilege constant indicating that the document can be declared in a record.
|
|
PRIV_DELETE
Privilege constant indicating that the document can be deleted.
|
|
PRIV_EDITANNOTATIONS
Privilege constant indicating that annotations can be edited on the document.
|
|
PRIV_EDITDOC
Privilege constant indicating the item's content can be edited
|
|
PRIV_EDITPROPERTIES
Privilege constant indicating properties of the item can be edited
|
|
PRIV_EMAILDOC
Privilege constant indicating the document can be emailed.
|
|
PRIV_EXPORT
Privilege constant indicating the document can be exported (downloaded)
|
|
PRIV_HOLD
Privilege constant indicating that the document can be put on hold.
|
|
PRIV_MAJOR_VERSION
Privilege constant indicating that the document can be major versioned.
|
|
PRIV_MINOR_VERSION
Privilege constant indicating that the document can be minor versioned
|
|
PRIV_MODIFYNOTES
Privilege constant indicating that notes can be modified on the document.
|
|
PRIV_MOVE_TO_FOLDER
Privilege constant indicating that the item can be moved from one folder to another.
|
|
PRIV_PRINTDOC
Privilege constant indicating that the document can be printed
|
|
PRIV_PRINTNOTES
Privilege constant indicating that notes can be printed
|
|
PRIV_REMOVE_FROM_FOLDER
Privilege constant on a folder indicating that items can be removed from it
|
|
PRIV_REMOVE_LINK
Privilege constant on an item indicating that links can be removed from the item
|
|
PRIV_STARTWORKFLOW
Privilege constant indicating that the document can be started on workflow.
|
|
PRIV_VIEWANNOTATIONS
Privilege constant indicating that annotations can be viewed on the document.
|
|
PRIV_VIEWDOC
Privilege constant indicating that the document can be viewed.
|
|
PRIV_VIEWNOTES
Privilege constant indicating notes on the item can be viewed
|
|
TYPE_BINARY
Data type constant for binary data
|
|
TYPE_BOOLEAN
Data type constant for boolean
|
|
TYPE_DOUBLE
Data type constant for floating point
|
|
TYPE_GUID
Data type constant for an GUID
|
|
TYPE_INTEGER
Data type constant for integer
|
|
TYPE_OBJECT
Data type constant for a complex object
|
|
TYPE_STRING
Data type constant for string
|
|
TYPE_TIMESTAMP
Data type constant for date, time, timestamp
|
Constructor Summary
Constructor and Description |
---|
JSONResultSetRow()
Default constructor.
|
JSONResultSetRow(java.lang.String id,java.lang.String name,java.lang.String mimetype,long privileges)
Constructor
|
JSONResultSetRow(java.lang.String template,java.lang.String id,java.lang.String name,java.lang.String mimetype,long privileges)
Constructor
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addAttribute(java.lang.String id,java.lang.Object value,java.lang.String type,java.lang.String format,java.lang.String displayValue)
Adds an attribute to the row.
|
|
getAttributeCount()
Returns the number of attributes on the row.
|
|
getAttributeDisplayValue(java.lang.String id)
Returns the display value of an attribute given the attribute id.
|
|
getAttributeFormat(java.lang.String id)
Returns the format of an attribute given the attribute id.
|
|
getAttributeType(java.lang.String id)
Returns the type of an attribute given the attribute id.
|
|
getAttributeValue(java.lang.String id)
Returns the value of an attribute given the attribute id.
|
|
getId()
Returns the internal identifier for the item represented by this row.
|
|
getId(java.lang.String id)
Sets the internal identifier for the item represented by this row.
|
|
getMimetype()
Returns the MIME content type of the item represented by the row.
|
|
getName()
Returns the name of the item represented by this row.
|
|
getPrivileges()
Returns a bitmapped integer containing the privileges the user has on this item.
|
|
setAttributeDisplayValue(java.lang.String id,java.lang.String displayValue)
Sets the display value of an attribute.
|
|
setAttributeFormat(java.lang.String id,java.lang.String format)
Sets the format of an attribute.
|
|
setAttributeType(java.lang.String id,java.lang.String type)
Sets the type of an attribute.
|
|
setAttributeValue(java.lang.String id,java.lang.Object value)
Sets the value of an attribute.
|
|
setMimetype(java.lang.String mimetype)
Sets the MIME content type of the item represented by this row.
|
|
setName(java.lang.String name)
Sets the name of the item represented by this row.
|
|
setPrivileges(long privileges)
Sets the bitmapped integer containing the privileges the user has on this item.
|
|
toJSONResultSetRow(JSONObject jsonObject)
This is for compatibility with earlier JSON that did not use this class.
|
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 |
Field Detail
PRIV_EDITPROPERTIES
- public static final long PRIV_EDITPROPERTIES
Privilege constant indicating properties of the item can be edited
See Also:
PRIV_EDITDOC
- public static final long PRIV_EDITDOC
Privilege constant indicating the item's content can be edited
See Also:
PRIV_VIEWNOTES
- public static final long PRIV_VIEWNOTES
Privilege constant indicating notes on the item can be viewed
See Also:
PRIV_ADDDOC
- public static final long PRIV_ADDDOC
Privilege constant indicating that documents can be added
See Also:
PRIV_ADDITEM
- public static final long PRIV_ADDITEM
Privilege constant indicating non-document items can be added
See Also:
PRIV_EMAILDOC
- public static final long PRIV_EMAILDOC
Privilege constant indicating the document can be emailed.
See Also:
PRIV_EXPORT
- public static final long PRIV_EXPORT
Privilege constant indicating the document can be exported (downloaded)
See Also:
PRIV_ADD_TO_FOLDER
- public static final long PRIV_ADD_TO_FOLDER
Privilege constant on folders indicating that the folder can have items added to it
See Also:
PRIV_REMOVE_FROM_FOLDER
- public static final long PRIV_REMOVE_FROM_FOLDER
Privilege constant on a folder indicating that items can be removed from it
See Also:
PRIV_ADD_LINK
- public static final long PRIV_ADD_LINK
Privilege constant on an item indicating that links can be added to the item
See Also:
PRIV_REMOVE_LINK
- public static final long PRIV_REMOVE_LINK
Privilege constant on an item indicating that links can be removed from the item
See Also:
PRIV_ADDNOTES
- public static final long PRIV_ADDNOTES
Privilege constant indicating indicating that notes can be added to an item
See Also:
PRIV_PRINTNOTES
- public static final long PRIV_PRINTNOTES
Privilege constant indicating that notes can be printed
See Also:
PRIV_PRINTDOC
- public static final long PRIV_PRINTDOC
Privilege constant indicating that the document can be printed
See Also:
PRIV_CHECKINOUTDOC
- public static final long PRIV_CHECKINOUTDOC
Privilege constant indicating that the document supports checkin and checkout.
See Also:
PRIV_CHECKINDOC
- public static final long PRIV_CHECKINDOC
Privilege constant indicating that the document can be checked in.
See Also:
PRIV_CHECKOUTDOC
- public static final long PRIV_CHECKOUTDOC
Privilege constant indicating that the document can be checked out.
See Also:
PRIV_CANCELCHECKOUTDOC
- public static final long PRIV_CANCELCHECKOUTDOC
Privilege constant indicating that the document checkout can be cancelled.
See Also:
PRIV_VIEWANNOTATIONS
- public static final long PRIV_VIEWANNOTATIONS
Privilege constant indicating that annotations can be viewed on the document.
See Also:
PRIV_EDITANNOTATIONS
- public static final long PRIV_EDITANNOTATIONS
Privilege constant indicating that annotations can be edited on the document.
See Also:
PRIV_VIEWDOC
- public static final long PRIV_VIEWDOC
Privilege constant indicating that the document can be viewed.
See Also:
PRIV_DELETE
- public static final long PRIV_DELETE
Privilege constant indicating that the document can be deleted.
See Also:
PRIV_STARTWORKFLOW
- public static final long PRIV_STARTWORKFLOW
Privilege constant indicating that the document can be started on workflow.
See Also:
PRIV_HOLD
- public static final long PRIV_HOLD
Privilege constant indicating that the document can be put on hold.
See Also:
PRIV_MOVE_TO_FOLDER
- public static final long PRIV_MOVE_TO_FOLDER
Privilege constant indicating that the item can be moved from one folder to another.
See Also:
PRIV_CHANGE_CLASS
- public static final long PRIV_CHANGE_CLASS
Privilege constant indicating that the content class of the item can be changed.
See Also:
PRIV_MAJOR_VERSION
- public static final long PRIV_MAJOR_VERSION
Privilege constant indicating that the document can be major versioned.
See Also:
PRIV_MINOR_VERSION
- public static final long PRIV_MINOR_VERSION
Privilege constant indicating that the document can be minor versioned
See Also:
PRIV_DECLARE
- public static final long PRIV_DECLARE
Privilege constant indicating that the document can be declared in a record.
See Also:
PRIV_MODIFYNOTES
- public static final long PRIV_MODIFYNOTES
Privilege constant indicating that notes can be modified on the document.
See Also:
TYPE_STRING
- public static final java.lang.String TYPE_STRING
Data type constant for string
See Also:
TYPE_BOOLEAN
- public static final java.lang.String TYPE_BOOLEAN
Data type constant for boolean
See Also:
TYPE_TIMESTAMP
- public static final java.lang.String TYPE_TIMESTAMP
Data type constant for date, time, timestamp
See Also:
TYPE_DOUBLE
- public static final java.lang.String TYPE_DOUBLE
Data type constant for floating point
See Also:
TYPE_INTEGER
- public static final java.lang.String TYPE_INTEGER
Data type constant for integer
See Also:
TYPE_OBJECT
- public static final java.lang.String TYPE_OBJECT
Data type constant for a complex object
See Also:
TYPE_BINARY
- public static final java.lang.String TYPE_BINARY
Data type constant for binary data
See Also:
TYPE_GUID
- public static final java.lang.String TYPE_GUID
Data type constant for an GUID
See Also:
Constructor Detail
JSONResultSetRow
- public JSONResultSetRow()
Default constructor. This constructor in public to be available internally and should not normally be used by
plug-ins.
JSONResultSetRow
- public JSONResultSetRow(java.lang.String id,
- java.lang.String name,
- java.lang.String mimetype,
- long privileges)
Constructor
Parameters:
id
- the id of the row. This is an internal identifier used on other requests for the item represented by
this row. name
- the name of the item represented by this row. The name is displayed in tree views and other locations
to name the item. mimetype
- the MIME content type of the item represented by the row. For non-content items, special values are
used for mimetype to indicate the type of the item. privileges
- a bitmapped integer containing the privileges the user has on this item. See the PRIV_ statics for the
definition of the different bits. JSONResultSetRow
- public JSONResultSetRow(java.lang.String template,
- java.lang.String id,
- java.lang.String name,
- java.lang.String mimetype,
- long privileges)
Constructor
Parameters:
template
- the name of the class type for this item. id
- the id of the row. This is an internal identifier used on other requests for the item represented by
this row. name
- the name of the item represented by this row. The name is displayed in tree views and other locations
to name the item. mimetype
- the MIME content type of the item represented by the row. For non-content items, special values are
used for mimetype to indicate the type of the item. privileges
- a bitmapped integer containing the privileges the user has on this item. See the PRIV_ statics for the
definition of the different bits. Method Detail
toJSONResultSetRow
- public static final JSONResultSetRow toJSONResultSetRow( JSONObject jsonObject)
This is for compatibility with earlier JSON that did not use this class. It will either return an instance of the
argument if it is already a JSONResultSetRow or will construct a JSONResultSetColum from the given JSONObject.
Parameters:
jsonObject
- Returns:
getId
- public java.lang.String getId()
Returns the internal identifier for the item represented by this row.
getId
- public void getId(java.lang.String id)
Sets the internal identifier for the item represented by this row.
getName
- public java.lang.String getName( )
Returns the name of the item represented by this row. This is the name that will be displayed on tree views and
other locations to name the item.
setName
- public void setName(java.lang.String name)
Sets the name of the item represented by this row.
getMimetype
- public java.lang.String getMimetype( )
Returns the MIME content type of the item represented by the row. For non-content items, special values are used
for mimetype to indicate the type of the item.
setMimetype
- public void setMimetype(java.lang.String mimetype)
Sets the MIME content type of the item represented by this row.
getPrivileges
- public long getPrivileges()
Returns a bitmapped integer containing the privileges the user has on this item. See the PRIV_ statics for the
definition of the different bits.
setPrivileges
- public void setPrivileges(long privileges)
Sets the bitmapped integer containing the privileges the user has on this item.
addAttribute
- public void addAttribute(java.lang.String id,
- java.lang.Object value,
- java.lang.String type,
- java.lang.String format,
- java.lang.String displayValue)
Adds an attribute to the row. An attribute corresponds to a cell in the details view of the content list.
Parameters:
id
- the identifier of the attribute. This should match the identifier of a result set column to appear in
the content list details view. value
- the value of the attribute. This is usually a String but Integer and Boolean are also used for
appropriate data types. type
- the type of the attribute. Use the TYPE_ static strings defined in this class for the proper syntax of
the type for different data types. These strings are based on XML data type descriptors. format
- the format of the attribute. This is interpreted differently depending on the type. For timestamp
types this is an dojo date formatter. Look at the implementation of ecm.model.ValueFormatter for how
the format is interpreted. If no format is needed specify null. displayValue
- a string describing how the value should be displayed. This overrides any formatting that would
normally occur for the value and it will be displayed using this string. If no overriding display
value is needed specify null. getAttributeCount
- public int getAttributeCount()
Returns the number of attributes on the row.
getAttributeValue
- public java.lang.Object getAttributeValue( java.lang.String id)
Returns the value of an attribute given the attribute id.
Parameters:
id
- the identifier of the attribute. Returns:
an object, typically a String but may be a Boolean or Integer, containing the value, or null if no value
is defined for the attribute or the attribute does not exist.
setAttributeValue
- public void setAttributeValue(java.lang.String id,
- java.lang.Object value)
Sets the value of an attribute. This will add the attribute if it does not exist on the row.
Parameters:
id
- the attribute id value
- an object containing the value of the attribute. This is typically a String but may be Boolean or
Integer for boolean and integer data types. getAttributeType
- public java.lang.String getAttributeType( java.lang.String id)
Returns the type of an attribute given the attribute id.
Parameters:
id
- the identifier of the attribute. Returns:
the type of the attribute, one of the TYPE_ constants, or null if the attribute does not have a defined
type.
setAttributeType
- public void setAttributeType(java.lang.String id,
- java.lang.String type)
Sets the type of an attribute. This will add the attribute if it does not exist on the row.
Parameters:
id
- the attribute id type
- an string, one of the TYPE_ constants, containing the type of the attribute. getAttributeFormat
- public java.lang.String getAttributeFormat( java.lang.String id)
Returns the format of an attribute given the attribute id.
Parameters:
id
- the identifier of the attribute. Returns:
the format of the attribute or null if the attribute uses default formatting.
setAttributeFormat
- public void setAttributeFormat( java.lang.String id,
- java.lang.String format)
Sets the format of an attribute. This will add the attribute if it does not exist on the row.
Parameters:
id
- the attribute id format
- a format string or null for default formatting. getAttributeDisplayValue
- public java.lang.String getAttributeDisplayValue( java.lang.String id)
Returns the display value of an attribute given the attribute id.
Parameters:
id
- the identifier of the attribute. Returns:
the display value of the attribute or null if the attribute does not have a defined display value, in
which case the display value will be determined from formatting the value (which is normally the case).
setAttributeDisplayValue
- public void setAttributeDisplayValue( java.lang.String id,
- java.lang.String displayValue)
Sets the display value of an attribute. This will add the attribute if it does not exist on the row.
Parameters:
id
- the attribute id