Examples of PageNavigation


Examples of org.exoplatform.portal.config.model.PageNavigation

      return navigations;
   }

   public PageNavigation getNavigationById(Integer navId)
   {
      PageNavigation navigation = new PageNavigation();
      for (PageNavigation nav : navigations)
      {
         if (nav.getId() == navId)
         {
            navigation = nav;
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

         // get navigation id
         String id = event.getRequestContext().getRequestParameter(OBJECTID);
         Integer navId = Integer.parseInt(id);
         // get PageNavigation by navigation id
         PageNavigation navigation = uicomp.getNavigationById(navId);
         uicomp.setSelectedNavigation(navigation);
         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApplication = context.getUIApplication();

         // check edit permission, ensure that user has edit permission on that
         // navigation
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);

         if (!userACL.hasEditPermission(navigation))
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }

         // ensure this navigation is exist
         DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
         if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
            return;
         }

         UIPopupWindow popUp = uicomp.getChild(UIPopupWindow.class);

         UINavigationManagement pageManager = popUp.createUIComponent(UINavigationManagement.class, null, null, popUp);
         pageManager.setOwner(navigation.getOwnerId());
         pageManager.setOwnerType(navigation.getOwnerType());

         UINavigationNodeSelector selector = pageManager.getChild(UINavigationNodeSelector.class);
      
         selector.setEdittedNavigation(navigation);
         selector.initTreeData();
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

         // get navigation id
         String id = event.getRequestContext().getRequestParameter(OBJECTID);
         Integer navId = Integer.parseInt(id);

         // get PageNavigation by navigation id
         PageNavigation navigation = uicomp.getNavigationById(navId);

         // open a add navigation popup
         UIPopupWindow popUp = uicomp.getChild(UIPopupWindow.class);
         UIPageNavigationForm pageNavigation = popUp.createUIComponent(UIPageNavigationForm.class, null, null, popUp);
         pageNavigation.setOwnerId(navigation.getOwnerId());
         pageNavigation.setOwnerType(navigation.getOwnerType());
         pageNavigation.setPriority(String.valueOf(navigation.getPriority()));
         pageNavigation.addFormInput();
         pageNavigation.setPageNav(navigation);
         popUp.setUIComponent(pageNavigation);
         popUp.setWindowSize(600, 400);
         popUp.setShowMask(true);
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

         // get navigation id
         String id = event.getRequestContext().getRequestParameter(OBJECTID);
         Integer navId = Integer.parseInt(id);

         // get PageNavigation by navigation id
         PageNavigation navigation = uicomp.getNavigationById(navId);

         // check edit permission, ensure that user has edit permission on that
         // navigation
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);

         if (!userACL.hasEditPermission(navigation))
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }

         // TODO ensure this navigation is exist
         DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
         if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
            return;
         }
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

   {

      public void execute(Event<UIPageNodeForm> event) throws Exception
      {
         UIPageNodeForm uiPageNodeForm = event.getSource();
         PageNavigation contextNavigation = uiPageNodeForm.getContextPageNavigation();
        
         UIGroupNavigationManagement uiGroupNavigation =
            uiPageNodeForm.getAncestorOfType(UIGroupNavigationManagement.class);
         PageNavigation selectedNavigation = uiGroupNavigation.getSelectedNavigation();
         UIPopupWindow uiNavigationPopup = uiGroupNavigation.getChild(UIPopupWindow.class);
         UINavigationManagement navigationManager =
            uiPageNodeForm.createUIComponent(UINavigationManagement.class, null, null);
         navigationManager.setOwner(contextNavigation.getOwnerId());
         navigationManager.setOwnerType(contextNavigation.getOwnerType());
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));;
            return;
         }
        
         PageNavigation edittedNavigation = dataService.getPageNavigation(PortalConfig.PORTAL_TYPE, portalName);
        
        
         //Minh Hoang TO: For release 3.1, Edit Permission check would be rollback to former checks on PortalConfig
         /*
         if (edittedNavigation == null)
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

   {

      public void execute(Event<UIPageNodeForm> event) throws Exception
      {
         UIPageNodeForm uiPageNodeForm = event.getSource();
         PageNavigation contextNavigation = uiPageNodeForm.getContextPageNavigation();
         UISiteManagement uiSiteManagement = uiPageNodeForm.getAncestorOfType(UISiteManagement.class);
         UIPopupWindow uiNavigationPopup = uiSiteManagement.getChild(UIPopupWindow.class);
         UINavigationManagement navigationManager = uiPageNodeForm.createUIComponent(UINavigationManagement.class, null, null);
         navigationManager.setOwner(contextNavigation.getOwnerId());
         navigationManager.setOwnerType(contextNavigation.getOwnerType());
         UINavigationNodeSelector selector = navigationManager.getChild(UINavigationNodeSelector.class);
        
         selector.setEdittedNavigation(uiPageNodeForm.getContextPageNavigation());
         selector.initTreeData();
        
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

   {
      new UnitTest()
      {
         public void execute() throws Exception
         {
            PageNavigation navigation = new PageNavigation();
            navigation.setOwnerType("group");
            navigation.setOwnerId("/platform/administrators");
            assertTrue(events.isEmpty());
            storage_.remove(navigation);
            assertEquals(1, events.size());
            Event event = events.removeFirst();
            assertEquals(DataStorage.NAVIGATION_REMOVED, event.getEventName());
            PageNavigation n = ((PageNavigation)event.getData());
            assertEquals("group", n.getOwnerType());
            assertEquals("/platform/administrators", n.getOwnerId());
            assertEquals(null, storage_.getPageNavigation("group", "/platform/administrators"));
         }
      }.execute(null);
   }
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

   {
      new UnitTest()
      {
         public void execute() throws Exception
         {
            PageNavigation navigation = new PageNavigation();
            navigation.setOwnerType("group");
            navigation.setOwnerId("/platform/administrators");
            storage_.remove(navigation);
            assertNotNull(events.removeLast());
            assertTrue(events.isEmpty());
            storage_.create(navigation);
            assertEquals(1, events.size());
            Event event = events.removeFirst();
            assertEquals(DataStorage.NAVIGATION_CREATED, event.getEventName());
            PageNavigation n = ((PageNavigation)event.getData());
            assertEquals("group", n.getOwnerType());
            assertEquals("/platform/administrators", n.getOwnerId());
            PageNavigation n2 = storage_.getPageNavigation("group", "/platform/administrators");
            assertEquals("group", n2.getOwnerType());
            assertEquals("/platform/administrators", n2.getOwnerId());
         }
      }.execute(null);
   }
View Full Code Here

Examples of org.exoplatform.portal.config.model.PageNavigation

   {
      new UnitTest()
      {
         public void execute() throws Exception
         {
            PageNavigation navigation = new PageNavigation();
            navigation.setOwnerType("group");
            navigation.setOwnerId("/platform/administrators");
            navigation.setPriority(3);
            assertTrue(events.isEmpty());
            storage_.save(navigation);
            assertEquals(1, events.size());
            Event event = events.removeFirst();
            assertEquals(DataStorage.NAVIGATION_UPDATED, event.getEventName());
            PageNavigation n = ((PageNavigation)event.getData());
            assertEquals("group", n.getOwnerType());
            assertEquals("/platform/administrators", n.getOwnerId());
            assertEquals(3, n.getPriority());
            PageNavigation n2 = storage_.getPageNavigation("group", "/platform/administrators");
            assertEquals("group", n2.getOwnerType());
            assertEquals("/platform/administrators", n2.getOwnerId());
            assertEquals(3, n2.getPriority());
         }
      }.execute(null);
   }
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.