Package io.jmix.flowui.menu
Class MenuConfig
java.lang.Object
io.jmix.flowui.menu.MenuConfig
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Component("flowui_MenuConfig")
public class MenuConfig
extends Object
implements org.springframework.context.ApplicationContextAware
Holds information about the main menu structure.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected Dom4jToolsprotected org.springframework.core.env.Environmentprotected IconLoaderSupportprotected booleanprotected ReadWriteLockstatic final Stringprotected Messagesprotected MessageToolsprotected Metadataprotected MetadataToolsprotected JmixModulesprotected Resourcesprotected UiProperties -
Constructor Summary
ConstructorsConstructorDescriptionMenuConfig(Resources resources, Messages messages, MessageTools messageTools, Dom4jTools dom4JTools, org.springframework.core.env.Environment environment, UiProperties uiProperties, JmixModules modules, Metadata metadata, MetadataTools metadataTools) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckDuplicateAction(String menuItemId, String... actionDefinition) protected voidprotected voidcheckValueOrEntityProvided(org.dom4j.Element property) protected ComponentLoader.Contextprotected MenuItemcreateMenuItem(org.dom4j.Element element, MenuItem currentParentItem) protected IconLoaderSupportgetItemIdPath(String id, MenuItem parentItem) protected voidgetItemIdPathRecursive(String id, MenuItem parentItem, LinkedList<String> resultPath) getItemTitle(MenuItem menuItem) Returns the title of the specified menu item.getItemTitle(String id) Returns the title of a menu item based on its identifier.protected ObjectMain menu root itemsprotected voidinit()protected voidloadClassNames(org.dom4j.Element element, MenuItem menuItem) protected voidloadDescription(org.dom4j.Element element, MenuItem menuItem) protected StringloadEntityFetchPlan(org.dom4j.Element propertyElement) protected voidprotected MetaClassloadItemPropertyEntityClass(org.dom4j.Element property) protected ObjectloadItemPropertyEntityId(org.dom4j.Element property, MetaClass metaClass) protected List<MenuItem.MenuItemParameter>loadMenuItemParameters(org.dom4j.Element menuItem, String parametersElementName) protected List<MenuItem.MenuItemProperty>loadMenuItemProperties(org.dom4j.Element menuItem) protected ObjectloadMenuItemPropertyValue(org.dom4j.Element property) protected voidloadMenuItems(org.dom4j.Element parentElement, MenuItem parentItem, Map<List<String>, MenuItem> menusByIdPaths) protected voidloadOpened(org.dom4j.Element element, MenuItem menuItem) protected StringloadResourceString(String ref) protected voidloadShortcutCombination(MenuItem menuItem, org.dom4j.Element element) protected voidprotected voidloadVisible(org.dom4j.Element element, MenuItem menuItem) protected ObjectparseEntityId(MetaClass entityMetaClass, String entityId) voidreset()Make the config to reload view on next request.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Field Details
-
MENU_CONFIG_XML_PROP
- See Also:
-
rootItems
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
resources
-
messages
-
messageTools
-
dom4JTools
-
environment
protected org.springframework.core.env.Environment environment -
uiProperties
-
modules
-
metadata
-
metadataTools
-
iconLoaderSupport
-
initialized
protected volatile boolean initialized -
lock
-
-
Constructor Details
-
MenuConfig
public MenuConfig(Resources resources, Messages messages, MessageTools messageTools, Dom4jTools dom4JTools, org.springframework.core.env.Environment environment, UiProperties uiProperties, JmixModules modules, Metadata metadata, MetadataTools metadataTools)
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getItemTitle
Returns the title of a menu item based on its identifier.- Parameters:
id- the unique identifier of the menu item- Returns:
- the title of the menu item
-
checkInitialized
protected void checkInitialized() -
init
protected void init() -
reset
public void reset()Make the config to reload view on next request. -
getRootItems
Main menu root items -
checkValueOrEntityProvided
protected void checkValueOrEntityProvided(org.dom4j.Element property) -
checkDuplicateAction
-
loadResourceString
-
loadMenuItemProperties
-
loadMenuItemParameters
protected List<MenuItem.MenuItemParameter> loadMenuItemParameters(org.dom4j.Element menuItem, String parametersElementName) -
loadMenuItemPropertyValue
-
getMenuItemPropertyTypedValue
-
loadItemPropertyEntityClass
-
loadItemPropertyEntityId
-
loadEntityFetchPlan
-
parseEntityId
-
getIconLoaderSupport
-
createLoaderContext
-