Examples of PortletInvoker


Examples of org.gatein.pc.api.PortletInvoker

    }

    public void setState(PortletState<S> state) {
        if (state != null) {
            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) {
                    // Whenever couldn't invoke the portlet object, set the request portlet to null for the error tobe
                    // properly handled and displayed when the portlet is rendered
                    producedOfferedPortlet = null;
                    log.error(e.getMessage(), e);
View Full Code Here

Examples of org.gatein.pc.api.PortletInvoker

     * @param invocation the portlet invocation
     * @return the portlet invocation response
     * @throws PortletInvokerException any invoker exception
     */
    public PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException {
        PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
        currentPortlet.set(this);
        try {
            return portletInvoker.invoke(invocation);
        } finally {
            currentPortlet.set(null);
        }
    }
View Full Code Here

Examples of org.gatein.pc.api.PortletInvoker

        //
        log.info("About to import portlets in application registry");

        //
        ExoContainer manager = ExoContainerContext.getCurrentContainer();
        PortletInvoker portletInvoker = (PortletInvoker) manager.getComponentInstance(PortletInvoker.class);
        Set<org.gatein.pc.api.Portlet> portlets = portletInvoker.getPortlets();

        //
        portlet: for (org.gatein.pc.api.Portlet portlet : portlets) {
            PortletInfo info = portlet.getInfo();
            String portletApplicationName = info.getApplicationName();
View Full Code Here

Examples of org.gatein.pc.api.PortletInvoker

      {
         return;
      }

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

      //

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

Examples of org.gatein.pc.api.PortletInvoker

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

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

      // Get marshalled version
      StatefulPortletContext<C> updatedCtx = (StatefulPortletContext<C>)portletInvoker.setProperties(portletContext, changes);

      //
      C updateState = updatedCtx.getState();

      // Now save it
View Full Code Here

Examples of org.gatein.pc.api.PortletInvoker

   {
      if (state != null)
      {
         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 (NoSuchPortletException nspe)
            {
              producedOfferedPortlet = null;
              nspe.printStackTrace();
View Full Code Here

Examples of org.gatein.pc.api.PortletInvoker

    * @return the portlet invocation response
    * @throws PortletInvokerException any invoker exception
    */
   public PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException
   {
      PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
      currentPortlet.set(this);
      try
      {
         return portletInvoker.invoke(invocation);
      }
      finally
      {
         currentPortlet.set(null);
      }
View Full Code Here

Examples of org.gatein.pc.api.PortletInvoker

         else
         {
            FederatedPortletInvoker fedInvoker = federatingPortletInvoker.getFederatedInvoker(id);
            if (fedInvoker != null)
            {
               PortletInvoker invoker = fedInvoker.getPortletInvoker();
               if (invoker instanceof WSRPConsumer)
               {
                  consumer = (WSRPConsumer)invoker;
                  consumer.deactivate();
                  federatingPortletInvoker.unregisterInvoker(id);
View Full Code Here

Examples of org.gatein.pc.api.PortletInvoker

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

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

        // Get marshalled version
        StatefulPortletContext<C> updatedCtx = (StatefulPortletContext<C>) portletInvoker
                .setProperties(portletContext, changes);

        //
        C updateState = updatedCtx.getState();
View Full Code Here

Examples of org.gatein.pc.api.PortletInvoker

    }

    public void setState(PortletState<S> state) {
        if (state != null) {
            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) {
                    // Whenever couldn't invoke the portlet object, set the request portlet to null for the error tobe
                    // properly handled and displayed when the portlet is rendered
                    producedOfferedPortlet = null;
                    log.error(e.getMessage(), e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.