Package com.uc4.communication.requests
Class CauDeploy
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.CauDeploy
Upgrades agents to a specific version via Central Agent Upgrade (CAU) functionality.
-
Constructor Summary
ConstructorsConstructorDescriptionCauDeploy(List<UC4HostName> hosts, String versionOrStoragename) Creates new CAU deploy request, using a list of agents and a version or storage reference. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.intgetRunID()Returns the RunID of the CAU statistics record.protected StringgetSrc()Returns the request source.protected voidhandleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.protected booleanThis method is used internally.voidsetCustomText(String customText) Sets the custom text for the upgrade, which will be used as name prefix for the top statistics record instead of 'CAU'.voidsetForced(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 Details
-
CauDeploy
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 Details
-
getSrc
Description copied from class:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin classXMLRequest- Returns:
- Source
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()Description copied from class:XMLRequestThis method is used internally. Tests if thisXMLRequestis allowed in client 0. The default implementation returnsfalse, subclasses may override.- Overrides:
isAllowedInClientZeroin classXMLRequest- Returns:
trueif this request is allowed in client 0,falseotherwise
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Description copied from class:XMLRequestCreates the XML Document for the request. This method is used internally.- Specified by:
createRequestin classXMLRequest- Parameters:
doc- Document, used to create new Elementsrequest- Request Element - classes append information to this request elementsessionInfo- Information about the session
-
handleContent
Description copied from class:XMLRequestSub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContentin classXMLRequest- Parameters:
doc- XML Documentsession- Info about the user session
-
setCustomText
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
-