public abstract class ConfigurableCommand<O extends ConfigurableOptions> extends Object implements ZanataCommand
| Constructor and Description |
|---|
ConfigurableCommand(O opts) |
ConfigurableCommand(O opts,
ZanataProxyFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
deprecate(String deprecationMessage) |
protected static void |
expectYes(Console console)
Deprecated.
|
String |
getDeprecationMessage()
If the command has been deprecated, returns a message (eg a command which
replaces the deprecated command).
|
String |
getName()
Returns the command name (eg Maven goal name)
|
O |
getOpts() |
ZanataProxyFactory |
getRequestFactory() |
boolean |
isDeprecated()
Returns true if the command has been deprecated.
|
protected abstract void |
run()
Runs the specific command, not including before- or after- actions.
|
void |
runWithActions()
Executes before-actions, the command, then after-actions.
|
public ConfigurableCommand(O opts, ZanataProxyFactory factory)
public ConfigurableCommand(O opts)
@Deprecated protected static void expectYes(Console console) throws IOException
IOExceptionpublic O getOpts()
public ZanataProxyFactory getRequestFactory()
public boolean isDeprecated()
ZanataCommandisDeprecated in interface ZanataCommandpublic String getDeprecationMessage()
ZanataCommandgetDeprecationMessage in interface ZanataCommandpublic void deprecate(String deprecationMessage)
public String getName()
ZanataCommandgetName in interface ZanataCommandpublic void runWithActions()
throws Exception
ZanataCommandrunWithActions in interface ZanataCommandExceptionorg.zanata.client.config.CommandHook}Copyright © 2014 Zanata Project. All Rights Reserved.