Class AbstractTaskClientGenerator

java.lang.Object
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 Object implements com.vaadin.flow.server.frontend.FallibleCommand
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
      Specified by:
      execute in interface com.vaadin.flow.server.frontend.FallibleCommand
      Throws:
      com.vaadin.flow.server.ExecutionFailedException