Package com.adito.navigation

Examples of com.adito.navigation.MenuTree


    WEBFORWARD_RESOURCE_TYPE.addPermission(PolicyConstants.PERM_ASSIGN);
        WEBFORWARD_RESOURCE_TYPE.addPermission(PolicyConstants.PERM_PERSONAL_CREATE_EDIT_AND_DELETE);
  }

  void initTableItemActions() throws Exception {
    MenuTree tree = NavigationManager.getMenuTree(TableItemActionMenuTree.MENU_TABLE_ITEM_ACTION_MENU_TREE);
    // Web Forwards
        tree.addMenuItem(null, new MenuItem("webForward", WebForwardPlugin.MESSAGE_RESOURCES_KEY, null, 100, false, SessionInfo.ALL_CONTEXTS));
        tree.addMenuItem("webForward", new AddToFavoritesAction(WebForwardPlugin.MESSAGE_RESOURCES_KEY));
        tree.addMenuItem("webForward", new RemoveFromFavoritesAction(WebForwardPlugin.MESSAGE_RESOURCES_KEY));
        tree.addMenuItem("webForward", new RemoveResourceAction(SessionInfo.ALL_CONTEXTS, WebForwardPlugin.MESSAGE_RESOURCES_KEY));
        tree.addMenuItem("webForward", new EditResourceAction(SessionInfo.ALL_CONTEXTS, WebForwardPlugin.MESSAGE_RESOURCES_KEY));
        tree.addMenuItem("webForward", new CloneResourceAction(SessionInfo.MANAGEMENT_CONSOLE_CONTEXT, WebForwardPlugin.MESSAGE_RESOURCES_KEY));
  }
