Package org.gatein.pc.api

Examples of org.gatein.pc.api.PortletContext


                StatefulPortletContext statefulPortletContext = StatefulPortletContext.create(
                        preferencesPortletContext.getId(), PortletStateType.OPAQUE, wsrp.getState());

                invocation.setTarget(statefulPortletContext);
            } else {
                PortletContext portletContext = PortletContext.createPortletContext(preferencesPortletContext.getId());
                invocation.setTarget(portletContext);
            }

            // if the portlet is a cloned one already, we can modify it directly instead of requesting a clone
            if (wsrp.isCloned()) {
View Full Code Here


        //
        return invocation;
    }

    public void update(PropertyChange... changes) throws Exception {
        PortletContext portletContext = getPortletContext();

        //
        PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);

        // Get marshalled version
View Full Code Here

            try {
                PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
                DataStorage dataStorage = getApplicationComponent(DataStorage.class);
                String applicationId = dataStorage.getId(state.getApplicationState());
                ModelAdapter<S, C> adapter = ModelAdapter.getAdapter(state.getApplicationType());
                PortletContext producerOfferedPortletContext = adapter.getProducerOfferedPortletContext(applicationId);
                org.gatein.pc.api.Portlet producedOfferedPortlet;

                try {
                    producedOfferedPortlet = portletInvoker.getPortlet(producerOfferedPortletContext);
                } catch (Exception e) {
View Full Code Here

                StatefulPortletContext<C> updatedCtx = (StatefulPortletContext<C>) instanceCtx.getModifiedContext();
                C portletState = uiPortlet.getModifiedState(updatedCtx);
                uiPortlet.update(portletState);
            } else {
                // todo: fix me as this shouldn't probably be done only for the WSRP case
                PortletContext clonedContext = instanceCtx.getClonedContext();
                if (clonedContext != null) {
                    C state = uiPortlet.getClonedState(clonedContext);
                    uiPortlet.update(state);
                }
            }
View Full Code Here

         ConsumerStructureProvider structureProvider = consumer.getMigrationService().getStructureProvider();
         int importCount = 0;
         for (SelectablePortletHandle importedPortlet : portletsToImport)
         {
            String handle = importedPortlet.getHandle();
            PortletContext portletContext = info.getPortletContextFor(handle);
            if (portletContext != null)
            {
               structureProvider.assignPortletToWindow(portletContext, importedPortlet.getWindow(), importedPortlet.getPage(), handle);
               importCount++;
            }
View Full Code Here

            uiPortlet.update(portletState);
         }
         else
         {
            // todo: fix me as this shouldn't probably be done only for the WSRP case
            PortletContext clonedContext = instanceCtx.getClonedContext();
            if (clonedContext != null)
            {
               WSRP wsrp = new WSRP();
               wsrp.setPortletId(clonedContext.getId());
               wsrp.setCloned(true); // mark the state as cloned

               // if we have an associated state, record it as well...
               if (clonedContext instanceof StatefulPortletContext)
               {
View Full Code Here

      return invocation;
   }

   public void update(PropertyChange... changes) throws Exception
   {
      PortletContext portletContext = getPortletContext();

      //
      PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);

      // Get marshalled version
View Full Code Here

         {
            PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
            DataStorage dataStorage = getApplicationComponent(DataStorage.class);
            String applicationId = dataStorage.getId(state.getApplicationState());
            ModelAdapter<S, C> adapter = ModelAdapter.getAdapter(state.getApplicationType());
            PortletContext producerOfferedPortletContext = adapter.getProducerOfferedPortletContext(applicationId);
            org.gatein.pc.api.Portlet producedOfferedPortlet;
           
            try
            {
              producedOfferedPortlet = portletInvoker.getPortlet(producerOfferedPortletContext);
View Full Code Here

         return;
      }

      //
      PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
      PortletContext portletContext = uiPortlet_.getPortletContext();

      //

      PropertyChange[] propertyChanges = new PropertyChange[uiFormInputs.size()];
View Full Code Here

   {
      ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "PortletContext");
      String handle = portletContext.getPortletHandle();
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(handle, "portlet handle", "PortletContext");

      PortletContext context;
      byte[] state = portletContext.getPortletState();
      context = PortletContext.createPortletContext(handle, state, false);

      return context;
   }
View Full Code Here

TOP

Related Classes of org.gatein.pc.api.PortletContext

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.