public class ActivityList extends XMLRequest implements java.lang.Iterable<Task>
TaskFilter
.Modifier and Type | Class and Description |
---|---|
static class |
ActivityList.GroupingType
Grouping criteria for the activity window.
|
Constructor and Description |
---|
ActivityList(TaskFilter filter)
Creates a
ActivityList using the specified TaskFilter . |
ActivityList(TaskFilter filter,
boolean treeMode)
Creates a
ActivityList using the specified TaskFilter for tree oder list mode. |
Modifier and Type | Method and Description |
---|---|
protected void |
createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
Creates the XML Document for the request.
|
protected java.lang.String |
getSrc()
Returns the request source.
|
protected void |
handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session) |
protected boolean |
isAllowedInClientZero()
This method is used internally.
|
java.util.Iterator<Task> |
iterator()
Returns an iterator over the
Task elements in this activity list. |
void |
setClient(int client)
Sets a specific client as filter for the
ActivityList . |
void |
setExpandedRunIds(java.util.List<java.lang.Integer> runIds)
Sets the RundIds of Tasks that should be expanded.
|
void |
setGroupingType(ActivityList.GroupingType groupingType)
Sets the grouping type for the activity window.
|
int |
size()
Returns the number of tasks.
|
void |
sortByNameAscending()
Sorts the result from the server.
|
void |
sortByNameDescending()
Sorts the result from the server.
|
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotification
public ActivityList(TaskFilter filter)
ActivityList
using the specified TaskFilter
.filter
- Taskfilterpublic ActivityList(TaskFilter filter, boolean treeMode)
ActivityList
using the specified TaskFilter
for tree oder list mode.
Tree mode: in the tree mode the hierarchical view of the Activity Window is returned. That means the top level activities.
To expand sub level activities as well, use setExpandedRunIds
.
List mode: all activities are returned.filter
- TaskfiltertreeMode
- If true
the tree view of the Activity Window is returned, if false
the list view is returned.protected java.lang.String getSrc()
XMLRequest
getSrc
in class XMLRequest
public void sortByNameAscending()
iterator
method is called.
The Iterator will then return the tasks in the specified order.public void sortByNameDescending()
iterator
method is called.
The Iterator will then return the tasks in the specified order.protected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
XMLRequest
createRequest
in class XMLRequest
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the sessionprotected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
handleContent
in class XMLRequest
public int size()
public java.util.Iterator<Task> iterator()
Task
elements in this activity list.
If this request has not been sent the return value is null
iterator
in interface java.lang.Iterable<Task>
Task
elements in this activity listpublic void setExpandedRunIds(java.util.List<java.lang.Integer> runIds)
ActivityList
is used in tree modus.runIds
- RundIds of the tasks, that should be expanded.public void setGroupingType(ActivityList.GroupingType groupingType)
groupingType
- GroupingType
public void setClient(int client)
ActivityList
. This method is only used for client 0.
For all clients other 0 it has no effect.client
- filter for the ActivityList
protected boolean isAllowedInClientZero()
XMLRequest
XMLRequest
is allowed in client 0.
The default implementation returns false
, subclasses may override.isAllowedInClientZero
in class XMLRequest
true
if this request is allowed in client 0, false
otherwise