public class CmsListMetadata
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
CmsListMetadata.I_CsvItemFormatter
Interface used for formatting list data in text form.
|
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
SEARCH_BAR_INPUT_ID
the html id for the input element of the search bar.
|
构造器和说明 |
---|
CmsListMetadata(java.lang.String listId)
Default Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
void |
addColumn(CmsListColumnDefinition listColumn)
Adds a new column definition at the end.
|
void |
addColumn(CmsListColumnDefinition listColumn,
int position)
Adds a new column definition at the given position.
|
void |
addIndependentAction(I_CmsListAction action)
Adds a list item independent action.
|
void |
addItemDetails(CmsListItemDetails itemDetail)
Adds a new item detail definition at the end.
|
void |
addItemDetails(CmsListItemDetails itemDetail,
int position)
Adds a new item detail definition at the given position.
|
void |
addMultiAction(CmsListMultiAction multiAction)
Adds an action applicable to more than one list item at once.
|
java.lang.String |
csvEmptyList()
Generates the csv output for an empty table.
|
java.lang.String |
csvHeader()
Returns the csv output for the header of the list.
|
java.lang.String |
csvItem(CmsListItem item)
Returns the csv output for a list item.
|
CmsListColumnDefinition |
getColumnDefinition(java.lang.String columnId)
Returns a column definition object for a given column id.
|
java.util.List<CmsListColumnDefinition> |
getColumnDefinitions()
Returns all columns definitions.
|
I_CmsListAction |
getIndependentAction(java.lang.String actionId)
Returns an independent action object for a given id.
|
java.util.List<I_CmsListAction> |
getIndependentActions()
Returns the list of independent actions.
|
CmsListItemDetails |
getItemDetailDefinition(java.lang.String itemDetailId)
Returns the item details definition object for a given id.
|
java.util.List<CmsListItemDetails> |
getItemDetailDefinitions()
Returns all detail definitions.
|
java.lang.String |
getListId()
Returns the id of the list.
|
CmsListMultiAction |
getMultiAction(java.lang.String actionId)
Returns a multi action object for a given id.
|
java.util.List<CmsListMultiAction> |
getMultiActions()
Returns the list of multi actions.
|
CmsListSearchAction |
getSearchAction()
Returns the search action.
|
int |
getWidth()
Returns the total number of displayed columns.
|
A_CmsListDialog |
getWp()
Returns the related workplace dialog.
|
boolean |
hasActions()
Returns
true if the list definition contains an action. |
boolean |
hasCheckMultiActions()
Returns
true if at least 'check' multiaction has been set. |
boolean |
hasMultiActions()
Returns
true if the list definition contains a multi action. |
boolean |
hasSingleActions()
Returns
true if any column definition contains a single action. |
java.lang.String |
htmlActionBar()
Returns the html code for the action bar.
|
java.lang.String |
htmlEmptyTable()
Generates the hml code for an empty table.
|
java.lang.String |
htmlHeader(CmsHtmlList list)
Returns the html code for the header of the list.
|
java.lang.String |
htmlItem(CmsListItem item,
boolean odd,
boolean isPrintable)
Returns the html code for a list item.
|
java.lang.String |
htmlMultiActionBar()
Returns the html code for the multi action bar.
|
java.lang.String |
htmlSearchBar()
Generates the html code for the search bar.
|
boolean |
isSearchable()
Returns
true if the list is searchable. |
boolean |
isSelfManaged()
Returns the self Managed flag.
|
boolean |
isSorteable()
Returns
true if any column is sorteable. |
boolean |
isVolatile()
Returns
true if this metadata object should not be cached. |
void |
setCsvItemFormatter(CmsListMetadata.I_CsvItemFormatter formatter)
Sets the CSV item formatter to use.
|
void |
setSearchAction(CmsListSearchAction searchAction)
Sets the search action.
|
void |
setSelfManaged(boolean selfManaged)
Sets the self Managed flag.
|
void |
setVolatile(boolean volatileFlag)
Sets the volatile flag.
|
void |
setWp(A_CmsListDialog wp)
Sets the related workplace dialog.
|
void |
toogleDetailState(java.lang.String itemDetailId)
Toggles the given item detail state from visible to hidden or
from hidden to visible.
|
public static final java.lang.String SEARCH_BAR_INPUT_ID
public CmsListMetadata(java.lang.String listId)
listId
- the id of the listpublic void addColumn(CmsListColumnDefinition listColumn)
By default a column is printable if it is the first column in the list, or if it is sorteable.
If you want to override this behaviour, use the
CmsListColumnDefinition.setPrintable(boolean)
method after calling this one.
listColumn
- the column definitionCmsIdentifiableObjectContainer
public void addColumn(CmsListColumnDefinition listColumn, int position)
By default a column is printable if it is the first column in the list, or if it is sorteable.
If you want to override this behaviour, use the
CmsListColumnDefinition.setPrintable(boolean)
method after calling this one.
listColumn
- the column definitionposition
- the positionCmsIdentifiableObjectContainer
public void addIndependentAction(I_CmsListAction action)
action
- the actionpublic void addItemDetails(CmsListItemDetails itemDetail)
itemDetail
- the item detail definitionCmsIdentifiableObjectContainer
public void addItemDetails(CmsListItemDetails itemDetail, int position)
itemDetail
- the item detail definitionposition
- the positionCmsIdentifiableObjectContainer
public void addMultiAction(CmsListMultiAction multiAction)
It will be executed with a list of
s.CmsListItem
multiAction
- the actionpublic java.lang.String csvEmptyList()
public java.lang.String csvHeader()
public java.lang.String csvItem(CmsListItem item)
item
- the list item to renderpublic CmsListColumnDefinition getColumnDefinition(java.lang.String columnId)
columnId
- the column idnull
if not presentpublic java.util.List<CmsListColumnDefinition> getColumnDefinitions()
CmsListColumnDefinition
s.public I_CmsListAction getIndependentAction(java.lang.String actionId)
actionId
- the idnull
if not presentpublic java.util.List<I_CmsListAction> getIndependentActions()
I_CmsListAction
spublic CmsListItemDetails getItemDetailDefinition(java.lang.String itemDetailId)
itemDetailId
- the idnull
if not presentpublic java.util.List<CmsListItemDetails> getItemDetailDefinitions()
CmsListItemDetails
.public java.lang.String getListId()
public CmsListMultiAction getMultiAction(java.lang.String actionId)
actionId
- the idnull
if not presentpublic java.util.List<CmsListMultiAction> getMultiActions()
CmsListMultiAction
spublic CmsListSearchAction getSearchAction()
public int getWidth()
public A_CmsListDialog getWp()
public boolean hasActions()
true
if the list definition contains an action.true
if the list definition contains an actionpublic boolean hasCheckMultiActions()
true
if at least 'check' multiaction has been set.true
if at least 'check' multiaction has been setpublic boolean hasMultiActions()
true
if the list definition contains a multi action.true
if the list definition contains a multi actionpublic boolean hasSingleActions()
true
if any column definition contains a single action.true
if any column definition contains a single actionpublic java.lang.String htmlActionBar()
public java.lang.String htmlEmptyTable()
public java.lang.String htmlHeader(CmsHtmlList list)
list
- the list to generate the code forpublic java.lang.String htmlItem(CmsListItem item, boolean odd, boolean isPrintable)
item
- the list item to renderodd
- if the position is odd or evenisPrintable
- if the list is to be printedpublic java.lang.String htmlMultiActionBar()
public java.lang.String htmlSearchBar()
public boolean isSearchable()
true
if the list is searchable.true
if the list is searchablepublic boolean isSelfManaged()
public boolean isSorteable()
true
if any column is sorteable.true
if any column is sorteablepublic boolean isVolatile()
true
if this metadata object should not be cached.true
if this metadata object should not be cached.public void setCsvItemFormatter(CmsListMetadata.I_CsvItemFormatter formatter)
formatter
- the CSV item formatterpublic void setSearchAction(CmsListSearchAction searchAction)
searchAction
- the search action to setpublic void setSelfManaged(boolean selfManaged)
selfManaged
- the self Managed flag to setpublic void setVolatile(boolean volatileFlag)
volatileFlag
- the volatile flag to setpublic void setWp(A_CmsListDialog wp)
wp
- the related workplace dialog to setpublic void toogleDetailState(java.lang.String itemDetailId)
itemDetailId
- the item detail id