Package com.uc4.communication.requests
Class NotificationMonitor
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- com.uc4.communication.requests.NotificationMonitor
-
- All Implemented Interfaces:
java.lang.Iterable<NotificationMonitor.CallStatus>
public class NotificationMonitor extends XMLRequest implements java.lang.Iterable<NotificationMonitor.CallStatus>
Reads the monitor of a notification. The modify the notification use the requestModifyNotificationMonitor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNotificationMonitor.CallStatusThis inner class represents a row in the calling status table of this notification monitor.static classNotificationMonitor.TypeNotification type.
-
Constructor Summary
Constructors Constructor Description NotificationMonitor(int runID)Creates a newNotificationMonitorrequest.NotificationMonitor(java.util.List<java.lang.Integer> runIDs)Creates a newNotificationMonitorrequest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)Creates the XML Document for the request.DateTimegetEscalation()Returns the date and time on which the Notification escalates.java.lang.StringgetMessage()Returns the message text of this notification.java.util.List<NotificationMonitor>getNotificationMonitors()Returns a list of NotificationMonitor objects.NotificationMonitor.TypegetNotificationType()Returns the type of the notification independent of the logon languge.intgetParentRunID()Returns the RunID of the parent or0if there is none.java.lang.StringgetPriority()Returns the Priority of the Notification (high, normal, low).intgetRunID()Returns the RunID of this notification.protected java.lang.StringgetSrc()Returns the request source.DateTimegetStartTime()Returns the start time of this notification.intgetStatusCode()Returns the status of the notification.java.lang.StringgetSubject()Returns the subject of the message text.java.lang.StringgetTypeText()Translated type text, for example Email, Message, Request or Alert.protected voidhandleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)Sub classes extract the values from the XML document and provide public getter methods.booleanhasComment()Returnstrueif this notification has comments.protected booleanisAllowedInClientZero()This method is used internally.java.util.Iterator<NotificationMonitor.CallStatus>iterator()intsize()Returns the number of rows in the calling status table.-
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
-
NotificationMonitor
public NotificationMonitor(int runID)
Creates a newNotificationMonitorrequest.- Parameters:
runID- RunID of the CALL task.
-
NotificationMonitor
public NotificationMonitor(java.util.List<java.lang.Integer> runIDs)
Creates a newNotificationMonitorrequest.- Parameters:
runIDs- RunIDs of the CALL tasks.
-
-
Method Detail
-
getRunID
public int getRunID()
Returns the RunID of this notification.- Returns:
- RunID
-
getParentRunID
public int getParentRunID()
Returns the RunID of the parent or0if there is none.- Returns:
- RunID of the parent
-
getSrc
protected java.lang.String getSrc()
Description copied from class:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin classXMLRequest- Returns:
- Source
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.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
protected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)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
-
getStatusCode
public int getStatusCode()
Returns the status of the notification. This information can be used to restrict the possible actions. For example, enable or disable accept, done and reject button depending on the state.- Returns:
Type Alert
- 1552 Called - possible actions are Accept or Reject
- 1553 Accepted - possible actions are Done and Reject
Type Request
- 1552 Called - possible actions are Yes or No
Type Message
- 1552 Called - possible action is Ok
-
getNotificationType
public NotificationMonitor.Type getNotificationType()
Returns the type of the notification independent of the logon languge. The translated type text is returned ingetTypeText()- Returns:
- Type
-
hasComment
public boolean hasComment()
Returnstrueif this notification has comments. The requestGetCommentscan be used to get the detail of the comment.- Returns:
- true if comments are stored
-
getEscalation
public DateTime getEscalation()
Returns the date and time on which the Notification escalates. The specified Notification starts if there is no user acknowledgement. A particular point in time is only displayed if a definition was made in the setting "Escalation" of the "Operator" tab.- Returns:
- DateTime instance, which can be empty but never null
-
getTypeText
public java.lang.String getTypeText()
Translated type text, for example Email, Message, Request or Alert.- Returns:
- Type of the notification
-
getPriority
public java.lang.String getPriority()
Returns the Priority of the Notification (high, normal, low).- Returns:
- translated priority, for example "High" (English) or "Hoch" (German)
-
getStartTime
public DateTime getStartTime()
Returns the start time of this notification.- Returns:
- Start time
-
getSubject
public java.lang.String getSubject()
Returns the subject of the message text.- Returns:
- Subject
-
getMessage
public java.lang.String getMessage()
Returns the message text of this notification.- Returns:
- Message text
-
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
-
iterator
public java.util.Iterator<NotificationMonitor.CallStatus> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<NotificationMonitor.CallStatus>
-
size
public int size()
Returns the number of rows in the calling status table.- Returns:
- Count
-
getNotificationMonitors
public java.util.List<NotificationMonitor> getNotificationMonitors()
Returns a list of NotificationMonitor objects.- Returns:
- List of NotificationMonitor, can be empty but never null.
-
-