Package com.vaadin.flow.plugin.base
Interface PluginAdapterBase
- All Known Subinterfaces:
PluginAdapterBuild
public interface PluginAdapterBase
Gives access to plugin-specific implementations and configurations.
-
Method Summary
Modifier and TypeMethodDescriptionGets the application identifier.Application properties file in Spring project.The folder where everything is built into.booleanInstructs to use bun for installing npm frontend resources.default LookupcreateLookup(ClassFinder classFinder) Creates aLookupfor theClassFinder.booleanWhether to insert the initial Uidl object in the bootstrap index.html.A directory with project's frontend source files.Get the list of project file extensions.default FileThe folder where the frontend build tool should output index.js and other generated files.The folder where flow will put TS API files for client projects.TheClassFinderthat should be used.The Jar Files that would be searched.default booleanSpecifies whether to allow building a version of the application with a commercial banner when commercial components are used without a license key.booleanChecks the debug Mode.booleanbooleanWhether to ignore node/npm tool version checks or not.booleanIndicates that it is a Jar Project.booleanWhether to exclude Vaadin web component npm packages in packages.json.booleanPrevents tracking state of the `vaadinPrepareFrontend` task in Gradle builds, so that it will re-run every time it is called.booleanSet React enabled or disabled.Java resource folder.Java source folders for scanning.voidlogDebug(CharSequence debugMessage) Delegates a debug-Message to a logger.voidlogDebug(CharSequence debugMessage, Throwable throwable) Delegates a debug-Message to a logger.voidlogError(CharSequence errorMessage) delegates a error-Message to a logger.voidlogError(CharSequence warning, Throwable e) Delegates a error-Message to a logger.voidlogInfo(CharSequence infoMessage) Delegates a info-Message to a logger.voidlogWarn(CharSequence warningMessage) delegates a warning-Message to a logger.voidlogWarn(CharSequence warningMessage, Throwable throwable) Delegates a warning-Message to a logger.booleanWhether the alternative node may be auto-updated or not.Download node.js from this URL.The node.js version to be used when node.js is installed automatically by Vaadin, for example `"v12.18.3"`.The folder where `package.json` file is located.Default generated path of the OpenAPI json.booleanInstructs to use pnpm for installing npm frontend resources.Additional npm packages to run postinstall for.The projects root Directory.booleanWhether vaadin home node executable usage is forced.Defines the output directory for generated non-served resources, such as the token file.booleanEnable skip of dev bundle rebuild if a dev bundle exists.booleanInstructs to use globally installed pnpm tool or the default supported pnpm version.Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
applicationProperties
File applicationProperties()Application properties file in Spring project.- Returns:
FileapplicationProperties
-
createLookup
Creates aLookupfor theClassFinder.- 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:
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
ClassFinder getClassFinder()TheClassFinderthat should be used.- Returns:
ClassFinder
-
getJarFiles
The Jar Files that would be searched. -
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
Delegates a debug-Message to a logger.- Parameters:
debugMessage- to be logged.
-
logDebug
Delegates a debug-Message to a logger.- Parameters:
debugMessage- to be logged.throwable- to be logged.
-
logInfo
Delegates a info-Message to a logger.- Parameters:
infoMessage- to be logged.
-
logWarn
delegates a warning-Message to a logger.- Parameters:
warningMessage- to be logged.
-
logError
delegates a error-Message to a logger.- Parameters:
errorMessage- to be logged.
-
logWarn
Delegates a warning-Message to a logger.- Parameters:
warningMessage- to be logged.throwable- to be logged.
-
logError
Delegates a error-Message to a logger.- Parameters:
warning- to be logged.e- to be logged.
-
nodeDownloadRoot
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 useNodeInstaller.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:
trueto 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 - seeFrontendToolsfor 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 totruethen 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, for removal: This API element is subject to removal in a future version.since 24.8, usefrontendOutputDirectory()instead.The folder where webpack should output index.js and other generated files.- Returns:
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
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:
trueto 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:
truefor enable React andfalsefor 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
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:
trueto 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:
trueto 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:
trueto enable commercial banner when commercial components are used without a valid license key,falseto fail the build in this situation
-
frontendOutputDirectory()instead.