Package org.exoplatform.portal.mop.navigation

Examples of org.exoplatform.portal.mop.navigation.NodeContext


                    return "Adding node " + target.getName() + " to parent " + parent.getName();
                }

                @Override
                public void rollback() throws Exception {
                    NodeContext node = parent.add(index, name);
                    node.setState(state);
                    node.setHidden(hidden);
                }
            });
        }
View Full Code Here


    public NodeContext<?> perform() {
        NavigationContext navigationCtx = navigationService.loadNavigation(navigationKey);

        //
        if (navigationCtx != null) {
            NodeContext root = navigationService.loadNode(NodeModel.SELF_MODEL, navigationCtx, GenericScope.branchShape(path),
                    null);

            //
            NodeContext from = root;
            for (String name : path) {
                NodeContext a = from.get(name);
                if (a != null) {
                    from = a;
                } else {
                    from = from.add(null, name);
                }
View Full Code Here

                    return "Adding node " + target.getName() + " to parent " + parent.getName();
                }

                @Override
                public void rollback() throws Exception {
                    NodeContext node = parent.add(index, name);
                    node.setState(state);
                    node.setHidden(hidden);
                }
            });
        }
View Full Code Here

      NavigationContext navigationCtx = navigationService.loadNavigation(navigationKey);

      //
      if (navigationCtx != null)
      {
         NodeContext root = navigationService.loadNode(NodeModel.SELF_MODEL, navigationCtx, GenericScope.branchShape(path), null);

         //
         NodeContext from = root;
         for (String name : path)
         {
            NodeContext a = from.get(name);
            if (a != null)
            {
               from = a;
            }
            else
View Full Code Here

            }

            @Override
            public void rollback() throws Exception
            {
               NodeContext node = parent.add(index, name);
               node.setState(state);
               node.setHidden(hidden);
            }
         });
      }
View Full Code Here

            path = requestPath.substring(1).split("/");
        } else {
            path = requestPath.split("/");
        }

        NodeContext nodeContext = navService.loadNode(NodeModel.SELF_MODEL, navContext,
                GenericScope.branchShape(path, Scope.ALL), null);

        boolean found = true;
        String lastCommonAncestor = "/";

        for (String nodeName : path) {
            nodeContext = nodeContext.get(nodeName);
            if (nodeContext == null) {
                found = false;
                break;
            } else {
                if (lastCommonAncestor.equals("/")) {
                    lastCommonAncestor += nodeContext.getName();
                } else {
                    lastCommonAncestor += "/" + nodeContext.getName();
                }
            }
        }

        if (found == true) {
View Full Code Here

        {
            return "";
        }

        String[] path = requestPath.split("/");
        NodeContext nodeContext = navService.loadNode(NodeModel.SELF_MODEL, navContext,
                GenericScope.branchShape(path, Scope.ALL), null);

        boolean found = true;
        String lastCommonAncestor = "";

        for (String nodeName : path) {
            nodeContext = nodeContext.get(nodeName);
            if (nodeContext == null) {
                found = false;
                break;
            } else {
                if (lastCommonAncestor.equals("")) {
                    lastCommonAncestor += nodeContext.getName();
                } else {
                    lastCommonAncestor += "/" + nodeContext.getName();
                }
            }
        }

        if (found == true) {
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.mop.navigation.NodeContext

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.