Interface PluginAdapterBase

All Known Subinterfaces:
PluginAdapterBuild

public interface PluginAdapterBase
Gives access to plugin-specific implementations and configurations.
  • Method Details

    • applicationProperties

      File applicationProperties()
      Application properties file in Spring project.
      Returns:
      File applicationProperties
    • createLookup

      default com.vaadin.flow.di.Lookup createLookup(com.vaadin.flow.server.frontend.scanner.ClassFinder classFinder)
      Creates a Lookup for the ClassFinder.
      Parameters:
      classFinder - implementation that will be registered for the serviceTxpe `ClassFinder`.
      Returns:
      Lookup
    • eagerServerLoad

      boolean eagerServerLoad()
      Whether to insert the initial Uidl object in the bootstrap index.html.
      Returns:
      invalid reference
      boolean
    • frontendDirectory

      File frontendDirectory()
      A directory with project's frontend source files.
      Returns:
      File
    • generatedTsFolder

      File generatedTsFolder()
      The folder where flow will put TS API files for client projects.
      Returns:
      File
    • getClassFinder

      com.vaadin.flow.server.frontend.scanner.ClassFinder getClassFinder()
      The ClassFinder that should be used.
      Returns:
      ClassFinder
    • getJarFiles

      Set<File> getJarFiles()
      The Jar Files that would be searched.
      Returns:
      Set of File
    • isJarProject

      boolean isJarProject()
      Indicates that it is a Jar Project.
      Returns:
      boolean - indicates that it is a Jar Project
    • isDebugEnabled

      boolean isDebugEnabled()
      Checks the debug Mode.
      Returns:
      boolean
    • javaSourceFolder

      File javaSourceFolder()
      Java source folders for scanning.
      Returns:
      File
    • javaResourceFolder

      File javaResourceFolder()
      Java resource folder.
      Returns:
      File
    • logDebug

      void logDebug(CharSequence debugMessage)
      Delegates a debug-Message to a logger.
      Parameters:
      debugMessage - to be logged.
    • logDebug

      void logDebug(CharSequence debugMessage, Throwable throwable)
      Delegates a debug-Message to a logger.
      Parameters:
      debugMessage - to be logged.
      throwable - to be logged.
    • logInfo

      void logInfo(CharSequence infoMessage)
      Delegates a info-Message to a logger.
      Parameters:
      infoMessage - to be logged.
    • logWarn

      void logWarn(CharSequence warningMessage)
      delegates a warning-Message to a logger.
      Parameters:
      warningMessage - to be logged.
    • logError

      void logError(CharSequence errorMessage)
      delegates a error-Message to a logger.
      Parameters:
      errorMessage - to be logged.
    • logWarn

      void logWarn(CharSequence warningMessage, Throwable throwable)
      Delegates a warning-Message to a logger.
      Parameters:
      warningMessage - to be logged.
      throwable - to be logged.
    • logError

      void logError(CharSequence warning, Throwable e)
      Delegates a error-Message to a logger.
      Parameters:
      warning - to be logged.
      e - to be logged.
    • nodeDownloadRoot

      URI nodeDownloadRoot() throws URISyntaxException
      Download node.js from this URL. Handy in heavily firewalled corporate environments where the node.js download can be provided from an intranet mirror. Defaults to null which will cause the downloader to use NodeInstaller.DEFAULT_NODEJS_DOWNLOAD_ROOT.

      Example: "https://nodejs.org/dist/".

      Returns:
      nodeDownloadRoot
      Throws:
      URISyntaxException - - Could not build a URI from nodeDownloadRoot().
    • nodeAutoUpdate

      boolean nodeAutoUpdate()
      Whether the alternative node may be auto-updated or not.
      Returns:
      true to update node if older than default
    • nodeVersion

      String nodeVersion()
      The node.js version to be used when node.js is installed automatically by Vaadin, for example `"v12.18.3"`. Defaults to null which uses the Vaadin-default node version - see FrontendTools for details.
      Returns:
      node version as a string
    • npmFolder

      File npmFolder()
      The folder where `package.json` file is located. Default is project root dir.
      Returns:
      boolean
    • openApiJsonFile

      File openApiJsonFile()
      Default generated path of the OpenAPI json.
      Returns:
      boolean
    • pnpmEnable

      boolean pnpmEnable()
      Instructs to use pnpm for installing npm frontend resources.
      Returns:
      boolean
    • bunEnable

      boolean bunEnable()
      Instructs to use bun for installing npm frontend resources.
      Returns:
      boolean
    • useGlobalPnpm

      boolean useGlobalPnpm()
      Instructs to use globally installed pnpm tool or the default supported pnpm version.
      Returns:
      boolean
    • projectBaseDirectory

      Path projectBaseDirectory()
      The projects root Directory.
      Returns:
      Path
    • requireHomeNodeExec

      boolean requireHomeNodeExec()
      Whether vaadin home node executable usage is forced. If it's set to true then vaadin home 'node' is checked and installed if it's absent. Then it will be used instead of globally 'node' or locally installed 'node'.
      Returns:
      boolean
    • servletResourceOutputDirectory

      File servletResourceOutputDirectory()
      Defines the output directory for generated non-served resources, such as the token file.
      Returns:
      File
    • webpackOutputDirectory

      @Deprecated(since="24.8", forRemoval=true) File webpackOutputDirectory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 24.8, use frontendOutputDirectory() instead.
      The folder where webpack should output index.js and other generated files.
      Returns:
      File
    • frontendOutputDirectory

      default File frontendOutputDirectory()
      The folder where the frontend build tool should output index.js and other generated files.
      Returns:
      File
    • buildFolder

      String buildFolder()
      The folder where everything is built into.
      Returns:
      build folder
    • postinstallPackages

      List<String> postinstallPackages()
      Additional npm packages to run postinstall for.
      Returns:
      a list of packages
    • isFrontendHotdeploy

      boolean isFrontendHotdeploy()
    • skipDevBundleBuild

      boolean skipDevBundleBuild()
      Enable skip of dev bundle rebuild if a dev bundle exists.
      Returns:
      true to skip dev bundle rebuild
    • isPrepareFrontendCacheDisabled

      boolean isPrepareFrontendCacheDisabled()
      Prevents tracking state of the `vaadinPrepareFrontend` task in Gradle builds, so that it will re-run every time it is called.

      Returns `true` if Gradle should always execute `vaadinPrepareFrontend`.

      Defaults to `false`, meaning that the task execution is skipped when its outcomes are up-to-date, improving the overall build time.

      For Maven builds this is always `false`, because no caching of `prepare-frontend` goal is supported.

    • isReactEnabled

      boolean isReactEnabled()
      Set React enabled or disabled.
      Returns:
      true for enable React and false for using Vaadin router and excluding React dependencies
    • applicationIdentifier

      String applicationIdentifier()
      Gets the application identifier.

      The application identifier is usually computed against project unique information, such as hashed groupId and artifactId, but it can be any kind of not blank string.

      Returns:
      application identifier, never null nor blank.
    • frontendExtraFileExtensions

      List<String> frontendExtraFileExtensions()
      Get the list of project file extensions.

      File extensions are given with or without . prefix eg "png" and ".png" are both accepted.

      Returns:
      list of project file extensions
    • isNpmExcludeWebComponents

      boolean isNpmExcludeWebComponents()
      Whether to exclude Vaadin web component npm packages in packages.json.
      Returns:
      true to exclude Vaadin web component npm packages.
    • isFrontendIgnoreVersionChecks

      boolean isFrontendIgnoreVersionChecks()
      Whether to ignore node/npm tool version checks or not. Note that disabling frontend tools version checking could cause failing builds and other issues that are difficult to debug.
      Returns:
      true to ignore node/npm tool version checks
    • isCommercialBannerEnabled

      default boolean isCommercialBannerEnabled()
      Specifies whether to allow building a version of the application with a commercial banner when commercial components are used without a license key.
      Returns:
      true to enable commercial banner when commercial components are used without a valid license key, false to fail the build in this situation