Package com.vaadin.portlet
Class VaadinPortletService
- java.lang.Object
-
- com.vaadin.server.VaadinService
-
- com.vaadin.portlet.VaadinPortletService
-
- All Implemented Interfaces:
Serializable
public class VaadinPortletService extends VaadinService
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.vaadin.server.VaadinService
URL_PARAMETER_CLOSE_APPLICATION, URL_PARAMETER_RESTART_APPLICATION
-
-
Constructor Summary
Constructors Constructor Description VaadinPortletService(VaadinPortlet portlet, DeploymentConfiguration deploymentConfiguration)
-
Method Summary
-
Methods inherited from class com.vaadin.server.VaadinService
accessSession, addServiceDestroyListener, addSessionDestroyListener, addSessionInitListener, cleanupSession, closeSession, createCriticalNotificationJSON, criticalNotification, destroy, ensureAccessQueuePurged, ensurePushAvailable, findUI, findVaadinSession, fireSessionDestroy, generateConnectorId, getApplicationUrl, getClassLoader, getCurrent, getDependencyFilters, getDeploymentConfiguration, getExistingSession, getLockAttributeName, getRequestHandlers, getServiceInitListeners, getSessionAttributeName, getSystemMessages, getSystemMessagesProvider, handleRequest, init, initConnectorIdGenerator, initDependencyFilters, isAtmosphereAvailable, isCsrfTokenValid, isOtherSessionLocked, isUIActive, loadSession, lockSession, reinitializeSession, removeServiceDestroyListener, removeSession, removeSessionDestroyListener, removeSessionInitListener, requestEnd, requestStart, runPendingAccessTasks, setClassLoader, setCurrent, setCurrentInstances, setDefaultClassLoader, setSystemMessagesProvider, storeSession, unlockSession, verifyNoOtherSessionLocked, writeStringResponse, writeUncachedStringResponse
-
-
-
-
Constructor Detail
-
VaadinPortletService
public VaadinPortletService(VaadinPortlet portlet, DeploymentConfiguration deploymentConfiguration) throws ServiceException
- Throws:
ServiceException
-
-
Method Detail
-
createRequestHandlers
protected List<RequestHandler> createRequestHandlers() throws ServiceException
- Overrides:
createRequestHandlersin classVaadinService- Throws:
ServiceException
-
getPortlet
public VaadinPortlet getPortlet()
Retrieves a reference to the portlet associated with this service.- Returns:
- A reference to the VaadinPortlet this service is using
-
getConfiguredWidgetset
public String getConfiguredWidgetset(VaadinRequest request)
- Specified by:
getConfiguredWidgetsetin classVaadinService
-
getConfiguredTheme
public String getConfiguredTheme(VaadinRequest request)
- Specified by:
getConfiguredThemein classVaadinService
-
isStandalone
public boolean isStandalone(VaadinRequest request)
- Specified by:
isStandalonein classVaadinService
-
getStaticFileLocation
public String getStaticFileLocation(VaadinRequest request)
- Specified by:
getStaticFileLocationin classVaadinService
-
getMimeType
public String getMimeType(String resourceName)
- Specified by:
getMimeTypein classVaadinService- See Also:
PortletContext.getMimeType(String)
-
getBaseDirectory
public File getBaseDirectory()
- Specified by:
getBaseDirectoryin classVaadinService
-
requestCanCreateSession
protected boolean requestCanCreateSession(VaadinRequest request)
- Specified by:
requestCanCreateSessionin classVaadinService
-
getRequestType
@Deprecated protected VaadinPortlet.RequestType getRequestType(VaadinRequest request)
Deprecated.As of 7.0. Will likely change or be removed in a future versionGets the request type for the request.- Parameters:
request- the request to get a request type for- Returns:
- the request type
-
getCurrentPortletRequest
public static javax.portlet.PortletRequest getCurrentPortletRequest()
Gets the currently processed portlet request. The current portlet request is automatically defined when the request is started. The current portlet request can not be used in e.g. background threads because of the way server implementations reuse request instances.- Returns:
- the current portlet request instance if available, otherwise
null
-
getCurrentRequest
public static VaadinPortletRequest getCurrentRequest()
Gets the currently processed Vaadin portlet request. The current request is automatically defined when the request is started. The current request can not be used in e.g. background threads because of the way server implementations reuse request instances.- Returns:
- the current Vaadin portlet request instance if available,
otherwise
null
-
getCurrentResponse
public static VaadinPortletResponse getCurrentResponse()
Gets the currently processed Vaadin portlet response. The current response is automatically defined when the request is started. The current response can not be used in e.g. background threads because of the way server implementations reuse response instances.- Returns:
- the current Vaadin portlet response instance if available,
otherwise
null
-
createVaadinSession
protected VaadinSession createVaadinSession(VaadinRequest request) throws ServiceException
- Overrides:
createVaadinSessionin classVaadinService- Throws:
ServiceException
-
getServiceName
public String getServiceName()
- Specified by:
getServiceNamein classVaadinService
-
preserveUIOnRefresh
public boolean preserveUIOnRefresh(UIProvider provider, UICreateEvent event)
Always preserve UIs in portlets to make portlet actions work.- Overrides:
preserveUIOnRefreshin classVaadinService
-
getThemeResourceAsStream
public InputStream getThemeResourceAsStream(UI uI, String themeName, String resource)
- Specified by:
getThemeResourceAsStreamin classVaadinService
-
getMainDivId
public String getMainDivId(VaadinSession session, VaadinRequest request, Class<? extends UI> uiClass)
- Specified by:
getMainDivIdin classVaadinService
-
handleSessionExpired
protected void handleSessionExpired(VaadinRequest request, VaadinResponse response)
- Overrides:
handleSessionExpiredin classVaadinService
-
writeToHttpSession
protected void writeToHttpSession(WrappedSession wrappedSession, VaadinSession session)
- Overrides:
writeToHttpSessionin classVaadinService
-
readFromHttpSession
protected VaadinSession readFromHttpSession(WrappedSession wrappedSession)
- Overrides:
readFromHttpSessionin classVaadinService
-
removeFromHttpSession
protected void removeFromHttpSession(WrappedSession wrappedSession)
- Overrides:
removeFromHttpSessionin classVaadinService
-
setSessionLock
protected void setSessionLock(WrappedSession wrappedSession, Lock lock)
- Overrides:
setSessionLockin classVaadinService
-
getSessionLock
protected Lock getSessionLock(WrappedSession wrappedSession)
- Overrides:
getSessionLockin classVaadinService
-
-