Skip navigation links
<dependency org="org.apache.ant" name="ant" rev="1.9.9" />
org.apache.tools.ant.taskdefs.optional.j2ee

Class AbstractHotDeploymentTool

    • Constructor Detail

      • AbstractHotDeploymentTool

        public AbstractHotDeploymentTool()
    • Method Detail

      • createClasspath

        public Path createClasspath()
        Add a classpath as a nested element.
        Returns:
        A Path object representing the classpath to be used.
      • deploy

        public abstract void deploy()
                             throws BuildException
        Perform the actual deployment. It's up to the subclasses to implement the actual behavior.
        Specified by:
        deploy in interface HotDeploymentTool
        Throws:
        BuildException - if the attributes are invalid or incomplete.
      • getClasspath

        public Path getClasspath()
        gets the classpath field.
        Returns:
        A Path representing the "classpath" attribute.
      • getPassword

        public String getPassword()
        Returns the password field.
        Returns:
        A String representing the "password" attribute.
      • getServer

        public String getServer()
        Returns the server field.
        Returns:
        A String representing the "server" attribute.
      • getTask

        protected ServerDeploy getTask()
        Returns the task field, a ServerDeploy object.
        Returns:
        An ServerDeploy representing the parent task.
      • getUserName

        public String getUserName()
        Returns the userName field.
        Returns:
        A String representing the "userName" attribute.
      • isActionValid

        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.

        Returns:
        true if the "action" attribute is valid, false if not.
      • setClasspath

        public void setClasspath(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.
        Parameters:
        classpath - A Path object representing the "classpath" attribute.
      • setPassword

        public void setPassword(String password)
        The password of the user; optional.
        Parameters:
        password - A String representing the "password" attribute.
      • setServer

        public void setServer(String server)
        The address or URL for the server where the component will be deployed.
        Parameters:
        server - A String representing the "server" attribute.
      • setTask

        public void setTask(ServerDeploy task)
        Sets the parent task.
        Specified by:
        setTask in interface HotDeploymentTool
        Parameters:
        task - a ServerDeploy object representing the parent task.
      • setUserName

        public void setUserName(String userName)
        The user with privileges to deploy applications to the server; optional.
        Parameters:
        userName - A String representing the "userName" attribute.
      • validateAttributes

        public void validateAttributes()
                                throws BuildException
        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.

        Specified by:
        validateAttributes in interface HotDeploymentTool
        Throws:
        BuildException - if the attributes are invalid or incomplete.
<dependency org="org.apache.ant" name="ant" rev="1.9.9" />