Package io.wcm.devops.conga.generator
Class GeneratorOptions
- java.lang.Object
-
- io.wcm.devops.conga.generator.GeneratorOptions
-
public final class GeneratorOptions extends Object
Options for generator.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CLASSPATH_ENVIRONMENTS_DIR
Classpath directory in JAR file for rolesstatic String
CLASSPATH_PREFIX
Prefix for all CONGA resources in classpath.static String
CLASSPATH_ROLES_DIR
Classpath directory in JAR file for rolesstatic String
CLASSPATH_TEMPLATES_DIR
Classpath directory in JAR file for roles
-
Constructor Summary
Constructors Constructor Description GeneratorOptions()
-
Method Summary
-
-
-
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
-
-
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
-
version
public GeneratorOptions version(String value)
- 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)
- 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)
- Parameters:
value
- Model export- Returns:
- this
-
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.
-
valueProviderConfig
public GeneratorOptions valueProviderConfig(Map<String,Map<String,Object>> value)
- Parameters:
value
- Configuration for value providers.- Returns:
- this
-
getGenericPluginConfig
public Map<String,Map<String,Object>> getGenericPluginConfig()
- Returns:
- Generic plugin configuration.
-
genericPluginConfig
public GeneratorOptions genericPluginConfig(Map<String,Map<String,Object>> value)
- Parameters:
value
- Generic plugin configuration.- Returns:
- this
-
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
-
pluginManager
public GeneratorOptions pluginManager(PluginManager value)
- Parameters:
value
- Plugin manager- Returns:
- this
-
getDependencyVersionBuilder
public Function<Environment,Collection<String>> getDependencyVersionBuilder()
- Returns:
- Function to build a list of dependency versions for a given environment
-
dependencyVersionBuilder
public GeneratorOptions dependencyVersionBuilder(Function<Environment,Collection<String>> value)
- Parameters:
value
- Function to build a list of dependency versions for a given environment- Returns:
- this
-
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
-
-