View Full Code Here


        tree.addMenuItem("webForward", new EditResourceAction(SessionInfo.ALL_CONTEXTS, WebForwardPlugin.MESSAGE_RESOURCES_KEY));
        tree.addMenuItem("webForward", new CloneResourceAction(SessionInfo.MANAGEMENT_CONSOLE_CONTEXT, WebForwardPlugin.MESSAGE_RESOURCES_KEY));
  }

  void initMainMenu() throws Exception {
    MenuTree tree = NavigationManager.getMenuTree(CoreMenuTree.MENU_ITEM_MENU_TREE);

    tree.addMenuItem("resources", new MenuItem("userWebForwards",
            "webForwards",
            "/showUserWebForwards.do",
            50,
            true,
            null,
            SessionInfo.USER_CONSOLE_CONTEXT,
                        WEBFORWARD_RESOURCE_TYPE,
                        new Permission[] { PolicyConstants.PERM_PERSONAL_CREATE_EDIT_AND_DELETE },
                        WEBFORWARD_RESOURCE_TYPE));

    tree.addMenuItem("globalResources", new MenuItem("managementWebForwards",
            "webForwards",
            "/showWebForwards.do",
            100,
            true,
            null,
View Full Code Here

  void initTagLib() {
    ContextHolder.getContext().setResourceAlias("/server/taglibs/webforwards", "/WEB-INF/webforwards.tld");
  }

  void initPageTasks() throws Exception {
    MenuTree tree = NavigationManager.getMenuTree(PageTaskMenuTree.PAGE_TASK_MENU_TREE);
    tree.addMenuItem(null, new MenuItem("showWebForwards", null, null, 100, false, SessionInfo.MANAGEMENT_CONSOLE_CONTEXT));
        tree.addMenuItem("showWebForwards", new MenuItem("createWebForward",
                        WebForwardPlugin.MESSAGE_RESOURCES_KEY,
                        "/webForwardTypeSelection.do",
                        100,
                        true,
                        "_self",
                        SessionInfo.MANAGEMENT_CONSOLE_CONTEXT,
                        WEBFORWARD_RESOURCE_TYPE,
                        new Permission[] { PolicyConstants.PERM_CREATE_EDIT_AND_ASSIGN },
                        null));
        tree.addMenuItem("showWebForwards", new MenuItem("replacements",
                        WebForwardPlugin.MESSAGE_RESOURCES_KEY,
                        "/showReplacements.do",
                        600,
                        true,
                        null,
                        SessionInfo.MANAGEMENT_CONSOLE_CONTEXT,
                        PolicyConstants.REPLACEMENTS_RESOURCE_TYPE,
                        new Permission[] { PolicyConstants.PERM_CHANGE },
                        null));
       
        // userWebForwards
        tree.addMenuItem(null, new MenuItem("showUserWebForwards", null, null, 100, false, SessionInfo.USER_CONSOLE_CONTEXT));
        tree.addMenuItem("showUserWebForwards", new MenuItem("createPersonalWebForward",
                        WebForwardPlugin.MESSAGE_RESOURCES_KEY,
                        "/webForwardTypeSelection.do",
                        100,
                        true,
                        "_self",
View Full Code Here

      ContextHolder.getContext().deregisterRequestHandler(new ReplacementProxyMethodHandler());
    }
  }

  private void removePageTasks() {
    MenuTree tree = NavigationManager.getMenuTree(PageTaskMenuTree.PAGE_TASK_MENU_TREE);
    tree.removeMenuItem("showWebForwards", "createTunneledWebForward");
    tree.removeMenuItem("showWebForwards", "createReplacementWebForward");
    tree.removeMenuItem("showWebForwards", "createReverseProxyWebForward");
  }
View Full Code Here

    tree.removeMenuItem("showWebForwards", "createReplacementWebForward");
    tree.removeMenuItem("showWebForwards", "createReverseProxyWebForward");
  }

  private void removeMainMenu() {
    MenuTree tree = NavigationManager.getMenuTree(CoreMenuTree.MENU_ITEM_MENU_TREE);
    tree.removeMenuItem("resources", "userWebForwards");
    tree.removeMenuItem("globalResources", "managementWebForwards");
    tree.removeMenuItem("configuration", "replacements");
  }
View Full Code Here

    tree.removeMenuItem("globalResources", "managementWebForwards");
    tree.removeMenuItem("configuration", "replacements");
  }

  private void removeTableItemActions() {
    MenuTree tree = NavigationManager.getMenuTree(TableItemActionMenuTree.MENU_TABLE_ITEM_ACTION_MENU_TREE);
    tree.removeMenuItem("webForward", AddToFavoritesAction.TABLE_ITEM_ACTION_ID);
    tree.removeMenuItem("webForward", RemoveFromFavoritesAction.TABLE_ITEM_ACTION_ID);
    tree.removeMenuItem("webForward", RemoveResourceAction.TABLE_ITEM_ACTION_ID);
    tree.removeMenuItem("webForward", EditResourceAction.TABLE_ITEM_ACTION_ID);
  }
View Full Code Here

        } catch (Exception e) {
            throw new PluginException("Failed to register resource type.", e);
        }

        // Add the new items to the main menu
        MenuTree tree = NavigationManager.getMenuTree(CoreMenuTree.MENU_ITEM_MENU_TREE);
        tree.addMenuItem("resources", new MenuItem("userSamples", "sample", "/showUserSamples.do", 50, true, null,
                        SessionInfo.USER_CONSOLE_CONTEXT, null, null, Sample.SAMPLE_RESOURCE_TYPE));
        tree.addMenuItem("globalResources", new MenuItem("managementSamples", "sample", "/showSamples.do", 50, true, null,
                        SessionInfo.MANAGEMENT_CONSOLE_CONTEXT, Sample.SAMPLE_RESOURCE_TYPE, new Permission[] {
                                        PolicyConstants.PERM_CREATE_EDIT_AND_ASSIGN, PolicyConstants.PERM_EDIT_AND_ASSIGN,
                                        PolicyConstants.PERM_DELETE }, Sample.SAMPLE_RESOURCE_TYPE));

        // Add the new page tasks
        MenuTree pageTasks = NavigationManager.getMenuTree(PageTaskMenuTree.PAGE_TASK_MENU_TREE);
        pageTasks.addMenuItem(null, new MenuItem("showSamples", null, null, 100, false, SessionInfo.MANAGEMENT_CONSOLE_CONTEXT));
        pageTasks.addMenuItem("showSamples", new MenuItem("createSample", "sample", "/sampleDefaultDetails.do", 100, true, "_self",
                        SessionInfo.MANAGEMENT_CONSOLE_CONTEXT, Sample.SAMPLE_RESOURCE_TYPE,
                        new Permission[] { PolicyConstants.PERM_CREATE_EDIT_AND_ASSIGN }));

        // This demonstrates listening for events. In this case we will look for
        // 'sample created' events and display a message on the console
View Full Code Here

        } catch (Exception e) {
            log.warn("Failed to deregister resource type.", e);
        }

        // Remove the new items from the main menu
        MenuTree tree = NavigationManager.getMenuTree(CoreMenuTree.MENU_ITEM_MENU_TREE);
        tree.removeMenuItem("resources", "userSamples");
        tree.removeMenuItem("globalResources", "managementSamples");

        // Remove the new page tasks
        MenuTree pageTasks = NavigationManager.getMenuTree(PageTaskMenuTree.PAGE_TASK_MENU_TREE);
        pageTasks.removeMenuItem(null, "showSamples");
    }
