Interface AbstractConfiguration

All Superinterfaces:
Serializable
All Known Subinterfaces:
ApplicationConfiguration, DeploymentConfiguration
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 Details

    • isProductionMode

      boolean isProductionMode()
      Returns whether Vaadin is in production mode.
      Returns:
      true if in production mode, false otherwise.
    • frontendHotdeploy

      @Deprecated default boolean frontendHotdeploy()
      Deprecated.
      Use getMode() instead
      Get if the dev server should be enabled. false by default as express mode should be used.
      Returns:
      true if dev server should be used
    • getMode

      default Mode getMode()
      Gets the mode the application is running in.
      Returns:
      production, development using livereload or development using bundle
    • 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
    • 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 defined
      Returns:
      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 defined
      Returns:
      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 is true.
      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 to build.

      Returns:
      build folder name, default target
    • getProjectFolder

      default File getProjectFolder()
      Return the project root folder.

      Only available in development mode.

      Returns:
      the project root folder, or null if unknown
    • 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.
    • getJavaSourceFolder

      default File getJavaSourceFolder()
      Gets the folder where sources are stored.

      Only available in development mode.

      Returns:
      the folder where source files are stored, typically src/main/java.