Package com.uc4.communication.requests
Class CauDeploy
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- com.uc4.communication.requests.CauDeploy
-
public class CauDeploy extends XMLRequest
Upgrades agents to a specific version via Central Agent Upgrade (CAU) functionality.
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
Creates the XML Document for the request.int
getRunID()
Returns the RunID of the CAU statistics record.protected java.lang.String
getSrc()
Returns the request source.protected void
handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
Sub classes extract the values from the XML document and provide public getter methods.protected boolean
isAllowedInClientZero()
This method is used internally.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'.void
setForced(boolean forced)
Sets the forced flag.-
Methods inherited from class com.uc4.communication.requests.XMLRequest
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotification
-
-
-
-
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 classXMLRequest
- Returns:
- Source
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()
Description copied from class:XMLRequest
This method is used internally. Tests if thisXMLRequest
is allowed in client 0. The default implementation returnsfalse
, subclasses may override.- Overrides:
isAllowedInClientZero
in classXMLRequest
- 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 classXMLRequest
- Parameters:
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- 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 classXMLRequest
- Parameters:
doc
- XML Documentsession
- 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 methodgetMsgbox()
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
-
-