Class CmsDetailPageTable

java.lang.Object
org.opencms.ade.sitemap.shared.CmsDetailPageTable
All Implemented Interfaces:
Serializable, Cloneable

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

Since:
8.0.0
See Also:
  • Constructor Details

    • CmsDetailPageTable

      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 Details

    • 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

      Copies the detail page table.

      Returns:
      the copy of the detail page table
    • get

      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

      Returns the page ids of all detail pages.

      Returns:
      the page ids of all detail pages
    • getInfosForType

      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

      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

      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