Package org.exoplatform.portal.config.model

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


      assertEquals(new PortletBuilder().add("template", "someanothervalue").build(), prefs);
   }

   public void testNullPreferenceValue() throws Exception
   {
      Page page = storage_.getPage("portal::test::test4");
      Application<Portlet> app = (Application<Portlet>)page.getChildren().get(0);
      PersistentApplicationState<Portlet> state = (PersistentApplicationState)app.getState();

      //
      Portlet prefs = storage_.load(state, ApplicationType.PORTLET);
View Full Code Here


      assertNotNull(nav);
      assertEquals("/platform/test/legacy", nav.getOwnerId());
      PageNode node = nav.getNodes().get(0);
      assertEquals("group::/platform/test/legacy::register", node.getPageReference());

      Page page = storage.getPage("group::/platform/test/legacy::register");
      assertNotNull(page);
      assertEquals("group::/platform/test/legacy::register", page.getPageId());
      assertEquals("/platform/test/legacy", page.getOwnerId());
      Application app = (Application)page.getChildren().get(0);
      //    assertEquals("group#/platform/test/legacy:/web/IFramePortlet/blog", app.getInstanceState().getWeakReference());

      PortletPreferences prefs = storage.getPortletPreferences("group#/platform/test/legacy:/web/IFramePortlet/blog");
      assertNotNull(prefs);
      assertEquals("group#/platform/test/legacy:/web/IFramePortlet/blog", prefs.getWindowId());
View Full Code Here

      assertNotNull(nav);
      assertEquals("/platform/test/normalized", nav.getOwnerId());
      PageNode node = nav.getNodes().get(0);
      assertEquals("group::/platform/test/normalized::register", node.getPageReference());

      Page page = storage.getPage("group::/platform/test/normalized::register");
      assertNotNull(page);
      assertEquals("group::/platform/test/normalized::register", page.getPageId());
      assertEquals("/platform/test/normalized", page.getOwnerId());
      Application app = (Application)page.getChildren().get(0);
      //    assertEquals("group#/platform/test/normalized:/exoadmin/AccountPortlet/Account", app.getInstanceState().getWeakReference());

      PortletPreferences prefs =
         storage.getPortletPreferences("group#/platform/test/normalized:/exoadmin/AccountPortlet/Account");
      assertNotNull(prefs);
View Full Code Here

      assertEquals("test_prop_value", portal.getProperty("prop_key"));
   }

   public void testPageWithoutPageId() throws Exception
   {
      Page page = storage.getPage("portal::test::test2");
      assertNotNull(page);
      assertEquals("portal::test::test2", page.getPageId());
      assertEquals("test", page.getOwnerId());
      assertEquals("portal", page.getOwnerType());
      assertEquals("test2", page.getName());
   }
View Full Code Here

      assertEquals("test2", page.getName());
   }

   public void testPage() throws Exception
   {
      Page page = storage.getPage("portal::test::test1");
      assertNotNull(page);

      //
      assertEquals("test_title", page.getTitle());
      assertEquals("test_factory_id", page.getFactoryId());
      assertTrue(Arrays.equals(new String[]{"test_access_permissions"}, page.getAccessPermissions()));
      assertEquals("test_edit_permission", page.getEditPermission());
      assertEquals(true, page.isShowMaxWindow());

      //
      List<ModelObject> children = page.getChildren();
      assertEquals(2, children.size());

      //
      Container container1 = (Container)children.get(0);
      assertEquals("container_1", container1.getName());
View Full Code Here

   }
*/

   public void testAnonymousPreferencesSavePage() throws Exception
   {
      Page page = storage.getPage("portal::test::test3");

      // Save it again
      storage.save(page);

      //
      page = storage.getPage("portal::test::test3");

      //
      Application app = (Application)page.getChildren().get(0);
      //    String instanceId = app.getInstanceState().getWeakReference();

      // Check instance id
      //    String[] chunks = Mapper.parseWindowId(instanceId);
      //    assertEquals("portal", chunks[0]);
View Full Code Here

      //    assertNull(storage.getPortletPreferences(instanceId));
   }

   public void testAnonymousPreference() throws Exception
   {
      Page page = storage.getPage("portal::test::test3");
      Application app = (Application)page.getChildren().get(0);
      //    String instanceId = app.getInstanceState().getWeakReference();

      // Check instance id
      //    String[] chunks = Mapper.parseWindowId(instanceId);
      //    assertEquals("portal", chunks[0]);
View Full Code Here

      assertEquals(0, res.size());
   }

   public void testFoo() throws Exception
   {
      Page page = new Page();
      page.setPageId("portal::test::searchedpage");
      page.setTitle("Juuu Ziii");
      storage.create(page);
      session.save();

      //
      assertFound("Juuu Ziii", "portal::test::searchedpage");
View Full Code Here

      wsrp.setPortletId(id);
      TransientApplicationState<WSRP> state = new TransientApplicationState<WSRP>("test", wsrp);
      Application<WSRP> wsrpApplication = Application.createWSRPApplication();
      wsrpApplication.setState(state);

      Page container = new Page();
      String pageId = "portal::test::wsrp_page";
      container.setPageId(pageId);
      container.getChildren().add(wsrpApplication);

      storage_.create(container);

      container = storage_.getPage(pageId);
      wsrpApplication = (Application<WSRP>)container.getChildren().get(0);

      wsrp = storage_.load(wsrpApplication.getState(), ApplicationType.WSRP_PORTLET);
      assertNotNull(wsrp);
      assertEquals(id, wsrp.getPortletId());
   }
View Full Code Here

         throws Exception
      {
         String pageId = node.getPageReference();
         if (pageId != null)
         {
            Page page = service.getPage(pageId);
            if (page != null)
            {
               String newName = "page" + node.hashCode();
               page = service.renewPage(pageId, newName, ownerType, ownerId);
               node.setPageReference(page.getPageId());
            }
         }
         List<PageNode> children = node.getChildren();
         if (children == null || children.size() < 1)
         {
View Full Code Here

TOP

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

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.