public class WalkModFacade extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
WalkModFacade()
Deprecated.
Use #{link #WalkModFacade(File,OptionsBuilder,
ConfigurationProvider} instead
|
WalkModFacade(boolean offline,
boolean verbose,
boolean printError)
Deprecated.
Use #{link #WalkModFacade(File,OptionsBuilder,
ConfigurationProvider} instead
|
WalkModFacade(boolean offline,
boolean verbose,
boolean printError,
String[] includes,
String[] excludes)
Deprecated.
Use #{link #WalkModFacade(File,OptionsBuilder,
ConfigurationProvider} instead
|
WalkModFacade(File cfg,
boolean offline,
boolean verbose,
boolean printError)
Deprecated.
Use #{link #WalkModFacade(File,OptionsBuilder,
ConfigurationProvider} instead
|
WalkModFacade(File cfg,
boolean offline,
boolean verbose,
boolean printError,
String[] includes,
String[] excludes)
Deprecated.
Use #{link #WalkModFacade(File,OptionsBuilder,
ConfigurationProvider} instead
|
WalkModFacade(File walkmodCfg,
OptionsBuilder optionsBuilder,
ConfigurationProvider configurationProvider)
Initalizes a Walkmod service
|
WalkModFacade(OptionsBuilder optionsBuilder)
Initalizes a Walkmod service
|
WalkModFacade(String cfg,
boolean offline,
boolean verbose,
boolean printError)
Deprecated.
Use #{link #WalkModFacade(File,OptionsBuilder,
ConfigurationProvider} instead
|
WalkModFacade(String cfg,
boolean offline,
boolean verbose,
boolean printError,
boolean throwsException,
String[] includes,
String[] excludes)
Deprecated.
Use #{link #WalkModFacade(File,OptionsBuilder,
ConfigurationProvider} instead
|
WalkModFacade(String cfg,
boolean offline,
boolean verbose,
boolean printError,
String[] includes,
String[] excludes)
Deprecated.
Use #{link #WalkModFacade(File,OptionsBuilder,
ConfigurationProvider} instead
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChainConfig(ChainConfig chainCfg,
boolean recursive)
Adds a new chain configuration into the configuration file
|
void |
addConfigurationParameter(String param,
String value,
String type,
String category,
String name,
String chain,
boolean recursive)
Sets an specific parameter value into a bean.
|
void |
addModules(List<String> modules)
Adds a module into the configuration file
|
void |
addPluginConfig(PluginConfig pluginConfig,
boolean recursive)
Adds a new plugin into the configuration file
|
void |
addProviderConfig(ProviderConfig providerCfg,
boolean recursive)
Adds a new provider configuration into the configuration file
|
void |
addTransformationConfig(String chain,
String path,
boolean recursive,
TransformationConfig transformationCfg)
Adds a new transformation configuration into the configuration file
|
List<File> |
apply(String... chains)
Applies a list of transformation chains.
|
List<File> |
check(String... chains)
Applies a list of transformation chains without updating the source
files.
|
Configuration |
getConfiguration()
Returns the equivalent configuration representation of the Walkmod config
file.
|
void |
init()
Initializes an empty walkmod configuration file
|
List<BeanDefinition> |
inspectPlugin(PluginConfig plugin)
Retrieves the bean definitions that contains an specific plugin.
|
void |
install()
Downloads the list of declared plugins in the configuration file using
Ivy.
|
void |
removeChains(List<String> chains,
boolean recursive)
Removes the chains from the Walkmod config file.
|
void |
removeModules(List<String> modules)
Removes the module list from the configuration file
|
void |
removePluginConfig(PluginConfig pluginConfig,
boolean recursive)
Removes a plugin from the configuration file.
|
void |
removeProviders(List<String> providers,
boolean recursive)
Removes the list of configuration providers from the config file.
|
void |
removeTransformations(String chain,
List<String> transformations,
boolean recursive)
Remove a list of transformations for an specific chain.
|
void |
setReader(String chain,
String type,
String path,
boolean recursive)
Sets an specific reader for an specific chain.
|
void |
setWriter(String chain,
String type,
String path,
boolean recursive)
Sets an specific writer for an specific chain.
|
public WalkModFacade(File cfg, boolean offline, boolean verbose, boolean printError)
cfg - configuration file.offline - if the missing plugins are downloaded.verbose - if log messages are printed in the System.outprintError - if the exception stack trace is printed in the System.outpublic WalkModFacade(File cfg, boolean offline, boolean verbose, boolean printError, String[] includes, String[] excludes)
cfg - configuration file.offline - if the missing plugins are downloaded.verbose - if log messages are printed in the System.outprintError - if the exception stack trace is printed in the System.outincludes - the list of included files.excludes - the list of excluded files.public WalkModFacade(String cfg, boolean offline, boolean verbose, boolean printError)
cfg - configuration fileoffline - if the missing plugins are downloaded.verbose - if log messages are printed in the System.outprintError - if the exception trace is printed in the System.out@Deprecated public WalkModFacade(String cfg, boolean offline, boolean verbose, boolean printError, String[] includes, String[] excludes)
cfg - configuration fileoffline - if the missing plugins are downloaded.verbose - if log messages are printed in the System.outprintError - if the exception trace is printed in the System.outincludes - the list of included files.excludes - the list of excluded files.@Deprecated public WalkModFacade(String cfg, boolean offline, boolean verbose, boolean printError, boolean throwsException, String[] includes, String[] excludes)
cfg - configuration fileoffline - if the missing plugins are downloaded.verbose - if log messages are printed in the System.outprintError - if the exception trace is printed in the System.outthrowsException - if the exception is thrown to the calling processincludes - the list of included files.excludes - the list of excluded files.@Deprecated public WalkModFacade(boolean offline, boolean verbose, boolean printError)
offline - if the missing plugins are downloaded.verbose - if log messages are printed in the System.outprintError - if the exception trace is printed in the System.out@Deprecated public WalkModFacade(boolean offline, boolean verbose, boolean printError, String[] includes, String[] excludes)
offline - if the missing plugins are downloaded.verbose - if log messages are printed in the System.outprintError - if the exception trace is printed in the System.outincludes - the list of included files.excludes - the list of excluded files.@Deprecated public WalkModFacade()
public WalkModFacade(OptionsBuilder optionsBuilder)
optionsBuilder - Map of option. See Options and OptionsBuilder
for available options and default values.public WalkModFacade(File walkmodCfg, OptionsBuilder optionsBuilder, ConfigurationProvider configurationProvider)
walkmodCfg - Walkmod configuration file. If null, file named 'walkmod.xml'
is searched at the root.optionsBuilder - Map of option. See Options and OptionsBuilder
for available options and default values.configurationProvider - Configuration provider responsible for the resolution of
plugins (used to use custom classloading strategies). If null
Ivy is used.public List<File> apply(String... chains) throws InvalidConfigurationException
chains - the list of applied transformation chains.InvalidConfigurationException - if the walkmod configuration is invalid and it is working in
no verbose mode.public List<File> check(String... chains) throws InvalidConfigurationException
chains - the list of applied transformation chains.InvalidConfigurationException - if the walkmod configuration is invalid and it is working in
no verbose mode.public void init()
throws Exception
Exception - in case that the walkmod configuration file can't be created.public void addChainConfig(ChainConfig chainCfg, boolean recursive) throws Exception
chainCfg - chain configuration to addrecursive - Adds the new chain into all the submodulesException - in case that the walkmod configuration file can't be read.public void addTransformationConfig(String chain, String path, boolean recursive, TransformationConfig transformationCfg) throws Exception
chain - chain identifier where the transformation will be appended. It
can be null.path - the path where the transformation config will be applied if
the chain does not exists or is null.recursive - if the transformation config is added recursively to all the
submodules.transformationCfg - transformation configuration to addException - in case that the walkmod configuration file can't be read.public void addProviderConfig(ProviderConfig providerCfg, boolean recursive) throws Exception
providerCfg - provider configuration to add.recursive - if the provider config is added recursively to all the
submodules.Exception - in case that the walkmod configuration file can't be read.public void addPluginConfig(PluginConfig pluginConfig, boolean recursive) throws Exception
pluginConfig - the plugin to addrecursive - if the plugin config is added recursively to all the
submodules.Exception - in case that the walkmod configuration file can't be read.public void install()
throws InvalidConfigurationException
InvalidConfigurationException - if the walkmod configuration is invalid and it is working in
no verbose mode.public void addModules(List<String> modules) throws Exception
modules - Modules to addException - if the walkmod configuration file can't be read.public void removeTransformations(String chain, List<String> transformations, boolean recursive) throws Exception
chain - To remove the transformations. By default, it is the "default"
chain.transformations - List of transformation names (type ids) to be removed.recursive - If the action is applied to all the submodules.Exception - if the walkmod configuration file can't be read.public void setWriter(String chain, String type, String path, boolean recursive) throws Exception
chain - Chain to apply the writertype - Writer type to setpath - Writer path to setrecursive - If to set the writer to all the submodules.Exception - if the walkmod configuration file can't be read.public void setReader(String chain, String type, String path, boolean recursive) throws Exception
chain - Chain to apply the writertype - Reader type to setpath - Reader path to setrecursive - If to set the reader to all the submodules.Exception - if the walkmod configuration file can't be read.public void removePluginConfig(PluginConfig pluginConfig, boolean recursive) throws Exception
pluginConfig - Plugin configuration to remove.recursive - If it necessary to remove the plugin from all the submodules.Exception - if the walkmod configuration file can't be read.public void removeModules(List<String> modules) throws Exception
modules - Module names to removeException - if the walkmod configuration file can't be read.public void removeProviders(List<String> providers, boolean recursive) throws Exception
providers - Name of the configuration providers to remove.recursive - If it necessary to remove the plugin from all the submodules.Exception - If the walkmod configuration file can't be read.public Configuration getConfiguration() throws Exception
Exception - If the walkmod configuration file can't be read.public void removeChains(List<String> chains, boolean recursive) throws Exception
chains - Chain names to removerecursive - If it necessary to remove the chains from all the submodules.Exception - If the walkmod configuration file can't be read.public List<BeanDefinition> inspectPlugin(PluginConfig plugin)
plugin - Plugin container of bean definitions.public void addConfigurationParameter(String param, String value, String type, String category, String name, String chain, boolean recursive) throws Exception
param - Parameter namevalue - Parameter valuetype - Bean type to set the parametercategory - Bean category to set the parameter (walker, reader,
transformation, writer)name - Bean name/alias to set the parameterchain - Bean chain to filter the beans to take into accountrecursive - If it necessary to set the parameter to all the submodules.Exception - If the walkmod configuration file can't be read.Copyright © 2015. All rights reserved.