T - The type of the worklist items which are managed in the worklist.public interface Worklist<T extends WorklistItem> extends UserAttributeContainer
InternalWorklist or ClientWorklist. A special case is a
IncrementalWorklist which is used for transferring worklist items
incrementally to a client.
A user may have multiple worklists, but each worklist is assigned to exactly one user.
A worklist is identified by a system-wide unique worklist ID.
Every worklist has a revision, which is an ID of its version. The revision is
incremented on the server-side during every change to the worklist. Using
this revision, incremental updates are possible (c.f.
WorklistUpdateManager.getWorklistUpdates(de.aristaflow.adept2.base.sessionmanagement.SessionToken, UUID, WorklistRevision, de.aristaflow.adept2.model.filter.Filter)).
There may be more than one client worklist per internal worklist. They all
share the same state and therefore a client worklist has the same ID as the
corresponding internal worklist. E.g. a may be logged in from different
computers. The only difference between these client worklists is when and how
they are updated, i.e. their WorklistUpdateConfiguration may be
different.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Two worklists are equal if they're either both internal worklists or
client worklists and additionally their IDs are equal.
|
static boolean |
equals(Worklist<?> me,
java.lang.Object obj)
Implements equality on
Worklists. |
QualifiedAgent |
getAgent()
The agent this worklist belongs to.
|
boolean |
getAggregateGroups()
Gets whether this worklist aggregates all worklist groups and returns only the grouping items
instead of the actual (flat) worklist items in
getWorklistItems(). |
T |
getGroupingWorklistItem(java.util.UUID groupId)
Gets the grouping worklist item representing the designated group.
|
java.util.UUID |
getID()
The system-wide unique ID of this worklist.
|
WorklistRevision |
getRevision()
Returns the current revision of this worklist, which is the update count and the service start
timestamp.
|
T |
getWorklistItem(java.util.UUID itemID)
Gets the worklist item having the designated ID or
null in
case this worklist does not have an item with the designated item ID. |
java.util.List<T> |
getWorklistItemGroup(java.util.UUID groupId)
Gets the worklist items that the designated group represents.
|
java.util.List<T> |
getWorklistItems()
Returns all worklist items of this worklist.
|
java.util.List<T> |
getWorklistItemsFlat(boolean includeGroupingItems)
Gets all worklist items of this worklist, this includes items within groups and optionally the
grouping items representing the groups.
|
int |
hashCode()
When overriding
Object.equals(Object) one also needs to override
Object.hashCode(). |
void |
setAggregateGroups(boolean aggregate)
Sets whether this worklist aggregates all worklist groups and returns only the grouping items
instead of the actual (flat) worklist items in
getWorklistItems(). |
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValuejava.util.UUID getID()
QualifiedAgent getAgent()
WorklistRevision getRevision()
T getWorklistItem(java.util.UUID itemID)
null in
case this worklist does not have an item with the designated item ID.itemID - The ID for which to retrieve a worklist item. This must not
be null.null in
case this worklist does not have an item with the designated item
ID.T getGroupingWorklistItem(java.util.UUID groupId)
null will be returned.groupId - The ID of the item group.null
if the designated group does not exist.java.util.List<T> getWorklistItems()
While the internal worklist will return an unmodifiable view on the list of worklist items, the
client worklist will return a copy (i.e. a snapshot) of the list which therefore does not
necessarily reflect the worklist's current state (or only for a short time). This is necessary
to prevent conflicts with asynchronous updates to the client worklist, e.g. while iterating
over the returned list.
TODO: Examine if it is feasible that the internal worklist only returns an unmodifiable view.
Maybe it has to be a copy, too. Maybe offer both.
java.util.List<T> getWorklistItemGroup(java.util.UUID groupId)
null will be returned.groupId - The ID of the item group.null if the
designated group does not exist.boolean getAggregateGroups()
getWorklistItems().getWorklistItems().void setAggregateGroups(boolean aggregate)
getWorklistItems(). Note that changing
this may require some time since the implementation needs to restructure the items.aggregate - Whether this worklist aggregates all worklist groups and returns only the
grouping items instead of the actual (flat) worklist items in
getWorklistItems().java.util.List<T> getWorklistItemsFlat(boolean includeGroupingItems)
getWorklistItems() in that
this method ignores aggregation and returns the items flat independent from whether this
worklist aggregates or not. When excluding grouping items,
the returned result is equal to getWorklistItems() when not aggregating.includeGroupingItems - Whether to include the grouping items, that are, the worklist items
that are only for grouping purpose.boolean equals(java.lang.Object obj)
Object.hashCode() must be implemented accordingly.
equals in class java.lang.Objectobj - the reference object with which to compare.int hashCode()
Object.equals(Object) one also needs to override
Object.hashCode().hashCode in class java.lang.Objectstatic boolean equals(Worklist<?> me, java.lang.Object obj)
me - The object on which to call equals(Object).obj - The object with which to compare the current/other object.Worklist
and have the same ID.