@ServerSideProxyAllow public interface IncrementalWorklistUpdate extends WorklistUpdate
drop this worklist update after use to release the resources.
After an incremental worklist update has been dropped, all
data retrieving methods including the one from the super-interface will throw
an IllegalArgumentException on server side and a all methods
will throw a ServiceConnectionException on client side.
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Generated ID for serialisation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
drop()
Explicitly drops this worklist update which allows to release occupied
memory and resources.
|
java.util.Collection<WorklistItemUpdate<ClientWorklistItem>> |
getAll()
Returns all updates, i.e. the differences from the source revision up to
(and including) the target revision.
|
int |
getMaxPriority()
Returns the highest priority of this update, that is the highest priority
of all items of this update.
|
java.util.List<WorklistItemUpdate<ClientWorklistItem>> |
getNext(int count)
Gets the next specified amount of worklist item updates of this incremental
worklist update.
|
WorklistRevision |
getSourceRevision()
Gets the source revision, i.e. the worklist revision (initialisation date and update count) to
which this update can be applied.
|
long |
getTargetRevision()
Returns the target revision, i.e. the new revision (update count) the client worklist will have
after applying this update.
|
java.util.UUID |
getWorklistID()
The ID of the worklist for which this update is intended.
|
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValuestatic final long serialVersionUID
java.util.UUID getWorklistID()
Immutable.getWorklistID in interface WorklistUpdateWorklistRevision getSourceRevision()
source revision up to (and including) the
target revision (update count).
Additionally marked as Immutable.getSourceRevision in interface WorklistUpdatelong getTargetRevision()
The update contains all changes that have been made to the worklist since the
source revision (update count) up to (and including) the
target revision.
Like the source revision the target revision refers to the
initialisation date of the worklist.
Additionally marked as Immutable.
getTargetRevision in interface WorklistUpdateint getMaxPriority()
WorklistConstants.Priority.NORMAL.
Additionally marked as Immutable.getMaxPriority in interface WorklistUpdatejava.util.Collection<WorklistItemUpdate<ClientWorklistItem>> getAll()
The returned collection is unmodifiable.
When compiling the individual recorded updates into a worklist update, the
case when there are multiple recorded updates for the same worklist item
(i.e. same ID, not necessarily same state) needs special attention. In this
case the recorded updates need to be compressed, since a worklist update
may only contain one update per worklist item. It is assumed, that every
revision only contains one added, removed or changed worklist item. To
compress these individual updates, only the first (since the source
revision) and the last recorded update of a certain worklist item need to
be considered: The state of the client worklist item (which is the key of
the map), is the state at the time of its last update.
The WorklistConstants.WorklistItemUpdateType (which is the value in the map) is
determined by looking at the type of the first and the last recorded update
for that item. The following shows the relevant combinations and their
results.
| type of first recorded update | type of last recorded update | resulting update type |
|---|---|---|
| ADDED | CHANGED | ADDED |
| ADDED | REMOVED | omit (NOTHING) |
| ADDED | ADDED_OR_CHANGED | ADDED |
| ADDED | REMOVED_OR_NOTHING | omit (NOTHING) |
| CHANGED | CHANGED | CHANGED |
| CHANGED | REMOVED | REMOVED |
| CHANGED | ADDED_OR_CHANGED | CHANGED |
| CHANGED | REMOVED_OR_NOTHING | REMOVED |
| REMOVED | ADDED | CHANGED |
| REMOVED | ADDED_OR_CHANGED | CHANGED |
| REMOVED | REMOVED_OR_NOTHING | REMOVED |
| ADDED_OR_CHANGED | CHANGED | ADDED_OR_CHANGED |
| ADDED_OR_CHANGED | REMOVED | REMOVED_OR_NOTHING |
| ADDED_OR_CHANGED | ADDED_OR_CHANGED | ADDED_OR_CHANGED |
| ADDED_OR_CHANGED | REMOVED_OR_NOTHING | REMOVED_OR_NOTHING |
| REMOVED_OR_NOTHING | ADDED | ADDED_OR_CHANGED |
| REMOVED_OR_NOTHING | ADDED_OR_CHANGED | ADDED_OR_CHANGED |
| REMOVED_OR_NOTHING | REMOVED_OR_NOTHING | REMOVED_OR_NOTHING |
dropped. You will not be able to use it again, that is,
every method will throw an IllegalStateException.getAll in interface WorklistUpdateServiceConnectionException - If this incremental worklist update has been dropped (explicitly or implicitly), a
ServiceConnectionException will be thrown on client
side.java.util.List<WorklistItemUpdate<ClientWorklistItem>> getNext(int count)
count - The amount of worklist item updates to retrieve. This has to
be > 0.null
will be returned.java.lang.IllegalArgumentException - If count is non-positive (<= 0), an
IllegalArgumentException will be thrown.java.lang.IllegalStateException - If this worklist update has been
dropped (explicitly or implicitly), an
IllegalStateException will be thrown.ServiceConnectionException - If this incremental worklist update has been dropped (explicitly or implicitly), a
ServiceConnectionException will be thrown on client
side.@ServerSideProxyRemove void drop()
getAll() once.
When retrieving incrementally, be sure to call this method afterwards to
release occupied memory and resources. ServiceConnectionException - If this incremental worklist update has been dropped (explicitly or implicitly), a
ServiceConnectionException will be thrown on client
side.