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 class
NotificationMonitor.CallStatus
This inner class represents a row in the calling status table of this notification monitor.static class
NotificationMonitor.Type
Notification type.
-
Constructor Summary
Constructors Constructor Description NotificationMonitor(int runID)
Creates a newNotificationMonitor
request.NotificationMonitor(java.util.List<java.lang.Integer> runIDs)
Creates a newNotificationMonitor
request.
-
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.DateTime
getEscalation()
Returns the date and time on which the Notification escalates.java.lang.String
getMessage()
Returns the message text of this notification.java.util.List<NotificationMonitor>
getNotificationMonitors()
Returns a list of NotificationMonitor objects.NotificationMonitor.Type
getNotificationType()
Returns the type of the notification independent of the logon languge.int
getParentRunID()
Returns the RunID of the parent or0
if there is none.java.lang.String
getPriority()
Returns the Priority of the Notification (high, normal, low).int
getRunID()
Returns the RunID of this notification.protected java.lang.String
getSrc()
Returns the request source.DateTime
getStartTime()
Returns the start time of this notification.int
getStatusCode()
Returns the status of the notification.java.lang.String
getSubject()
Returns the subject of the message text.java.lang.String
getTypeText()
Translated type text, for example Email, Message, Request or Alert.protected void
handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
Sub classes extract the values from the XML document and provide public getter methods.boolean
hasComment()
Returnstrue
if this notification has comments.protected boolean
isAllowedInClientZero()
This method is used internally.java.util.Iterator<NotificationMonitor.CallStatus>
iterator()
int
size()
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 newNotificationMonitor
request.- Parameters:
runID
- RunID of the CALL task.
-
NotificationMonitor
public NotificationMonitor(java.util.List<java.lang.Integer> runIDs)
Creates a newNotificationMonitor
request.- 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 or0
if there is none.- Returns:
- RunID of the parent
-
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
-
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
-
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()
Returnstrue
if this notification has comments. The requestGetComments
can 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: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
-
iterator
public java.util.Iterator<NotificationMonitor.CallStatus> iterator()
- Specified by:
iterator
in 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.
-
-