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) |
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)
public O getOpts()
public ZanataProxyFactory getRequestFactory()
public boolean isDeprecated()
ZanataCommand
isDeprecated
in interface ZanataCommand
public String getDeprecationMessage()
ZanataCommand
getDeprecationMessage
in interface ZanataCommand
public void deprecate(String deprecationMessage)
public String getName()
ZanataCommand
getName
in interface ZanataCommand
public void runWithActions() throws Exception
ZanataCommand
runWithActions
in interface ZanataCommand
Exception
org.zanata.client.config.CommandHook}
Copyright © 2014 Zanata Project. All rights reserved.