Package org.gatein.pc.api

Examples of org.gatein.pc.api.PortletInvoker


   }

   public PortletContext importPortlet(PortletStateType stateType, PortletContext compoundPortletContext)
      throws PortletInvokerException
   {
      PortletInvoker federated = getFederatedPortletInvokerFor(compoundPortletContext);
      return federated.importPortlet(stateType, compoundPortletContext);
   }
View Full Code Here


    *
    * @return the non null next invoker
    */
   private PortletInvoker safeGetNext()
   {
      PortletInvoker next = this.next.get();

      //
      if (next == null)
      {
         throw new IllegalStateException("No next invoker");
View Full Code Here

    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

    }

    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

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

    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

    }

    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

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

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

      {
         return;
      }

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

      //

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

TOP

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

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.