org.opencms.workplace.list
Class CmsListItem

java.lang.Object
  extended byorg.opencms.workplace.list.CmsListItem

public class CmsListItem
extends java.lang.Object

Generic list item.

Since:
6.0.0
Version:
$Revision: 1.9 $
Author:
Michael Moossen

Constructor Summary
CmsListItem(CmsListMetadata metadata, java.lang.String id)
          Default Constructor.
 
Method Summary
 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 metadata.
 java.lang.Object set(java.lang.String columnId, java.lang.Object value)
          Sets the object to display at the given column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsListItem

public CmsListItem(CmsListMetadata metadata,
                   java.lang.String id)
Default Constructor.

Parameters:
id - the id of the item has to be unique
metadata - the corresponding list definition
Method Detail

get

public java.lang.Object get(java.lang.String columnId)
                     throws CmsIllegalArgumentException
Returns the value of the column for this item.

Parameters:
columnId - the column id
Returns:
the content, may be null
Throws:
CmsIllegalArgumentException - if the given columnId 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 metadata.

Returns:
the metadata

set

public java.lang.Object set(java.lang.String columnId,
                            java.lang.Object value)
                     throws CmsIllegalArgumentException
Sets the object to display at the given column.

Parameters:
columnId - the column id
value - the value to display
Returns:
the previous value, or null if unset
Throws:
CmsIllegalArgumentException - if the given columnId is invalid