Class CauDeploy


  • public class CauDeploy
    extends XMLRequest
    Upgrades agents to a specific version via Central Agent Upgrade (CAU) functionality.
    • Constructor Detail

      • CauDeploy

        public CauDeploy​(java.util.List<UC4HostName> hosts,
                         java.lang.String versionOrStoragename)
        Creates new CAU deploy request, using a list of agents and a version or storage reference. The optional parameters "Custom Text" and "Forced" can be set via setter methods.
        Parameters:
        hosts - list of agent names which should be upgrade. The list must contain at least one host.
        versionOrStoragename - version (e.g. 12.0.0-DEV+MAIN.BUILD.1285) or storage (e.g. UC_AGENT_UNIX_12.0.0-DEV@MAIN.BUILD.1285) to which the agents should be upgraded to.
    • Method Detail

      • getSrc

        protected java.lang.String getSrc()
        Description copied from class: XMLRequest
        Returns the request source. This method is used internally.
        Specified by:
        getSrc in class XMLRequest
        Returns:
        Source
      • isAllowedInClientZero

        protected boolean isAllowedInClientZero()
        Description copied from class: XMLRequest
        This method is used internally. Tests if this XMLRequest is allowed in client 0. The default implementation returns false, subclasses may override.
        Overrides:
        isAllowedInClientZero in class XMLRequest
        Returns:
        true if this request is allowed in client 0, false otherwise
      • createRequest

        protected void createRequest​(com.uc4.util.XMLDocument doc,
                                     org.w3c.dom.Element request,
                                     ConnectionAttributes sessionInfo)
        Description copied from class: XMLRequest
        Creates the XML Document for the request. This method is used internally.
        Specified by:
        createRequest in class XMLRequest
        Parameters:
        doc - Document, used to create new Elements
        request - Request Element - classes append information to this request element
        sessionInfo - Information about the session
      • handleContent

        protected void handleContent​(com.uc4.util.XMLDocument doc,
                                     ConnectionAttributes session)
        Description copied from class: XMLRequest
        Sub classes extract the values from the XML document and provide public getter methods.
        Overrides:
        handleContent in class XMLRequest
        Parameters:
        doc - XML Document
        session - Info about the user session
      • setCustomText

        public void setCustomText​(java.lang.String customText)
        Sets the custom text for the upgrade, which will be used as name prefix for the top statistics record instead of 'CAU'.
        Parameters:
        customText - Custom text as string, max length is 20
      • setForced

        public void setForced​(boolean forced)
        Sets the forced flag.
        Parameters:
        forced - When true, also agents which are not linked to the service manager will be upgraded.
      • getRunID

        public int getRunID()
        Returns the RunID of the CAU statistics record. If the UC4 Object could not be generated this method returns 0 and the method getMsgbox() returns the error message. The return value is also 0 if the request has never been sent.
        Returns:
        RunID or 0 if there was an error. Use the method getMessageNumber() and getMessageInsert() to get more information