Package com.uc4.communication.requests
Class XMLRequest
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- Direct Known Subclasses:
ActivateLDAPConnection
,ActivateObject
,ActivatorStatistics
,ActiveNotifications
,ActivityList
,ActivityNotificationOn
,AddComment
,AddJobPlanTask
,AddPromptSet
,AddScheduleMonitorTask
,AddScheduleTask
,AdoptTask
,AgentAndGroupList
,AgentAssignmentList
,AgentGroupList
,AgentGroupMonitor
,AgentGroupSimulation
,AgentList
,AuthenticateAgent
,CacheList
,CalendarList
,CancelForm
,CancelTask
,CauDeploy
,CauSkipWaiting
,ChangeLogging
,ChangePassword
,ChangeServerMode
,CheckAuthorizations
,CheckILMPartition
,CheckUserPrivileges
,ChildStatistics
,ClearTransportCase
,ClientList
,CloseObject
,CloseProcessFlowModification
,ClosePrompt
,CockpitMonitorDefiniton
,ConfirmQuarantineMessage
,CreateFolder
,CreateObject
,CreateSession
,DeactivateLDAPConnection
,DeactivateTask
,DeepRename
,DeleteAgentAssignment
,DeleteLink
,DeleteMQMemList
,DeleteObject
,DeleteQuarantineMessage
,DeleteStaticVaraRow
,DeleteStorageEntry
,DisconnectAgentGroup
,DisconnectHost
,DisconnectUser
,DownloadBinary
,DropILMPartition
,DuplicateObject
,EnforcePreConditionEvaluation
,ExecuteAgentAssignment
,ExecuteObject
,ExecuteObjects
,ExitList
,ExportAuthenticationPackage
,ExportCompanyKey
,ExportObject
,ExportWithReferences
,FindReferencedObjects
,FolderList
,FolderTree
,ForceMemoryTrace
,GenericStatistics
,GetActivitiesFilter
,GetAgentGroupMonitorProperties
,GetAgentGroupProperties
,GetAgentProperties
,GetCAUAgentVersions
,GetChangeLog
,GetComments
,GetComponentTemplates
,GetComponentWorkflows
,GetCPProperties
,GetDatabaseInfo
,GetDeploymentProperties
,GetDeployObjectProperties
,GetDynamicComboList
,GetExecuteOnce
,GetExecutePeriod
,GetGroupMonitorProperties
,GetLastRuntimes
,GetModifyQueue
,GetObjectDocu
,GetObjectProperties
,GetOutputDirectory
,GetQuarantineMessage
,GetRAAgentNames
,GetRAConnectionNames
,GetRAConnectionValues
,GetRAJobNames
,GetReplaceList
,GetRestartInformation
,GetRestEndpoints
,GetSessionTZ
,GetStaticVaraRows
,GetStorageItems
,GetSyncMonitor
,GetSyncUsage
,GetUnreadMessages
,GetWPProperties
,GroupMonitor
,IgnoreAgentResources
,IgnoreConditions
,IgnoreQueueLimit
,IgnoreTaskSyncCondition
,ILMList
,ImportObject
,JobPlanMonitor
,LatestReport
,LicenseList
,LinkTo
,MessageList
,ModifyNotificationMonitor
,ModifyProcessFlowMonitor
,ModifyQueue
,ModifyQueueStatus
,ModifyRecurringTask
,ModifyStartTime
,ModifyTaskPriority
,ModifyTaskState
,ModifyUISettings
,MoveAgentAssignment
,MoveObject
,MoveUserToClient
,MQMemList
,NavigatorAgentTree
,NavigatorCATree
,NavigatorQueueTree
,NavigatorStatusTree
,NavigatorZDUTree
,NotificationMonitor
,NotificationState
,ObjectStatistics
,OpenObject
,OpenProcessFlowModification
,ParentStatistics
,PreviewAssignment
,PreviewVariable
,PromptInputHelp
,QuarantineList
,QueryData
,QueueList
,QuickSearch
,QuitTask
,RefreshCockpitMonitor
,RefreshServiceManagerScan
,ReleaseManually
,ReleaseQuarantineMessage
,ReloadNextTurnaround
,RemoteRestart
,RemoveJobPlanBreakPoint
,RenameObject
,RenewTransferKey
,ReplaceObject
,Report
,ReportTypeList
,RerunWorkflow
,ResetLastRuntimes
,ResetOpenFlag
,ResetScheduleTask
,RestartTask
,RestoreObject
,RestoreObjectVersion
,ResumeClient
,ResumeTask
,RollbackTask
,RollbackTo
,RunJobPlanTask
,RunScheduledTask
,SaveAgentAssignment
,SaveObject
,ScheduleMonitor
,SearchObject
,ServerList
,ServiceFulfillmentList
,ServiceLevelObjectiveList
,SetAgentGroupMonitorProperties
,SetAgentGroupProperties
,SetAgentProperties
,SetCPProperties
,SetGroupMonitorProperties
,SetHostAuthorizations
,SetJobPlanBreakPoint
,SetJobPlanTaskActive
,SetJobPlanTaskInactive
,SetObjectProperties
,SetStaticVaraRows
,SetSyncMonitor
,SetWPProperties
,SetZDUStep
,ShowQuarantineMessage
,StartHost
,StartILM
,StartServer
,StopILM
,SubmitForm
,SubmitPrompt
,SuspendClient
,SuspendTask
,SwitchOutILM
,SynchronizeLDAP
,SystemWorkload
,TaskDetails
,TaskList
,TaskPromptSetContent
,TaskPromptSetNames
,TaskStatistics
,TemplateList
,TerminateAgentGroup
,TerminateHost
,TerminateServer
,TransportObject
,UnblockJobPlanTask
,UnblockWorkflow
,UnregisterTask
,UploadBinary
,UserList
,VersionControlList
,ZDUControl
,ZduStep
,ZduWizard
public abstract class XMLRequest extends java.lang.Object
This is the super class of all request classes.
-
-
Constructor Summary
Constructors Constructor Description XMLRequest()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static void
assertClientZero(ConnectionAttributes sessioninfo)
protected static void
assertServerVersion(ConnectionAttributes sessioninfo, int minExpected)
protected static void
checkClient(int client)
protected static void
checkID(int id)
protected static void
checkLnr(int lnr)
protected static void
checkNull(java.lang.Object object, java.lang.String msg)
protected static void
checkSelStatisticsPrivilege(ConnectionAttributes sessionInfo)
protected static void
checkSystemOverviewPrivilege(ConnectionAttributes sessionInfo)
protected static void
checkUC4ObjectEmptyName(UC4ObjectName name)
protected static void
checkUC4ObjectName(UC4ObjectName name)
protected static com.automic.protocol.Message
createNATFor(XMLRequest r, ConnectionAttributes sessionInfo)
protected com.automic.protocol.Message
createNATRequest(ConnectionAttributes sessionInfo)
Sub classes may override this method send messages in NAT protocol to the AE.protected abstract void
createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
Creates the XML Document for the request.protected boolean
emptyAttributes(org.w3c.dom.NamedNodeMap attributeMap, com.uc4.translate.Message translator)
Returnstrue
if the attribute map is not empty.java.util.List<MessageBox>
getAllMessageBoxes()
Returns a List of all MessageBoxes object if the server returns messages for this request.MessageBox
getMessageBox()
Returns a MessageBox object if the server returns a message for this request.java.lang.String
getRequestID(java.lang.String defaultValue)
Sub classes may override to send a UUID instead.protected abstract 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.void
handleResponse(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
Handles the response from the server.protected boolean
ignoreMessageBox()
protected boolean
isAllowedInClientZero()
This method is used internally.void
send(org.w3c.dom.Document doc, ConnectionAttributes sessioninfo, java.lang.String nr)
Prepares the request for sending.protected void
setMessageBox(MessageBox box)
Used inXMLRequestSet
to move the Message Box from a child request to theXMLRequestSet
object.boolean
showQuarantineNotification()
Returnstrue
if a new quarantine message has been found.
-
-
-
Method Detail
-
getSrc
protected abstract java.lang.String getSrc()
Returns the request source. This method is used internally.- Returns:
- Source
-
createRequest
protected abstract void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
Creates the XML Document for the request. This method is used internally.- Parameters:
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the session
-
createNATRequest
protected com.automic.protocol.Message createNATRequest(ConnectionAttributes sessionInfo)
Sub classes may override this method send messages in NAT protocol to the AE.- Parameters:
sessionInfo
- Session infos- Returns:
- Message or null if not used
-
createNATFor
protected static com.automic.protocol.Message createNATFor(XMLRequest r, ConnectionAttributes sessionInfo)
-
handleResponse
public final void handleResponse(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
Handles the response from the server. This method should be called fromIResponseHandler#handleResponse
.- Parameters:
doc
- Document returned from the serversession
- Information about the session
-
handleContent
protected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
Sub classes extract the values from the XML document and provide public getter methods.- Parameters:
doc
- XML Documentsession
- Info about the user session
-
showQuarantineNotification
public boolean showQuarantineNotification()
Returnstrue
if a new quarantine message has been found. This information can be used to show an alert message to users. The requestGetQuarantineMessage
can be used to get more details about the crash.- Returns:
- true if an alert should be shown, false if the alert notification can be removed.
-
getMessageBox
public final MessageBox getMessageBox()
Returns a MessageBox object if the server returns a message for this request. The message can indicate an error.- Returns:
- MessageBox or null if there is no message
-
getAllMessageBoxes
public final java.util.List<MessageBox> getAllMessageBoxes()
Returns a List of all MessageBoxes object if the server returns messages for this request. The messages can indicate an error, warning or information.- Returns:
- List of MessageBox received in the request.
-
setMessageBox
protected void setMessageBox(MessageBox box)
Used inXMLRequestSet
to move the Message Box from a child request to theXMLRequestSet
object.- Parameters:
box
- Message Box
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()
This method is used internally. Tests if thisXMLRequest
is allowed in client 0. The default implementation returnsfalse
, subclasses may override.- Returns:
true
if this request is allowed in client 0,false
otherwise
-
ignoreMessageBox
protected boolean ignoreMessageBox()
-
emptyAttributes
protected boolean emptyAttributes(org.w3c.dom.NamedNodeMap attributeMap, com.uc4.translate.Message translator)
Returnstrue
if the attribute map is not empty. Also an error message is set. Used by internal tests only.- Parameters:
attributeMap
- attribute maptranslator
- message translator- Returns:
true
if the attribute map is empty
-
checkClient
protected static final void checkClient(int client)
-
checkID
protected static final void checkID(int id)
-
checkNull
protected static final void checkNull(java.lang.Object object, java.lang.String msg)
-
checkLnr
protected static final void checkLnr(int lnr)
-
checkUC4ObjectName
protected static final void checkUC4ObjectName(UC4ObjectName name)
-
checkUC4ObjectEmptyName
protected static final void checkUC4ObjectEmptyName(UC4ObjectName name)
-
assertClientZero
protected static final void assertClientZero(ConnectionAttributes sessioninfo)
-
assertServerVersion
protected static final void assertServerVersion(ConnectionAttributes sessioninfo, int minExpected)
-
send
public void send(org.w3c.dom.Document doc, ConnectionAttributes sessioninfo, java.lang.String nr)
Prepares the request for sending.- Parameters:
doc
- DOMsessioninfo
- Information about the UC4 sessionnr
- Request number
-
getRequestID
public java.lang.String getRequestID(java.lang.String defaultValue)
Sub classes may override to send a UUID instead. This is used for a file transfer from the Agent to the client- Parameters:
defaultValue
- Unique number which is not used so far- Returns:
- ID to use to send this request
-
checkSystemOverviewPrivilege
protected static final void checkSystemOverviewPrivilege(ConnectionAttributes sessionInfo)
-
checkSelStatisticsPrivilege
protected static final void checkSelStatisticsPrivilege(ConnectionAttributes sessionInfo)
-
-