public abstract class Command extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
_log
The log.
|
| Constructor and Description |
|---|
Command() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
execute(DatabaseTaskBase task,
Database model)
Executes this command.
|
protected void |
handleException(Exception ex,
String msg)
Handles the given exception according to the fail-on-error setting by either
re-throwing it (wrapped in a build exception) or only logging it.
|
boolean |
isFailOnError()
Determines whether the command execution will be stopped upon an error.
|
abstract boolean |
isRequiringModel()
Specifies whether this command requires a model, i.e.
|
void |
setFailOnError(boolean failOnError)
Specifies whether the execution shall stop if an error has occurred during the task runs.
|
public boolean isFailOnError()
true.true if the execution stops in case of an errorpublic void setFailOnError(boolean failOnError)
failOnError - true if the execution shall stop in case of an errorprotected void handleException(Exception ex, String msg) throws org.apache.tools.ant.BuildException
ex - The exceptionmsg - The message to use unless this the exception is rethrown and it is
already a build exceptionorg.apache.tools.ant.BuildExceptionpublic abstract boolean isRequiringModel()
execute(DatabaseTaskBase, Database) cannot be null.true if this command requires a modelpublic abstract void execute(DatabaseTaskBase task, Database model) throws org.apache.tools.ant.BuildException
task - The executing taskmodel - The database modelorg.apache.tools.ant.BuildExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.