com.vaadin.flow.server.
Interface AbstractConfiguration
-
All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
AbstractDeploymentConfiguration
,AbstractPropertyConfiguration
,DefaultApplicationConfigurationFactory.ApplicationConfigurationImpl
,DefaultDeploymentConfiguration
,PropertyDeploymentConfiguration
public interface AbstractConfiguration extends Serializable
Defines a base contract for configuration (e.g. on an application level, servlet level,...).
Since:
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method Description default boolean
enableDevServer()
Get if the dev server should be enabled.
boolean
getBooleanProperty(String name, boolean defaultValue)
Gets a configured property as a boolean.
default String
getBuildFolder()
Return the defined build folder for the used build system.
default String
getFlowResourcesFolder()
Get the location for flow resources inside the build folder.
default File
getJavaResourceFolder()
Gets the folder where resource sources are stored.
String
getStringProperty(String name, String defaultValue)
Gets a configured property as a string.
default boolean
isGlobalPnpm()
Returns whether globally installed pnpm is used or the default one (see
FrontendTools.DEFAULT_PNPM_VERSION
).default boolean
isPnpmEnabled()
Returns whether pnpm is enabled or not.
boolean
isProductionMode()
Returns whether Vaadin is in production mode.
default boolean
isUsageStatisticsEnabled()
Returns whether development time usage statistics collection is enabled or not.
default 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
useV14Bootstrap()
Returns whether Vaadin is running in useDeprecatedV14Bootstrapping.
-
-
-
Method Detail
-
isProductionMode
boolean isProductionMode()
Returns whether Vaadin is in production mode.
Returns:
true if in production mode, false otherwise.
-
enableDevServer
default boolean enableDevServer()
Get if the dev server should be enabled. True by default
Returns:
true if dev server should be used
-
reuseDevServer
default boolean reuseDevServer()
Get if the dev server should be reused on each reload. True by default, set it to false in tests so as dev server is not kept as a daemon after the test.
Returns:
true if dev server should be reused
-
useV14Bootstrap
default boolean useV14Bootstrap()
Returns whether Vaadin is running in useDeprecatedV14Bootstrapping.
Returns:
true if in useDeprecatedV14Bootstrapping, false otherwise.
-
getStringProperty
String getStringProperty(String name, String defaultValue)
Gets a configured property as a string.
Parameters:
name
- 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 definedReturns:
the property value, or the passed default value if no property value is found
-
getBooleanProperty
boolean getBooleanProperty(String name, boolean defaultValue)
Gets a configured property as a boolean.
Parameters:
name
- 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 definedReturns:
the property value, or the passed default value if no property value is found
-
isPnpmEnabled
default boolean isPnpmEnabled()
Returns whether pnpm is enabled or not.
Returns:
true
if enabled,false
if not
-
isGlobalPnpm
default boolean isGlobalPnpm()
Returns whether globally installed pnpm is used or the default one (see
FrontendTools.DEFAULT_PNPM_VERSION
).Returns:
true
if globally installed pnpm is used,false
if the default one is used.
-
isUsageStatisticsEnabled
default boolean isUsageStatisticsEnabled()
Returns whether development time usage statistics collection is enabled or not. Always return false if
isProductionMode
istrue
.Returns:
true
if enabled,false
if not collected.See Also:
-
isXsrfProtectionEnabled
default boolean isXsrfProtectionEnabled()
Returns whether cross-site request forgery protection is enabled.
Returns:
true if XSRF protection is enabled, false otherwise.
-
getBuildFolder
default String getBuildFolder()
Return the defined build folder for the used build system.
Default value is
target
used by maven and the gradle plugin will set it tobuild
.Returns:
build folder name, default
target
-
getFlowResourcesFolder
default String getFlowResourcesFolder()
Get the location for flow resources inside the build folder.
Default will be
target/flow-frontend
where target is the defined buildFolder seegetBuildFolder()
.Note! The path is made using Paths.get which will use File.separator that is OS dependent.
Returns:
flow resources folder, default
target/flow-frontend
-
getJavaResourceFolder
default File getJavaResourceFolder()
Gets the folder where resource sources are stored.
Only available in development mode.
Returns:
the folder where resources are stored, typically
src/main/resources
.
-
-