org.zanata.client.commands
Class AbstractPushPullOptionsImpl<O extends PushPullOptions>
java.lang.Object
org.zanata.client.commands.BasicOptionsImpl
org.zanata.client.commands.ConfigurableOptionsImpl
org.zanata.client.commands.ConfigurableProjectOptionsImpl
org.zanata.client.commands.AbstractPushPullOptionsImpl<O>
- All Implemented Interfaces:
- BasicOptions, ConfigurableOptions, ConfigurableProjectOptions, PushPullOptions
- Direct Known Subclasses:
- PullOptionsImpl, PushOptionsImpl
public abstract class AbstractPushPullOptionsImpl<O extends PushPullOptions>
- extends ConfigurableProjectOptionsImpl
- implements PushPullOptions
Specifies options that have the same description and defaults for push and pull
- Author:
- David Mason, damason@redhat.com
| Methods inherited from class org.zanata.client.commands.ConfigurableOptionsImpl |
getKey, getLogHttp, getUrl, getUserConfig, getUsername, isDisableSSLCert, setDisableSSLCert, setKey, setLogHttp, setUrl, setUserConfig, setUsername |
| Methods inherited from class org.zanata.client.commands.BasicOptionsImpl |
getDebug, getErrors, getHelp, getQuiet, isDebugSet, isErrorsSet, isInteractiveMode, isQuietSet, setBatchMode, setDebug, setErrors, setHelp, setInteractiveMode, setQuiet |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.zanata.client.commands.ConfigurableOptions |
getKey, getLogHttp, getUrl, getUserConfig, getUsername, isDisableSSLCert, setDisableSSLCert, setKey, setLogHttp, setUrl, setUserConfig, setUsername |
| Methods inherited from interface org.zanata.client.commands.BasicOptions |
getCommandDescription, getCommandName, getDebug, getErrors, getHelp, getQuiet, initCommand, isDebugSet, isErrorsSet, isInteractiveMode, isQuietSet, setDebug, setErrors, setHelp, setInteractiveMode, setQuiet |
PROJECT_TYPE_FILE
protected static final String PROJECT_TYPE_FILE
- See Also:
- Constant Field Values
locales
protected String[] locales
AbstractPushPullOptionsImpl
public AbstractPushPullOptionsImpl()
getLocaleMapList
public LocaleList getLocaleMapList()
- Override the parent method as the push and pull
commands can have locales specified via command line.
- Specified by:
getLocaleMapList in interface ConfigurableProjectOptions- Overrides:
getLocaleMapList in class ConfigurableProjectOptionsImpl
- Returns:
- The locale map list taking into account the global locales in zanata.xml as well as the command line
argument ones.
getSrcDir
public File getSrcDir()
- Specified by:
getSrcDir in interface PushPullOptions
setSrcDir
public void setSrcDir(File file)
getSrcDirParameterName
public String getSrcDirParameterName()
- Specified by:
getSrcDirParameterName in interface PushPullOptions
getTransDir
public File getTransDir()
- Specified by:
getTransDir in interface PushPullOptions
setTransDir
public void setTransDir(File transDir)
getFromDoc
public String getFromDoc()
- Specified by:
getFromDoc in interface PushPullOptions
buildFromDocArgument
public String buildFromDocArgument(String argValue)
- Description copied from interface:
PushPullOptions
- This name should represent the exact parameter as it would be entered on the command line, and include
any space or operators that would link the parameter to the argument. This is so that the argument can be
appended directly to the parameter name.
- Specified by:
buildFromDocArgument in interface PushPullOptions
setFromDoc
public void setFromDoc(String fromDoc)
isDryRun
public boolean isDryRun()
- Specified by:
isDryRun in interface PushPullOptions
setDryRun
public void setDryRun(boolean dryRun)
getEnableModules
public boolean getEnableModules()
- Specified by:
getEnableModules in interface PushPullOptions
getDocNameRegex
public String getDocNameRegex()
- Description copied from interface:
PushPullOptions
- A regex for document names, which captures the module ID as group 1 and the unqualified docname as group 2.
This regex should broadly follow the pattern "(moduleID)moduleSuffix(localDocName)".
- Specified by:
getDocNameRegex in interface PushPullOptions
getModuleSuffix
public String getModuleSuffix()
- Description copied from interface:
PushPullOptions
- Character or characters which must appear after moduleIDs when constructing qualified document names
- Specified by:
getModuleSuffix in interface PushPullOptions
- Returns:
isRootModule
public boolean isRootModule()
- Specified by:
isRootModule in interface PushPullOptions
getCurrentModule
public String getCurrentModule()
- Specified by:
getCurrentModule in interface PushPullOptions
getCurrentModule
public String getCurrentModule(boolean canonicalName)
- Specified by:
getCurrentModule in interface PushPullOptions
- Parameters:
canonicalName - true if the module name should be in the canonical format used by maven
- Returns:
getAllModules
public Set<String> getAllModules()
- Specified by:
getAllModules in interface PushPullOptions
Copyright © 2013 Zanata Project. All Rights Reserved.