public interface DeploymentConfiguration extends Serializable
Modifier and Type | Method and Description |
---|---|
default boolean |
areWebJarsEnabled()
Determines if webJars mechanism is enabled.
|
default boolean |
disableAutomaticServletRegistration()
Determines if Flow should automatically register servlets.
|
default boolean |
enableDevServer()
Get if the dev server should be enabled.
|
<T> T |
getApplicationOrSystemProperty(String propertyName,
T defaultValue,
Function<String,T> converter)
Gets a configured property.
|
default boolean |
getBooleanProperty(String propertyName,
boolean defaultValue)
A shorthand of
getApplicationOrSystemProperty(String, Object, Function)
for String type. |
String |
getClassLoaderName()
Gets class loader configuration option value.
|
default String |
getCompiledWebComponentsPath() |
default String |
getDevelopmentFrontendPrefix()
Gets the URL from which frontend resources should be loaded during
development, unless explicitly configured to use the production es6 and
es5 URLs.
|
default String |
getEs5FrontendPrefix()
Gets the URL from which frontend resources should be loaded in ES5
compatible browsers.
|
default String |
getEs6FrontendPrefix()
Gets the URL from which frontend resources should be loaded in ES6
compatible browsers.
|
default String |
getExternalStatsUrl()
Get the url from where stats.json should be retrieved from.
|
int |
getHeartbeatInterval()
Returns the number of seconds between heartbeat requests of a UI, or a
non-positive number if heartbeat is disabled.
|
Properties |
getInitParameters()
Gets the properties configured for the deployment, e.g.
|
int |
getMaxMessageSuspendTimeout()
In certain cases, such as when combining XmlHttpRequests and push over
low bandwidth connections, messages may be received out of order by the
client.
|
default String |
getNpmFrontendPrefix()
Gets the URL from which frontend resources should be loaded in NPM mode.
|
default List<String> |
getPolyfills()
Returns an array with polyfills to be loaded when the app is loaded.
|
PushMode |
getPushMode()
Returns the mode of bidirectional ("push") client-server communication
that should be used.
|
String |
getPushURL()
Returns the URL that bidirectional ("push") client-server communication
should use.
|
default String |
getStringProperty(String propertyName,
String defaultValue)
A shorthand of
getApplicationOrSystemProperty(String, Object, Function)
for String type. |
String |
getUIClassName()
Gets UI class configuration option value.
|
int |
getWebComponentDisconnect()
Returns the number of seconds that a WebComponent will wait for a
reconnect before removing the server-side component from memory.
|
boolean |
isBowerMode()
Deprecated.
Bower WebJars are being deprecated, so compatibility mode
should no longer be used and will be removed in near future.
|
default boolean |
isBrotli()
Checks whether precompressed Brotli files should be used if available.
|
boolean |
isCloseIdleSessions()
Returns whether a Vaadin session should be closed when all its open UIs
have been idle for longer than its configured maximum inactivity time.
|
default boolean |
isCompatibilityMode()
Deprecated.
Bower WebJars are being deprecated, so compatibility mode
should no longer be used and will be removed in near future.
|
default boolean |
isDevModeLiveReloadEnabled()
Checks if dev mode live reload is enabled or not.
|
default boolean |
isEnforcedFieldValidationEnabled()
Whether the full experience validation is enforced for Flow components.
|
default boolean |
isOldLicenseCheckerEnabled()
Returns whether server-side and offline license checking are enabled or
not.
|
default boolean |
isPnpmEnabled()
Returns whether pnpm is enabled or not.
|
boolean |
isProductionMode()
Returns whether Vaadin is in production mode.
|
boolean |
isRequestTiming()
Returns whether the server provides timing info to the client.
|
boolean |
isSendUrlsAsParameters()
Returns whether the sending of URL's as GET and POST parameters in
requests with content-type
application/x-www-form-urlencoded
is enabled or not. |
default boolean |
isStatsExternal()
Get if the stats.json file should be retrieved from an external service
or through the classpath.
|
boolean |
isSyncIdCheckEnabled()
Returns whether sync id checking is enabled.
|
boolean |
isXsrfProtectionEnabled()
Returns whether cross-site request forgery protection is enabled.
|
default boolean |
reuseDevServer()
Get if the dev server should be reused on each reload.
|
default boolean |
useCompiledFrontendResources()
Determines if Flow should use compiled or original frontend resources.
|
boolean isProductionMode()
@Deprecated boolean isBowerMode()
@Deprecated default boolean isCompatibilityMode()
boolean isRequestTiming()
boolean isXsrfProtectionEnabled()
boolean isSyncIdCheckEnabled()
true
if sync id checking is enabled;
false
otherwiseint getHeartbeatInterval()
int getMaxMessageSuspendTimeout()
int getWebComponentDisconnect()
boolean isSendUrlsAsParameters()
application/x-www-form-urlencoded
is enabled or not.false
if set to false or true
otherwiseboolean isCloseIdleSessions()
A UI is idle if it is open on the client side but has no activity other
than heartbeat requests. If isCloseIdleSessions() == false
,
heartbeat requests cause the session to stay open for as long as there
are open UIs on the client side. If it is true
, the session is
eventually closed if the open UIs do not have any user interaction.
WrappedSession.getMaxInactiveInterval()
PushMode getPushMode()
String getPushURL()
Properties getInitParameters()
<T> T getApplicationOrSystemProperty(String propertyName, T defaultValue, Function<String,T> converter)
T
- type of a propertypropertyName
- The simple of the property, in some contexts, lookup might be
performed using variations of the provided name.defaultValue
- the default value that should be used if no value has been
definedconverter
- the way string should be converted into the required propertydefault String getStringProperty(String propertyName, String defaultValue)
getApplicationOrSystemProperty(String, Object, Function)
for String
type.propertyName
- The simple of the property, in some contexts, lookup might be
performed using variations of the provided name.defaultValue
- the default value that should be used if no value has been
defineddefault boolean getBooleanProperty(String propertyName, boolean defaultValue) throws IllegalArgumentException
getApplicationOrSystemProperty(String, Object, Function)
for String
type.
Considers ""
to be equal true
in order to treat params
like -Dtest.param
as enabled (test.param == true
).
Additionally validates the property value, requiring non-empty strings to
be equal to boolean string representation. An exception thrown if it's
not true.propertyName
- The simple of the property, in some contexts, lookup might be
performed using variations of the provided name.defaultValue
- the default value that should be used if no value has been
definedIllegalArgumentException
- if property value string is not a boolean valueString getUIClassName()
String getClassLoaderName()
default String getDevelopmentFrontendPrefix()
default String getEs6FrontendPrefix()
default String getEs5FrontendPrefix()
default String getNpmFrontendPrefix()
default boolean areWebJarsEnabled()
InitParameters.DISABLE_WEBJARS
property
to true
, or the user have not set the property at all and the
useCompiledFrontendResources()
returns false.true
if webJars are enabled, false
otherwisedefault boolean useCompiledFrontendResources()
InitParameters.USE_ORIGINAL_FRONTEND_RESOURCES
property to
true
.true
if Flow should use compiled frontend resources.default boolean disableAutomaticServletRegistration()
ServletDeployer
javadoc.
User can explicitly disable automatic servlet registration by setting the
InitParameters.DISABLE_AUTOMATIC_SERVLET_REGISTRATION
property to
true
.true
if Flow should not automatically register servletsServletDeployer
default boolean isBrotli()
true
to serve precompressed Brotli files,
false
to not serve Brotli files.default String getCompiledWebComponentsPath()
default List<String> getPolyfills()
InitParameters.SERVLET_PARAMETER_POLYFILLS
as a comma separated
list of JS files to load.default boolean enableDevServer()
default boolean reuseDevServer()
default boolean isStatsExternal()
default String getExternalStatsUrl()
default boolean isDevModeLiveReloadEnabled()
true
if dev mode live reload is enabled, false
otherwisedefault boolean isPnpmEnabled()
true
if enabled, false
if notdefault boolean isOldLicenseCheckerEnabled()
New license checker is only available in npm mode with enabled live reload. Once compatibility/bower mode is used or live reload is disabled, the old license checker is used.
true
if old JavaScript license checker is used,
false
if new license checker enableddefault boolean isEnforcedFieldValidationEnabled()
The full experience validation integrates web component's own validation, server-side component's constraints and Binder validation into a seamless chain. By default, it's disabled, which means that components aren't validated on blur, for example.
For more detailed information, please refer to: https://github.com/vaadin/platform/issues/3066#issuecomment-1598771284
true
if enabled, false
otherwise.Copyright © 2025. All rights reserved.