Class AbstractTaskClientGenerator

java.lang.Object
com.vaadin.flow.server.frontend.AbstractFileGeneratorFallibleCommand
io.jmix.flowui.devserver.frontend.AbstractTaskClientGenerator
All Implemented Interfaces:
com.vaadin.flow.server.frontend.FallibleCommand
Direct Known Subclasses:
TaskGenerateBootstrap, TaskGenerateFeatureFlags, TaskGenerateIndexHtml, TaskGenerateIndexTs, TaskGenerateServiceWorker, TaskGenerateTsConfig, TaskGenerateTsDefinitions, TaskGenerateViteDevMode

public abstract class AbstractTaskClientGenerator extends com.vaadin.flow.server.frontend.AbstractFileGeneratorFallibleCommand
Abstract class for generating client files.
  • Constructor Details

    • AbstractTaskClientGenerator

      public AbstractTaskClientGenerator()
  • Method Details

    • getFileContent

      protected abstract String getFileContent() throws IOException
      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

      protected abstract File 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

      public void execute() throws com.vaadin.flow.server.ExecutionFailedException
      Throws:
      com.vaadin.flow.server.ExecutionFailedException