Class MenuConfig

java.lang.Object
io.jmix.flowui.menu.MenuConfig

@Component("flowui_MenuConfig") public class MenuConfig extends Object
Holds information about the main menu structure.
  • Field Details

    • rootItems

      protected List<MenuItem> rootItems
    • resources

      @Autowired protected Resources resources
    • messages

      @Autowired protected Messages messages
    • messageTools

      @Autowired protected MessageTools messageTools
    • dom4JTools

      @Autowired protected Dom4jTools dom4JTools
    • environment

      @Autowired protected org.springframework.core.env.Environment environment
    • uiProperties

      @Autowired protected UiProperties uiProperties
    • modules

      @Autowired protected JmixModules modules
    • metadata

      @Autowired protected Metadata metadata
    • metadataTools

      @Autowired protected MetadataTools metadataTools
    • viewTemplateDefinitions

      @Autowired protected ViewTemplateDefinitions viewTemplateDefinitions
    • iconLoaderSupportProvider

      @Autowired protected org.springframework.beans.factory.ObjectProvider<IconLoaderSupport> iconLoaderSupportProvider
    • iconLoaderSupport

      protected IconLoaderSupport iconLoaderSupport
    • initialized

      protected volatile boolean initialized
    • lock

      protected ReadWriteLock lock
  • Constructor Details

    • MenuConfig

      public MenuConfig()
  • Method Details

    • getItemTitle

      public String getItemTitle(String id)
      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
    • getItemTitle

      public String getItemTitle(MenuItem menuItem)
      Returns the title of the specified menu item.
      Parameters:
      menuItem - the MenuItem object representing 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

      public List<MenuItem> getRootItems()
      Main menu root items
    • loadMenuItems

      protected void loadMenuItems(org.dom4j.Element parentElement, @Nullable MenuItem parentItem, Map<List<String>,MenuItem> menusByIdPaths)
    • getItemIdPath

      protected List<String> getItemIdPath(String id, @Nullable MenuItem parentItem)
    • loadTemplateMenuItems

      protected void loadTemplateMenuItems()
    • createTemplateMenuItem

      protected MenuItem createTemplateMenuItem(MenuItem parentItem, ViewTemplateDefinition definition)
    • findItem

      protected @Nullable MenuItem findItem(String id)
    • getItemIdPathRecursive

      protected void getItemIdPathRecursive(String id, @Nullable MenuItem parentItem, LinkedList<String> resultPath)
    • createMenuItem

      protected @Nullable MenuItem createMenuItem(org.dom4j.Element element, @Nullable MenuItem currentParentItem)
    • checkValueOrEntityProvided

      protected void checkValueOrEntityProvided(org.dom4j.Element property)
    • checkDuplicateAction

      protected void checkDuplicateAction(@Nullable String menuItemId, String... actionDefinition)
    • loadOpened

      protected void loadOpened(org.dom4j.Element element, MenuItem menuItem)
    • loadVisible

      protected void loadVisible(org.dom4j.Element element, MenuItem menuItem)
    • loadTitle

      protected void loadTitle(org.dom4j.Element element, MenuItem menuItem)
    • loadDescription

      protected void loadDescription(org.dom4j.Element element, MenuItem menuItem)
    • loadClassNames

      protected void loadClassNames(org.dom4j.Element element, MenuItem menuItem)
    • loadIcon

      protected void loadIcon(org.dom4j.Element element, MenuItem menuItem)
    • loadResourceString

      protected String loadResourceString(@Nullable String ref)
    • loadMenuItemProperties

      protected List<MenuItem.MenuItemProperty> loadMenuItemProperties(org.dom4j.Element menuItem)
    • loadMenuItemParameters

      protected List<MenuItem.MenuItemParameter> loadMenuItemParameters(org.dom4j.Element menuItem, String parametersElementName)
    • loadMenuItemPropertyValue

      protected @Nullable Object loadMenuItemPropertyValue(org.dom4j.Element property)
    • getMenuItemPropertyTypedValue

      protected Object getMenuItemPropertyTypedValue(String value)
    • loadItemPropertyEntityClass

      protected MetaClass loadItemPropertyEntityClass(org.dom4j.Element property)
    • loadItemPropertyEntityId

      protected Object loadItemPropertyEntityId(org.dom4j.Element property, MetaClass metaClass)
    • loadEntityFetchPlan

      protected String loadEntityFetchPlan(org.dom4j.Element propertyElement)
    • parseEntityId

      protected @Nullable Object parseEntityId(MetaClass entityMetaClass, String entityId)
    • loadShortcutCombination

      protected void loadShortcutCombination(MenuItem menuItem, org.dom4j.Element element)
    • findItem

      public @Nullable MenuItem findItem(String id, MenuItem item)
      Finds a MenuItem by its identifier within a given MenuItem hierarchy. This method searches recursively through the children of the menu item to locate the menu item with the specified identifier. If the item is not found, null is returned.
      Parameters:
      id - the identifier of the desired MenuItem
      item - the root MenuItem to start the search from
      Returns:
      the MenuItem with the specified identifier, or null if no such item is found
    • getIconLoaderSupport

      protected IconLoaderSupport getIconLoaderSupport()
    • createLoaderContext

      protected ComponentLoader.Context createLoaderContext()