public abstract class ConfigurableCommand<O extends ConfigurableOptions> extends Object implements ZanataCommand
| Constructor and Description |
|---|
ConfigurableCommand(O opts) |
ConfigurableCommand(O opts,
RestClientFactory clientFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
deprecate(String deprecationMessage) |
protected static void |
expectYes(Console console)
Deprecated.
|
RestClientFactory |
getClientFactory() |
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() |
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.
|
protected void |
setClientFactory(RestClientFactory clientFactory) |
public ConfigurableCommand(O opts, RestClientFactory clientFactory)
public ConfigurableCommand(O opts)
@Deprecated protected static void expectYes(Console console) throws IOException
IOExceptionpublic O getOpts()
public RestClientFactory getClientFactory()
protected final void setClientFactory(RestClientFactory clientFactory)
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 © 2016 Zanata Project. All rights reserved.