Class Constants

java.lang.Object
com.vaadin.flow.server.Constants
All Implemented Interfaces:
Serializable

public final class Constants extends Object implements Serializable
Constants used by the server side framework.

Not available on the client side, for that use ApplicationConstants.

Since:
1.0
See Also:
  • Field Details

    • REQUIRED_ATMOSPHERE_RUNTIME_VERSION

      public static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION
      See Also:
    • VAADIN_PREFIX

      public static final String VAADIN_PREFIX
      The prefix used for System property parameters.
      Since:
      2.0
      See Also:
    • NPM_TOKEN

      public static final String NPM_TOKEN
      See Also:
    • FRONTEND_TOKEN

      public static final String FRONTEND_TOKEN
      See Also:
    • CONNECT_JAVA_SOURCE_FOLDER_TOKEN

      public static final String CONNECT_JAVA_SOURCE_FOLDER_TOKEN
      See Also:
    • JAVA_RESOURCE_FOLDER_TOKEN

      public static final String JAVA_RESOURCE_FOLDER_TOKEN
      See Also:
    • CONNECT_APPLICATION_PROPERTIES_TOKEN

      public static final String CONNECT_APPLICATION_PROPERTIES_TOKEN
      See Also:
    • CONNECT_OPEN_API_FILE_TOKEN

      public static final String CONNECT_OPEN_API_FILE_TOKEN
      See Also:
    • PROJECT_FRONTEND_GENERATED_DIR_TOKEN

      public static final String PROJECT_FRONTEND_GENERATED_DIR_TOKEN
      See Also:
    • EXTERNAL_STATS_FILE_TOKEN

      public static final String EXTERNAL_STATS_FILE_TOKEN
      See Also:
    • EXTERNAL_STATS_URL_TOKEN

      public static final String EXTERNAL_STATS_URL_TOKEN
      See Also:
    • DAU_TOKEN

      public static final String DAU_TOKEN
      See Also:
    • PREMIUM_FEATURES

      public static final String PREMIUM_FEATURES
      See Also:
    • COMMERCIAL_BANNER_TOKEN

      public static final String COMMERCIAL_BANNER_TOKEN
      See Also:
    • POLYFILLS_DEFAULT_VALUE

      public static final String POLYFILLS_DEFAULT_VALUE
      See Also:
    • STATISTICS_JSON_DEFAULT

      public static final String STATISTICS_JSON_DEFAULT
      Default path for the frontend statistics json file. It can be modified by setting the system property "statistics.file.path".
      Since:
      2.0
      See Also:
    • TEMPLATE_DIRECTORY

      public static final String TEMPLATE_DIRECTORY
      Default resource directory to place template sources in. This is used used for Vite production mode instead of a stats.json file.
      Since:
      9.0
      See Also:
    • PACKAGE_JSON

      public static final String PACKAGE_JSON
      Name of the npm main file.
      Since:
      2.0
      See Also:
    • PACKAGE_LOCK_JSON

      public static final String PACKAGE_LOCK_JSON
      Name of the npm version locking file.
      Since:
      23.0
      See Also:
    • PACKAGE_LOCK_YAML

      public static final String PACKAGE_LOCK_YAML
      Name of the pnpm version locking file.
      Since:
      24.1
      See Also:
    • PACKAGE_LOCK_BUN

      public static final String PACKAGE_LOCK_BUN
      Name of the bun version locking file.
      Since:
      24.3
      See Also:
    • PACKAGE_LOCK_BUN_1_2

      public static final String PACKAGE_LOCK_BUN_1_2
      Name of the bun version locking file, starting from bun 1.2.
      Since:
      24.6.3
      See Also:
    • TARGET

      public static final String TARGET
      Target folder constant.
      Since:
      7.0
      See Also:
    • COMPATIBILITY_RESOURCES_FRONTEND_DEFAULT

      public static final String COMPATIBILITY_RESOURCES_FRONTEND_DEFAULT
      Location for the frontend resources in jar files for compatibility mode (also obsolete but supported for npm mode).
      Since:
      2.0.11
      See Also:
    • RESOURCES_FRONTEND_DEFAULT

      public static final String RESOURCES_FRONTEND_DEFAULT
      Location for the frontend resources in jar files.
      Since:
      2.0
      See Also:
    • APPLICATION_THEME_ROOT

      public static final String APPLICATION_THEME_ROOT
      The name of the application theme root folder.
      Since:
      6.0
      See Also:
    • RESOURCES_JAR_DEFAULT

      public static final String RESOURCES_JAR_DEFAULT
      Location for the resources in jar files.
      Since:
      6.0
      See Also:
    • RESOURCES_THEME_JAR_DEFAULT

      public static final String RESOURCES_THEME_JAR_DEFAULT
      Location for the theme resources in jar files.
      Since:
      6.0
      See Also:
    • ENABLE_PNPM_DEFAULT

      public static final boolean ENABLE_PNPM_DEFAULT
      Constant for whether pnpm is default or not.
      Since:
      9.0
      See Also:
    • ENABLE_BUN_DEFAULT

      public static final boolean ENABLE_BUN_DEFAULT
      Constant for whether bun is default or not.
      Since:
      24.3
      See Also:
    • GLOBAL_PNPM_DEFAULT

      public static final boolean GLOBAL_PNPM_DEFAULT
      Constant for setting the pinned supported version of pnpm to be used by default.
      Since:
      9.0
      See Also:
    • DEFAULT_REQUIRE_HOME_NODE_EXECUTABLE

      public static final boolean DEFAULT_REQUIRE_HOME_NODE_EXECUTABLE
      Since:
      9.0
      See Also:
    • VAADIN_USAGE_STATS_ENABLED

      public static final String VAADIN_USAGE_STATS_ENABLED
      The name of the environment variable that controls whether server-side usage statistics is enabled. Usage statistics are disabled if the environment variable is set to "false".
      Since:
      25.0
      See Also:
    • DEFAULT_DEVMODE_STATS

      public static final boolean DEFAULT_DEVMODE_STATS
      The default value for whether usage statistics is enabled.
      Since:
      9.0.2
    • ALLOW_APPSHELL_ANNOTATIONS

      public static final String ALLOW_APPSHELL_ANNOTATIONS
      Internal parameter which prevent validation for annotations which are allowed on an AppShell class
      Since:
      4.0
      See Also:
    • META_INF

      public static final String META_INF
      The path used in the vaadin servlet for handling static resources.
      Since:
      2.0
      See Also:
    • VAADIN_MAPPING

      public static final String VAADIN_MAPPING
      The path used in the vaadin servlet for handling static resources.
      Since:
      2.0
      See Also:
    • PUSH_MAPPING

      public static final String PUSH_MAPPING
      The path used in the vaadin servlet for handling push.
      Since:
      23.3
      See Also:
    • VAADIN_BUILD

      public static final String VAADIN_BUILD
      The static build resources folder.
      Since:
      2.0
      See Also:
    • VAADIN_CONFIGURATION

      public static final String VAADIN_CONFIGURATION
      The static configuration resources folder.
      Since:
      2.0
      See Also:
    • VAADIN_WEBAPP

      public static final String VAADIN_WEBAPP
      The static resources root folder.
      Since:
      6.0
      See Also:
    • VAADIN_PWA_ICONS

      public static final String VAADIN_PWA_ICONS
      The generated PWA icons folder.
      Since:
      24.6
      See Also:
    • VAADIN_SERVLET_RESOURCES

      public static final String VAADIN_SERVLET_RESOURCES
      The path to meta-inf/VAADIN/ where static resources are put on the servlet.
      Since:
      2.0
      See Also:
    • VAADIN_WEBAPP_RESOURCES

      public static final String VAADIN_WEBAPP_RESOURCES
      The path to webapp/ public resources root.
      Since:
      6.0
      See Also:
    • VAADIN_BUILD_FILES_PATH

      public static final String VAADIN_BUILD_FILES_PATH
      The prefix used for all internal static files, relative to context root.
      Since:
      2.0
      See Also:
    • LOCAL_FRONTEND_RESOURCES_PATH

      public static final String LOCAL_FRONTEND_RESOURCES_PATH
      Default path for local frontend resources packaged for jar add-ons.
      Since:
      2.0.5
      See Also:
    • EXTERNAL_STATS_FILE

      public static final String EXTERNAL_STATS_FILE
      Property boolean for marking stats.json to be fetched from external location.
      Since:
      2.2
      See Also:
    • EXTERNAL_STATS_URL

      public static final String EXTERNAL_STATS_URL
      Property String for external stats.json location url.
      Since:
      2.2
      See Also:
    • DEFAULT_EXTERNAL_STATS_URL

      public static final String DEFAULT_EXTERNAL_STATS_URL
      Default location to look for the external stats.json.
      Since:
      2.2
      See Also:
    • URL_PARAMETER_RESTART_APPLICATION

      public static final String URL_PARAMETER_RESTART_APPLICATION
      A request parameter that can be given in browser to force the Vaadin application to create a new UI and session instance, thus overriding @PreserveOnRefresh annotation.
      Since:
      3.0
      See Also:
    • URL_PARAMETER_CLOSE_APPLICATION

      public static final String URL_PARAMETER_CLOSE_APPLICATION
      A request parameter that can be given in browser to force the Vaadin application to close an existing UI and session. Unlike URL_PARAMETER_RESTART_APPLICATION, this will not create a new session.
      Since:
      3.0
      See Also:
    • STATISTIC_FLOW_BOOTSTRAPHANDLER

      public static final String STATISTIC_FLOW_BOOTSTRAPHANDLER
      UsageEntry name for UsageStatistics BootstrapHandler.
      Since:
      3.0
      See Also:
    • STATISTIC_ROUTING_SERVER

      public static final String STATISTIC_ROUTING_SERVER
      UsageEntry name for UsageStatistics Routing Server.
      Since:
      3.0
      See Also:
    • STATISTIC_ROUTING_CLIENT

      public static final String STATISTIC_ROUTING_CLIENT
      UsageEntry name for UsageStatistics Routing Client.
      Since:
      3.0
      See Also:
    • STATISTIC_ROUTING_HYBRID

      public static final String STATISTIC_ROUTING_HYBRID
      UsageEntry name for UsageStatistics Hybrid.
      Since:
      3.0
      See Also:
    • STATISTIC_HAS_FLOW_ROUTE

      public static final String STATISTIC_HAS_FLOW_ROUTE
      UsageEntry name for Flow routes definitions. Marked used, if RouteRegistry is not empty.
      Since:
      24.4
      See Also:
    • STATISTIC_HAS_AUTO_LAYOUT

      public static final String STATISTIC_HAS_AUTO_LAYOUT
      UsageEntry name for automatic layout. Marked used, if Layout annotation is used or RouteRegistry#setLayout is used directly.
      Since:
      24.5
      See Also:
    • STATISTIC_HAS_CLIENT_ROUTE_WITH_AUTO_LAYOUT

      public static final String STATISTIC_HAS_CLIENT_ROUTE_WITH_AUTO_LAYOUT
      UsageEntry name for client route using automatic layout. Marked used, if AvailableViewInfo#flowLayout is true for any client route.
      Since:
      24.5
      See Also:
    • STATISTIC_HAS_SERVER_ROUTE_WITH_AUTO_LAYOUT

      public static final String STATISTIC_HAS_SERVER_ROUTE_WITH_AUTO_LAYOUT
      UsageEntry name for server route using automatic layout. Marked used, if any server route's layout matches Layout annotated layout.
      Since:
      24.5
      See Also:
    • STATISTIC_HAS_EXPORTED_WC

      public static final String STATISTIC_HAS_EXPORTED_WC
      UsageEntry name for exported web components. Marked used, if either WebComponentExporter or WebComponentExporterFactory is found in a project
      Since:
      24.4
      See Also:
    • STATISTICS_FLOW_ROUTER

      public static final String STATISTICS_FLOW_ROUTER
      UsageEntry for rendering a Flow route. Marked as used, if a user navigates to a Flow route and navigation doesn't end up with an error.
      Since:
      24.4
      See Also:
    • STATISTICS_EXPORTED_WC

      public static final String STATISTICS_EXPORTED_WC
      UsageEntry for rendering an exported web component. Marked as used, if an exported web component is instantiated on the server.
      Since:
      24.4
      See Also:
    • PINNED_NPM_VERSIONS_FOLDER

      public static final String PINNED_NPM_VERSIONS_FOLDER
      The path of the folder containing the versions files, listing the npm packages whose versions are pinned and the versions to pin them to.

      Every jar pinning npm package versions ships one or more .json files in this folder and all of them are read and merged.

      See Also:
    • SPRING_BOOT_DEFAULT_LIVE_RELOAD_PORT

      public static final int SPRING_BOOT_DEFAULT_LIVE_RELOAD_PORT
      Default live reload port as defined in Spring Boot Dev Tools.
      Since:
      4.0
      See Also:
    • DEV_BUNDLE_NAME

      public static final String DEV_BUNDLE_NAME
      The name of the default dev bundle for the Express Build mode.
      Since:
      24.0
      See Also:
    • PROD_BUNDLE_NAME

      public static final String PROD_BUNDLE_NAME
      The name of the default production bundle.
      Since:
      24.1
      See Also:
    • DEV_BUNDLE_LOCATION

      public static final String DEV_BUNDLE_LOCATION
      The folder in the project where Flow generates Express Build mode application dev bundle.
      Since:
      24.0
      See Also:
    • BUNDLE_LOCATION

      public static final String BUNDLE_LOCATION
      The folder where the bundle zip files are stored.
      Since:
      24.3
      See Also:
    • DEV_BUNDLE_COMPRESSED_FILE

      public static final String DEV_BUNDLE_COMPRESSED_FILE
      The file name of the compressed development bundle.
      Since:
      24.3
      See Also:
    • DEV_BUNDLE_COMPRESSED_FILE_LOCATION

      public static final String DEV_BUNDLE_COMPRESSED_FILE_LOCATION
      Location of the compressed development bundle file.
      Since:
      24.3
      See Also:
    • DEV_BUNDLE_JAR_PATH

      public static final String DEV_BUNDLE_JAR_PATH
      The path part where dev-bundle is located inside the jar.
      Since:
      24.0
      See Also:
    • PROD_BUNDLE_JAR_PATH

      public static final String PROD_BUNDLE_JAR_PATH
      The path part where production bundle is located inside the jar.
      Since:
      24.1
      See Also:
    • PROD_BUNDLE_COMPRESSED_FILE

      public static final String PROD_BUNDLE_COMPRESSED_FILE
      The file name of the compressed production bundle.
      Since:
      24.3
      See Also:
    • PROD_BUNDLE_COMPRESSED_FILE_LOCATION

      public static final String PROD_BUNDLE_COMPRESSED_FILE_LOCATION
      Location of the compressed production bundle file.
      Since:
      24.3
      See Also:
    • ASSETS

      public static final String ASSETS
      The directory name inside dev bundle for the frontend assets.
      Since:
      24.0
      See Also:
    • NEEDS_BUNDLE_BUILD_FILE

      public static final String NEEDS_BUNDLE_BUILD_FILE
      Name of the temporary file storing internal flag showing that Flow needs to re-build the production bundle or not.
      Since:
      24.1
      See Also:
    • DISABLE_PREPARE_FRONTEND_CACHE

      public static final String DISABLE_PREPARE_FRONTEND_CACHE
      Key for storing the value of `alwaysExecutePrepareFrontend` flag of Gradle builds in a build info (token) file.
      Since:
      24.2
      See Also:
    • ATTRIBUTE_WIDTH_FULL

      public static final String ATTRIBUTE_WIDTH_FULL
      Attribute used by HasSize to mark elements that have been set to full width.
      Since:
      24.7
      See Also:
    • ATTRIBUTE_HEIGHT_FULL

      public static final String ATTRIBUTE_HEIGHT_FULL
      Attribute used by HasSize to mark elements that have been set to full height.
      Since:
      24.7
      See Also:
    • DEFAULT_REQUEST_SIZE_MAX

      public static final long DEFAULT_REQUEST_SIZE_MAX
      maximum allowed size of a complete request for multipart stream upload requests.
      Since:
      24.8
      See Also:
    • DEFAULT_FILE_SIZE_MAX

      public static final long DEFAULT_FILE_SIZE_MAX
      maximum allowed size of a single uploaded file for multipart stream upload requests.
      Since:
      24.8
      See Also:
    • DEFAULT_FILE_COUNT_MAX

      public static final long DEFAULT_FILE_COUNT_MAX
      maximum number of files allowed per multipart stream upload requests.
      Since:
      24.8
      See Also:
    • DEFAULT_URL_SAFE_SCHEMES

      public static final Set<String> DEFAULT_URL_SAFE_SCHEMES
      Default set of URL schemes considered safe when no custom set is configured through InitParameters.URL_SAFE_SCHEMES.

      Script-capable schemes such as javascript and data are intentionally excluded as they can be used to execute scripts in the browser when used as a link or frame target.

      Note that the about:blank URL is considered safe regardless of the configured schemes, whereas other about: URLs are not safe unless the about scheme is explicitly configured as safe.

      Since:
      25.2
    • URL_SAFE_SCHEMES_WILDCARD

      public static final String URL_SAFE_SCHEMES_WILDCARD
      Special InitParameters.URL_SAFE_SCHEMES entry that marks every scheme as safe, disabling scheme validation. Mixing this entry with other schemes still disables validation.
      Since:
      25.1.12
      See Also: