Package net.sf.jportlet.portlet.application

Examples of net.sf.jportlet.portlet.application.PortletProxy


            __log.debug( "doAction(" + uri + ")" );
        }

        /* Perform the action */
        PortletServiceFactory serviceFactory = _application.getPortletServiceFactory(  );
        PortletProxy          proxy = ( PortletProxy ) _application.getPortlet( uri.getPortletName(  ) );
        PortletRequestImpl    req = new PortletRequestImpl( proxy, request, serviceFactory );
        PortletResponseImpl   resp = new PortletResponseImpl( proxy, req, response );
        HttpServletRequest    hreq = req.getHttpRequest(  );
        String                action = uri.getAction(  );
        ActionEventImpl       event = new ActionEventImpl( action, req, resp );
        proxy.actionPerformed( event );

        /* Get the URI where to move*/
        PortletURI nextURI = event.getNextURI(  );
        String     nextUri;
        if ( nextURI != null )
        {
            nextUri = nextURI.toString(  ).substring( request.getContextPath(  ).length(  ) );
        }
        else
        {
            WebflowActionDescriptor webflow = proxy.getDescriptor(  ).getWebflowAction( action );
            nextUri = ( webflow != null )
                      ? webflow.getReturnURI( event.getReturnCode(  ) )
                      : null;
        }

View Full Code Here


                      Object          message,
                      PortletRequest  request,
                      PortletResponse response )
        throws PortletException
    {
        PortletProxy       proxy;
        PortletApplication container = getApplication(  );
        MessageEventImpl   event = new MessageEventImpl( message, ( PortletRequestImpl ) request, ( PortletResponseImpl ) response );

        if ( portletName != null )
        {
View Full Code Here

        PortletRequestImpl req = ( PortletRequestImpl ) request;
        Map                attributes = req.getAttributes(  );
        putAll( attributes, ctx );

        /* Standard context variables */
        PortletProxy proxy = req.getProxy(  );
        put( PROXY, proxy, ctx );
        put( PORTLET, proxy.getPortlet(  ), ctx );
        put( REQUEST, request, ctx );
        put( RESPONSE, response, ctx );
        put( RUNTIME, new Runtime(  ), ctx );

        return ctx;
View Full Code Here

        Iterator it = _descriptor.getPortletDescriptors(  ).iterator(  );

        while ( it.hasNext(  ) )
        {
            PortletDescriptor descr = ( PortletDescriptor ) it.next(  );
            PortletProxy      proxy = new PortletProxy( descr );
            String            name = descr.getName(  );

            if ( info )
            {
                __log.info( "Initializing Portlet: " + name );
            }

            proxy.init( new PortletConfigImpl( proxy, servletConfig, this ) );
            _portlets.put( name, proxy );
        }
    }
View Full Code Here

                    throw new JspException( "No portlet to render" );
                }

                HttpServletResponse response = ( HttpServletResponse ) pageContext.getResponse(  );
                PortletApplication  container = getPortletContainer(  );
                PortletProxy        proxy = ( PortletProxy ) getPortletContainer(  ).getPortlet( portletName );
                PortletRequestImpl  req = new PortletRequestImpl( proxy, request, container.getPortletServiceFactory(  ) );
                PortletResponseImpl resp = new PortletResponseImpl( proxy, req, response );
               
                PageTag page = (PageTag)findAncestorWithClass( this, PageTag.class );
                if ( page == null )
                {
                  throw new JspException( "'portlet' tag MUST be inside a 'page' tag");
                }
                _portletPageContext.setSkinContextPath( page.getSkinContextPath());

                req.setPageContext( _portletPageContext );
                proxy.service( req, resp );
                pageContext.getOut(  ).println( resp.getBuffer(  ).toString(  ) );
            }

            return EVAL_PAGE;
        }
View Full Code Here

TOP

Related Classes of net.sf.jportlet.portlet.application.PortletProxy

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.