Examples of PortalConfig


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

      {
         public void execute() throws Exception
         {
            UserPortalConfig userPortalCfg = userPortalConfigSer_.getUserPortalConfig("classic", "mary");
            assertNotNull(userPortalCfg);
            PortalConfig portalCfg = userPortalCfg.getPortalConfig();
            assertNotNull(portalCfg);
            assertEquals(PortalConfig.PORTAL_TYPE, portalCfg.getType());
            assertEquals("classic", portalCfg.getName());
            assertNotNull(userPortalCfg.getNavigations());
            Map<String, PageNavigation> navigations = toMap(userPortalCfg);
            assertEquals(3, navigations.size());
            assertTrue(navigations.containsKey("portal::classic"));
            assertTrue(navigations.containsKey("group::/platform/users"));
View Full Code Here

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

      {
         public void execute() throws Exception
         {
            UserPortalConfig userPortalCfg = userPortalConfigSer_.getUserPortalConfig("classic", null);
            assertNotNull(userPortalCfg);
            PortalConfig portalCfg = userPortalCfg.getPortalConfig();
            assertNotNull(portalCfg);
            assertEquals(PortalConfig.PORTAL_TYPE, portalCfg.getType());
            assertEquals("classic", portalCfg.getName());
            assertNotNull(userPortalCfg.getNavigations());
            Map<String, PageNavigation> navigations = toMap(userPortalCfg);
            assertEquals("" + navigations, 1, navigations.size());
            assertTrue(navigations.containsKey("portal::classic"));
         }
View Full Code Here

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

         public void execute() throws Exception
         {
            userPortalConfigSer_.createUserPortalConfig(PortalConfig.PORTAL_TYPE, "jazz", "test");
            UserPortalConfig userPortalCfg = userPortalConfigSer_.getUserPortalConfig("jazz", "root");
            assertNotNull(userPortalCfg);
            PortalConfig portalCfg = userPortalCfg.getPortalConfig();
            assertNotNull(portalCfg);
            assertEquals(PortalConfig.PORTAL_TYPE, portalCfg.getType());
            assertEquals("jazz", portalCfg.getName());
            assertNotNull(userPortalCfg.getNavigations());
            Map<String, PageNavigation> navigations = toMap(userPortalCfg);
            assertEquals("expected to have 5 navigations instead of " + navigations, 5, navigations.size());
            assertTrue(navigations.containsKey("portal::jazz"));
            assertTrue(navigations.containsKey("group::/platform/administrators"));
View Full Code Here

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

      {
         public void execute() throws Exception
         {
            mgr.clearCache();

            PortalConfig cfg = storage_.getPortalConfig(PortalConfig.USER_TYPE, "overwritelayout");
            assertNotNull(cfg);

            Container container = cfg.getPortalLayout();
            assertNotNull(container);
            assertEquals(2, container.getChildren().size());
            assertTrue(container.getChildren().get(0) instanceof PageBody);
            assertTrue(((Application)container.getChildren().get(1)).getType() == ApplicationType.PORTLET);
            Application<Portlet> pa = (Application<Portlet>)container.getChildren().get(1);
View Full Code Here

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

            user.setLastName("default");
            user.setEmail("exo@exoportal.org");
            userHandler.createUser(user, true);

            //
            PortalConfig cfg = storage_.getPortalConfig(PortalConfig.USER_TYPE, "julien");
            assertNotNull(cfg);
            Container container = cfg.getPortalLayout();
            assertNotNull(container);
            assertEquals(2, container.getChildren().size());
            assertTrue(container.getChildren().get(0) instanceof PageBody);
            assertTrue(((Application)container.getChildren().get(1)).getType() == ApplicationType.PORTLET);
            Application<Portlet> pa = (Application<Portlet>)container.getChildren().get(1);
View Full Code Here

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

            group.setGroupName(groupName);
            group.setDescription("this is a group for test");
            groupHandler.addChild(null, group, true);

            //
            PortalConfig cfg = storage_.getPortalConfig(PortalConfig.GROUP_TYPE, "/" + groupName);
            assertNotNull(cfg);
            Container container = cfg.getPortalLayout();
            assertNotNull(container);
            assertEquals(4, container.getChildren().size());
            assertTrue(container.getChildren().get(2) instanceof PageBody);
            assertTrue(((Application)container.getChildren().get(1)).getType() == ApplicationType.PORTLET);
           
View Full Code Here

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

      super.tearDown();
   }

   public void testSiteLayout() throws Exception
   {
      PortalConfig pConfig = storage.getPortalConfig(PortalConfig.PORTAL_TYPE, "classic");
      assertNotNull(pConfig);
      assertNotNull("The Group layout of " + pConfig.getName() + " is null", pConfig.getPortalLayout());

      pConfig = storage.getPortalConfig(PortalConfig.GROUP_TYPE, "/platform/administrators");
      assertNotNull(pConfig);
      assertNotNull("The Group layout of " + pConfig.getName() + " is null", pConfig.getPortalLayout());
      assertTrue(pConfig.getPortalLayout().getChildren() != null && pConfig.getPortalLayout().getChildren().size() > 1);
      pConfig.getPortalLayout().getChildren().clear();
      storage.save(pConfig);

      pConfig = storage.getPortalConfig(PortalConfig.GROUP_TYPE, "/platform/administrators");
      assertNotNull(pConfig);
      assertNotNull("The Group layout of " + pConfig.getName() + " is null", pConfig.getPortalLayout());
      assertTrue(pConfig.getPortalLayout().getChildren() != null && pConfig.getPortalLayout().getChildren().size() == 0);

      pConfig = storage.getPortalConfig(PortalConfig.USER_TYPE, "root");
      assertNotNull(pConfig);
      assertNotNull("The User layout of " + pConfig.getName() + " is null", pConfig.getPortalLayout());

      pConfig = storage.getPortalConfig(PortalConfig.USER_TYPE, "mary");
      assertNotNull(pConfig);
      assertNotNull("The User layout of " + pConfig.getName() + " is null", pConfig.getPortalLayout());
   }
View Full Code Here

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

      groupHandler.addChild(null, group, true);

      group = groupHandler.findGroupById("/groupTest");
      assertNotNull(group);

      PortalConfig pConfig = storage.getPortalConfig(PortalConfig.GROUP_TYPE, "/groupTest");
      assertNotNull("the Group's PortalConfig is not null", pConfig);
      assertTrue(pConfig.getPortalLayout().getChildren() == null || pConfig.getPortalLayout().getChildren().size() == 4);
     
      /**
       * We need to remove the /groupTest from the groupHandler as the
       * handler is shared between the tests and can cause other tests
       * to fail.
View Full Code Here

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

      userHandler.createUser(user, true);

      user = userHandler.findUserByName("testing");
      assertNotNull(user);

      PortalConfig pConfig = storage.getPortalConfig(PortalConfig.USER_TYPE, "testing");
      assertNotNull("the User's PortalConfig is not null", pConfig);
   }
View Full Code Here

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

   {
      String userName = context.getRemoteUser();
      if (userName != null)
      {
         DataStorage storage = (DataStorage)PortalContainer.getComponent(DataStorage.class);
         PortalConfig portalConfig = storage.getPortalConfig("user", userName);

         //
         if (portalConfig == null)
         {
            log.debug("About to create user site for user " + userName);
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.