Package org.exoplatform.portal.config.model

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


      }

      String applicationId = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);

      Application application = event.getSource().getApplication(applicationId);
      ApplicationType appType = application.getType();
      String portletName = application.getApplicationName();
//      String appGroup = application.getApplicationGroup();

      // TODO review windowId for eXoWidget and eXoApplication
      UIComponent component = null;
      if (ApplicationType.GADGET.equals(appType))
      {
         UIGadget uiGadget = uiPage.createUIComponent(event.getRequestContext(), UIGadget.class, null, null);

         uiGadget.setState(new TransientApplicationState<Gadget>(portletName));

         // Set Properties For gadget
         int posX = (int)(Math.random() * 400);
         int posY = (int)(Math.random() * 200);

         uiGadget.getProperties().put(UIApplication.locationX, String.valueOf(posX));
         uiGadget.getProperties().put(UIApplication.locationY, String.valueOf(posY));

         component = uiGadget;
      }
      else
      {
         boolean remote = ApplicationType.WSRP_PORTLET.equals(appType);

         UIPortlet uiPortlet = uiPage.createUIComponent(UIPortlet.class, null, null);

         CloneApplicationState appState;
         Object appId;
         if (!remote)
         {
            appState = new CloneApplicationState<Portlet>(application.getId());
         }
         else
         {
            appState = new CloneApplicationState<WSRPState>(application.getId());
         }

         ApplicationType applicationType = remote ? ApplicationType.WSRP_PORTLET : ApplicationType.PORTLET;
         PortletState portletState = new PortletState(appState, applicationType);

         uiPortlet.setState(portletState);
         uiPortlet.setPortletInPortal(false);

View Full Code Here


            else
            {
               Application app = null;
               UIApplicationList appList = uiApp.findFirstComponentOfType(UIApplicationList.class);
               app = appList.getApplication(sourceId);
               ApplicationType applicationType = app.getType();

               //
               UIPortlet uiPortlet = uiTarget.createUIComponent(UIPortlet.class, null, null);
               if (app.getDisplayName() != null)
               {
View Full Code Here

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

TOP

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

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.