当前位置: 首页>>代码示例>>Java>>正文


Java MenuContainer类代码示例

本文整理汇总了Java中org.fenixedu.bennu.portal.domain.MenuContainer的典型用法代码示例。如果您正苦于以下问题:Java MenuContainer类的具体用法?Java MenuContainer怎么用?Java MenuContainer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MenuContainer类属于org.fenixedu.bennu.portal.domain包,在下文中一共展示了MenuContainer类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateMenuFunctionality

import org.fenixedu.bennu.portal.domain.MenuContainer; //导入依赖的package包/类
/**
 * Updates the site's slug and it's respective MenuFunctionality. It should
 * be used after setting the site's description, name and slug.
 */

public void updateMenuFunctionality() {
    Preconditions.checkNotNull(getDescription());
    Preconditions.checkNotNull(getName());
    Preconditions.checkNotNull(getSlug());
    Preconditions.checkArgument(isValidSlug(getSlug()));

    if (getFolder() == null) {
        MenuContainer parent =
                getFunctionality() == null ? PortalConfiguration.getInstance().getMenu() : getFunctionality().getParent();
        if (getFunctionality() != null) {
            deleteMenuFunctionality();
        }
        setFunctionality(new MenuFunctionality(parent, getEmbedded(), getSlug(),
                getEmbedded() ? CMSEmbeddedBackend.BACKEND_KEY : CMSBackend.BACKEND_KEY, "anyone", getDescription(),
                getName(), getSlug()));
        getFunctionality().setAccessGroup(SiteViewersGroup.get(this));
    }
}
 
开发者ID:FenixEdu,项目名称:fenixedu-cms,代码行数:24,代码来源:Site.java

示例2: findFunctionalityWithPath

import org.fenixedu.bennu.portal.domain.MenuContainer; //导入依赖的package包/类
private static final MenuFunctionality findFunctionalityWithPath(MenuContainer container, int startIndex, String... parts) {
    // 1)
    if (parts.length == startIndex) {
        return container.findInitialContent();
    }

    // 2)
    for (MenuItem child : container.getOrderedChild()) {
        if (child.getPath().equals(parts[startIndex])) {
            if (child.isMenuFunctionality()) {
                return child.getAsMenuFunctionality();
            } else {
                return findFunctionalityWithPath(child.getAsMenuContainer(), startIndex + 1, parts);
            }
        }
    }

    // 3)
    return null;
}
 
开发者ID:FenixEdu,项目名称:fenixedu-appliance-webapp,代码行数:21,代码来源:FenixEduApplianceBootstrapper.java

示例3: findTopLevelContainer

import org.fenixedu.bennu.portal.domain.MenuContainer; //导入依赖的package包/类
private static MenuItem findTopLevelContainer(final MenuContainer container) {
    for (final MenuItem item : container.getOrderedChild()) {
        if (item.isVisible() && item.isAvailableForCurrentUser()) {
            return item instanceof MenuContainer ? findTopLevelContainer((MenuContainer) item) : item;
        }
    }
    return null;
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:9,代码来源:HomeAction.java

示例4: CMSFolder

import org.fenixedu.bennu.portal.domain.MenuContainer; //导入依赖的package包/类
public CMSFolder(MenuContainer parent, String path, LocalizedString description) {
    super();
    setBennu(Bennu.getInstance());
    setFunctionality(new MenuFunctionality(parent, false, path, "cms", "anyone", description, description, path));
    Signal.emit(SIGNAL_CREATED,new DomainObjectEvent<>(this));
}
 
开发者ID:FenixEdu,项目名称:fenixedu-cms,代码行数:7,代码来源:CMSFolder.java

示例5: make

import org.fenixedu.bennu.portal.domain.MenuContainer; //导入依赖的package包/类
private static MenuContainer make(MenuContainer parent, RoleType role, String pt, String en) {
    LocalizedString title = new LocalizedString(PT, pt).with(EN, en);
    return new MenuContainer(parent, true, "role(" + role.name() + ")", title, title, en.toLowerCase().replace(' ', '-'));
}
 
开发者ID:FenixEdu,项目名称:fenixedu-appliance-webapp,代码行数:5,代码来源:FenixEduApplianceBootstrapper.java

示例6: install

import org.fenixedu.bennu.portal.domain.MenuContainer; //导入依赖的package包/类
private static MenuContainer install(MenuContainer parent, Class<?> appClass) {
    return install(parent, appClass.getName());
}
 
开发者ID:FenixEdu,项目名称:fenixedu-appliance-webapp,代码行数:4,代码来源:FenixEduApplianceBootstrapper.java

示例7: makeRedirect

import org.fenixedu.bennu.portal.domain.MenuContainer; //导入依赖的package包/类
private static void makeRedirect(MenuContainer parent, String path, String pt, String en) {
    LocalizedString str = new LocalizedString(PT, pt).with(EN, en);
    new MenuFunctionality(parent, true, path, "redirect", "anyone", str, str, en.toLowerCase().replace(' ', '-'));
}
 
开发者ID:FenixEdu,项目名称:fenixedu-appliance-webapp,代码行数:5,代码来源:FenixEduApplianceBootstrapper.java


注:本文中的org.fenixedu.bennu.portal.domain.MenuContainer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。