Interface IncrementalWorklist<T extends WorklistItem>
-
- Type Parameters:
T
- The type of the worklist items which are managed in the worklist.
- All Superinterfaces:
AutoCloseable
,Closeable
,de.aristaflow.adept2.model.communication.ServerSideProxy
,UserAttributeContainer
,Worklist<T>
public interface IncrementalWorklist<T extends WorklistItem> extends Worklist<T>, de.aristaflow.adept2.model.communication.ServerSideProxy
This interface extends the normal worklist by the means for incrementally retrieving worklist items. This reduces the initial data transferred to a client. However, such a worklist can not be updated but has to beclosed
and retrieved again. It is crucial to really close an incremental worklist since the occupy memory and resources, especially a client/server-connection.An incremental worklist will not be closed automatically; it has to be closed explicitly be the requesting component. After an incremental worklist has been
closed
, all data retrieving methods including the ones from the super-interface will throw anIllegalArgumentException
on server side and a all methods will throw aServiceConnectionException
on client side.Aggregating affects the worklist items and can therefore not change while iterating. It can change before an iteration takes place or as soon as the iteration reaches the first item in the list (again). However, an incremental worklist can ignore aggregation completely and return grouping items as well as group items (items being member of a group) at the same time. This is determined by
Worklist.getAggregateGroups()
.- See Also:
RemoteIterator
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
close()
Explicitly closes this incremental worklist which allows to release occupied memory and resources.default void
drop()
Deprecated, for removal: This API element is subject to removal in a future version.Useclose()
instead.static boolean
equals(Worklist<?> me, Object obj)
Implements equality onIncrementalWorklist
s which corresponds to the equality onWorklist
s except for implementingIncrementalWorklist
.UUID
getID()
The system-wide unique ID of this worklist.List<T>
getNext(int count)
Gets the next specified amount of worklist items of this incremental worklist.List<T>
getNext(int count, int start)
Gets the next specified amount of worklist items of this incremental worklist starting at the designated index (0-based).List<T>
getPrevious(int count)
Gets the previous specified amount of worklist items of this incremental worklist.boolean
getRespectAggregation()
Gets whether this incremental worklist respects aggregation, that is, depending on whether this worklist aggregates or not, either grouping items or group items will be returned but not both.int
hashCode()
When overridingObject.equals(Object)
one also needs to overrideObject.hashCode()
.-
Methods inherited from interface de.aristaflow.adept2.model.communication.ServerSideProxy
getRemainingAliveTime, keepAlive
-
Methods inherited from interface de.aristaflow.adept2.model.common.UserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValue
-
Methods inherited from interface de.aristaflow.adept2.model.worklistmodel.Worklist
equals, getAgent, getAggregateGroups, getGroupingWorklistItem, getRevision, getWorklistItem, getWorklistItemGroup, getWorklistItems, getWorklistItemsFlat, setAggregateGroups
-
-
-
-
Method Detail
-
getID
UUID getID()
The system-wide unique ID of this worklist. This ID is not necessarily persistent and may change between logons. Additionally marked asImmutable
.- Specified by:
getID
in interfaceWorklist<T extends WorklistItem>
- Returns:
- The ID of the worklist.
-
getRespectAggregation
boolean getRespectAggregation()
Gets whether this incremental worklist respects aggregation, that is, depending on whether this worklist aggregates or not, either grouping items or group items will be returned but not both. Per default, aggregation will not be respected and grouping items as well as group items will be returned.
For obvious reasons this cannot be changed while iterating.- Returns:
- Whether this incremental worklist respects aggregation and returns either grouping or group items.
-
getNext
List<T> getNext(int count)
Gets the next specified amount of worklist items of this incremental worklist.- Parameters:
count
- The amount of worklist items to retrieve in forward direction. This has to be > 0.- Returns:
- The next n worklist items of this incremental worklist, where n is the specified count.
In case of an insufficient amount of items less than the requested items will be
returned. If there are no more next elements,
null
will be returned. - Throws:
IllegalArgumentException
- If count is non-positive (<= 0), anIllegalArgumentException
will be thrown.IllegalStateException
- If this incremental worklist has beenclosed
(explicitly or implicitly), anIllegalStateException
will be thrown on server side.de.aristaflow.adept2.model.communication.ServiceConnectionException
- If this incremental worklist has beenclosed
(explicitly or implicitly), aServiceConnectionException
will be thrown on client side.
-
getNext
List<T> getNext(int count, int start)
Gets the next specified amount of worklist items of this incremental worklist starting at the designated index (0-based).
Afterwards the cursor to the current item will be set to the index start + count, that is,getNext(n)
will be the same as callinggetNext(n, start + count)
.- Parameters:
count
- The amount of worklist items to retrieve in forward direction. This has to be > 0.start
- The index of the worklist item from which to retrieve the next count elements. 0 is the index of the first element. This has to be >= 0 and it must not be bigger than the amounts of items in this incremental worklist.- Returns:
- The next n worklist items of this incremental worklist, where n is the specified count.
In case of an insufficient amount of items less than the requested items will be
returned. If there are no more next elements,
null
will be returned. - Throws:
IllegalArgumentException
- If count is non-positive (<= 0) or start is negative (< 0) or it refers to an index that is bigger than the amount of items of this incremental worklist, anIllegalArgumentException
will be thrown.IllegalStateException
- If this incremental worklist has beenclosed
(explicitly or implicitly), anIllegalStateException
will be thrown on server side.de.aristaflow.adept2.model.communication.ServiceConnectionException
- If this incremental worklist has beenclosed
(explicitly or implicitly), aServiceConnectionException
will be thrown on client side.
-
getPrevious
List<T> getPrevious(int count)
Gets the previous specified amount of worklist items of this incremental worklist.- Parameters:
count
- The amount of worklist items to retrieve in backward direction. This has to be > 0.- Returns:
- The previous n worklist items of this incremental worklist, where n is the specified
count. The order corresponds to the one in the underlying data structure, that is
previous items in the returned list are also previous items in the data structure. In
case of an insufficient amount of previous elements remaining only the available
elements will be returned. If there are no more previous elements,
null
will be returned. - Throws:
IllegalArgumentException
- If count is non-positive (<= 0), anIllegalArgumentException
will be thrown.IllegalStateException
- If this incremental worklist has beenclosed
(explicitly or implicitly), anIllegalStateException
will be thrown on server side.de.aristaflow.adept2.model.communication.ServiceConnectionException
- If this incremental worklist has beenclosed
(explicitly or implicitly), aServiceConnectionException
will be thrown on client side.
-
close
void close()
Explicitly closes this incremental worklist which allows to release occupied memory and resources. Closing has to be done explicitly as soon as the worklist is not used any more.
This method may be called several times. Implementors have to take care of this.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacede.aristaflow.adept2.model.communication.ServerSideProxy
- Throws:
de.aristaflow.adept2.model.communication.ServiceConnectionException
- If this incremental worklist has beenclosed
(explicitly or implicitly), aServiceConnectionException
will be thrown on client side.
-
drop
@Deprecated(since="15.0.0", forRemoval=true) default void drop()
Deprecated, for removal: This API element is subject to removal in a future version.Useclose()
instead.
-
hashCode
int hashCode()
When overridingObject.equals(Object)
one also needs to overrideObject.hashCode()
. Additionally marked asImmutable
and as replacement forObject.hashCode()
.
The explicit replacement is required since the proxy will callObject.hashCode()
instead of this method even if the proxy is defined onIncrementalWorklist
.
-
equals
static boolean equals(Worklist<?> me, Object obj)
Implements equality onIncrementalWorklist
s which corresponds to the equality onWorklist
s except for implementingIncrementalWorklist
.This method replaces
Object.equals(Object)
in a remote method call locally. Thus equality will be evaluated by the local proxy object using only properties which are immutable. So if the cached immutable values are present locally (in most cases), the equality will be evaluated without a remote call.- Parameters:
me
- The object on which to callWorklist.equals(Object)
. In case of a remote invocation, this will be the proxy object.obj
- The object with which to compare the current/other object.- Returns:
- Whether the designated objects are equal, that is, both implement
IncrementalWorklist
and have the same ID.
-
-