Class AbstractCatalinaTask

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractCatalinaTask()
      Construct a new instance of this task.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Execute the specified command.
      void execute​(java.lang.String command)
      Execute the specified command, based on the configured properties.
      void execute​(java.lang.String command, java.io.InputStream istream, java.lang.String contentType, long contentLength)
      Execute the specified command, based on the configured properties.
      java.lang.String getCharset()
      Returns the charset used during URL encoding.
      java.lang.String getPassword()
      Returns the login password for the Manager application.
      java.lang.String getUrl()
      Returns the URL of the Manager application to be used.
      java.lang.String getUsername()
      Returns the login username for the Manager application.
      boolean isIgnoreResponseConstraint()
      Returns whether the constraint on the first line of the response message is ignored.
      void setCharset​(java.lang.String charset)
      Sets the charset used during URL encoding.
      void setIgnoreResponseConstraint​(boolean ignoreResponseConstraint)
      Sets whether the constraint on the first line of the response message is ignored.
      void setPassword​(java.lang.String password)
      Sets the login password for the Manager application.
      void setUrl​(java.lang.String url)
      Sets the URL of the Manager application to be used.
      void setUsername​(java.lang.String username)
      Sets the login username for the Manager application.
      • Methods inherited from class org.apache.tools.ant.Task

        bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleInput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • charset

        protected java.lang.String charset
        The charset used during URL encoding.
      • password

        protected java.lang.String password
        The login password for the Manager application.
      • url

        protected java.lang.String url
        The URL of the Manager application to be used.
      • username

        protected java.lang.String username
        The login username for the Manager application.
      • ignoreResponseConstraint

        protected boolean ignoreResponseConstraint
        If set to true - ignore the constraint of the first line of the response message that must be "OK -".

        When this attribute is set to false (the default), the first line of server response is expected to start with "OK -". If it does not then the task is considered as failed and the first line is treated as an error message.

        When this attribute is set to true, the first line of the response is treated like any other, regardless of its text.

    • Constructor Detail

      • AbstractCatalinaTask

        protected AbstractCatalinaTask()
        Construct a new instance of this task.
    • Method Detail

      • getCharset

        public java.lang.String getCharset()
        Returns the charset used during URL encoding.
        Returns:
        the charset
      • setCharset

        public void setCharset​(java.lang.String charset)
        Sets the charset used during URL encoding.
        Parameters:
        charset - the charset to set
      • getPassword

        public java.lang.String getPassword()
        Returns the login password for the Manager application.
        Returns:
        the password
      • setPassword

        public void setPassword​(java.lang.String password)
        Sets the login password for the Manager application.
        Parameters:
        password - the password to set
      • getUrl

        public java.lang.String getUrl()
        Returns the URL of the Manager application to be used.
        Returns:
        the url
      • setUrl

        public void setUrl​(java.lang.String url)
        Sets the URL of the Manager application to be used.
        Parameters:
        url - the url to set
      • getUsername

        public java.lang.String getUsername()
        Returns the login username for the Manager application.
        Returns:
        the username
      • setUsername

        public void setUsername​(java.lang.String username)
        Sets the login username for the Manager application.
        Parameters:
        username - the username to set
      • isIgnoreResponseConstraint

        public boolean isIgnoreResponseConstraint()
        Returns whether the constraint on the first line of the response message is ignored.
        Returns:
        true if the constraint is ignored
      • setIgnoreResponseConstraint

        public void setIgnoreResponseConstraint​(boolean ignoreResponseConstraint)
        Sets whether the constraint on the first line of the response message is ignored.
        Parameters:
        ignoreResponseConstraint - true to ignore the constraint
      • execute

        public void execute()
                     throws org.apache.tools.ant.BuildException
        Execute the specified command. This logic only performs the common attribute validation required by all subclasses; it does not perform any functional logic directly.
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException - if a validation error occurs
      • execute

        public void execute​(java.lang.String command)
                     throws org.apache.tools.ant.BuildException
        Execute the specified command, based on the configured properties.
        Parameters:
        command - Command to be executed
        Throws:
        org.apache.tools.ant.BuildException - if an error occurs
      • execute

        public void execute​(java.lang.String command,
                            java.io.InputStream istream,
                            java.lang.String contentType,
                            long contentLength)
                     throws org.apache.tools.ant.BuildException
        Execute the specified command, based on the configured properties. The input stream will be closed upon completion of this task, whether it was executed successfully or not.
        Parameters:
        command - Command to be executed
        istream - InputStream to include in an HTTP PUT, if any
        contentType - Content type to specify for the input, if any
        contentLength - Content length to specify for the input, if any
        Throws:
        org.apache.tools.ant.BuildException - if an error occurs