com.ibm.ecm.json

Class JSONResultSetColumn

  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.JSONResultSetColumn
All implemented interfaces:
JSONArtifact, java.io.Serializable, java.lang.Cloneable, java.util.Map

  1. public class JSONResultSetColumn
  2. extends JSONObject
This class models the JSON for a column of a result set. A column can be both a traditional table column, as seen in the details view, or a field as used in the magazine view.
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>

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
STATE_BOOKMARK
State constant indicating the column can have a has-bookmark state indicator.
  1. static
  2. java.lang.String
STATE_DEADLINE
State constant indicating the column can have a has-deadline state indicator.
  1. static
  2. java.lang.String
STATE_DECLARED
State constant indicating the column can have an declared state indicator.
  1. static
  2. java.lang.String
STATE_DEFAULT
State constant indicating the column can have a default indicator.
  1. static
  2. java.lang.String
STATE_LOCKED
State constant indicating the column can have an is-locked state indicator.
  1. static
  2. java.lang.String
STATE_MAJORMINOR
State constant indicating the column can have a has-minor-version state indicator.
  1. static
  2. java.lang.String
STATE_NOTE
State constant indicating the column can have a has-note state indicator.
  1. static
  2. java.lang.String
STATE_OFFLINE
State constant indicating the column can have an offline state indicator.
  1. static
  2. java.lang.String
STATE_ONHOLD
State constant indicating the column can have a has-hold state indicator.
  1. static
  2. java.lang.String
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
  1. JSONArray
getExtraFieldsToDisplay()
Valid only for magazine view columns of field type equal to "content".
  1. java.lang.String
getField()
Returns the field name of the column.
  1. JSONArray
getFieldsToDisplay()
Valid only for magazine view columns of field type equal to "content".
  1. java.lang.String
getName()
Returns the name of the column.
  1. java.lang.String
getWidth()
Returns the width of the column, or null if the width is not specified.
  1. boolean
isFilterable()
Returns true if the colum is filterable.
  1. boolean
isSortable()
Returns true if the column is sortable.
  1. void
setExtraFieldsToDisplay(JSONArray extraFieldsToDisplay)
Valid only for magazine view columns of field type equal to "content".
  1. void
setField(java.lang.String field)
Sets the field name of the column.
  1. void
setFieldToDisplay(JSONArray fieldsToDisplay)
Valid only for magazine view columns of field type equal to "content".
  1. void
setFilterable(boolean filterable)
Sets an indicator to indicate that the column is filterable..
  1. void
setName(java.lang.String name)
Sets the display name of the column.
  1. void
setSortable(boolean sortable)
Sets an indicator to indicate that the column is sortable.
  1. void
setWidth(java.lang.String width)
Sets the width of the column.
  1. static
  2. JSONResultSetColumn
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

  1. public static final java.lang.String STATE_DECLARED
State constant indicating the column can have an declared state indicator.
See Also:

STATE_MAJORMINOR

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

  1. public static final java.lang.String STATE_LOCKED
State constant indicating the column can have an is-locked state indicator.
See Also:

STATE_SUSPENDED

  1. public static final java.lang.String STATE_SUSPENDED
State constant indicating the column can have an is-suspended state indicator.
See Also:

STATE_DEADLINE

  1. public static final java.lang.String STATE_DEADLINE
State constant indicating the column can have a has-deadline state indicator.
See Also:

STATE_ONHOLD

  1. public static final java.lang.String STATE_ONHOLD
State constant indicating the column can have a has-hold state indicator.
See Also:

STATE_NOTE

  1. public static final java.lang.String STATE_NOTE
State constant indicating the column can have a has-note state indicator.
See Also:

STATE_BOOKMARK

  1. public static final java.lang.String STATE_BOOKMARK
State constant indicating the column can have a has-bookmark state indicator.
See Also:

STATE_OFFLINE

  1. public static final java.lang.String STATE_OFFLINE
State constant indicating the column can have an offline state indicator.
See Also:

STATE_DEFAULT

  1. public static final java.lang.String STATE_DEFAULT
State constant indicating the column can have a default indicator.
See Also:

Constructor Detail

JSONResultSetColumn

  1. public JSONResultSetColumn()
Default constructor. This is public to be available internally and should not normally be used by plug-ins.

JSONResultSetColumn

  1. public JSONResultSetColumn(java.lang.String name,
  2. java.lang.String width,
  3. java.lang.String field,
  4. java.lang.String style,
  5. 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

  1. public JSONResultSetColumn(java.lang.String name,
  2. java.lang.String field,
  3. boolean sortable,
  4. 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

  1. public JSONResultSetColumn(java.lang.String name,
  2. java.lang.String width,
  3. java.lang.String field,
  4. JSONArray fieldsToDisplay,
  5. 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.
in addition, there are two special fields that can be specified for P8 for comment and download count. For comment count, the JSONObject would have these fields:
            "field": "ClbCommentCount",
            "decorator": "MagazineViewDecorator.contentCellDecoratorClbCommentCount"
 
The download count JSONObject would have these fields:
            "field": "ClbDownloadCount",
            "decorator": "MagazineViewDecorator.contentCellDecoratorClbDownloadCount"
 

Method Detail

toJSONResultSetColumn

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

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

  1. public void setName(java.lang.String name)
Sets the display name of the column.
Parameters:
name - the display name for the column.

getField

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

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

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

  1. public void setWidth(java.lang.String width)
Sets the width of the column. This should be an integer suffixed with "px".
Parameters:
width -

isSortable

  1. public boolean isSortable()
Returns true if the column is sortable.

setSortable

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

  1. public boolean isFilterable()
Returns true if the colum is filterable.

setFilterable

  1. public void setFilterable(boolean filterable)
Sets an indicator to indicate that the column is filterable..

getFieldsToDisplay

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

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

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

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