public class PropertyDeploymentConfiguration extends AbstractDeploymentConfiguration
DeploymentConfiguration based
on a base class for resolving system properties and a set of init parameters.| Constructor and Description |
|---|
PropertyDeploymentConfiguration(ApplicationConfiguration parentConfig,
Class<?> systemPropertyBaseClass,
Properties initParameters)
Create a new property deployment configuration instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
enableDevServer()
Get if the dev server should be enabled.
|
String |
getApplicationProperty(String parameterName)
Gets an application property value.
|
String |
getBuildFolder()
Return the defined build folder for the used build system.
|
String |
getFlowResourcesFolder()
Get the location for flow resources inside the build folder.
|
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.
|
File |
getJavaResourceFolder()
Gets the folder where resource sources are stored.
|
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.
|
protected ApplicationConfiguration |
getParentConfiguration()
Returns parent application configuration.
|
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.
|
protected String |
getSystemProperty(String parameterName)
Gets an system property 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 |
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.
|
boolean |
isDevModeGizmoEnabled()
Checks if dev mode gizmo (debug window) is enabled or not.
|
boolean |
isDevModeLiveReloadEnabled()
Checks if dev mode live reload is enabled or not.
|
boolean |
isGlobalPnpm()
Returns whether globally installed pnpm is used or the default one (see
FrontendTools.DEFAULT_PNPM_VERSION). |
protected boolean |
isOwnProperty(String property)
Checks whether the given
property is the property explicitly set
in this deployment configuration (not in it's parent config). |
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. |
boolean |
isSyncIdCheckEnabled()
Returns whether sync id checking is enabled.
|
boolean |
isUsageStatisticsEnabled()
Returns whether development time usage statistics collection is enabled
or not.
|
boolean |
isXsrfProtectionEnabled()
Returns whether cross-site request forgery protection is enabled.
|
boolean |
reuseDevServer()
Get if the dev server should be reused on each reload.
|
boolean |
useV14Bootstrap()
Returns whether Vaadin is running in useDeprecatedV14Bootstrapping.
|
getClassLoaderName, getUIClassNamegetApplicationOrSystemProperty, getApplicationProperty, getBooleanProperty, getProperties, getStringPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetApplicationOrSystemProperty, getBooleanProperty, getCompiledWebComponentsPath, getExternalStatsUrl, getPolyfills, isBrotli, isEagerServerLoad, isStatsExternalgetStringPropertypublic PropertyDeploymentConfiguration(ApplicationConfiguration parentConfig, Class<?> systemPropertyBaseClass, Properties initParameters)
parentConfig - a parent application configurationsystemPropertyBaseClass - the class that should be used as a basis when reading system
propertiesinitParameters - the init parameters that should make up the foundation for
this configurationprotected String getSystemProperty(String parameterName)
getSystemProperty in class AbstractPropertyConfigurationparameterName - the Name or the parameter.public String getApplicationProperty(String parameterName)
getApplicationProperty in class AbstractPropertyConfigurationparameterName - the Name or the parameter.public boolean isProductionMode()
AbstractConfigurationpublic boolean enableDevServer()
AbstractConfigurationpublic boolean useV14Bootstrap()
AbstractConfigurationpublic boolean isPnpmEnabled()
AbstractConfigurationtrue if enabled, false if notpublic boolean isUsageStatisticsEnabled()
AbstractConfigurationisProductionMode is true.true if enabled, false if not collected.AbstractConfiguration.isProductionMode()public boolean isGlobalPnpm()
AbstractConfigurationFrontendTools.DEFAULT_PNPM_VERSION).true if globally installed pnpm is used, false if
the default one is used.public boolean reuseDevServer()
AbstractConfigurationpublic boolean isRequestTiming()
DeploymentConfigurationpublic boolean isXsrfProtectionEnabled()
AbstractConfigurationpublic String getBuildFolder()
AbstractConfiguration
Default value is target used by maven and the gradle plugin
will set it to build.
targetpublic String getFlowResourcesFolder()
AbstractConfiguration
Default will be target/flow-frontend where target is the
defined buildFolder see AbstractConfiguration.getBuildFolder().
Note! The path is made using Paths.get which will use File.separator that is OS dependent.
target/flow-frontendpublic File getJavaResourceFolder()
AbstractConfigurationOnly available in development mode.
src/main/resources.public boolean isSyncIdCheckEnabled()
DeploymentConfigurationtrue if sync id checking is enabled;
false otherwisepublic int getHeartbeatInterval()
DeploymentConfigurationpublic int getMaxMessageSuspendTimeout()
DeploymentConfigurationpublic int getWebComponentDisconnect()
DeploymentConfigurationpublic boolean isSendUrlsAsParameters()
DeploymentConfigurationapplication/x-www-form-urlencoded
is enabled or not.false if set to false or true otherwisepublic boolean isCloseIdleSessions()
DeploymentConfiguration
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()public PushMode getPushMode()
DeploymentConfigurationpublic String getPushURL()
DeploymentConfigurationpublic Properties getInitParameters()
DeploymentConfigurationpublic boolean isDevModeLiveReloadEnabled()
DeploymentConfiguration
Note that if the dev mode gizmo is disabled
(DeploymentConfiguration.isDevModeGizmoEnabled() returns false), the live reload
will be disabled as well.
true if dev mode live reload is enabled, false
otherwisepublic boolean isDevModeGizmoEnabled()
DeploymentConfigurationtrue if dev mode gizmo is enabled, false
otherwiseprotected boolean isOwnProperty(String property)
property is the property explicitly set
in this deployment configuration (not in it's parent config).
The deployment configuration consists of properties defined in the configuration itself and properties which are coming from the application configuration. The properties which are defined in the deployment configuration itself (own properties) should take precedence: their values should override the parent config properties values.
property - a property nameproperty is explicitly set in the
configurationprotected ApplicationConfiguration getParentConfiguration()
Copyright © 2023. All rights reserved.