public class OptionsUtil extends Object
Constructor and Description |
---|
OptionsUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
applyConfigFiles(ConfigurableOptions opts)
Loads the config files (controlled by the property userConfig) to supply
any values which haven't already been set.
|
protected static void |
applyIncludesAndExcludesFromProjectConfig(ConfigurableProjectOptions opts,
ZanataConfig config)
Note: command line options take precedence over pom.xml which
takes precedence over zanata.xml.
|
protected static void |
applySrcDirAndTransDirFromProjectConfig(ConfigurableProjectOptions opts,
ZanataConfig config)
Note: command line options take precedence over pom.xml which
takes precedence over zanata.xml.
|
static void |
applyUserConfig(ConfigurableOptions opts,
org.apache.commons.configuration.HierarchicalINIConfiguration config)
Applies values from the user's personal configuration unless they have
been set directly (by parameters or by project configuration).
|
protected static void |
checkPotentialMistakesInRules(ConfigurableProjectOptions opts,
ConsoleInteractor console)
Will check potential mistakes in file mapping rules.
|
static <O extends ConfigurableOptions> |
createClientFactory(O opts)
Creates rest client factory that will perform an eager REST version check.
|
static <O extends ConfigurableOptions> |
createClientFactoryWithoutVersionCheck(O opts)
Creates rest client factory that will NOT perform an eager REST version
check.
|
static String |
stripValidHolders(String rule) |
public static void applyConfigFiles(ConfigurableOptions opts) throws org.apache.commons.configuration.ConfigurationException, JAXBException
Exception
org.apache.commons.configuration.ConfigurationException
JAXBException
protected static void checkPotentialMistakesInRules(ConfigurableProjectOptions opts, ConsoleInteractor console)
opts
- console
- protected static void applySrcDirAndTransDirFromProjectConfig(ConfigurableProjectOptions opts, ZanataConfig config)
opts
- optionsconfig
- config from project configuration file i.e. zanata.xmlOptionMismatchChecker
protected static void applyIncludesAndExcludesFromProjectConfig(ConfigurableProjectOptions opts, ZanataConfig config)
opts
- optionsconfig
- config from project configuration file i.e. zanata.xmlOptionMismatchChecker
public static void applyUserConfig(ConfigurableOptions opts, org.apache.commons.configuration.HierarchicalINIConfiguration config)
config
- public static <O extends ConfigurableOptions> RestClientFactory createClientFactory(O opts)
public static <O extends ConfigurableOptions> RestClientFactory createClientFactoryWithoutVersionCheck(O opts)
Copyright © 2016 Zanata Project. All rights reserved.