com.ibm.ecm.json
Class JSONResultSetColumn
- java.lang.Object
- java.util.AbstractMap<K,V>
- java.util.HashMap
- com.ibm.json.java.JSONObject
- com.ibm.ecm.json.JSONResultSetColumn
All implemented interfaces:
JSONArtifact, java.io.Serializable, java.lang.Cloneable, java.util.Map
- public class JSONResultSetColumn
- 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 |
---|---|
|
STATE_BOOKMARK
State constant indicating the column can have a has-bookmark state indicator.
|
|
STATE_DEADLINE
State constant indicating the column can have a has-deadline state indicator.
|
|
STATE_DECLARED
State constant indicating the column can have an declared state indicator.
|
|
STATE_DEFAULT
State constant indicating the column can have a default indicator.
|
|
STATE_LOCKED
State constant indicating the column can have an is-locked state indicator.
|
|
STATE_MAJORMINOR
State constant indicating the column can have a has-minor-version state indicator.
|
|
STATE_NOTE
State constant indicating the column can have a has-note state indicator.
|
|
STATE_OFFLINE
State constant indicating the column can have an offline state indicator.
|
|
STATE_ONHOLD
State constant indicating the column can have a has-hold state indicator.
|
|
STATE_SUSPENDED
State constant indicating the column can have an is-suspended state indicator.
|
Constructor Summary
Constructor and Description |
---|
JSONResultSetColumn()
Default constructor.
|
JSONResultSetColumn(java.lang.String name,java.lang.String field,boolean sortable,java.lang.String[] states)
Constructor.
|
JSONResultSetColumn(java.lang.String name,java.lang.String width,java.lang.String field,JSONArray fieldsToDisplay,JSONArray extraFieldsToDisplay)
Constructor.
|
JSONResultSetColumn(java.lang.String name,java.lang.String width,java.lang.String field,java.lang.String style,boolean sortable)
Constructor.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
getExtraFieldsToDisplay()
Valid only for magazine view columns of field type equal to "content".
|
|
|
getField()
Returns the field name of the column.
|
getFieldsToDisplay()
Valid only for magazine view columns of field type equal to "content".
|
|
|
getName()
Returns the name of the column.
|
|
getWidth()
Returns the width of the column, or null if the width is not specified.
|
|
isFilterable()
Returns true if the colum is filterable.
|
|
isSortable()
Returns true if the column is sortable.
|
|
setExtraFieldsToDisplay(JSONArray extraFieldsToDisplay)
Valid only for magazine view columns of field type equal to "content".
|
|
setField(java.lang.String field)
Sets the field name of the column.
|
|
setFieldToDisplay(JSONArray fieldsToDisplay)
Valid only for magazine view columns of field type equal to "content".
|
|
setFilterable(boolean filterable)
Sets an indicator to indicate that the column is filterable..
|
|
setName(java.lang.String name)
Sets the display name of the column.
|
|
setSortable(boolean sortable)
Sets an indicator to indicate that the column is sortable.
|
|
setWidth(java.lang.String width)
Sets the width of the column.
|
|
toJSONResultSetColumn(JSONObject jsonObject)
Returns an instance of JSONResultSetColum for a result set column given a JSONObject representing the column.
|
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
STATE_DECLARED
- public static final java.lang.String STATE_DECLARED
State constant indicating the column can have an declared state indicator.
See Also:
STATE_MAJORMINOR
- public static final java.lang.String STATE_MAJORMINOR
State constant indicating the column can have a has-minor-version state indicator.
See Also:
STATE_LOCKED
- public static final java.lang.String STATE_LOCKED
State constant indicating the column can have an is-locked state indicator.
See Also:
STATE_SUSPENDED
- public static final java.lang.String STATE_SUSPENDED
State constant indicating the column can have an is-suspended state indicator.
See Also:
STATE_DEADLINE
- public static final java.lang.String STATE_DEADLINE
State constant indicating the column can have a has-deadline state indicator.
See Also:
STATE_ONHOLD
- public static final java.lang.String STATE_ONHOLD
State constant indicating the column can have a has-hold state indicator.
See Also:
STATE_NOTE
- public static final java.lang.String STATE_NOTE
State constant indicating the column can have a has-note state indicator.
See Also:
STATE_BOOKMARK
- public static final java.lang.String STATE_BOOKMARK
State constant indicating the column can have a has-bookmark state indicator.
See Also:
STATE_OFFLINE
- public static final java.lang.String STATE_OFFLINE
State constant indicating the column can have an offline state indicator.
See Also:
STATE_DEFAULT
- public static final java.lang.String STATE_DEFAULT
State constant indicating the column can have a default indicator.
See Also:
Constructor Detail
JSONResultSetColumn
- public JSONResultSetColumn()
Default constructor. This is public to be available internally and should not normally be used by plug-ins.
JSONResultSetColumn
- public JSONResultSetColumn(java.lang.String name,
- java.lang.String width,
- java.lang.String field,
- java.lang.String style,
- boolean sortable)
Constructor. This constructor is for standard details column containing text.
Parameters:
name
- The name of the column. This is displayed in the header in the content list details view width
- The width of the column. Tis should be specified in pixels with a suffix of "px". field
- The symbolic name of the attribute in result set rows that corresponds to this column. style
- the style of this column. sortable
- a boolean indicating if the column is sortable. JSONResultSetColumn
- public JSONResultSetColumn(java.lang.String name,
- java.lang.String field,
- boolean sortable,
- java.lang.String[] states)
Constructor. This constructor is used for the state flags column in the details view. (The column that displays
locked and other icons for the state of the item.)
Parameters:
name
- the name of the column. Since the state flags column usually has no field name, this is usually an
empty string. field
- the symbolic name of the column. sortable
- a boolean indicating if the column is sortable. states
- a string array containing the true states of the item. Use the STATE_ constants defined in this class
for the supported states. JSONResultSetColumn
- public JSONResultSetColumn(java.lang.String name,
- java.lang.String width,
- java.lang.String field,
- JSONArray fieldsToDisplay,
- JSONArray extraFieldsToDisplay)
Constructor. This constructor is for magazine view columns.
Parameters:
name
- the displayable name of the column. For magazine view this is never shown so is usually an empty
string. width
- the width of the column. If thumbnail column you should use 60px. For content column, this should be
left null. For other custom columns this should be specified in an appropriate size in pixels,
suffices with "px". field
- the field shown by the column. This can be either a specific attribute symbolic name or one of the
following special names:
- thumbnail -- indicates a thumbnail column
- content -- indicates the content column
fieldsToDisplay
- valid only if field is "content". Describes the attributes to display in the content field. This is a
JSONArray of JSONObject objects. Each JSONObject in the array has these fields defines:
- field -- the symbolic name of the attribute
- displayName -- the display name for the attribute.
extraFieldsToDisplay
- valid only if field is "content". Describes additional attributes that will be displayed on a
secondary line in the magazine view This is a JSONArray of JSONObject objects. Each JSONObject in the
array has these fields defines:
- field -- the symbolic name of the attribute
- displayName -- the display name for the attribute.
"field": "ClbCommentCount", "decorator": "MagazineViewDecorator.contentCellDecoratorClbCommentCount"The download count JSONObject would have these fields:
"field": "ClbDownloadCount", "decorator": "MagazineViewDecorator.contentCellDecoratorClbDownloadCount"
Method Detail
toJSONResultSetColumn
- public static final JSONResultSetColumn toJSONResultSetColumn( JSONObject jsonObject)
Returns an instance of JSONResultSetColum for a result set column given a JSONObject representing the column.
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 JSONResultSetColumn or will construct a JSONResultSetColum from the given JSONObject.
Parameters:
jsonObject
- an instance Returns:
getName
- public java.lang.String getName( )
Returns the name of the column. This is the name displayed in the column header of the content list details view.
setName
- public void setName(java.lang.String name)
Sets the display name of the column.
Parameters:
name
- the display name for the column. getField
- public java.lang.String getField( )
Returns the field name of the column. This is the symbolic name for attributes (properties) or a special value
indicating a special type of column.
setField
- public void setField(java.lang.String field)
Sets the field name of the column. This is the symbolic name of the attribute (property) or a special value
indicating a special type of column.
Parameters:
field
- getWidth
- public java.lang.String getWidth( )
Returns the width of the column, or null if the width is not specified. This will be an integer with "px"
suffixed for widths defined by IBM Content Navigator.
Returns:
setWidth
- public void setWidth(java.lang.String width)
Sets the width of the column. This should be an integer suffixed with "px".
Parameters:
width
- isSortable
- public boolean isSortable()
Returns true if the column is sortable.
setSortable
- public void setSortable(boolean sortable)
Sets an indicator to indicate that the column is sortable.
Parameters:
sortable
- a boolean, set to true if the column is sortable. isFilterable
- public boolean isFilterable()
Returns true if the colum is filterable.
setFilterable
- public void setFilterable(boolean filterable)
Sets an indicator to indicate that the column is filterable..
getFieldsToDisplay
- public JSONArray getFieldsToDisplay( )
Valid only for magazine view columns of field type equal to "content". Returns the fields to display
descriptions. See the constructor for magazine view columns for more description.
setFieldToDisplay
- public void setFieldToDisplay(JSONArray fieldsToDisplay)
Valid only for magazine view columns of field type equal to "content". Sets the fields to display descriptions.
See the constructor for magazine view columns for more description.
getExtraFieldsToDisplay
- public JSONArray getExtraFieldsToDisplay( )
Valid only for magazine view columns of field type equal to "content". Returns the extra fields to display
descriptions or null if no extra fields descriptions exist. See the constructor for magazine view columns for
more description.
setExtraFieldsToDisplay
- public void setExtraFieldsToDisplay( JSONArray extraFieldsToDisplay)
Valid only for magazine view columns of field type equal to "content". Sets the extra fields to display
descriptions. See the constructor for magazine view columns for more description.