Search in sources :

Example 1 with MenuSection

use of org.entando.entando.apsadmin.system.services.shortcut.model.MenuSection in project entando-core by entando.

the class ShortcutDefDOM method getSectionMenus.

public Map<String, MenuSection> getSectionMenus() {
    Map<String, MenuSection> menuSections = new HashMap<String, MenuSection>();
    Element menuSectionsElement = this._doc.getRootElement().getChild(MENUSECTIONS_ELEMENT_NAME);
    if (null == menuSectionsElement) {
        return menuSections;
    }
    List<Element> menuSectionElements = menuSectionsElement.getChildren();
    for (int i = 0; i < menuSectionElements.size(); i++) {
        Element menuSectionElement = menuSectionElements.get(i);
        String id = menuSectionElement.getAttributeValue(MENUSECTION_ID_ATTRIBUTE_NAME);
        MenuSection menuSection = new MenuSection(id);
        this.extractDescriptions(menuSectionElement, menuSection);
        menuSections.put(menuSection.getId(), menuSection);
    }
    return menuSections;
}
Also used : HashMap(java.util.HashMap) Element(org.jdom.Element) MenuSection(org.entando.entando.apsadmin.system.services.shortcut.model.MenuSection)

Example 2 with MenuSection

use of org.entando.entando.apsadmin.system.services.shortcut.model.MenuSection in project entando-core by entando.

the class ShortcutLoader method completeLoading.

private void completeLoading() {
    Iterator<Shortcut> shorCutIter = this.getShortcuts().values().iterator();
    while (shorCutIter.hasNext()) {
        Shortcut shortcut = shorCutIter.next();
        String menuSectionCode = shortcut.getMenuSectionCode();
        MenuSection section = this.getManuSections().get(menuSectionCode);
        shortcut.setMenuSection(section);
    }
}
Also used : Shortcut(org.entando.entando.apsadmin.system.services.shortcut.model.Shortcut) MenuSection(org.entando.entando.apsadmin.system.services.shortcut.model.MenuSection)

Aggregations

MenuSection (org.entando.entando.apsadmin.system.services.shortcut.model.MenuSection)2 HashMap (java.util.HashMap)1 Shortcut (org.entando.entando.apsadmin.system.services.shortcut.model.Shortcut)1 Element (org.jdom.Element)1