Class ContentItemId


  • public class ContentItemId
    extends Object
    This class represents the id of a content item.
    • Constructor Detail

      • ContentItemId

        public ContentItemId​(String fullContentItemId)
                      throws ContentDomainException
        Constructs a new content item id from a full content item id using the syntax [type]-[id] (i.e. page-24356).
        Parameters:
        fullContentItemId - the full content item id
        Throws:
        ContentDomainException - In case the provided identifier does not conform to the syntax [type]-[id]
      • ContentItemId

        public ContentItemId​(String type,
                             int id)
        Constructs a new content item id from a type and id (i.e. type is 'page' and id is 24356)
        Parameters:
        type - The type to construct the content item id with
        id - The id of the content item to construct
    • Method Detail

      • getWrapperClass

        public Class<?> getWrapperClass()
        Returns the wrapper class needed to create a wrapper for this content item using Session.getWrapper(int, Class).
        Returns:
        the wrapper class needed to create a wrapper
        Since:
        10.34.0
      • getType

        public String getType()
        Returns a String representing the type of the content item associated with this id. The type is either 'page', 'pagesection' or the content type of the media item (as returned by MediaItem.getContentType().
        Returns:
        the type of the content item associated with this id.
        Since:
        10.34.0
      • getId

        public int getId()
        Returns the id of the content item associated with this id, as returned by Page.getId() or MediaItem.getId().
        Returns:
        the id of the content item associated with this id
        Since:
        10.34.0