Package com.vaadin.client.bootstrap
Class JsoConfiguration
- java.lang.Object
-
- com.google.gwt.core.client.JavaScriptObject
-
- com.vaadin.client.bootstrap.JsoConfiguration
-
public final class JsoConfiguration extends com.google.gwt.core.client.JavaScriptObject
Helper class for reading configuration options from the bootstrap javascript.- Since:
- 1.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JsoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAtmosphereJSVersion()
Gets the JS version used in the Atmosphere framework.String
getAtmosphereVersion()
Gets the version of the Atmosphere framework.boolean
getConfigBoolean(String name)
Reads a configuration parameter as a boolean.ErrorMessage
getConfigError(String name)
Reads a configuration parameter as anErrorMessage
object.Integer
getConfigInteger(String name)
Reads a configuration parameter as an integer object.String
getConfigString(String name)
Reads a configuration parameter as a string.String[]
getConfigStringArray(String name)
Reads a configuration parameter as a String array.ValueMap
getConfigValueMap(String name)
Reads a configuration parameter as aValueMap
.ValueMap
getUIDL()
Gets the initial UIDL from the bootstrap page.String
getVaadinVersion()
Gets the version of the Vaadin framework used on the server.
-
-
-
Method Detail
-
getConfigString
public String getConfigString(String name)
Reads a configuration parameter as a string. Please note that the javascript value of the parameter should also be a string, or else an undefined exception may be thrown.- Parameters:
name
- name of the configuration parameter- Returns:
- value of the configuration parameter, or
null
if not defined
-
getConfigValueMap
public ValueMap getConfigValueMap(String name)
Reads a configuration parameter as aValueMap
. Please note that the javascript value of the parameter should also be a javascript object, or else an undefined exception may be thrown.- Parameters:
name
- name of the configuration parameter- Returns:
- value of the configuration parameter, or
null
if not defined
-
getConfigStringArray
public String[] getConfigStringArray(String name)
Reads a configuration parameter as a String array.- Parameters:
name
- name of the configuration parameter- Returns:
- value of the configuration parameter, or
null
if not defined
-
getConfigBoolean
public boolean getConfigBoolean(String name)
Reads a configuration parameter as a boolean.Please note that the javascript value of the parameter should also be a boolean, or else an undefined exception may be thrown.
- Parameters:
name
- name of the configuration parameter- Returns:
- the boolean value of the configuration parameter, or
false
if no value is defined
-
getConfigInteger
public Integer getConfigInteger(String name)
Reads a configuration parameter as an integer object. Please note that the javascript value of the parameter should also be an integer, or else an undefined exception may be thrown.- Parameters:
name
- name of the configuration parameter- Returns:
- integer value of the configuration parameter, or
null
if no value is defined
-
getConfigError
public ErrorMessage getConfigError(String name)
Reads a configuration parameter as anErrorMessage
object. Please note that the javascript value of the parameter should also be an object with appropriate fields, or else an undefined exception may be thrown when calling this method or when calling methods on the returned object.- Parameters:
name
- name of the configuration parameter- Returns:
- error message with the given name, or
null
if no value is defined
-
getVaadinVersion
public String getVaadinVersion()
Gets the version of the Vaadin framework used on the server.- Returns:
- a string with the version
-
getAtmosphereVersion
public String getAtmosphereVersion()
Gets the version of the Atmosphere framework.- Returns:
- a string with the version
-
getAtmosphereJSVersion
public String getAtmosphereJSVersion()
Gets the JS version used in the Atmosphere framework.- Returns:
- a string with the version
-
getUIDL
public ValueMap getUIDL()
Gets the initial UIDL from the bootstrap page.- Returns:
- the initial UIDL
-
-