Class 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()  
      • 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 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 given columnId is invalid
      • 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 id
        value - the value to display
        Returns:
        the previous value, or null if not set
        Throws:
        org.opencms.main.CmsIllegalArgumentException - if the given columnId is invalid
      • toString

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