Class GeneratorOptions


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

      • CLASSPATH_PREFIX

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

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

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

        public static final String CLASSPATH_ENVIRONMENTS_DIR
        Classpath directory in JAR file for roles
        See Also:
        Constant Field Values
    • Constructor Detail

      • GeneratorOptions

        public GeneratorOptions()
    • Method Detail

      • getBaseDir

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

        public GeneratorOptions baseDir​(File value)
        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)
        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)
        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)
        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)
        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)
        Parameters:
        value - Delete before generate
        Returns:
        this
      • getVersion

        public String getVersion()
        The main version of the environment definition.
        Returns:
        Version
      • 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)
        Parameters:
        value - Allow symlinks
        Returns:
        this
      • getModelExport

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

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

        public Map<String,​Map<String,​Object>> getGenericPluginConfig()
        Returns:
        Generic plugin configuration.
      • getContainerContext

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

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

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

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

        public PluginManager getPluginManager()
        Returns:
        Plugin manager
      • getDependencyVersionBuilder

        public Function<Environment,​Collection<String>> getDependencyVersionBuilder()
        Returns:
        Function to build a list of dependency versions for a given environment
      • getContainerVersionInfo

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

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

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

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