com.vaadin.server.

Class VaadinPortlet

  • All Implemented Interfaces:

    Constants, Serializable, javax.portlet.EventPortlet, javax.portlet.Portlet, javax.portlet.PortletConfig, javax.portlet.ResourceServingPortlet

    Direct Known Subclasses:

    LegacyVaadinPortlet


    public class VaadinPortlet
    extends javax.portlet.GenericPortlet
    implements Constants, Serializable

    Portlet 2.0 base class. This replaces the servlet in servlet/portlet 1.0 deployments and handles various portlet requests from the browser.

    Author:

    Vaadin Ltd

    See Also:

    Serialized Form

    • Field Detail

      • PORTLET_PARAMETER_STYLE

        @Deprecated
        public static final String PORTLET_PARAMETER_STYLE

        Deprecated. As of 7.0. Will likely change or be removed in a future version

        This portlet parameter is used to add styles to the main element. E.g "height:500px" generates a style="height:500px" to the main element.

        See Also:

        Constant Field Values

      • PORTAL_PARAMETER_VAADIN_THEME

        @Deprecated
        public static final String PORTAL_PARAMETER_VAADIN_THEME

        Deprecated. As of 7.0. Will likely change or be removed in a future version

        This portal parameter is used to define the name of the Vaadin theme that is used for all Vaadin applications in the portal.

        See Also:

        Constant Field Values

      • WRITE_AJAX_PAGE_SCRIPT_WIDGETSET_SHOULD_WRITE

        @Deprecated
        public static final String WRITE_AJAX_PAGE_SCRIPT_WIDGETSET_SHOULD_WRITE

        Deprecated. As of 7.0. Will likely change or be removed in a future version

        See Also:

        Constant Field Values

    • Constructor Detail

      • VaadinPortlet

        public VaadinPortlet()
    • Method Detail

      • init

        public void init(javax.portlet.PortletConfig config)
                  throws javax.portlet.PortletException

        Specified by:

        init in interface javax.portlet.Portlet

        Overrides:

        init in class javax.portlet.GenericPortlet

        Throws:

        javax.portlet.PortletException

      • portletInitialized

        protected void portletInitialized()
                                   throws javax.portlet.PortletException

        Throws:

        javax.portlet.PortletException

      • handleRequest

        @Deprecated
        protected void handleRequest(javax.portlet.PortletRequest request,
                                                 javax.portlet.PortletResponse response)
                                          throws javax.portlet.PortletException,
                                                 IOException

        Deprecated. As of 7.0. Will likely change or be removed in a future version

        Parameters:

        request -

        response -

        Throws:

        javax.portlet.PortletException

        IOException

      • createVaadinRequest

        protected VaadinPortletRequest createVaadinRequest(javax.portlet.PortletRequest request)

        Wraps the request in a (possibly portal specific) Vaadin portlet request.

        Parameters:

        request - The original PortletRequest

        Returns:

        A wrapped version of the PortletRequest

      • processEvent

        public void processEvent(javax.portlet.EventRequest request,
                                 javax.portlet.EventResponse response)
                          throws javax.portlet.PortletException,
                                 IOException

        Specified by:

        processEvent in interface javax.portlet.EventPortlet

        Overrides:

        processEvent in class javax.portlet.GenericPortlet

        Throws:

        javax.portlet.PortletException

        IOException

      • processAction

        public void processAction(javax.portlet.ActionRequest request,
                                  javax.portlet.ActionResponse response)
                           throws javax.portlet.PortletException,
                                  IOException

        Specified by:

        processAction in interface javax.portlet.Portlet

        Overrides:

        processAction in class javax.portlet.GenericPortlet

        Throws:

        javax.portlet.PortletException

        IOException

      • doDispatch

        protected void doDispatch(javax.portlet.RenderRequest request,
                                  javax.portlet.RenderResponse response)
                           throws javax.portlet.PortletException,
                                  IOException

        Overrides:

        doDispatch in class javax.portlet.GenericPortlet

        Throws:

        javax.portlet.PortletException

        IOException

      • serveResource

        public void serveResource(javax.portlet.ResourceRequest request,
                                  javax.portlet.ResourceResponse response)
                           throws javax.portlet.PortletException,
                                  IOException

        Specified by:

        serveResource in interface javax.portlet.ResourceServingPortlet

        Overrides:

        serveResource in class javax.portlet.GenericPortlet

        Throws:

        javax.portlet.PortletException

        IOException

      • destroy

        public void destroy()

        Specified by:

        destroy in interface javax.portlet.Portlet

        Overrides:

        destroy in class javax.portlet.GenericPortlet

      • getCurrent

        public static VaadinPortlet getCurrent()

        Gets the currently used Vaadin portlet. The current portlet is automatically defined when processing requests related to the service (see ThreadLocal) and in VaadinSession.access(Runnable) and UI.access(Runnable). In other cases, (e.g. from background threads, the current service is not automatically defined. The current portlet is derived from the current service using VaadinService.getCurrent()

        Returns:

        the current vaadin portlet instance if available, otherwise null

        Since:

        7.0