Package com.github.sardine.ant
Class Command
java.lang.Object
org.apache.tools.ant.ProjectComponent
com.github.sardine.ant.Command
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
Copy,CreateDirectory,Delete,Exists,Move,Put,RecursiveGet
public abstract class Command
extends org.apache.tools.ant.ProjectComponent
Base class for a Command which represents a sardine command
such as sardine.put().
- Author:
- jonstevens
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Command() -
Method Summary
Modifier and Type Method Description protected abstract voidexecute()Execute the command.voidexecuteCommand()Check the command attribute and execute it.protected SardinegetSardine()Returns the Sardine for this command.voidsetTask(SardineTask task)Sets the SardineTaskprotected abstract voidvalidateAttributes()This is called prior toexecute()in order to enable the command implementation to validate the provided attributes.
-
Constructor Details
-
Command
public Command()
-
-
Method Details
-
validateAttributes
This is called prior toexecute()in order to enable the command implementation to validate the provided attributes.- Throws:
Exception- if the command is misconfigured
-
execute
Execute the command.- Throws:
Exception- if the command failed
-
executeCommand
Check the command attribute and execute it.- Throws:
Exception- if the command is misconfigured or failed for some other reason
-
setTask
Sets the SardineTask -
getSardine
Returns the Sardine for this command.- Returns:
- the Sardine for this command
-