Examples of Navigation


Examples of org.gatein.mop.api.workspace.Navigation

            toUpdate.add(from.handle);
            toUpdate.add(to.handle);
        }

        public void onRename(NodeContext<N> target, NodeContext<N> parent, String name) throws NavigationServiceException {
            Navigation sourceNav = session.findObjectById(ObjectType.NAVIGATION, target.data.id);
            Navigation parentNav = session.findObjectById(ObjectType.NAVIGATION, parent.data.id);

            //
            toEvict.add(sourceNav.getObjectId());
            toEvict.add(parentNav.getObjectId());
            sourceNav.setName(name);

            //
            target.data = new NodeData(sourceNav);
            target.name = null;
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

        if (pages != null && !pages.getChildren().isEmpty()) {
            children.add("pages");
            pageOrNav = true;
        }

        Navigation defaultNav = site.getRootNavigation().getChild("default");
        if (defaultNav != null && !defaultNav.getChildren().isEmpty()) {
            children.add("navigation");
            pageOrNav = true;
        }

        if (site.getObjectType() != ObjectType.GROUP_SITE || pageOrNav) {
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

                boolean pageOrNav = false;
                Page pages = site.getRootPage().getChild("pages");
                if (pages != null && !pages.getChildren().isEmpty()) {
                    pageOrNav = true;
                }
                Navigation defaultNav = site.getRootNavigation().getChild("default");
                if (defaultNav != null && !defaultNav.getChildren().isEmpty()) {
                    pageOrNav = true;
                }

                String name = site.getName();
                if (name.charAt(0) == '/' && pageOrNav) {
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

                startPublicationDate != null ? startPublicationDate.getTime() : -1,
                endPublicationDate != null ? endPublicationDate.getTime() : -1, visibility, pageRef);

        //
        String parentId;
        Navigation parent = navigation.getParent();
        if (parent != null) {
            parentId = parent.getObjectId();
        } else {
            parentId = null;
        }

        //
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

        ObjectType<Site> objectType = objectType(type);
        Collection<Site> sites = session.getWorkspace().getSites(objectType);

        List<NavigationContext> navigations = new LinkedList<NavigationContext>();
        for (Site site : sites) {
            Navigation defaultNavigation = site.getRootNavigation().getChild("default");
            if (defaultNavigation != null) {
                SiteKey key = new SiteKey(type, site.getName());
                navigations.add(new NavigationContext(new NavigationData(key, defaultNavigation)));
            }
        }
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

        if (site == null) {
            throw new NavigationServiceException(NavigationError.NAVIGATION_NO_SITE);
        }

        //
        Navigation rootNode = site.getRootNavigation();

        //
        Navigation defaultNode = rootNode.getChild("default");
        if (defaultNode == null) {
            defaultNode = rootNode.addChild("default");
        }

        //
        NavigationState state = navigation.state;
        if (state != null) {
            Integer priority = state.getPriority();
            defaultNode.getAttributes().setValue(MappedAttributes.PRIORITY, priority);
        }

        //
        dataCache.removeNavigationData(session, navigation.key);
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

        if (site == null) {
            throw new NavigationServiceException(NavigationError.NAVIGATION_NO_SITE);
        }

        //
        Navigation rootNode = site.getRootNavigation();
        Navigation defaultNode = rootNode.getChild("default");

        //
        if (defaultNode != null) {
            // Invalidate cache
            dataCache.removeNavigation(navigation.key);
            String rootId = navigation.data.rootId;
            if (rootId != null) {
                dataCache.removeNodes(Collections.singleton(rootId));
            }

            // Destroy nav
            defaultNode.destroy();

            // Update state
            navigation.data = null;

            //
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

        }

        @Override
        public void onCreate(NodeContext<N> target, NodeContext<N> parent, NodeContext<N> previous, String name)
                throws NavigationServiceException {
            Navigation parentNav = session.findObjectById(ObjectType.NAVIGATION, parent.data.id);
            toEvict.add(parentNav.getObjectId());
            int index = 0;
            if (previous != null) {
                Navigation previousNav = session.findObjectById(ObjectType.NAVIGATION, previous.data.id);
                index = previousNav.getIndex() + 1;
            }

            //
            Navigation sourceNav = parentNav.addChild(index, name);

            //
            parent.data = new NodeData(parentNav);

            // Save the handle
            toPersist.put(target.handle, sourceNav.getObjectId());

            //
            target.data = new NodeData(sourceNav);
            target.handle = target.data.id;
            target.name = null;
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

      removeNavigation(key);
   }

   protected final NodeData loadNode(POMSession session, String nodeId)
   {
      Navigation navigation = session.findObjectById(ObjectType.NAVIGATION, nodeId);
      if (navigation != null)
      {
         return new NodeData(navigation);
      }
      else
View Full Code Here

Examples of org.gatein.mop.api.workspace.Navigation

      Workspace workspace = session.getWorkspace();
      ObjectType<Site> objectType = objectType(key.getType());
      Site site = workspace.getSite(objectType, key.getName());
      if (site != null)
      {
         Navigation defaultNavigation = site.getRootNavigation().getChild("default");
         if (defaultNavigation != null)
         {
            return new NavigationData(key, defaultNavigation);
         }
         else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.