Package org.exoplatform.portal.config.model

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


         {
            portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
               new String[]{portalName}));
            return;
         }
         PortalConfig portalConfig = userConfig.getPortalConfig();

         UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(portalConfig))
         {
            portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission",
               new String[]{portalConfig.getName()}));
            return;
         }

         UIWorkingWorkspace uiWorkingWS = portalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
         //UIEditInlineWorkspace uiEditWS = uiWorkingWS.addChild(UIEditInlineWorkspace.class, null, UIPortalApplication.UI_EDITTING_WS_ID);
View Full Code Here


public class TestPortalACL extends AbstractTestUserACL
{

   public void testFoo()
   {
      PortalConfig portal = new PortalConfig();
      portal.setAccessPermissions(new String[0]);

      //
      assertTrue(root.hasEditPermission(portal));
      assertFalse(administrator.hasEditPermission(portal));
      assertFalse(manager.hasEditPermission(portal));
View Full Code Here

      assertFalse(guest.hasPermission(portal));
   }

   public void testPortalAccessible()
   {
      PortalConfig portal = new PortalConfig();
      portal.setAccessPermissions(new String[]{"manager:/manageable"});

      //
      assertTrue(root.hasEditPermission(portal));
      assertFalse(administrator.hasEditPermission(portal));
      assertFalse(manager.hasEditPermission(portal));
View Full Code Here

      assertFalse(guest.hasPermission(portal));
   }

   public void testPortalEditable()
   {
      PortalConfig portal = new PortalConfig();
      portal.setAccessPermissions(new String[0]);
      portal.setEditPermission("manager:/manageable");

      //
      assertTrue(root.hasEditPermission(portal));
      assertFalse(administrator.hasEditPermission(portal));
      assertTrue(manager.hasEditPermission(portal));
View Full Code Here

      assertFalse(guest.hasPermission(portal));
   }

   public void testPortalAccessibleAndEditable()
   {
      PortalConfig portal = new PortalConfig();
      portal.setAccessPermissions(new String[]{"manager:/manageable"});
      portal.setEditPermission("manager:/manageable");

      //
      assertTrue(root.hasEditPermission(portal));
      assertFalse(administrator.hasEditPermission(portal));
      assertTrue(manager.hasEditPermission(portal));
View Full Code Here

      }

      // Get portals without edit permission
      UserACL userACL = getApplicationComponent(UserACL.class);
      Iterator<PortalConfig> iterPortals = tempArrayList.iterator();
      PortalConfig portalConfig;
      while (iterPortals.hasNext())
      {
         portalConfig = iterPortals.next();
         if (!userACL.hasEditPermission(portalConfig))
         {
View Full Code Here

      assertEquals(true, nodeNavigation.isVisible());
   }

   public void testPortal() throws Exception
   {
      PortalConfig portal = storage.getPortalConfig("test");
      assertNotNull(portal);

      assertEquals("test", portal.getName());
      assertEquals("en", portal.getLocale());
      assertTrue(Arrays.equals(new String[]{"test_access_permissions"}, portal.getAccessPermissions()));
      assertEquals("test_edit_permission", portal.getEditPermission());
      assertEquals("test_skin", portal.getSkin());
      assertEquals("test_prop_value", portal.getProperty("prop_key"));
   }
View Full Code Here

      {
         public void execute() throws Exception
         {
            UserPortalConfig userPortalCfg = userPortalConfigSer_.getUserPortalConfig("classic", "root");
            assertNotNull(userPortalCfg);
            PortalConfig portalCfg = userPortalCfg.getPortalConfig();
            assertNotNull(portalCfg);
            assertEquals(PortalConfig.PORTAL_TYPE, portalCfg.getType());
            assertEquals("classic", portalCfg.getName());
            assertEquals("en", portalCfg.getLocale());
            portalCfg.setLocale("fr");

            storage_.save(portalCfg);

            userPortalCfg = userPortalConfigSer_.getUserPortalConfig("classic", "root");
            portalCfg = userPortalCfg.getPortalConfig();
            assertEquals("fr", portalCfg.getLocale());
         }
      }.execute("root");
   }
View Full Code Here

      {
         public void execute() throws Exception
         {
            UserPortalConfig userPortalCfg = userPortalConfigSer_.getUserPortalConfig("classic", "root");
            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("expected to have 5 navigations instead of " + navigations, 5, navigations.size());
            assertTrue(navigations.containsKey("portal::classic"));
            assertTrue(navigations.containsKey("group::/platform/administrators"));
View Full Code Here

      {
         public void execute() throws Exception
         {
            UserPortalConfig userPortalCfg = userPortalConfigSer_.getUserPortalConfig("classic", "john");
            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("expected to have 5 navigations instead of " + navigations, 5, navigations.size());
            assertTrue(navigations.containsKey("portal::classic"));
            assertTrue(navigations.containsKey("group::/platform/administrators"));
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.config.model.PortalConfig

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.