View Full Code Here

        if(!PolicyDatabaseFactory.getInstance().isAnyAccessRightAllowed(info.getUser(), true, true, false)) {
            throw new Exception("You do not have permission to use the management console.");
        }
        info.setNavigationContext(SessionInfo.MANAGEMENT_CONSOLE_CONTEXT);
        CoreUtil.resetMainNavigation(request.getSession());
        MenuTree menuTree = NavigationManager.getMenuTree(CoreMenuTree.MENU_ITEM_MENU_TREE);
        ActionForward fwd = menuTree.getFirstAvailableActionForward(menuTree.rebuildMenus(request));
        if (fwd == null) {
            // Not capabilities left on management console so switching to user console
            info.setNavigationContext(SessionInfo.USER_CONSOLE_CONTEXT);
            return mapping.findForward("home");
        }
View Full Code Here

  void initService() throws InstantiationException, IllegalAccessException {
    DefaultAgentManager.getInstance().registerService(NetworkPlaceService.class);
  }

  void initTableItemActions() throws Exception {
    MenuTree tree = NavigationManager.getMenuTree(TableItemActionMenuTree.MENU_TABLE_ITEM_ACTION_MENU_TREE);
    tree.addMenuItem("favorites", new FavoriteOpenWebFolderAction());

    // Network Places
    tree.addMenuItem(null, new MenuItem("networkPlace",
            NetworkPlacePlugin.MESSAGE_RESOURCES_KEY,
            null,
            100,
            false,
            SessionInfo.ALL_CONTEXTS));
    tree.addMenuItem("networkPlace", new AddToFavoritesAction(NetworkPlacePlugin.MESSAGE_RESOURCES_KEY));
    tree.addMenuItem("networkPlace", new RemoveFromFavoritesAction(NetworkPlacePlugin.MESSAGE_RESOURCES_KEY));
    tree.addMenuItem("networkPlace", new RemoveResourceAction(SessionInfo.ALL_CONTEXTS,
            NetworkPlacePlugin.MESSAGE_RESOURCES_KEY));
    tree.addMenuItem("networkPlace", new EditResourceAction(SessionInfo.ALL_CONTEXTS,
            NetworkPlacePlugin.MESSAGE_RESOURCES_KEY));
    tree.addMenuItem("networkPlace", new CloneResourceAction(SessionInfo.MANAGEMENT_CONSOLE_CONTEXT,
      NetworkPlacePlugin.MESSAGE_RESOURCES_KEY));
    tree.addMenuItem("networkPlace", new OpenWebFolderAction(NetworkPlacePlugin.MESSAGE_RESOURCES_KEY));
  }
View Full Code Here

TOP

Related Classes of com.adito.navigation.MenuTree

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.