com.vaadin.server
Class VaadinServlet.ServletService

java.lang.Object
  extended by com.vaadin.server.AbstractVaadinService
      extended by com.vaadin.server.VaadinServlet.ServletService
All Implemented Interfaces:
VaadinService, java.io.Serializable
Enclosing class:
VaadinServlet

public static class VaadinServlet.ServletService
extends AbstractVaadinService

See Also:
Serialized Form

Constructor Summary
VaadinServlet.ServletService(VaadinServlet servlet, DeploymentConfiguration deploymentConfiguration)
           
 
Method Summary
 java.io.File getBaseDirectory()
          Returns application context base directory.
 java.lang.String getConfiguredTheme(WrappedRequest request)
          Gets the theme that is configured for this deployment, e.g.
 java.lang.String getConfiguredWidgetset(WrappedRequest request)
          Gets the widgetset that is configured for this deployment, e.g.
 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.
protected  VaadinServlet getServlet()
           
 java.lang.String getStaticFileLocation(WrappedRequest request)
          Return the URL from where static files, e.g.
 SystemMessages getSystemMessages()
          Gets the system messages object
 boolean isStandalone(WrappedRequest request)
          Checks whether the Vaadin application will be rendered on its own in the browser or whether it will be included into some other context.
 
Methods inherited from class com.vaadin.server.AbstractVaadinService
getAddonContext, getAddonContextListeners, getClassLoader, getDeploymentConfiguration, getVaadinSession, setAddonContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VaadinServlet.ServletService

public VaadinServlet.ServletService(VaadinServlet servlet,
                                    DeploymentConfiguration deploymentConfiguration)
Method Detail

getServlet

protected VaadinServlet getServlet()

getStaticFileLocation

public java.lang.String getStaticFileLocation(WrappedRequest request)
Description copied from interface: VaadinService
Return the URL from where static files, e.g. the widgetset and the theme, are served. In a standard configuration the VAADIN folder inside the returned folder is what is used for widgetsets and themes. The returned folder is usually the same as the context path and independent of the application.

Parameters:
request - the request for which the location should be determined
Returns:
The location of static resources (should contain the VAADIN directory). Never ends with a slash (/).

getConfiguredWidgetset

public java.lang.String getConfiguredWidgetset(WrappedRequest request)
Description copied from interface: VaadinService
Gets the widgetset that is configured for this deployment, e.g. from a parameter in web.xml.

Parameters:
request - the request for which a widgetset is required
Returns:
the name of the widgetset

getConfiguredTheme

public java.lang.String getConfiguredTheme(WrappedRequest request)
Description copied from interface: VaadinService
Gets the theme that is configured for this deployment, e.g. from a portal parameter or just some sensible default value.

Parameters:
request - the request for which a theme is required
Returns:
the name of the theme

isStandalone

public boolean isStandalone(WrappedRequest request)
Description copied from interface: VaadinService
Checks whether the Vaadin application will be rendered on its own in the browser or whether it will be included into some other context. A standalone application may do things that might interfere with other parts of a page, e.g. changing the page title and requesting focus upon loading.

Parameters:
request - the request for which the application is loaded
Returns:
a boolean indicating whether the application should be standalone

getMimeType

public java.lang.String getMimeType(java.lang.String resourceName)
Description copied from interface: VaadinService
Returns the MIME type of the specified file, or null if the MIME type is not known. The MIME type is determined by the configuration of the container, and may be specified in a deployment descriptor. Common MIME types are "text/html" and "image/gif".

Parameters:
resourceName - a String specifying the name of a file
Returns:
a String specifying the file's MIME type
See Also:
ServletContext.getMimeType(String), PortletContext.getMimeType(String)

getSystemMessages

public SystemMessages getSystemMessages()
Description copied from interface: VaadinService
Gets the system messages object

Returns:
the system messages object

getBaseDirectory

public java.io.File getBaseDirectory()
Description copied from interface: VaadinService
Returns application context base directory. Typically an application is deployed in a such way that is has an application directory. For web applications this directory is the root directory of the web applications. In some cases applications might not have an application directory (for example web applications running inside a war).

Returns:
The application base directory or null if the application has no base directory.


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