Package com.vaadin.server
Class VaadinPortlet
- java.lang.Object
-
- javax.portlet.GenericPortlet
-
- com.vaadin.server.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classVaadinPortlet.RequestTypeDeprecated.As of 7.0.static classVaadinPortlet.VaadinGateInRequestPortlet request for GateIn.static classVaadinPortlet.VaadinHttpAndPortletRequestBase class for portlet requests that need access to HTTP servlet requests.static classVaadinPortlet.VaadinLiferayRequestPortlet request for Liferay.static classVaadinPortlet.VaadinWebLogicPortalRequestPortlet request for WebSphere Portal.static classVaadinPortlet.VaadinWebSpherePortalRequestPortlet request for WebSphere Portal.
-
Field Summary
Fields Modifier and Type Field Description static StringPORTAL_PARAMETER_VAADIN_THEMEDeprecated.As of 7.0.static StringPORTLET_PARAMETER_STYLEDeprecated.As of 7.0.static StringRESOURCE_URL_IDDeprecated.As of 7.0.static StringWRITE_AJAX_PAGE_SCRIPT_WIDGETSET_SHOULD_WRITEDeprecated.As of 7.0.-
Fields inherited from interface com.vaadin.server.Constants
ATMOSPHERE_MISSING_ERROR, CANNOT_ACQUIRE_CLASSLOADER_SEVERE, DEFAULT_BUFFER_SIZE, DEFAULT_THEME_CACHETIME, DEFAULT_THEME_NAME, DEFAULT_WIDGETSET, ERROR_NO_UI_FOUND, INVALID_ATMOSPHERE_VERSION_WARNING, 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, PORTLET_CONTEXT, PUSH_NOT_SUPPORTED_ERROR, REQUIRED_ATMOSPHERE_RUNTIME_JAKARTA_VERSION, REQUIRED_ATMOSPHERE_RUNTIME_VERSION, SERVLET_PARAMETER_CLOSE_IDLE_SESSIONS, SERVLET_PARAMETER_DISABLE_XSRF_PROTECTION, SERVLET_PARAMETER_HEARTBEAT_INTERVAL, SERVLET_PARAMETER_LEGACY_DESIGN_PREFIX, SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING, SERVLET_PARAMETER_PRODUCTION_MODE, SERVLET_PARAMETER_PUSH_MODE, SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING, SERVLET_PARAMETER_RESOURCE_CACHE_TIME, SERVLET_PARAMETER_SENDURLSASPARAMETERS, SERVLET_PARAMETER_SYNC_ID_CHECK, SERVLET_PARAMETER_UI_PROVIDER, THEME_DIR_PATH, URL_PARAMETER_THEME, WARNING_HEARTBEAT_INTERVAL_NOT_NUMERIC, WARNING_LEGACY_PROPERTY_TOSTRING, WARNING_PUSH_MODE_NOT_RECOGNIZED, WARNING_RESOURCE_CACHING_TIME_NOT_NUMERIC, WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE, WARNING_XSRF_PROTECTION_DISABLED, WIDGETSET_DIR_PATH, WIDGETSET_MISMATCH_INFO
-
-
Constructor Summary
Constructors Constructor Description VaadinPortlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected DeploymentConfigurationcreateDeploymentConfiguration(Properties initParameters)protected VaadinPortletServicecreatePortletService(DeploymentConfiguration deploymentConfiguration)protected VaadinPortletRequestcreateVaadinRequest(javax.portlet.PortletRequest request)Wraps the request in a (possibly portal specific) Vaadin portlet request.voiddestroy()protected voiddoDispatch(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)static VaadinPortletgetCurrent()Gets the currently used Vaadin portlet.protected VaadinPortlet.RequestTypegetRequestType(VaadinPortletRequest vaadinRequest)Deprecated.As of 7.0.protected VaadinPortletServicegetService()protected voidhandleRequest(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)Deprecated.As of 7.0.voidinit(javax.portlet.PortletConfig config)protected voidportletInitialized()voidprocessAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)voidprocessEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response)voidserveResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response)-
Methods inherited from class javax.portlet.GenericPortlet
doEdit, doHeaders, doHelp, doView, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, render
-
-
-
-
Field Detail
-
RESOURCE_URL_ID
@Deprecated public static final 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 String PORTLET_PARAMETER_STYLE
Deprecated.As of 7.0. Will likely change or be removed in a future versionThis 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 versionThis 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
-
-
Method Detail
-
init
public void init(javax.portlet.PortletConfig config) throws javax.portlet.PortletException- Specified by:
initin interfacejavax.portlet.Portlet- Overrides:
initin classjavax.portlet.GenericPortlet- Throws:
javax.portlet.PortletException
-
portletInitialized
protected void portletInitialized() throws javax.portlet.PortletException- Throws:
javax.portlet.PortletException
-
createDeploymentConfiguration
protected DeploymentConfiguration createDeploymentConfiguration(Properties initParameters)
-
createPortletService
protected VaadinPortletService createPortletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException
- Throws:
ServiceException
-
getRequestType
@Deprecated protected VaadinPortlet.RequestType getRequestType(VaadinPortletRequest vaadinRequest)
Deprecated.As of 7.0. This is no longer used and only provided for backwards compatibility. EachRequestHandlercan individually decide whether it wants to handle a request or not.- Parameters:
vaadinRequest-- Returns:
-
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.PortletExceptionIOException
-
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
-
getService
protected VaadinPortletService getService()
-
processEvent
public void processEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response) throws javax.portlet.PortletException, IOException- Specified by:
processEventin interfacejavax.portlet.EventPortlet- Overrides:
processEventin classjavax.portlet.GenericPortlet- Throws:
javax.portlet.PortletExceptionIOException
-
processAction
public void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws javax.portlet.PortletException, IOException- Specified by:
processActionin interfacejavax.portlet.Portlet- Overrides:
processActionin classjavax.portlet.GenericPortlet- Throws:
javax.portlet.PortletExceptionIOException
-
doDispatch
protected void doDispatch(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException- Overrides:
doDispatchin classjavax.portlet.GenericPortlet- Throws:
javax.portlet.PortletExceptionIOException
-
serveResource
public void serveResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response) throws javax.portlet.PortletException, IOException- Specified by:
serveResourcein interfacejavax.portlet.ResourceServingPortlet- Overrides:
serveResourcein classjavax.portlet.GenericPortlet- Throws:
javax.portlet.PortletExceptionIOException
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.portlet.Portlet- Overrides:
destroyin classjavax.portlet.GenericPortlet
-
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 (seeInheritableThreadLocal). In other cases, (e.g. from background threads started in some other way), the current portlet 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
-
-