Package com.vaadin.flow.server.frontend
Class AbstractTaskClientGenerator
java.lang.Object
com.vaadin.flow.server.frontend.AbstractFileGeneratorFallibleCommand
com.vaadin.flow.server.frontend.AbstractTaskClientGenerator
- All Implemented Interfaces:
FallibleCommand
- Direct Known Subclasses:
TaskGenerateBootstrap
,TaskGenerateFeatureFlags
,TaskGenerateIndexHtml
,TaskGenerateIndexTs
,TaskGenerateServiceWorker
,TaskGenerateTsConfig
,TaskGenerateTsDefinitions
,TaskGenerateViteDevMode
,TaskGenerateWebComponentBootstrap
,TaskGenerateWebComponentHtml
Abstract class for generating client files.
For internal use only. May be renamed or removed in a future release.
- Since:
- 3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Runs the given command.protected abstract String
Get file content for writing to the generated file.protected abstract File
Get the generated file where content will be written.protected abstract boolean
Check if it should generate the file or not.Methods inherited from class com.vaadin.flow.server.frontend.AbstractFileGeneratorFallibleCommand
setGeneratedFileSupport, track, track, writeIfChanged, writeIfChanged
-
Constructor Details
-
AbstractTaskClientGenerator
public AbstractTaskClientGenerator()
-
-
Method Details
-
getFileContent
Get file content for writing to the generated file.- Returns:
- content of the file.
- Throws:
IOException
- if IO error happens while reading file content.
-
getGeneratedFile
Get the generated file where content will be written.- Returns:
- the generated file.
-
shouldGenerate
protected abstract boolean shouldGenerate()Check if it should generate the file or not.- Returns:
- true if it should generate, false otherwise.
-
execute
Description copied from interface:FallibleCommand
Runs the given command.If execution fails then the command may throw an exception which may give a message and a cause of the failure.
- Throws:
ExecutionFailedException
- if there is an execution error
-