public class JSONResultSetColumn extends JSONObject
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
STATE_BOOKMARK
State constant indicating the column can have a has-bookmark state indicator.
|
static java.lang.String |
STATE_DEADLINE
State constant indicating the column can have a has-deadline state indicator.
|
static java.lang.String |
STATE_DECLARED
State constant indicating the column can have a declared state indicator.
|
static java.lang.String |
STATE_DEFAULT
State constant indicating the column can have a default indicator.
|
static java.lang.String |
STATE_FAVORITE
State constant indicating the column can have a favorite state indicator.
|
static java.lang.String |
STATE_LOCKED
State constant indicating the column can have an is-locked state indicator.
|
static java.lang.String |
STATE_MAJORMINOR
State constant indicating the column can have a has-minor-version state indicator.
|
static java.lang.String |
STATE_NOTE
State constant indicating the column can have a has-note state indicator.
|
static java.lang.String |
STATE_OFFLINE
State constant indicating the column can have an offline state indicator.
|
static java.lang.String |
STATE_ONHOLD
State constant indicating the column can have a has-hold state indicator.
|
static java.lang.String |
STATE_SHARE
State constant indicating the column can have a share indicator.
|
static java.lang.String |
STATE_SUSPENDED
State constant indicating the column can have an is-suspended state indicator.
|
| 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 field,
boolean sortable,
java.lang.String[] states,
java.lang.String ariaLabel)
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.
|
JSONResultSetColumn(java.lang.String name,
java.lang.String width,
java.lang.String field,
java.lang.String style,
boolean sortable,
java.lang.String ariaLabel)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
JSONArray |
getExtraFieldsToDisplay()
Valid only for magazine view columns of field type equal to "content".
|
java.lang.String |
getField()
Returns the field name of the column.
|
JSONArray |
getFieldsToDisplay()
Valid only for magazine view columns of field type equal to "content".
|
java.lang.String |
getName()
Returns the name of the column.
|
java.lang.String |
getWidth()
Returns the width of the column, or null if the width is not specified.
|
boolean |
isFilterable()
Returns true if the colum is filterable.
|
boolean |
isSortable()
Returns true if the column is sortable.
|
void |
setExtraFieldsToDisplay(JSONArray extraFieldsToDisplay)
Valid only for magazine view columns of field type equal to "content".
|
void |
setField(java.lang.String field)
Sets the field name of the column.
|
void |
setFieldToDisplay(JSONArray fieldsToDisplay)
Valid only for magazine view columns of field type equal to "content".
|
void |
setFilterable(boolean filterable)
Sets an indicator to indicate that the column is filterable..
|
void |
setName(java.lang.String name)
Sets the display name of the column.
|
void |
setSortable(boolean sortable)
Sets an indicator to indicate that the column is sortable.
|
void |
setWidth(java.lang.String width)
Sets the width of the column.
|
static JSONResultSetColumn |
toJSONResultSetColumn(JSONObject jsonObject)
Returns an instance of JSONResultSetColum for a result set column given a JSONObject representing the column.
|
isValidObject, isValidType, parse, parse, parse, put, serialize, serialize, serialize, serialize, serialize, serialize, toStringclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic static final java.lang.String STATE_DECLARED
public static final java.lang.String STATE_MAJORMINOR
public static final java.lang.String STATE_SHARE
public static final java.lang.String STATE_LOCKED
public static final java.lang.String STATE_SUSPENDED
public static final java.lang.String STATE_DEADLINE
public static final java.lang.String STATE_ONHOLD
public static final java.lang.String STATE_NOTE
public static final java.lang.String STATE_BOOKMARK
public static final java.lang.String STATE_OFFLINE
public static final java.lang.String STATE_FAVORITE
public static final java.lang.String STATE_DEFAULT
public JSONResultSetColumn()
public JSONResultSetColumn(java.lang.String name,
java.lang.String width,
java.lang.String field,
java.lang.String style,
boolean sortable)
name - The name of the column. This is displayed in the header in the content list details viewwidth - 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.public JSONResultSetColumn(java.lang.String name,
java.lang.String width,
java.lang.String field,
java.lang.String style,
boolean sortable,
java.lang.String ariaLabel)
name - The name of the column. This is displayed in the header in the content list details viewwidth - 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.ariaLabel - a string used to label the column in cases where the name is not visible (i.e., an empty string). This
is used to set the aria-label attribute on the column header element.public JSONResultSetColumn(java.lang.String name,
java.lang.String field,
boolean sortable,
java.lang.String[] states)
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.public JSONResultSetColumn(java.lang.String name,
java.lang.String field,
boolean sortable,
java.lang.String[] states,
java.lang.String ariaLabel)
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.ariaLabel - a string used to label the column in cases where the name is not visible (i.e., an empty string). This
is used to set the aria-label attribute on the column header element.public JSONResultSetColumn(java.lang.String name,
java.lang.String width,
java.lang.String field,
JSONArray fieldsToDisplay,
JSONArray extraFieldsToDisplay)
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:
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:
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": "ClbCommentCount",
"decorator": "MagazineViewDecorator.contentCellDecoratorClbCommentCount"
The download count JSONObject would have these fields:
"field": "ClbDownloadCount",
"decorator": "MagazineViewDecorator.contentCellDecoratorClbDownloadCount"
public static final JSONResultSetColumn toJSONResultSetColumn(JSONObject jsonObject)
jsonObject - an instancepublic java.lang.String getName()
public void setName(java.lang.String name)
name - the display name for the column.public java.lang.String getField()
public void setField(java.lang.String field)
field - public java.lang.String getWidth()
public void setWidth(java.lang.String width)
width - public boolean isSortable()
public void setSortable(boolean sortable)
sortable - a boolean, set to true if the column is sortable.public boolean isFilterable()
public void setFilterable(boolean filterable)
filterable - a boolean, set to true if the column is filterable.public JSONArray getFieldsToDisplay()
public void setFieldToDisplay(JSONArray fieldsToDisplay)
public JSONArray getExtraFieldsToDisplay()
public void setExtraFieldsToDisplay(JSONArray extraFieldsToDisplay)