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.13 $
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 meta data.
 java.util.Map 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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 meta data.

Returns:
the meta data

getValues

public java.util.Map 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 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 not set
Throws:
CmsIllegalArgumentException - if the given columnId is invalid

toString

public java.lang.String toString()
See Also:
Object.toString()