Package io.goobi.viewer.model.cms
Class CMSNavigationManager
java.lang.Object
io.goobi.viewer.model.cms.CMSNavigationManager
- All Implemented Interfaces:
Serializable
CMSNavigationManager class.
- See Also:
-
Constructor Summary
ConstructorDescriptionCMSNavigationManager
(String associatedTheme) Constructor for CMSNavigationManager. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAvailableItem.void
addCMSPageItems.void
Add all items fromavailableItems
tovisibleItems
for whichSelectableNavigationItem.isSelected()
is true.void
addVisibleItem
(CMSNavigationItem navigationItem) addVisibleItem.Getter for the fieldassociatedTheme
.Getter for the fieldavailableItems
.getItem.Getter for the fieldvisibleItems
.final void
loadItems.loadItemsFromDatabase.final List<CMSNavigationItem>
loadVisibleItems.void
reload()
reload.void
saveVisibleItems
(String theme) Replaces the complete navigation-item database table with the elements of 'visibleItems'void
setVisibleItems
(List<CMSNavigationItem> items) Adds the given item, along with all their descendants to the visible item list
-
Constructor Details
-
CMSNavigationManager
Constructor for CMSNavigationManager.
- Parameters:
associatedTheme
- aString
object.
-
-
Method Details
-
loadItems
loadItems.
- Throws:
DAOException
- if any.
-
addCMSPageItems
addCMSPageItems.
- Throws:
DAOException
- if any.
-
getAvailableItems
Getter for the field
availableItems
.- Returns:
- a
List
object.
-
addSelectedItemsToMenu
public void addSelectedItemsToMenu()Add all items fromavailableItems
tovisibleItems
for whichSelectableNavigationItem.isSelected()
is true. Afterwards setsSelectableNavigationItem.isSelected()
to fals for allavailableItems
-
loadVisibleItems
loadVisibleItems.
- Returns:
- the sublist of available menu items matching the navigationMenuItem-list from the database (in label and url)
- Throws:
DAOException
- if any.
-
loadItemsFromDatabase
loadItemsFromDatabase.
- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getVisibleItems
Getter for the field
visibleItems
.- Returns:
- a
List
object.
-
setVisibleItems
Adds the given item, along with all their descendants to the visible item list- Parameters:
items
- aList
object.
-
saveVisibleItems
Replaces the complete navigation-item database table with the elements of 'visibleItems'- Parameters:
theme
- aString
object.- Throws:
DAOException
- if any.
-
reload
reload.
- Throws:
DAOException
- if any.
-
getItem
getItem.
- Parameters:
id
- the item'sCMSNavigationItem.getSortingListId()
- Returns:
- The first matching item from all visible items as optional. Empty optional if no matching item was found
-
getAssociatedTheme
Getter for the field
associatedTheme
.- Returns:
- the associatedTheme
-