Package org.gatein.pc.portlet.impl.jsr168

Examples of org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker


   public PortletInvocationResponse dispatch(PortletInvocation invocation) throws PortletInvokerException, InvocationException
   {
      HttpServletRequest dreq = invocation.getDispatchedRequest();

      //
      PortletRequestImpl req;
      PortletResponseImpl resp;
      String phase;
      FilterChainImpl<?> chain;
      if (invocation instanceof ActionInvocation)
      {
View Full Code Here


   {
      HttpServletRequest dreq = invocation.getDispatchedRequest();

      //
      PortletRequestImpl req;
      PortletResponseImpl resp;
      String phase;
      FilterChainImpl<?> chain;
      if (invocation instanceof ActionInvocation)
      {
         req = new ActionRequestImpl(this, (ActionInvocation)invocation);
         resp = new ActionResponseImpl((ActionInvocation)invocation, req);
         phase = PortletRequest.ACTION_PHASE;
         chain = new FilterChainImpl<ActionFilter>(actionFilterList, ActionFilter.class);
      }
      else if (invocation instanceof RenderInvocation)
      {
         req = new RenderRequestImpl(this, (RenderInvocation)invocation);
         resp = new RenderResponseImpl((RenderInvocation)invocation, req);
         phase = PortletRequest.RENDER_PHASE;
         chain = new FilterChainImpl<RenderFilter>(renderFilterList, RenderFilter.class);
      }
      else if (invocation instanceof EventInvocation)
      {
         req = new EventRequestImpl(this, (EventInvocation)invocation);
         resp = new EventResponseImpl((EventInvocation)invocation, req);
         phase = PortletRequest.EVENT_PHASE;
         chain = new FilterChainImpl<EventFilter>(eventFilterList, EventFilter.class);
      }
      else if (invocation instanceof ResourceInvocation)
      {
         req = new ResourceRequestImpl(this, (ResourceInvocation)invocation);
         resp = new ResourceResponseImpl((ResourceInvocation)invocation, req);
         phase = PortletRequest.RESOURCE_PHASE;
         chain = new FilterChainImpl<ResourceFilter>(resourceFilterList, ResourceFilter.class);
      }
      else
      {
        throw new InvocationException("Unexpected invocation " + invocation);
      }

      //
      try
      {
         dreq.setAttribute(ContextDispatcherInterceptor.REQ_ATT_COMPONENT_INVOCATION, invocation);
         dreq.setAttribute(Constants.JAVAX_PORTLET_CONFIG, config);
         dreq.setAttribute(Constants.JAVAX_PORTLET_REQUEST, req);
         dreq.setAttribute(Constants.JAVAX_PORTLET_RESPONSE, resp);
         dreq.setAttribute(Constants.JAVAX_PORTLET_LIFECYCLE_PHASE, phase);

         //
         chain.doFilter(req, resp);

         //
         return resp.getResponse();
      }
      catch (NoClassDefFoundError e)
      {
         //
         return new ErrorResponse(e);
View Full Code Here

   {
      HttpServletRequest dreq = invocation.getRequest();

      //
      PortletRequestImpl req;
      PortletResponseImpl resp;
      String phase;
      FilterChainImpl<?> chain;
      if (invocation instanceof ActionInvocation)
      {
         req = new ActionRequestImpl(this, (ActionInvocation)invocation);
         resp = new ActionResponseImpl((ActionInvocation)invocation, req);
         phase = PortletRequest.ACTION_PHASE;
         chain = new FilterChainImpl<ActionFilter>(actionFilterList, ActionFilter.class);
      }
      else if (invocation instanceof RenderInvocation)
      {
         req = new RenderRequestImpl(this, (RenderInvocation)invocation);
         resp = new RenderResponseImpl((RenderInvocation)invocation, req);
         phase = PortletRequest.RENDER_PHASE;
         chain = new FilterChainImpl<RenderFilter>(renderFilterList, RenderFilter.class);
      }
      else if (invocation instanceof EventInvocation)
      {
         req = new EventRequestImpl(this, (EventInvocation)invocation);
         resp = new EventResponseImpl((EventInvocation)invocation, req);
         phase = PortletRequest.EVENT_PHASE;
         chain = new FilterChainImpl<EventFilter>(eventFilterList, EventFilter.class);
      }
      else if (invocation instanceof ResourceInvocation)
      {
         req = new ResourceRequestImpl(this, (ResourceInvocation)invocation);
         resp = new ResourceResponseImpl((ResourceInvocation)invocation, req);
         phase = PortletRequest.RESOURCE_PHASE;
         chain = new FilterChainImpl<ResourceFilter>(resourceFilterList, ResourceFilter.class);
      }
      else
      {
         throw new InvocationException("Unexpected invocation " + invocation);
      }

      //
      try
      {
         dreq.setAttribute(ContextDispatcherInterceptor.REQ_ATT_COMPONENT_INVOCATION, invocation);
         dreq.setAttribute(Constants.JAVAX_PORTLET_CONFIG, config);
         dreq.setAttribute(Constants.JAVAX_PORTLET_REQUEST, req);
         dreq.setAttribute(Constants.JAVAX_PORTLET_RESPONSE, resp);
         dreq.setAttribute(Constants.JAVAX_PORTLET_LIFECYCLE_PHASE, phase);

         //
         chain.doFilter(req, resp);

         //
         return resp.getResponse();
      }
      catch (NoClassDefFoundError e)
      {
         //
         return new ErrorResponse(e);
View Full Code Here

   {
      HttpServletRequest dreq = invocation.getDispatchedRequest();

      //
      PortletRequestImpl req;
      PortletResponseImpl resp;
      String phase;
      FilterChainImpl<?> chain;
      if (invocation instanceof ActionInvocation)
      {
         req = new ActionRequestImpl(this, (ActionInvocation)invocation);
         resp = new ActionResponseImpl((ActionInvocation)invocation, req);
         phase = PortletRequest.ACTION_PHASE;
         chain = new FilterChainImpl<ActionFilter>(actionFilterList, ActionFilter.class);
      }
      else if (invocation instanceof RenderInvocation)
      {
         req = new RenderRequestImpl(this, (RenderInvocation)invocation);
         resp = new RenderResponseImpl((RenderInvocation)invocation, req);
         phase = PortletRequest.RENDER_PHASE;
         chain = new FilterChainImpl<RenderFilter>(renderFilterList, RenderFilter.class);
      }
      else if (invocation instanceof EventInvocation)
      {
         req = new EventRequestImpl(this, (EventInvocation)invocation);
         resp = new EventResponseImpl((EventInvocation)invocation, req);
         phase = PortletRequest.EVENT_PHASE;
         chain = new FilterChainImpl<EventFilter>(eventFilterList, EventFilter.class);
      }
      else if (invocation instanceof ResourceInvocation)
      {
         req = new ResourceRequestImpl(this, (ResourceInvocation)invocation);
         resp = new ResourceResponseImpl((ResourceInvocation)invocation, req);
         phase = PortletRequest.RESOURCE_PHASE;
         chain = new FilterChainImpl<ResourceFilter>(resourceFilterList, ResourceFilter.class);
      }
      else
      {
         throw new InvocationException("Unexpected invocation " + invocation);
      }

      //
      try
      {
         dreq.setAttribute(ContextDispatcherInterceptor.REQ_ATT_COMPONENT_INVOCATION, invocation);
         dreq.setAttribute(Constants.JAVAX_PORTLET_CONFIG, config);
         dreq.setAttribute(Constants.JAVAX_PORTLET_REQUEST, req);
         dreq.setAttribute(Constants.JAVAX_PORTLET_RESPONSE, resp);
         dreq.setAttribute(Constants.JAVAX_PORTLET_LIFECYCLE_PHASE, phase);

         //
         chain.doFilter(req, resp);

         //
         return resp.getResponse();
      }
      catch (NoClassDefFoundError e)
      {
         //
         return new ErrorResponse(e);
View Full Code Here

   {
      HttpServletRequest dreq = invocation.getRequest();

      //
      PortletRequestImpl req;
      PortletResponseImpl resp;
      String phase;
      FilterChainImpl<?> chain;
      if (invocation instanceof ActionInvocation)
      {
         req = new ActionRequestImpl(this, (ActionInvocation)invocation);
         resp = new ActionResponseImpl((ActionInvocation)invocation, req);
         phase = PortletRequest.ACTION_PHASE;
         chain = new FilterChainImpl<ActionFilter>(actionFilterList, ActionFilter.class);
      }
      else if (invocation instanceof RenderInvocation)
      {
         req = new RenderRequestImpl(this, (RenderInvocation)invocation);
         resp = new RenderResponseImpl((RenderInvocation)invocation, req);
         phase = PortletRequest.RENDER_PHASE;
         chain = new FilterChainImpl<RenderFilter>(renderFilterList, RenderFilter.class);
      }
      else if (invocation instanceof EventInvocation)
      {
         req = new EventRequestImpl(this, (EventInvocation)invocation);
         resp = new EventResponseImpl((EventInvocation)invocation, req);
         phase = PortletRequest.EVENT_PHASE;
         chain = new FilterChainImpl<EventFilter>(eventFilterList, EventFilter.class);
      }
      else if (invocation instanceof ResourceInvocation)
      {
         req = new ResourceRequestImpl(this, (ResourceInvocation)invocation);
         resp = new ResourceResponseImpl((ResourceInvocation)invocation, req);
         phase = PortletRequest.RESOURCE_PHASE;
         chain = new FilterChainImpl<ResourceFilter>(resourceFilterList, ResourceFilter.class);
      }
      else
      {
         throw new InvocationException("Unexpected invocation " + invocation);
      }

      //
      try
      {
         dreq.setAttribute(ContextDispatcherInterceptor.REQ_ATT_COMPONENT_INVOCATION, invocation);
         dreq.setAttribute(Constants.JAVAX_PORTLET_CONFIG, config);
         dreq.setAttribute(Constants.JAVAX_PORTLET_REQUEST, req);
         dreq.setAttribute(Constants.JAVAX_PORTLET_RESPONSE, resp);
         dreq.setAttribute(Constants.JAVAX_PORTLET_LIFECYCLE_PHASE, phase);

         //
         chain.doFilter(req, resp);

         //
         return resp.getResponse();
      }
      catch (NoClassDefFoundError e)
      {
         //
         return new ErrorResponse(e);
View Full Code Here

   {
      HttpServletRequest dreq = invocation.getDispatchedRequest();

      //
      PortletRequestImpl req;
      PortletResponseImpl resp;
      String phase;
      FilterChainImpl<?> chain;
      if (invocation instanceof ActionInvocation)
      {
         req = new ActionRequestImpl(this, (ActionInvocation)invocation);
         resp = new ActionResponseImpl((ActionInvocation)invocation, req);
         phase = PortletRequest.ACTION_PHASE;
         chain = new FilterChainImpl<ActionFilter>(actionFilterList, ActionFilter.class);
      }
      else if (invocation instanceof RenderInvocation)
      {
         req = new RenderRequestImpl(this, (RenderInvocation)invocation);
         resp = new RenderResponseImpl((RenderInvocation)invocation, req);
         phase = PortletRequest.RENDER_PHASE;
         chain = new FilterChainImpl<RenderFilter>(renderFilterList, RenderFilter.class);
      }
      else if (invocation instanceof EventInvocation)
      {
         req = new EventRequestImpl(this, (EventInvocation)invocation);
         resp = new EventResponseImpl((EventInvocation)invocation, req);
         phase = PortletRequest.EVENT_PHASE;
         chain = new FilterChainImpl<EventFilter>(eventFilterList, EventFilter.class);
      }
      else if (invocation instanceof ResourceInvocation)
      {
         req = new ResourceRequestImpl(this, (ResourceInvocation)invocation);
         resp = new ResourceResponseImpl((ResourceInvocation)invocation, req);
         phase = PortletRequest.RESOURCE_PHASE;
         chain = new FilterChainImpl<ResourceFilter>(resourceFilterList, ResourceFilter.class);
      }
      else
      {
         throw new InvocationException("Unexpected invocation " + invocation);
      }

      //
      try
      {
         dreq.setAttribute(ContextDispatcherInterceptor.REQ_ATT_COMPONENT_INVOCATION, invocation);
         dreq.setAttribute(Constants.JAVAX_PORTLET_CONFIG, config);
         dreq.setAttribute(Constants.JAVAX_PORTLET_REQUEST, req);
         dreq.setAttribute(Constants.JAVAX_PORTLET_RESPONSE, resp);
         dreq.setAttribute(Constants.JAVAX_PORTLET_LIFECYCLE_PHASE, phase);

         //
         chain.doFilter(req, resp);

         //
         return resp.getResponse();
      }
      catch (NoClassDefFoundError e)
      {
         //
         return new ErrorResponse(e);
View Full Code Here

         }
      }

      //
      this.portletContext = portletContext;
      this.urlListener = listeners.size() == 0 ? null : new PortletURLGenerationListenerChain(Collections.unmodifiableList(listeners));
   }
View Full Code Here

         }
      }

      //
      this.portletContext = portletContext;
      this.urlListener = listeners.size() == 0 ? null : new PortletURLGenerationListenerChain(Collections.unmodifiableList(listeners));
   }
View Full Code Here

         phase = PortletRequest.ACTION_PHASE;
         chain = new FilterChainImpl<ActionFilter>(actionFilterList, ActionFilter.class);
      }
      else if (invocation instanceof RenderInvocation)
      {
         req = new RenderRequestImpl(this, (RenderInvocation)invocation);
         resp = new RenderResponseImpl((RenderInvocation)invocation, req);
         phase = PortletRequest.RENDER_PHASE;
         chain = new FilterChainImpl<RenderFilter>(renderFilterList, RenderFilter.class);
      }
      else if (invocation instanceof EventInvocation)
View Full Code Here

  @Override
  public void beforeRenderRequest(FacesContext facesContext) {

    Object responseObject = facesContext.getExternalContext().getRequest();
    if (responseObject instanceof RenderRequest) {
      RenderRequestImpl renderRequest = (RenderRequestImpl) responseObject;
      Map<String, String[]> servletParameterMap = renderRequest
          .getRealRequest().getRequest().getParameterMap();
      for (String name : servletParameterMap.keySet()) {
        String[] values = servletParameterMap.get(name);
        facesContext.getExternalContext().getRequestMap()
            .put(name, values);
View Full Code Here

TOP

Related Classes of org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker

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.