Package org.opencms.workplace.list
Class CmsListItem
- java.lang.Object
-
- org.opencms.workplace.list.CmsListItem
-
public class CmsListItem extends java.lang.Object
Generic list item.- Since:
- 6.0.0
-
-
Constructor Summary
Constructors Constructor Description CmsListItem(CmsListMetadata metadata, java.lang.String id)
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(java.lang.String columnId)
Returns the value of the column for this item.java.lang.String
getId()
Returns the id of the item.CmsListMetadata
getMetadata()
Returns the meta data.java.util.Map<java.lang.String,java.lang.Object>
getValues()
Returns the value map of the list item.java.lang.Object
set(java.lang.String columnId, java.lang.Object value)
Sets the object to display at the given column.java.lang.String
toString()
-
-
-
Constructor Detail
-
CmsListItem
public CmsListItem(CmsListMetadata metadata, java.lang.String id)
Default Constructor.- Parameters:
id
- the id of the item has to be uniquemetadata
- the corresponding list definition
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.String columnId) throws org.opencms.main.CmsIllegalArgumentException
Returns the value of the column for this item.- Parameters:
columnId
- the column id- Returns:
- the content, may be
null
- Throws:
org.opencms.main.CmsIllegalArgumentException
- if the givencolumnId
is invalid
-
getId
public java.lang.String getId()
Returns the id of the item.- Returns:
- the id
- See Also:
CmsHtmlList.getItem(String)
-
getMetadata
public CmsListMetadata getMetadata()
Returns the meta data.- Returns:
- the meta data
-
getValues
public java.util.Map<java.lang.String,java.lang.Object> getValues()
Returns the value map of the list item.- Returns:
- the value map of the list item
-
set
public java.lang.Object set(java.lang.String columnId, java.lang.Object value) throws org.opencms.main.CmsIllegalArgumentException
Sets the object to display at the given column.- Parameters:
columnId
- the column idvalue
- the value to display- Returns:
- the previous value, or
null
if not set - Throws:
org.opencms.main.CmsIllegalArgumentException
- if the givencolumnId
is invalid
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-