Class GeneratorOptions

java.lang.Object
io.wcm.devops.conga.generator.GeneratorOptions

public final class GeneratorOptions extends Object
Options for generator.
  • Field Details

    • CLASSPATH_PREFIX

      public static final String CLASSPATH_PREFIX
      Prefix for all CONGA resources in classpath.
      See Also:
    • CLASSPATH_ROLES_DIR

      public static final String CLASSPATH_ROLES_DIR
      Classpath directory in JAR file for roles
      See Also:
    • CLASSPATH_TEMPLATES_DIR

      public static final String CLASSPATH_TEMPLATES_DIR
      Classpath directory in JAR file for roles
      See Also:
    • CLASSPATH_ENVIRONMENTS_DIR

      public static final String CLASSPATH_ENVIRONMENTS_DIR
      Classpath directory in JAR file for roles
      See Also:
  • Constructor Details

    • GeneratorOptions

      public GeneratorOptions()
  • Method Details

    • getBaseDir

      public File getBaseDir()
      Gets base directory.
      Returns:
      Base directory for resolving relative file references
    • baseDir

      public GeneratorOptions baseDir(File value)
      Sets base directory.
      Parameters:
      value - Base directory for resolving relative file references
      Returns:
      this
    • getRoleDir

      public File getRoleDir()
      Directory with role definitions. Filename without extension = role name.
      Returns:
      Directory
    • roleDir

      public GeneratorOptions roleDir(File value)
      Sets role directory.
      Parameters:
      value - Directory with role definitions. Filename without extension = role name.
      Returns:
      this
    • getTemplateDir

      public File getTemplateDir()
      Template base directory
      Returns:
      Directory
    • templateDir

      public GeneratorOptions templateDir(File value)
      Sets template directory.
      Parameters:
      value - Template base directory
      Returns:
      this
    • getEnvironmentDir

      public File getEnvironmentDir()
      Directory with environment definitions. Filename without extension = environment name.
      Returns:
      Directory
    • environmentDir

      public GeneratorOptions environmentDir(File value)
      Sets environment directory.
      Parameters:
      value - Directory with environment definitions. Filename without extension = environment name.
      Returns:
      this
    • getDestDir

      public File getDestDir()
      Destination directory for generated file.
      Returns:
      Directory
    • destDir

      public GeneratorOptions destDir(File value)
      Sets destination directory.
      Parameters:
      value - Destination directory for generated file.
      Returns:
      this
    • isDeleteBeforeGenerate

      public boolean isDeleteBeforeGenerate()
      Set to true when the generate should delete the environment folders before generating new (default: false).
      Returns:
      Delete before generate
    • deleteBeforeGenerate

      public GeneratorOptions deleteBeforeGenerate(boolean value)
      Sets delete before generate flag.
      Parameters:
      value - Delete before generate
      Returns:
      this
    • getVersion

      public String getVersion()
      The main version of the environment definition.
      Returns:
      Version
    • version

      public GeneratorOptions version(String value)
      Sets version.
      Parameters:
      value - Version
      Returns:
      this
    • isAllowSymlinks

      public boolean isAllowSymlinks()
      Is it allowed to create symlinks instead of copying files if they are local files.
      Returns:
      Allow symlinks
    • setAllowSymlinks

      public GeneratorOptions setAllowSymlinks(boolean value)
      Sets allow symlinks flag.
      Parameters:
      value - Allow symlinks
      Returns:
      this
    • getModelExport

      public ModelExport getModelExport()
      Settings for exporting models to files.
      Returns:
      Model export
    • modelExport

      public GeneratorOptions modelExport(ModelExport value)
      Sets model export.
      Parameters:
      value - Model export
      Returns:
      this
    • getValueProviderConfig

      public Map<String,Map<String,Object>> getValueProviderConfig()
      Gets value provider configuration.
      Returns:
      Configuration for value providers. The outer map uses the value provider plugin name as key, the inner map contain the config properties.
    • valueProviderConfig

      public GeneratorOptions valueProviderConfig(Map<String,Map<String,Object>> value)
      Sets value provider configuration.
      Parameters:
      value - Configuration for value providers.
      Returns:
      this
    • getGenericPluginConfig

      public Map<String,Map<String,Object>> getGenericPluginConfig()
      Gets generic plugin configuration.
      Returns:
      Generic plugin configuration.
    • genericPluginConfig

      public GeneratorOptions genericPluginConfig(Map<String,Map<String,Object>> value)
      Sets generic plugin configuration.
      Parameters:
      value - Generic plugin configuration.
      Returns:
      this
    • getContainerContext

      public Object getContainerContext()
      Container-specific context object
      Returns:
      Context
    • containerContext

      public GeneratorOptions containerContext(Object value)
      Sets container context.
      Parameters:
      value - Container-specific context object
      Returns:
      this
    • getContainerClasspathUrls

      public List<URL> getContainerClasspathUrls()
      Gets container classpath URLs.
      Returns:
      List of classpath URLs to CONGA artifact dependencies and container classpath elements.
    • containerClasspathUrls

      public GeneratorOptions containerClasspathUrls(List<URL> value)
      Sets container classpath URLs.
      Parameters:
      value - List of URLs to CONGA artifact dependencies defined in the container.
      Returns:
      this
    • getPluginManager

      public PluginManager getPluginManager()
      Gets plugin manager.
      Returns:
      Plugin manager
    • pluginManager

      public GeneratorOptions pluginManager(PluginManager value)
      Sets plugin manager.
      Parameters:
      value - Plugin manager
      Returns:
      this
    • getDependencyVersionBuilder

      public Function<Environment,Collection<String>> getDependencyVersionBuilder()
      Gets dependency version builder.
      Returns:
      Function to build a list of dependency versions for a given environment
    • dependencyVersionBuilder

      public GeneratorOptions dependencyVersionBuilder(Function<Environment,Collection<String>> value)
      Sets dependency version builder.
      Parameters:
      value - Function to build a list of dependency versions for a given environment
      Returns:
      this
    • getContainerVersionInfo

      public Map<String,String> getContainerVersionInfo()
      Gets container version info.
      Returns:
      Version information from container, e.g. configured Maven plugin versions
    • containerVersionInfo

      public GeneratorOptions containerVersionInfo(Map<String,String> value)
      Sets container version info.
      Parameters:
      value - Version information from container, e.g. configured Maven plugin versions
      Returns:
      this
    • getLogger

      public org.slf4j.Logger getLogger()
      Gets logger.
      Returns:
      Logger
    • logger

      public GeneratorOptions logger(org.slf4j.Logger value)
      Sets logger.
      Parameters:
      value - Logger
      Returns:
      this