Package com.vaadin.client
Class ApplicationConfiguration
java.lang.Object
com.vaadin.client.ApplicationConfiguration
- All Implemented Interfaces:
com.google.gwt.core.client.EntryPoint
public class ApplicationConfiguration
extends Object
implements com.google.gwt.core.client.EntryPoint
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWraps a native javascript object containing fields for an error message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponentInheritanceInfo(com.vaadin.client.ValueMap valueMap) voidaddComponentMappings(com.vaadin.client.ValueMap valueMap, com.vaadin.client.WidgetSet widgetSet) Return Atmosphere JS version.Return Atmosphere version.static ApplicationConfigurationgetConfigFromDOM(String appId) static ApplicationConfigurationgetConfigFromJson(String appId, String json, com.google.gwt.dom.client.Element rootElement) Class<? extends com.vaadin.client.ServerConnector> getConnectorClassByEncodedTag(int tag) Gets the URL to the context root of the web application.Gets the URL of the that the frontend:// protocol should resolve to.intgetParentTag(int tag) com.google.gwt.dom.client.ElementGet the root element instance used for this application.static List<ApplicationConnection> Gets the URL to the server-side VaadinService.Return the name of the parameter used to to send data to the service url.Integer[]getTagsForServerSideClassName(String classname) Returns all tags for given class.Deprecated.as of 7.3.getUIDL()Gets the initial UIDL from the DOM, if it was provided during the init process.intgetUIId()Gets the UI id of the server-side UI associated with this client-side instance.Gets the URL of the VAADIN directory on the server.com.google.gwt.core.client.JavaScriptObjectstatic booleanChecks if client side is in debug mode.static booleanChecks if production mode is enabled.static booleanChecks whether debug logging should be quiet.booleanbooleanChecks whether the widget set version has been sent to the server.voidstatic <T extends com.google.gwt.core.client.JavaScriptObject>
Tstatic voidregisterCallback(String widgetsetName) Registers that callback that the bootstrap javascript uses to start applications once the widgetset is loaded and all required information is available.static voidrunWhenDependenciesLoaded(com.google.gwt.user.client.Command command) Runs the given command when all pending dependencies have been loaded, or immediately if no dependencies are being loaded.voidvoidRegisters that the widget set version has been sent to the server.static voidstartApplication(String applicationId) Starts the application with a given id by reading the configuration options stored by the bootstrap javascript.booleanChecks whether path info in requests to the server-side service should be in a request parameter (namedv-resourcePath) or appended to the end of the service URL.
-
Constructor Details
-
ApplicationConfiguration
public ApplicationConfiguration()
-
-
Method Details
-
useServiceUrlPathParam
public boolean useServiceUrlPathParam()Checks whether path info in requests to the server-side service should be in a request parameter (namedv-resourcePath) or appended to the end of the service URL.- Returns:
trueif path info should be a request parameter;falseif the path info goes after the service URL- See Also:
-
getServiceUrlParameterName
Return the name of the parameter used to to send data to the service url. This method should only be called ifuseServiceUrlPathParam()is true.- Returns:
- The parameter name, by default
v-resourcePath - Since:
- 7.1.6
-
getRootPanelId
-
getServiceUrl
Gets the URL to the server-side VaadinService. IfuseServiceUrlPathParam()returntrue, the requested path info should be in thev-resourcePathquery parameter; else the path info should be appended to the end of the URL.- Returns:
- the URL to the server-side service as a string
- See Also:
-
getContextRootUrl
Gets the URL to the context root of the web application.- Returns:
- the URL to the server-side context root as a string
- Since:
- 8.0.3
-
getThemeName
Deprecated.as of 7.3. UseUIConnector.getActiveTheme()to get the theme currently in use- Returns:
- the theme name used when initializing the application
-
getVaadinDirUrl
Gets the URL of the VAADIN directory on the server.- Returns:
- the URL of the VAADIN directory
-
getFrontendUrl
Gets the URL of the that the frontend:// protocol should resolve to.- Returns:
- the URL of the frontend protocol
- Since:
- 8.1
-
setAppId
-
getUIDL
Gets the initial UIDL from the DOM, if it was provided during the init process.- Returns:
-
isStandalone
public boolean isStandalone()- Returns:
- true if the application is served by std. Vaadin servlet and is considered to be the only or main content of the host page.
-
getUIId
public int getUIId()Gets the UI id of the server-side UI associated with this client-side instance. The UI id should be included in every request originating from this instance in order to associate the request with the right UI instance on the server.- Returns:
- the UI id
-
getHeartbeatInterval
public int getHeartbeatInterval()- Returns:
- The interval in seconds between heartbeat requests, or a non-positive number if heartbeat is disabled.
-
getVersionInfoJSObject
public com.google.gwt.core.client.JavaScriptObject getVersionInfoJSObject() -
getCommunicationError
-
getAuthorizationError
-
getSessionExpiredError
-
parseJson
-
startApplication
Starts the application with a given id by reading the configuration options stored by the bootstrap javascript.- Parameters:
applicationId- id of the application to load, this is also the id of the html element into which the application should be rendered.
-
getRunningApplications
-
getConfigFromDOM
-
getConfigFromJson
public static ApplicationConfiguration getConfigFromJson(String appId, String json, com.google.gwt.dom.client.Element rootElement) -
getServletVersion
-
getAtmosphereVersion
Return Atmosphere version.- Returns:
- Atmosphere version.
- Since:
- 7.4
-
getAtmosphereJSVersion
Return Atmosphere JS version.- Returns:
- Atmosphere JS version.
- Since:
- 7.4
-
getConnectorClassByEncodedTag
-
addComponentInheritanceInfo
public void addComponentInheritanceInfo(com.vaadin.client.ValueMap valueMap) -
addComponentMappings
public void addComponentMappings(com.vaadin.client.ValueMap valueMap, com.vaadin.client.WidgetSet widgetSet) -
getTagsForServerSideClassName
Returns all tags for given class. Tags are used inApplicationConfigurationto keep track of different classes and their hierarchy- Parameters:
classname- name of class which tags we want- Returns:
- Integer array of tags pointing to this classname
- Since:
- 7.2
-
getParentTag
-
getServerSideClassNameForTag
-
runWhenDependenciesLoaded
public static void runWhenDependenciesLoaded(com.google.gwt.user.client.Command command) Runs the given command when all pending dependencies have been loaded, or immediately if no dependencies are being loaded.- Parameters:
command- the command to run- Since:
- 7.6
-
onModuleLoad
public void onModuleLoad()- Specified by:
onModuleLoadin interfacecom.google.gwt.core.client.EntryPoint
-
registerCallback
Registers that callback that the bootstrap javascript uses to start applications once the widgetset is loaded and all required information is available.- Parameters:
widgetsetName- the name of this widgetset
-
isDebugMode
public static boolean isDebugMode()Checks if client side is in debug mode. Practically this is invoked by adding ?debug parameter to URI. Please note that debug mode is always disabled if production mode is enabled, but disabling production mode does not automatically enable debug mode.- Returns:
- true if client side is currently been debugged
- See Also:
-
isProductionMode
public static boolean isProductionMode()Checks if production mode is enabled. When production mode is enabled, client-side logging is disabled. There may also be other performance optimizations.- Returns:
trueif production mode is enabled; otherwisefalse.- Since:
- 7.1.2
-
isQuietDebugMode
public static boolean isQuietDebugMode()Checks whether debug logging should be quiet.- Returns:
trueif debug logging should be quiet
-
isWidgetsetVersionSent
public boolean isWidgetsetVersionSent()Checks whether the widget set version has been sent to the server. It is sent in the first UIDL request.- Returns:
trueif browser information has already been sent
-
setWidgetsetVersionSent
public void setWidgetsetVersionSent()Registers that the widget set version has been sent to the server. -
getRootElement
public com.google.gwt.dom.client.Element getRootElement()Get the root element instance used for this application.- Returns:
- registered root element
- Since:
- 8.4
-