Package com.uc4.communication.requests
Class TaskList
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- com.uc4.communication.requests.TaskList
-
- All Implemented Interfaces:
java.lang.Iterable<Task>
public class TaskList extends XMLRequest implements java.lang.Iterable<Task>
Returns a list of a tasks based on a filter.- Since:
- V12
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTaskList.DateRangeType of the time frame in a combined task selection.
-
Constructor Summary
Constructors Constructor Description TaskList(TaskFilter taskFilter, java.lang.String... selectedFields)Creates a newTaskListrequest.
-
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.java.lang.StringgetAlias()Returns the alias.booleangetCommentFlag()Returns commented flag.java.util.List<java.lang.Integer>getExpandedRunIds()Gets the expanded RunIds.java.lang.StringgetHost()Gets the host.booleangetModifyFlag()Returns modify flag.java.lang.StringgetMsgInsert()Returns remote status insert.intgetMsgNumber()Returns remote status number.intgetRunID()Returns runID.java.util.List<java.lang.Integer>getRunIDs()Returns the filter for multiple RunIDs or null if there is no filter.java.lang.StringgetSourceDestHost()Returns the source host.protected java.lang.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.voidincludeHistoricalData()Call this method before sending the request to include statistics data in addition to the tasks in the activity list.protected booleanisAllowedInClientZero()This method is used internally.booleanisExcludeHost()Checks if is exclude host.booleanisLimitReached()booleanisTreeMode()java.util.Iterator<Task>iterator()Returns an iterator over theTaskelements in this activity list.voidsetAlias(java.lang.String alias)Sets the filter for the alias.voidsetCauVersion(java.lang.String cauVersion)Sets the filter for the Version of the Agent.voidsetClient(int client)Sets a specific client as filter for theTaskList.voidsetCommentFlag(boolean commentFlag)Sets comment flag.voidsetDateSelectionLast(TaskList.DateRange type, int amount, TaskFilter.TimeUnit unit)Sets a time range filter for the last minutes, hours or days.voidsetDateSelectionRange(TaskList.DateRange type, DateTime from, DateTime to)Sets a time interval.voidsetExcludeHost(boolean excludeHost)Sets the exclude host.voidsetExpandedRunIds(java.util.List<java.lang.Integer> runIds)Sets the RundIds of Tasks that should be expanded.voidsetGroupingType(ActivityList.GroupingType groupingType)Sets the grouping type for the activity window.voidsetHost(java.lang.String host)Sets the host.voidsetMaxRows(int maxRows)Used to limit the number of returned tasks.voidsetModifyFlag(boolean modifyFlag)Sets modify flag.voidsetMsgInsert(java.lang.String msgInsert)Sets remote status insert.voidsetMsgNumber(int msgNumber)Sets remote status number.voidsetRemoteContextName(java.lang.String remoteContextName)Sets the filter for the remote context name.voidsetRemoteContextValue(java.lang.String remoteContextValue)Sets the filter for the remote context value.voidsetRunID(int runID)Sets runID.voidsetRunIDs(java.util.List<java.lang.Integer> runIDs)Sets List of runIDs.voidsetSourceDestHost(java.lang.String sourceDestHost)Sets the filter for the source host.voidsetSyncObjectNames(java.util.Set<java.lang.String> syncObjectNames)Sets the filter for SYNC objects.voidsetTreeMode(boolean treeMode)voidsetZduVersion(java.lang.String zduVersion)Sets the ZDU version filter.intsize()Returns the number of tasks.-
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
-
TaskList
public TaskList(TaskFilter taskFilter, java.lang.String... selectedFields)
Creates a newTaskListrequest.- Parameters:
taskFilter- the task filterselectedFields- Fields which should be returned. If no field is selected all fields are returned.Possible values are:
Name Description OBJECT_NAME Name of the object. ALIAS_NAME Name of the object or alias OBJECT_TYPE Object type AGENT_NAME Name of the Agent PARENT_PROCESSOR_RUNID RunID of the parent processor STATUS_WITHIN_PARENT Status within a workflow CONTAINER_TYPE Type of the container, used for icon STARTED_BY_AE Is a JOBD monitored or started by the AE. Used for the icon only COMMENT_FLAG Is this execution commented? END_TIME End time of the task. ACTIVATION_TIME Activation time of the task. START_TIME Start time of the task. USER_ID User who started this task. PLATFORM Platform TREE_PARENT RunID of the parent in the tree view PERIOD_DESCRIPTION Description of PERIOD objects. REMOTE_STATUS_ID Translation ID of the remote status. REMOTE_STATUS_INSERT Remote status insert. CPU_TIME CPU time. RESOURCE Resource count QUEUE Name of the Queue. PROCESS_ID Process ID START_TYPE Start type STATUS Status of the task RUNID RunID of the task. PRIORITY Priority LOGIN Login object ROLLBACK_FLAG Flag if rollback is enabled ARCHIVE_KEY1 Archive key 1 ARCHIVE_KEY2 Archive Key 2 ZDU_VERSION ZDU Version PROCESSOR_TASK Flag which indicates if this task is parent processor or not RETURN_CODE User return code of the task INT_ACCOUNT Account VERSION Version of the object
-
-
Method Detail
-
setCauVersion
public void setCauVersion(java.lang.String cauVersion)
Sets the filter for the Version of the Agent.- Parameters:
cauVersion- Agent Version, use null to clear the filter
-
setZduVersion
public void setZduVersion(java.lang.String zduVersion)
Sets the ZDU version filter.- Parameters:
zduVersion- "B" (Base) or "T" (Target) ornullto clear the filter
-
includeHistoricalData
public void includeHistoricalData()
Call this method before sending the request to include statistics data in addition to the tasks in the activity list.
-
setMaxRows
public void setMaxRows(int maxRows)
Used to limit the number of returned tasks. Tasks are sorted by their activation time in descending order. The value is ignored if it is larger than GENERIC_ACTIVITIES_LIMIT in UC_SYSTEM_SETTINGS.- Parameters:
maxRows- Maximum number of rows, value between 1 and GENERIC_ACTIVITIES_LIMIT- Throws:
java.lang.IllegalArgumentException- if the value is negative or zero or larger than the allowed maximum GENERIC_ACTIVITIES_LIMIT: 20000
-
setSourceDestHost
public void setSourceDestHost(java.lang.String sourceDestHost)
Sets the filter for the source host. The wildcard character * matches all source or destination.- Parameters:
sourceDestHost- source host
-
getSourceDestHost
public java.lang.String getSourceDestHost()
Returns the source host. The wildcard character * matches all hosts.- Returns:
- source host selection
-
setAlias
public void setAlias(java.lang.String alias)
Sets the filter for the alias. The wildcard character * matches all source hosts.- Parameters:
alias- new alias
-
getAlias
public java.lang.String getAlias()
Returns the alias. The wildcard character * matches all alias.- Returns:
- alias selection
-
setCommentFlag
public void setCommentFlag(boolean commentFlag)
Sets comment flag.- Parameters:
commentFlag- new commented flag
-
getCommentFlag
public boolean getCommentFlag()
Returns commented flag.- Returns:
- commentFlag
-
setModifyFlag
public void setModifyFlag(boolean modifyFlag)
Sets modify flag.- Parameters:
modifyFlag- new modify flag
-
setGroupingType
public void setGroupingType(ActivityList.GroupingType groupingType)
Sets the grouping type for the activity window.- Parameters:
groupingType-GroupingType
-
setSyncObjectNames
public void setSyncObjectNames(java.util.Set<java.lang.String> syncObjectNames)
Sets the filter for SYNC objects. Wildcards can be used.- Parameters:
syncObjectNames- Set of Sync object names, use null to clear the filter.
-
getModifyFlag
public boolean getModifyFlag()
Returns modify flag.- Returns:
- modifyFlag
-
setRunID
public void setRunID(int runID)
Sets runID.- Parameters:
runID- new runID
-
setRunIDs
public void setRunIDs(java.util.List<java.lang.Integer> runIDs)
Sets List of runIDs.- Parameters:
runIDs- List of RunIDs or null
-
getRunID
public int getRunID()
Returns runID.- Returns:
- runID
-
getRunIDs
public java.util.List<java.lang.Integer> getRunIDs()
Returns the filter for multiple RunIDs or null if there is no filter.- Returns:
- RunID filter or null
-
setMsgInsert
public void setMsgInsert(java.lang.String msgInsert)
Sets remote status insert.- Parameters:
msgInsert- new remote status insert
-
getMsgInsert
public java.lang.String getMsgInsert()
Returns remote status insert.- Returns:
- msgInsert
-
setMsgNumber
public void setMsgNumber(int msgNumber)
Sets remote status number.- Parameters:
msgNumber- new remote status number
-
getMsgNumber
public int getMsgNumber()
Returns remote status number.- Returns:
- msgNumber
-
setExcludeHost
public void setExcludeHost(boolean excludeHost)
Sets the exclude host.- Parameters:
excludeHost- the new exclude host
-
isExcludeHost
public boolean isExcludeHost()
Checks if is exclude host.- Returns:
- true, if is exclude host
-
setHost
public void setHost(java.lang.String host)
Sets the host.- Parameters:
host- the new host
-
getHost
public java.lang.String getHost()
Gets the host.- Returns:
- the host
-
setRemoteContextName
public void setRemoteContextName(java.lang.String remoteContextName)
Sets the filter for the remote context name.- Parameters:
remoteContextName- new remote context name
-
setRemoteContextValue
public void setRemoteContextValue(java.lang.String remoteContextValue)
Sets the filter for the remote context value.- Parameters:
remoteContextValue- new remote context value
-
setDateSelectionRange
public void setDateSelectionRange(TaskList.DateRange type, DateTime from, DateTime to)
Sets a time interval. You can call this method with DateRange.NONE in order to clear a previous selection.- Parameters:
type- Selection typefrom- Start of the time intervalto- End of the time interval
-
setDateSelectionLast
public void setDateSelectionLast(TaskList.DateRange type, int amount, TaskFilter.TimeUnit unit)
Sets a time range filter for the last minutes, hours or days. You can call this method with DateRange.NONE in order to clear a previous selection.- Parameters:
type- Selection typeamount- Number of minutes, hours or daysunit- Time unit
-
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
-
setClient
public void setClient(int client)
Sets a specific client as filter for theTaskList. This method is only used for client 0. For all clients other 0 it has no effect.- Parameters:
client- filter for theTaskList
-
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
-
iterator
public java.util.Iterator<Task> iterator()
Returns an iterator over theTaskelements in this activity list.- Specified by:
iteratorin interfacejava.lang.Iterable<Task>- Returns:
- an Iterator, never null
-
size
public int size()
Returns the number of tasks. If the request is not sent this method returns 0.- Returns:
- Integer containing the number of activities
-
isLimitReached
public boolean isLimitReached()
- Returns:
- true if max row limit was reached i.e. there are more results available than containing in this activity list
-
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
-
isTreeMode
public boolean isTreeMode()
- Returns:
- treeMode
-
setTreeMode
public void setTreeMode(boolean treeMode)
- Parameters:
treeMode- to set hierarchical view mode
-
setExpandedRunIds
public void setExpandedRunIds(java.util.List<java.lang.Integer> runIds)
Sets the RundIds of Tasks that should be expanded. Only used ifTaskListis used in tree modus.- Parameters:
runIds- RundIds of the tasks, that should be expanded.
-
getExpandedRunIds
public java.util.List<java.lang.Integer> getExpandedRunIds()
Gets the expanded RunIds. Only used ifTaskListis used in tree modus.- Returns:
- runIds RundIds of the expanded tasks
-
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
-
-