com.vaadin.terminal.gwt.client
Class ApplicationConfiguration

java.lang.Object
  extended by com.vaadin.terminal.gwt.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
static class ApplicationConfiguration.ErrorMessage
          Wraps a native javascript object containing fields for an error message
 
Field Summary
static String VERSION
          Builds number.
 
Constructor Summary
ApplicationConfiguration()
           
 
Method Summary
 void addComponentInheritanceInfo(ValueMap valueMap)
           
 void addComponentMappings(ValueMap valueMap, WidgetSet widgetSet)
           
 String getApplicationUri()
          Gets the application base URI.
 String getApplicationVersion()
           
 ApplicationConfiguration.ErrorMessage getAuthorizationError()
           
 ApplicationConfiguration.ErrorMessage getCommunicationError()
           
static ApplicationConfiguration getConfigFromDOM(String appId)
           
 Class<? extends ServerConnector> getConnectorClassByEncodedTag(int tag)
           
 Integer getParentTag(int tag)
           
 String getPortletUidlURLBase()
           
 int getRootId()
          Gets the root if of this application instance.
 String getRootPanelId()
           
static List<ApplicationConnection> getRunningApplications()
           
 String getServerSideClassNameForTag(Integer tag)
           
 String getServletVersion()
           
 String getThemeName()
           
 String getThemeUri()
           
 String getUIDL()
          Gets the initial UIDL from the DOM, if it was provided during the init process.
 com.google.gwt.core.client.JavaScriptObject getVersionInfoJSObject()
           
 boolean isBrowserDetailsSent()
          Checks whether information from the web browser (e.g.
static boolean isDebugMode()
          Checks if client side is in debug mode.
static boolean isQuietDebugMode()
          Checks whether debug logging should be quiet
 boolean isStandalone()
           
 boolean isWidgetsetVersionSent()
          Checks whether the widget set version has been sent to the server.
 void onModuleLoad()
           
static void registerCallback(String widgetsetName)
          Registers that callback that the bootstrap javascript uses to start applications once the widgetset is loaded and all required information is available
 void setAppId(String appId)
           
 void setBrowserDetailsSent()
          Registers that the browser details have been sent.
 void setWidgetsetVersionSent()
          Registers that the widget set version has been sent to the server.
static void startApplication(String applicationId)
          Starts the application with a given id by reading the configuration options stored by the bootstrap javascript.
 boolean useDebugIdInDOM()
           
 boolean usePortletURLs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Builds number. For example 0-custom_tag in 5.0.0-custom_tag.

Constructor Detail

ApplicationConfiguration

public ApplicationConfiguration()
Method Detail

usePortletURLs

public boolean usePortletURLs()

getPortletUidlURLBase

public String getPortletUidlURLBase()

getRootPanelId

public String getRootPanelId()

getApplicationUri

public String getApplicationUri()
Gets the application base URI. Using this other than as the download action URI can cause problems in Portlet 2.0 deployments.

Returns:
application base URI

getThemeName

public String getThemeName()

getThemeUri

public String getThemeUri()

setAppId

public void setAppId(String appId)

getUIDL

public String 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.

getRootId

public int getRootId()
Gets the root if of this application instance. The root id should be included in every request originating from this instance in order to associate it with the right Root instance on the server.

Returns:
the root id

getVersionInfoJSObject

public com.google.gwt.core.client.JavaScriptObject getVersionInfoJSObject()

getCommunicationError

public ApplicationConfiguration.ErrorMessage getCommunicationError()

getAuthorizationError

public ApplicationConfiguration.ErrorMessage getAuthorizationError()

startApplication

public static void startApplication(String applicationId)
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

public static List<ApplicationConnection> getRunningApplications()

getConfigFromDOM

public static ApplicationConfiguration getConfigFromDOM(String appId)

getServletVersion

public String getServletVersion()

getApplicationVersion

public String getApplicationVersion()

useDebugIdInDOM

public boolean useDebugIdInDOM()

getConnectorClassByEncodedTag

public Class<? extends ServerConnector> getConnectorClassByEncodedTag(int tag)

addComponentInheritanceInfo

public void addComponentInheritanceInfo(ValueMap valueMap)

addComponentMappings

public void addComponentMappings(ValueMap valueMap,
                                 WidgetSet widgetSet)

getParentTag

public Integer getParentTag(int tag)

getServerSideClassNameForTag

public String getServerSideClassNameForTag(Integer tag)

onModuleLoad

public void onModuleLoad()
Specified by:
onModuleLoad in interface com.google.gwt.core.client.EntryPoint

registerCallback

public static void registerCallback(String widgetsetName)
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.

Returns:
true if client side is currently been debugged

isQuietDebugMode

public static boolean isQuietDebugMode()
Checks whether debug logging should be quiet

Returns:
true if debug logging should be quiet

isBrowserDetailsSent

public boolean isBrowserDetailsSent()
Checks whether information from the web browser (e.g. uri fragment and screen size) has been sent to the server.

Returns:
true if browser information has already been sent
See Also:
ApplicationConnection.getNativeBrowserDetailsParameters(String)

setBrowserDetailsSent

public void setBrowserDetailsSent()
Registers that the browser details have been sent. isBrowserDetailsSent() will return after this method has been invoked.


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:
true if browser information has already been sent
See Also:
ApplicationConnection.getNativeBrowserDetailsParameters(String)

setWidgetsetVersionSent

public void setWidgetsetVersionSent()
Registers that the widget set version has been sent to the server.



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