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
ConstructorsConstructorDescriptionCMSNavigationManager(String associatedTheme) Constructor for CMSNavigationManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAvailableItem.voidaddCMSPageItems.voidAdd all items fromavailableItemstovisibleItemsfor whichSelectableNavigationItem.isSelected()is true.voidaddVisibleItem(CMSNavigationItem navigationItem) addVisibleItem.Getter for the fieldassociatedTheme.Getter for the fieldavailableItems.getItem.Getter for the fieldvisibleItems.final voidloadItems.loadItemsFromDatabase.final List<CMSNavigationItem> loadVisibleItems.voidreload()reload.voidsaveVisibleItems(String theme) Replaces the complete navigation-item database table with the elements of 'visibleItems'voidsetVisibleItems(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- aStringobject.
-
-
Method Details
-
loadItems
loadItems.
- Throws:
DAOException- if any.
-
addCMSPageItems
addCMSPageItems.
- Throws:
DAOException- if any.
-
getAvailableItems
Getter for the field
availableItems.- Returns:
- a
Listobject.
-
addSelectedItemsToMenu
public void addSelectedItemsToMenu()Add all items fromavailableItemstovisibleItemsfor 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
Listobject. - Throws:
DAOException- if any.
-
getVisibleItems
Getter for the field
visibleItems.- Returns:
- a
Listobject.
-
setVisibleItems
Adds the given item, along with all their descendants to the visible item list- Parameters:
items- aListobject.
-
saveVisibleItems
Replaces the complete navigation-item database table with the elements of 'visibleItems'- Parameters:
theme- aStringobject.- 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
-