Class MenuCallable
java.lang.Object
de.uplanet.lucy.server.auxiliaries.MenuCallable
@VelocityVariable("Menu")
@VelocityCallable("singleton")
public final class MenuCallable
extends Object
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbooleancanAccessMenuNode(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) Check if the current user can access the given menu item.findMenuItems(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, de.uplanet.lucy.server.menu.rt.IRtMenuFilter p_filter) Starting with the root menu node, find all menu items that are accepted by the given filter.findMenuItems(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId, de.uplanet.lucy.server.menu.rt.IRtMenuFilter p_filter) Find all menu items that are accepted by the given filter, starting with the given menu node.static de.uplanet.lucy.server.menu.rt.IRtMenuFilterstatic de.uplanet.lucy.server.menu.rt.IRtMenuFilterstatic de.uplanet.lucy.server.menu.rt.IRtMenuFiltergetApplicationMenuFilter(String p_strAppGuid) getApplicationMenus(String p_strKey) Get all application menus for the current user.getMenu(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx) Get the menu starting with the root menu node.getMenu(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, de.uplanet.lucy.server.menu.rt.IRtMenuFilter p_filter) Get the menu starting with the root menu node.getMenuTitleComparator(String p_strLang) getMenuTitleWithFallback(IMenuItem p_item, String p_strPreferredLang) Get a menu title in the given preferred language.static de.uplanet.lucy.server.menu.rt.IRtMenuFiltergetNamePatternMenuFilter(String p_strLang, String p_strPattern, boolean p_bAcceptPattern) getOpenNewWindowMenuItemAppGuids(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) Get the application GUIDs of all applications or links of the given submenu that have the open-new-window-flag set.getSubmenu(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) Get the submenu with the specified unique identifier.getSubmenu(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId, de.uplanet.lucy.server.menu.rt.IRtMenuFilter p_filter) Get the submenu with the specified unique identifier.getSubmenu(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId, de.uplanet.lucy.server.menu.rt.IRtMenuFilter p_filter, boolean p_bFilterCmsMenuItems) Get the submenu with the specified unique identifier.getSubmenuDefinition(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) Get the submenu with the specified unique identifier.getTopLevelGroupMenuFromChild(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) booleanbooleanisExistingMenuNode(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) Check if a menu node with the given GUID exists in the portal.booleanisMenuCookieValid(String p_strCookie) toJSONString(IMenuItem p_menuItem) Convert the given menu tree to JSON.voidConvert the given menu tree to JSON and write the output to the given character stream.
- 
Constructor Details- 
MenuCallablepublic MenuCallable(org.springframework.context.ApplicationContext p_appCtx) 
 
- 
- 
Method Details- 
alwaysCheckForNewMenupublic boolean alwaysCheckForNewMenu()
- 
isMenuCookieValid
- 
getMenuCookie
- 
isExistingMenuNodepublic boolean isExistingMenuNode(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) throws de.uplanet.lucy.menu.MenuException Check if a menu node with the given GUID exists in the portal.- Parameters:
- p_ctx- The processing context.
- p_strId- The unique identifier of the submenu.
- Returns:
- trueif a menu node with the given id exists in the portal, or- falseotherwise.
- Throws:
- de.uplanet.lucy.menu.MenuException
 
- 
canAccessMenuNodepublic boolean canAccessMenuNode(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) Check if the current user can access the given menu item.- Parameters:
- p_ctx- The processing context.
- p_strId- The unique identifier of the menu item.
- Returns:
- trueif the current user can access the given menu item, or- falseotherwise.
 
- 
getMenuGet the menu starting with the root menu node.- Parameters:
- p_ctx- The processing context.
- Returns:
- The complete menu, or nullif an error occurred.
 
- 
getTopLevelGroupMenuFromChildpublic TopLevelGroupMenuItem getTopLevelGroupMenuFromChild(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) 
- 
getApplicationMenuspublic Map<String,de.uplanet.lucy.server.auxiliaries.menu.ApplicationMenu> getApplicationMenus(String p_strKey) Get all application menus for the current user.- Parameters:
- p_strKey- A grouping key, e.g.- desktop, or- mobile.
- Returns:
- The application menus per application GUID.
 
- 
getOpenNewWindowMenuItemAppGuidspublic Set<String> getOpenNewWindowMenuItemAppGuids(de.uplanet.lucy.server.ISimpleProcessingContext p_ctx, String p_strId) Get the application GUIDs of all applications or links of the given submenu that have the open-new-window-flag set.- Parameters:
- p_ctx- The processing context.
- p_strId- The unique identifier of the submenu.
- Returns:
- A possibly empty set of application GUIDs.
 
- 
getMenuTitleComparator
- 
getAcceptingMenuFilter@Customization("feature request #4470") public static de.uplanet.lucy.server.menu.rt.IRtMenuFilter getAcceptingMenuFilter()- Returns:
- A menu filter that accepts all menu items.
 
- 
getNamePatternMenuFilter@Customization("feature request #4470") public static de.uplanet.lucy.server.menu.rt.IRtMenuFilter getNamePatternMenuFilter(String p_strLang, String p_strPattern, boolean p_bAcceptPattern) - Parameters:
- p_strLang- The language to be used.
- p_strPattern- A name pattern.
- p_bAcceptPattern-- trueif menu items that match the given pattern should be accepted, or- falseif they should be rejected by this filter.
- Returns:
- A menu filter that accepts menu items that match the given criteria.
 
- 
getAbstractContainerMenuFilterpublic static de.uplanet.lucy.server.menu.rt.IRtMenuFilter getAbstractContainerMenuFilter()- Returns:
- A menu filter that accepts all menu items that are
   instanceof de.uplanet.lucy.server.menu.rt.AbstractContainerMenuItem.
 
- 
getApplicationMenuFilterpublic static de.uplanet.lucy.server.menu.rt.IRtMenuFilter getApplicationMenuFilter(String p_strAppGuid) - Returns:
- A menu filter that accepts all application menu items with the given GUID.
 
- 
isCmsPage
 
-