Package org.exoplatform.portal.config.model

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


      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


      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("container_1_description", container1.getDescription());
      assertEquals("container_1_width", container1.getWidth());
      assertEquals("container_1_height", container1.getHeight());

      //
      Application application1 = (Application)children.get(1);
      assertEquals("application_1_theme", application1.getTheme());
      assertEquals("application_1_title", application1.getTitle());
      assertTrue(Arrays.equals(new String[]{"application_1_access_permissions"}, application1.getAccessPermissions()));
      assertEquals(true, application1.getShowInfoBar());
      assertEquals(true, application1.getShowApplicationState());
      assertEquals(true, application1.getShowApplicationMode());
      assertEquals("application_1_description", application1.getDescription());
      assertEquals("application_1_icon", application1.getIcon());
      assertEquals("application_1_width", application1.getWidth());
      assertEquals("application_1_height", application1.getHeight());
      assertEquals("application_1_prop_value", application1.getProperties().get("prop_key"));
      //    assertEquals("portal#test:/web/BannerPortlet/banner", application1.getInstanceState().getWeakReference());
   }
View Full Code Here

      //
      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

   }

   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

        } else if (model instanceof PageBody) {
            UIPageBody uiPageBody = uiContainer.createUIComponent(context, UIPageBody.class, null, null);
            uiPageBody.setStorageId(((PageBody) model).getStorageId());
            uiComponent = uiPageBody;
        } else if (model instanceof Application) {
            Application application = (Application) model;

            if (dashboard && application.getType() == ApplicationType.GADGET) {
                Application<Gadget> ga = (Application<Gadget>) application;
                UIGadget uiGadget = uiContainer.createUIComponent(context, UIGadget.class, null, null);
                uiGadget.setStorageId(application.getStorageId());
                toUIGadget(uiGadget, ga);
                uiComponent = uiGadget;
            } else {
                UIPortlet uiPortlet = uiContainer.createUIComponent(context, UIPortlet.class, null, null);
                uiPortlet.setStorageId(application.getStorageId());
                if (application.getStorageName() != null) {
                    uiPortlet.setStorageName(application.getStorageName());
                }
                toUIPortlet(uiPortlet, application);
                uiComponent = uiPortlet;
            }
        } else if (model instanceof Container) {
View Full Code Here

* @version $Revision$
*/
public abstract class AbstractMarshaller<T> implements Marshaller<T> {
    protected void marshalModelObject(StaxWriter<Element> writer, ModelObject modelObject) throws XMLStreamException {
        if (modelObject instanceof Application) {
            Application application = (Application) modelObject;
            ApplicationType type = application.getType();
            if (ApplicationType.PORTLET == type) {
                marshalPortletApplication(writer, safeCast(application, Portlet.class));
            } else if (ApplicationType.GADGET == type) {
                marshalGadgetApplication(writer, safeCast(application, Gadget.class));
            } else if (ApplicationType.WSRP_PORTLET == type) {
View Full Code Here

            updateOwnership(child, ownerType, ownerId);
         }
      }
      else if (object instanceof Application)
      {
         Application application = (Application)object;
         TransientApplicationState applicationState = (TransientApplicationState)application.getState();
         if (applicationState != null
            && (applicationState.getOwnerType() == null || applicationState.getOwnerId() == null))
         {
            applicationState.setOwnerType(ownerType);
            applicationState.setOwnerId(ownerId);
View Full Code Here

            }
            for (ModelObject child : container.getChildren()) {
                updateOwnership(child, ownerType, ownerId);
            }
        } else if (object instanceof Application) {
            Application application = (Application) object;
            TransientApplicationState applicationState = (TransientApplicationState) application.getState();
            if (applicationState != null && (applicationState.getOwnerType() == null || applicationState.getOwnerId() == null)) {
                applicationState.setOwnerType(ownerType);
                applicationState.setOwnerId(ownerId);
            }
        }
View Full Code Here

            return null;
        ArrayList<ModelObject> children = new ArrayList<ModelObject>(existing.size());

        for (ModelObject object : existing) {
            if (object instanceof Application) {
                @SuppressWarnings("unchecked")
                Application app = copy((Application) object);

                children.add(app);
            }
            if (object instanceof Dashboard) {
View Full Code Here

TOP

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

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.