Package org.opencms.ade.sitemap.shared
Class CmsDetailPageTable
java.lang.Object
org.opencms.ade.sitemap.shared.CmsDetailPageTable
- All Implemented Interfaces:
Serializable
,Cloneable
A data structure for managing the detail page ordering for different types in a given sitemap.
- Since:
- 8.0.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A type indicating the status of a page. -
Constructor Summary
ModifierConstructorDescriptionprotected
Empty default constructor for serialization.CmsDetailPageTable
(List<CmsDetailPageInfo> infos) Creates a detail page table from a list of detail page info bean. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(CmsDetailPageInfo info) Adds a new detail page information bean to the detail page table.boolean
Checks if the entry for the given id can be made the default detail page entry for its type.boolean
Returns true if the detail page table contains a page with a given id.copy()
Copies the detail page table.Returns the detail page info for a given page id.Returns the page ids of all detail pages.getInfosForType
(String type) Returns the list of detail page info beans for a given type.Returns the page status for the page with the given id.boolean
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
Removes the detail page with the given id.int
size()
The number of configured 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.
-
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
Adds a new detail page information bean to the detail page table.- Parameters:
info
- the detail page info to add
-
canMakeDefault
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
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
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
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
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
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
-