Package com.uc4.communication.requests
Class MessageList
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.MessageList
- All Implemented Interfaces:
Iterable<MessageListItem>
Find messages in the Automation Engine.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Category of the message.static enum
Type of the message.static enum
Sort order. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createRequest
(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.protected 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
This method is used internally.iterator()
void
setAdminMessages
(boolean value) Sets or clears the filter for admin messages.void
Sets the filter for the message category.void
setMaxNumber
(int maxNumber) Sets the maximum number of the returned rows, the default value is 100.void
setOrder
(MessageList.Order order) Sets the sort order of the returned messages.void
setSecurityMessages
(boolean value) Sets or clears the filter for security messages.void
setTextFilter
(int number, String insert) Sets the filter for the message number and insert.void
setTimeRange
(DateTime from, DateTime to) Sets the filter the message timestamp.void
Sets the filter for the type of the message.void
setUser
(UC4UserName user) Sets the filter for a user.int
size()
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MessageList
public MessageList()Creates a newMessageList
request.
-
-
Method Details
-
setAdminMessages
public void setAdminMessages(boolean value) Sets or clears the filter for admin messages.- Parameters:
value
- true if admin messages should be included in the result, false if not.
-
setSecurityMessages
public void setSecurityMessages(boolean value) Sets or clears the filter for security messages.- Parameters:
value
- true if security messages should be included in the result, false if not.
-
setMaxNumber
public void setMaxNumber(int maxNumber) Sets the maximum number of the returned rows, the default value is 100.- Parameters:
maxNumber
- Limit of returned messages, must be between 1 and 9999
-
setUser
Sets the filter for a user.- Parameters:
user
- User name ornull
to clear the filter.
-
setType
Sets the filter for the type of the message.- Parameters:
type
- Message type, must not be null
-
setCategory
Sets the filter for the message category.- Parameters:
cat
- categroy, must not be null
-
setTextFilter
Sets the filter for the message number and insert.- Parameters:
number
- Number of the messageinsert
- Message insert or * for all inserts
-
setTimeRange
Sets the filter the message timestamp.- Parameters:
from
- From date and timeto
- To date and time
-
setOrder
Sets the sort order of the returned messages.- Parameters:
order
- Ascending or descending
-
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, 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
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
-
iterator
- Specified by:
iterator
in interfaceIterable<MessageListItem>
-
size
public int size()- Returns:
- Number of returned messages
-