public interface ClientWorklist extends Worklist<ClientWorklistItem>, java.io.Serializable
ClientWorklistItems.
Additionally to the methods inherited from Worklist this interface
provides a method for updating the worklist based on a WorklistUpdate
and a method to retrieve its configuration.
The client worklist also offers a client-side listener mechanism to get notified when the client worklist gets updated, for both pushed and pulled updates. This is useful e.g. to trigger a GUI refresh.
The configuration is specified when
requesting the list. To change the configuration it's usually necessary to
re-request the ClientWorklist. See
WorklistUpdateManager.createClientWorklist(de.aristaflow.adept2.base.sessionmanagement.SessionToken, UUID, WorklistUpdateConfiguration, boolean)
for information on what has to be considered when doing this.
See Worklist for more information about the relationship between
InternalWorklist and ClientWorklist.
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
ID for serialisation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWorklistListener(ClientWorklistListener listener)
Registers the given listener to be notified about updates to the contents
of this client worklist object.
|
static boolean |
equals(ClientWorklist me,
java.lang.Object obj)
Implements equality on
ClientWorklists. |
QualifiedAgent |
getAgent()
The agent this worklist belongs to.
|
long |
getClientWorklistId()
Gets the ID of this client worklist.
|
java.util.UUID |
getID()
The system-wide unique ID of this worklist.
|
ClientWorklistListener[] |
getWorklistListeners()
Returns the list of registered listeners that are notified about updates to
the contents of this client worklist.
|
WorklistUpdateConfiguration |
getWorklistUpdateConfiguration()
Get the configuration of the worklist (e. g. the update mode).
|
int |
hashCode()
When overriding
Object.equals(Object) one also needs to override
Object.hashCode(). |
void |
removeWorklistListener(ClientWorklistListener listener)
Deregisters the given listener from being notified about updates to the
contents of this client worklist.
|
void |
updateWorklist(WorklistUpdate update)
Updates the worklist with the designated update-instance.
|
void |
updateWorklistIncrementally(java.util.UUID worklistId,
WorklistRevision srcRevision,
long trgtRevision,
int maxPriority,
IncrementalWorklistUpdate update)
Updates the worklist with the designated incremental worklist update.
|
equals, equals, getAggregateGroups, getGroupingWorklistItem, getRevision, getWorklistItem, getWorklistItemGroup, getWorklistItems, getWorklistItemsFlat, setAggregateGroupsgetUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValuestatic final long serialVersionUID
java.util.UUID getID()
Immutable.getID in interface Worklist<ClientWorklistItem>long getClientWorklistId()
QualifiedAgent getAgent()
Immutable.getAgent in interface Worklist<ClientWorklistItem>WorklistUpdateConfiguration getWorklistUpdateConfiguration()
void updateWorklist(WorklistUpdate update)
An update with source revision update count
0 indicates that the client worklist should discard all items
since the update contains the whole worklist.
This method is either called by the server (PUSH) or manually by the client (PULL).
This method also supports incremental worklist updates. Implementors have to ensured that the incremental worklist update is dropped after use.
null as update indicates that this client worklist has been
deregistered and does not receive updates any more.
update - An update-instance containing all changes of the worklist
since the last revision was sent. This will be null
to indicate that this client worklist has been deregistered and
does not receive updates any more.java.lang.IllegalArgumentException - if the worklist ID in the update doesn't
match this worklist's IDjava.lang.IllegalStateException - if the old revision in the update doesn't
match this worklist's current revisionWorklistUpdateConfiguration,
IncrementalWorklistvoid updateWorklistIncrementally(java.util.UUID worklistId,
WorklistRevision srcRevision,
long trgtRevision,
int maxPriority,
IncrementalWorklistUpdate update)
updateWorklist(WorklistUpdate) except that the updates are not transfered completely
but transferred as requested. The additional parameters are redundant to the attributes of the
incremental worklist update. This avoids communication by not needing to retrieve the values
from the (remote) incremental worklist update.
For push updates this method may be called instead of updateWorklist(WorklistUpdate).
So implementors must not rely on updateWorklist(WorklistUpdate) being called for push
updates. Do not forget to drop the incremental worklist update in implementations.
worklistId - The ID of the worklist for which this update is intended.srcRevision - The source revision, i.e. the initialisation date of the worklist to which
this update can be applied as well as the update count.trgtRevision - The target revision, i.e. the new revision the client worklist will have
after applying this update.maxPriority - The highest priority of all items of this update.update - An update-instance containing all changes of the worklist since the last revision
was sent. This will never be null. If the update should be
null, updateWorklist(WorklistUpdate) will be used.java.lang.IllegalArgumentException - If the worklist ID in the update does not match this
worklist's ID, an IllegalArgumentException will be thrown.java.lang.IllegalStateException - If the old revision in the update does not match this worklist's
current revision, an IllegalStateException will be thrown.updateWorklist(WorklistUpdate)void addWorklistListener(ClientWorklistListener listener)
updateWorklist(WorklistUpdate) (invoked either during a manual
update or by the server via remote communication). The listener mechanism
is useful e.g. to trigger a GUI refresh.
If the listener is already registered, this method does nothing.
listener - The listener to be notified about updates to the contents
of this client worklist.void removeWorklistListener(ClientWorklistListener listener)
listener - The listener to be deregistered from being notified about
updates to the contents of this client worklist.ClientWorklistListener[] getWorklistListeners()
int hashCode()
Object.equals(Object) one also needs to override
Object.hashCode().
Additionally marked as Immutable and as replacement for Object.hashCode(). Object.hashCode()
instead of this method even if the proxy is defined on ClientWorklist.hashCode in interface Worklist<ClientWorklistItem>hashCode in class java.lang.Objectstatic boolean equals(ClientWorklist me, java.lang.Object obj)
ClientWorklists. This is both objects implement
ClientWorklists, having the same ID as well as the same
client worklist ID.
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.
me - The object on which to call Worklist.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.ClientWorklist have the same ID and the same
client worklist ID.