|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.VaadinService
com.vaadin.server.VaadinPortletService
public class VaadinPortletService
| Field Summary |
|---|
| Fields inherited from class com.vaadin.server.VaadinService |
|---|
URL_PARAMETER_CLOSE_APPLICATION, URL_PARAMETER_RESTART_APPLICATION |
| Constructor Summary | |
|---|---|
VaadinPortletService(VaadinPortlet portlet,
DeploymentConfiguration deploymentConfiguration)
|
|
| Method Summary | |
|---|---|
protected java.util.List<RequestHandler> |
createRequestHandlers()
Called during initialization to add the request handlers for the service. |
protected VaadinSession |
createVaadinSession(VaadinRequest request)
Creates a new Vaadin session for this service and request |
java.io.File |
getBaseDirectory()
Returns the context base directory. |
java.lang.String |
getConfiguredTheme(VaadinRequest request)
Gets the theme that is configured for this deployment, e.g. |
java.lang.String |
getConfiguredWidgetset(VaadinRequest request)
Gets the widgetset that is configured for this deployment, e.g. |
static javax.portlet.PortletRequest |
getCurrentPortletRequest()
Gets the currently processed portlet request. |
static VaadinPortletRequest |
getCurrentRequest()
Gets the currently processed Vaadin portlet request. |
static VaadinPortletResponse |
getCurrentResponse()
Gets the currently processed Vaadin portlet response. |
java.lang.String |
getMainDivId(VaadinSession session,
VaadinRequest request,
java.lang.Class<? extends UI> uiClass)
Creates and returns a unique ID for the DIV where the UI is to be rendered. |
java.lang.String |
getMimeType(java.lang.String resourceName)
Returns the MIME type of the specified file, or null if the MIME type is not known. |
VaadinPortlet |
getPortlet()
Retrieves a reference to the portlet associated with this service. |
protected VaadinPortlet.RequestType |
getRequestType(VaadinRequest request)
Deprecated. As of 7.0. Will likely change or be removed in a future version |
java.lang.String |
getServiceName()
Gets a unique name for this service. |
java.lang.String |
getStaticFileLocation(VaadinRequest request)
Return the URL from where static files, e.g. |
java.io.InputStream |
getThemeResourceAsStream(UI uI,
java.lang.String themeName,
java.lang.String resource)
TODO PUSH Document TODO Pass UI or VaadinSession? |
protected void |
handleSessionExpired(VaadinRequest request,
VaadinResponse response)
Called when the session has expired and the request handling is therefore aborted. |
boolean |
isStandalone(VaadinRequest request)
Checks whether the UI will be rendered on its own in the browser or whether it will be included into some other context. |
boolean |
preserveUIOnRefresh(UIProvider provider,
UICreateEvent event)
Always preserve UIs in portlets to make portlet actions work. |
protected VaadinSession |
readFromHttpSession(WrappedSession wrappedSession)
Performs the actual read of the VaadinSession from the underlying HTTP session after sanity checks have been performed. |
protected void |
removeFromHttpSession(WrappedSession wrappedSession)
Performs the actual removal of the VaadinSession from the underlying HTTP session after sanity checks have been performed |
protected boolean |
requestCanCreateSession(VaadinRequest request)
Checks whether it's valid to create a new service session as a result of the given request. |
protected void |
writeToHttpSession(WrappedSession wrappedSession,
VaadinSession session)
Performs the actual write of the VaadinSession to the underlying HTTP session after sanity checks have been performed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VaadinPortletService(VaadinPortlet portlet,
DeploymentConfiguration deploymentConfiguration)
throws ServiceException
ServiceException| Method Detail |
|---|
protected java.util.List<RequestHandler> createRequestHandlers()
throws ServiceException
VaadinService
createRequestHandlers in class VaadinServiceServiceException - if a problem occurs when creating the request handlerspublic VaadinPortlet getPortlet()
public java.lang.String getConfiguredWidgetset(VaadinRequest request)
VaadinService
getConfiguredWidgetset in class VaadinServicerequest - the request for which a widgetset is required
public java.lang.String getConfiguredTheme(VaadinRequest request)
VaadinService
getConfiguredTheme in class VaadinServicerequest - the request for which a theme is required
public boolean isStandalone(VaadinRequest request)
VaadinService
isStandalone in class VaadinServicerequest - the request for which the UI is loaded
public java.lang.String getStaticFileLocation(VaadinRequest request)
VaadinService
getStaticFileLocation in class VaadinServicerequest - the request for which the location should be determined
public java.lang.String getMimeType(java.lang.String resourceName)
VaadinService
getMimeType in class VaadinServiceresourceName - a String specifying the name of a file
ServletContext.getMimeType(String),
PortletContext.getMimeType(String)public java.io.File getBaseDirectory()
VaadinService
getBaseDirectory in class VaadinServiceprotected boolean requestCanCreateSession(VaadinRequest request)
VaadinService
requestCanCreateSession in class VaadinServicerequest - the request
true if it's valid to create a new service session
for the request; else false@Deprecated protected VaadinPortlet.RequestType getRequestType(VaadinRequest request)
request - the request to get a request type for
public static javax.portlet.PortletRequest getCurrentPortletRequest()
nullpublic static VaadinPortletRequest getCurrentRequest()
nullpublic static VaadinPortletResponse getCurrentResponse()
null
protected VaadinSession createVaadinSession(VaadinRequest request)
throws ServiceException
VaadinService
createVaadinSession in class VaadinServicerequest - The request for which to create a VaadinSession
ServiceExceptionpublic java.lang.String getServiceName()
VaadinService
getServiceName in class VaadinService
public boolean preserveUIOnRefresh(UIProvider provider,
UICreateEvent event)
preserveUIOnRefresh in class VaadinServiceprovider - the UI provider responsible for the UIevent - the UI create event with details about the UI
true if the UI should be preserved on refresh;
false if a new UI instance should be initialized on
refreshed.
public java.io.InputStream getThemeResourceAsStream(UI uI,
java.lang.String themeName,
java.lang.String resource)
VaadinService
getThemeResourceAsStream in class VaadinService
public java.lang.String getMainDivId(VaadinSession session,
VaadinRequest request,
java.lang.Class<? extends UI> uiClass)
VaadinService
getMainDivId in class VaadinServicesession - The service session to which the bootstrapped UI will belong.request - The request for which a div id is neededuiClass - The class of the UI that will be bootstrapped
protected void handleSessionExpired(VaadinRequest request,
VaadinResponse response)
VaadinService
handleSessionExpired in class VaadinServicerequest - The requestresponse - The response
protected void writeToHttpSession(WrappedSession wrappedSession,
VaadinSession session)
VaadinService
Called by VaadinService.storeSession(VaadinSession, WrappedSession)
writeToHttpSession in class VaadinServicewrappedSession - the underlying HTTP sessionsession - the VaadinSession to storeprotected VaadinSession readFromHttpSession(WrappedSession wrappedSession)
VaadinService
Called by VaadinService.loadSession(WrappedSession).
readFromHttpSession in class VaadinServicewrappedSession - the underlying HTTP session
protected void removeFromHttpSession(WrappedSession wrappedSession)
VaadinService
removeFromHttpSession in class VaadinServicewrappedSession - the underlying HTTP session
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||