com.vaadin.server
Class VaadinPortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by com.vaadin.server.VaadinPortlet
All Implemented Interfaces:
Constants, java.io.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, java.io.Serializable

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

Author:
peholmst
See Also:
Serialized Form

Nested Class Summary
static class VaadinPortlet.AbstractApplicationPortletWrapper
           
protected static class VaadinPortlet.RequestType
          Deprecated. As of 7.0. Will likely change or be removed in a future version
static class VaadinPortlet.VaadinGateinRequest
           
static class VaadinPortlet.VaadinHttpAndPortletRequest
           
static class VaadinPortlet.VaadinLiferayRequest
           
 
Field Summary
static java.lang.String PORTAL_PARAMETER_VAADIN_THEME
          Deprecated. As of 7.0. Will likely change or be removed in a future version
static java.lang.String PORTLET_PARAMETER_STYLE
          Deprecated. As of 7.0. Will likely change or be removed in a future version
static java.lang.String RESOURCE_URL_ID
          Deprecated. As of 7.0. Will likely change or be removed in a future version
static java.lang.String WRITE_AJAX_PAGE_SCRIPT_WIDGETSET_SHOULD_WRITE
          Deprecated. As of 7.0. Will likely change or be removed in a future version
 
Fields inherited from interface com.vaadin.server.Constants
DEFAULT_BUFFER_SIZE, DEFAULT_THEME_CACHETIME, DEFAULT_THEME_NAME, DEFAULT_WIDGETSET, ERROR_NO_UI_FOUND, INVALID_SECURITY_KEY_MSG, MAX_BUFFER_SIZE, NOT_PRODUCTION_MODE_INFO, PARAMETER_VAADIN_RESOURCES, PARAMETER_WIDGETSET, PORTAL_PARAMETER_VAADIN_RESOURCE_PATH, PORTAL_PARAMETER_VAADIN_WIDGETSET, SERVLET_PARAMETER_CLOSE_IDLE_SESSIONS, SERVLET_PARAMETER_DISABLE_XSRF_PROTECTION, SERVLET_PARAMETER_HEARTBEAT_INTERVAL, SERVLET_PARAMETER_PRODUCTION_MODE, SERVLET_PARAMETER_RESOURCE_CACHE_TIME, SERVLET_PARAMETER_UI_PROVIDER, THEME_DIR_PATH, URL_PARAMETER_THEME, WARNING_HEARTBEAT_INTERVAL_NOT_NUMERIC, WARNING_RESOURCE_CACHING_TIME_NOT_NUMERIC, WARNING_XSRF_PROTECTION_DISABLED, WIDGETSET_DIR_PATH, WIDGETSET_MISMATCH_INFO
 
Constructor Summary
VaadinPortlet()
           
 
Method Summary
protected  DeploymentConfiguration createDeploymentConfiguration(java.util.Properties initParameters)
           
protected  VaadinPortletService createPortletService(DeploymentConfiguration deploymentConfiguration)
           
protected  VaadinPortletRequest createVaadinRequest(javax.portlet.PortletRequest request)
          Wraps the request in a (possibly portal specific) Vaadin portlet request.
protected  void doDispatch(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
static VaadinPortlet getCurrent()
          Gets the currently used Vaadin portlet.
protected  VaadinPortlet.RequestType getRequestType(VaadinPortletRequest vaadinRequest)
          Deprecated. As of 7.0. Will likely change or be removed in a future version
protected  VaadinPortletService getService()
           
protected  void handleRequest(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)
          Deprecated. As of 7.0. Will likely change or be removed in a future version
 void init(javax.portlet.PortletConfig config)
           
protected  void portletInitialized()
           
 void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
           
 void processEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response)
           
 void serveResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response)
           
static void setCurrent(VaadinPortlet portlet)
          Sets the current Vaadin portlet.
 
Methods inherited from class javax.portlet.GenericPortlet
destroy, doEdit, doHeaders, doHelp, doView, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_URL_ID

@Deprecated
public static final java.lang.String RESOURCE_URL_ID
Deprecated. As of 7.0. Will likely change or be removed in a future version
See Also:
Constant Field Values

PORTLET_PARAMETER_STYLE

@Deprecated
public static final java.lang.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 java.lang.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 java.lang.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

createDeploymentConfiguration

protected DeploymentConfiguration createDeploymentConfiguration(java.util.Properties initParameters)

createPortletService

protected VaadinPortletService createPortletService(DeploymentConfiguration deploymentConfiguration)

getRequestType

@Deprecated
protected VaadinPortlet.RequestType getRequestType(VaadinPortletRequest vaadinRequest)
Deprecated. As of 7.0. Will likely change or be removed in a future version

Parameters:
vaadinRequest -
Returns:

handleRequest

@Deprecated
protected void handleRequest(javax.portlet.PortletRequest request,
                                        javax.portlet.PortletResponse response)
                      throws javax.portlet.PortletException,
                             java.io.IOException
Deprecated. As of 7.0. Will likely change or be removed in a future version

Parameters:
request -
response -
Throws:
javax.portlet.PortletException
java.io.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 PorletRequest

getService

protected VaadinPortletService getService()

processEvent

public void processEvent(javax.portlet.EventRequest request,
                         javax.portlet.EventResponse response)
                  throws javax.portlet.PortletException,
                         java.io.IOException
Specified by:
processEvent in interface javax.portlet.EventPortlet
Overrides:
processEvent in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
java.io.IOException

processAction

public void processAction(javax.portlet.ActionRequest request,
                          javax.portlet.ActionResponse response)
                   throws javax.portlet.PortletException,
                          java.io.IOException
Specified by:
processAction in interface javax.portlet.Portlet
Overrides:
processAction in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
java.io.IOException

doDispatch

protected void doDispatch(javax.portlet.RenderRequest request,
                          javax.portlet.RenderResponse response)
                   throws javax.portlet.PortletException,
                          java.io.IOException
Overrides:
doDispatch in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
java.io.IOException

serveResource

public void serveResource(javax.portlet.ResourceRequest request,
                          javax.portlet.ResourceResponse response)
                   throws javax.portlet.PortletException,
                          java.io.IOException
Specified by:
serveResource in interface javax.portlet.ResourceServingPortlet
Overrides:
serveResource in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
java.io.IOException

getCurrent

public static VaadinPortlet getCurrent()
Gets the currently used Vaadin portlet. The current portlet is automatically defined when initializing the portlet and when processing requests to the server and in threads started at a point when the current portlet is defined (see InheritableThreadLocal). In other cases, (e.g. from background threads started in some other way), the current portlet is not automatically defined.

Returns:
the current vaadin portlet instance if available, otherwise null
Since:
7.0
See Also:
setCurrent(VaadinPortlet)

setCurrent

public static void setCurrent(VaadinPortlet portlet)
Sets the current Vaadin portlet. This method is used by the framework to set the current portlet whenever a new request is processed and it is cleared when the request has been processed.

The application developer can also use this method to define the current portlet outside the normal request handling, e.g. when initiating custom background threads.

Parameters:
portlet - the Vaadin portlet to register as the current portlet
See Also:
getCurrent(), InheritableThreadLocal


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.