Methods Summary |
---|
public org.apache.tools.ant.types.Path | createClasspath()Add a classpath as a nested element.
if (classpath == null) {
classpath = new Path(task.getProject());
}
return classpath.createPath();
|
public abstract void | deploy()Perform the actual deployment.
It's up to the subclasses to implement the actual behavior.
|
public org.apache.tools.ant.types.Path | getClasspath()gets the classpath field.
return classpath;
|
public java.lang.String | getPassword()Returns the password field.
return password;
|
public java.lang.String | getServer()Returns the server field.
return server;
|
protected ServerDeploy | getTask()Returns the task field, a ServerDeploy object.
return task;
|
public java.lang.String | getUserName()Returns the userName field.
return userName;
|
protected abstract boolean | isActionValid()Determines if the "action" attribute defines a valid action.
Subclasses should determine if the action passed in is
supported by the vendor's deployment tool.
Actions may by "deploy", "delete", etc... It all depends
on the tool.
|
public void | setClasspath(org.apache.tools.ant.types.Path classpath)The classpath to be passed to the JVM running the tool;
optional depending upon the tool.
The classpath may also be supplied as a nested element.
this.classpath = classpath;
|
public void | setPassword(java.lang.String password)The password of the user; optional.
this.password = password;
|
public void | setServer(java.lang.String server)The address or URL for the server where the component will be deployed.
this.server = server;
|
public void | setTask(ServerDeploy task)Sets the parent task.
this.task = task;
|
public void | setUserName(java.lang.String userName)The user with privileges to deploy applications to the server; optional.
this.userName = userName;
|
public void | validateAttributes()Validates the passed in attributes.
Subclasses should chain to this super-method to insure
validation of boilerplate attributes.
Only the "action" attribute is required in the
base class. Subclasses should check attributes accordingly.
if (task.getAction() == null) {
throw new BuildException("The \"action\" attribute must be set");
}
if (!isActionValid()) {
throw new BuildException("Invalid action \"" + task.getAction() + "\" passed");
}
if (classpath == null) {
throw new BuildException("The classpath attribute must be set");
}
|