Class CmsDetailPageTable

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class CmsDetailPageTable
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    A data structure for managing the detail page ordering for different types in a given sitemap.

    Since:
    8.0.0
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CmsDetailPageTable.Status
      A type indicating the status of a page.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CmsDetailPageTable()
      Empty default constructor for serialization.
        CmsDetailPageTable​(java.util.List<CmsDetailPageInfo> infos)
      Creates a detail page table from a list of detail page info bean.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(CmsDetailPageInfo info)
      Adds a new detail page information bean to the detail page table.
      boolean canMakeDefault​(CmsUUID id)
      Checks if the entry for the given id can be made the default detail page entry for its type.
      boolean contains​(CmsUUID id)
      Returns true if the detail page table contains a page with a given id.
      CmsDetailPageTable copy()
      Copies the detail page table.
      CmsDetailPageInfo get​(CmsUUID id)
      Returns the detail page info for a given page id.
      java.util.Collection<CmsUUID> getAllIds()
      Returns the page ids of all detail pages.
      java.util.List<CmsDetailPageInfo> getInfosForType​(java.lang.String type)
      Returns the list of detail page info beans for a given type.
      CmsDetailPageTable.Status getStatus​(CmsUUID id)
      Returns the page status for the page with the given id.
      boolean isDefaultDetailPage​(CmsUUID id)
      Returns true if the page with the given id is the default detail page for its type.
      int makeDefault​(CmsUUID id)
      Moves the detail page information for a given page to the front of the detail pages for the same type.
      int remove​(CmsUUID id)
      Removes the detail page with the given id.
      int size()
      The number of configured detail pages.
      java.util.List<CmsDetailPageInfo> toList()
      Returns a flat list containing all detail pages for all types which preserves the order of detail pages from each type list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmsDetailPageTable

        public CmsDetailPageTable​(java.util.List<CmsDetailPageInfo> infos)
        Creates a detail page table from a list of detail page info bean.

        Parameters:
        infos - the detail page info beans
      • CmsDetailPageTable

        protected CmsDetailPageTable()
        Empty default constructor for serialization.

    • Method Detail

      • add

        public void add​(CmsDetailPageInfo info)
        Adds a new detail page information bean to the detail page table.

        Parameters:
        info - the detail page info to add
      • canMakeDefault

        public boolean canMakeDefault​(CmsUUID id)
        Checks if the entry for the given id can be made the default detail page entry for its type.
        Parameters:
        id - the id to check
        Returns:
        true if the entry can be made the default detail page entry
      • contains

        public boolean contains​(CmsUUID id)
        Returns true if the detail page table contains a page with a given id.

        Parameters:
        id - the page id
        Returns:
        true if the detail page table contains the page with the given id
      • copy

        public CmsDetailPageTable copy()
        Copies the detail page table.

        Returns:
        the copy of the detail page table
      • get

        public CmsDetailPageInfo get​(CmsUUID id)
        Returns the detail page info for a given page id.

        Parameters:
        id - a page id
        Returns:
        the detail page info for the given page id
      • getAllIds

        public java.util.Collection<CmsUUIDgetAllIds()
        Returns the page ids of all detail pages.

        Returns:
        the page ids of all detail pages
      • getInfosForType

        public java.util.List<CmsDetailPageInfogetInfosForType​(java.lang.String type)
        Returns the list of detail page info beans for a given type.

        Parameters:
        type - the type for which the detail page beans should be retrieved
        Returns:
        the detail page beans for that type
      • getStatus

        public CmsDetailPageTable.Status getStatus​(CmsUUID id)
        Returns the page status for the page with the given id.

        Parameters:
        id - the id for which the page status should be checked
        Returns:
        the status of the page with the given id
      • isDefaultDetailPage

        public boolean isDefaultDetailPage​(CmsUUID id)
        Returns true if the page with the given id is the default detail page for its type.

        Parameters:
        id - a page id
        Returns:
        true if the detail page for the page id is the default detail page
      • makeDefault

        public int makeDefault​(CmsUUID id)
        Moves the detail page information for a given page to the front of the detail pages for the same type.

        Parameters:
        id - a page id
        Returns:
        the original position of the detail page entry in the list for the same type
      • remove

        public int remove​(CmsUUID id)
        Removes the detail page with the given id.

        Parameters:
        id - the id of the detail page to remove
        Returns:
        the original position of the detail page in the list for its type
      • size

        public int size()
        The number of configured detail pages.

        Returns:
        the number of detail pages
      • toList

        public java.util.List<CmsDetailPageInfotoList()
        Returns a flat list containing all detail pages for all types which preserves the order of detail pages from each type list.

        Returns:
        a list of all detail page info beans