T - the InternalWorklist only holds
InternalWorklistItems and subtypes thereof.public interface InternalWorklist<T extends InternalWorklistItem> extends Worklist<T>
InternalWorklist, but
there may be an indefinite number of associated
client-side representations.
It offers methods to manipulate the list (i.e. add, change and remove items)
and manage references to client worklists that were registered for push
updates. Changes to the items of this list are recorded and can be retrieved
through getUpdates(long, Filter). The references to client
worklists are only managed; none of their methods are called by the internal
worklist.
See Worklist for more information about the relationship between
InternalWorklist and ClientWorklist.
| Modifier and Type | Method and Description |
|---|---|
void |
addUpdateableClientWorklist(ClientWorklist clientWorklist)
Adds the given client worklist as recipient for push updates.
|
boolean |
addWorklistItem(T item)
Adds a worklist item (subtype of
) to this worklist. |
long |
getAbsenceFromDate()
Gets the date (as long) from which on the agent of this internal worklist
is absent. 0 means the agent is already / with immediate effect absent, a
negative number indicates that the absence is not set, that is, the agent
is present.
|
long |
getAbsenceToDate()
Gets the date (as long) until the agent of this internal worklist is
absent. 0 means the agent is absent indefinitely, a negative number
indicates that the absence is not set, that is, the agent is present.
|
long |
getNextClientWorklistId()
Gets the next ID for the client worklist of this internal worklist.
|
long |
getNextClientWorklistId(boolean inc)
Gets the next ID for the client worklist of this internal worklist only optionally increasing
the internal count.
|
java.lang.String |
getSubstitutionRule()
If absence information is set for this worklist, this method will return either a valid
substitution rule or
null for an absence without substitution. |
java.util.Map<java.lang.Long,ClientWorklist> |
getUpdateableClientWorklists()
Returns all client worklists that are registered as recipient for push
updates.
|
WorklistUpdate |
getUpdates(long sinceRevision,
Filter worklistFilter)
Returns all updates since the given revision of this worklist.
|
boolean |
isPresentNow()
Returns whether the owning agent of this worklist is present at this
moment, based on the
current time and
the provided absence information. |
void |
removeUpdateableClientWorklist(ClientWorklist clientWorklist)
Removes the given client worklist as recipient for push updates
|
void |
removeUpdateableClientWorklist(long clientWorklistID)
Removes the given client worklist as recipient for push updates
|
void |
removeWorklistItem(T item)
Removes a worklist item (subtype of
) that is no longer in this
worklist. |
void |
setAbsent(long from,
long to,
java.lang.String substitutionRule)
Sets the absence of the agent of this internal worklist for the designated time.
|
void |
setPresent()
Disables the absence of the agent of this internal worklist.
|
void |
updateIndividualSettings(ClientWorklistItem clientWorklistItem)
Updates the individual item settings by taking them from the given client
worklist item.
|
void |
updateWorklistItem(T item)
Updates a worklist item (subtype of
) already managed by this
worklist. |
equals, equals, getAgent, getAggregateGroups, getGroupingWorklistItem, getID, getRevision, getWorklistItem, getWorklistItemGroup, getWorklistItems, getWorklistItemsFlat, hashCode, setAggregateGroupsgetUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValueboolean addWorklistItem(T item)
InternalWorklistItem) to this worklist.
The revision will be increased by 1 and the change will be recorded in order to make it
available through getUpdates(long, Filter).
Make sure to add grouping worklist items before items of the corresponding group.
Note to implementors:
If this worklist already contains the given item, the item should be updated instead and this
incident be properly logged, so it doesn't go unnoticed.
item - The worklist item to add.void updateWorklistItem(T item)
InternalWorklistItem) already managed by this
worklist. The revision will be increased by 1 and the change will
be recorded in order to make it available through getUpdates(long, Filter).
Note to implementors:
If this worklist doesn't contain the given item, the item should be added
instead and this incident be properly logged, so it doesn't go unnoticed.
item - The worklist item to update.void removeWorklistItem(T item)
InternalWorklistItem) that is no longer in this
worklist. The revision will be increased by 1 and the change
will be recorded in order to make it available through
getUpdates(long, Filter).
Make sure to remove grouping worklist items after items of the corresponding group.
Note to implementors:
If this worklist doesn't contain the given item, it should be ignored and
this incident be properly logged, so it doesn't go unnoticed.
item - The worklist item to remove.void updateIndividualSettings(ClientWorklistItem clientWorklistItem)
clientWorklistItem - the client worklist item to read the individual
settings fromlong getNextClientWorklistId()
long getNextClientWorklistId(boolean inc)
inc - Whether to increase the internal count for client worklist IDs.void addUpdateableClientWorklist(ClientWorklist clientWorklist)
clientWorklist - The client worklist as recipient for push updates.void removeUpdateableClientWorklist(ClientWorklist clientWorklist)
clientWorklist - The client worklist to be removed.void removeUpdateableClientWorklist(long clientWorklistID)
clientWorklistID - The client worklist to be removed.java.util.Map<java.lang.Long,ClientWorklist> getUpdateableClientWorklists()
WorklistUpdate getUpdates(long sinceRevision, Filter worklistFilter)
worklist's current revision (update count)) an empty
WorklistUpdate-instance is returned.WorklistUpdate
with the source revision 0 is returned, containing all worklist
items with the WorklistItemUpdateState
WorklistConstants.WorklistItemUpdateType.ADDED.
See WorklistUpdate.getAll() for more information on how to
determine the contents of a worklist update.
Whether the returned update also reflects changes while executing this method is determined by the implementation. In any case the update may never contain any inconsistent data, like incomplete revisions.
Optionally a filter on the worklist items may be specified. If the revision
is greater than 0, this filter must be the same that has been used to
retrieve previous updates. Otherwise this might result in an inconsistent
state of ClientWorklists.
sinceRevision - The revision from which all updates until the current
revision are to be retrieved.worklistFilter - the filter used on the worklist items; may be {code
null}; if the revision is greater than 0, this filter must be the
same that has been used to retrieve previous updates; otherwise
this might result in the inconsistent state of
ClientWorklistsWorklistUpdate containing all update information since the designated
revision or a full update with source revision 0 in case that information is no
longer available.ClientWorklist.updateWorklist(WorklistUpdate)java.lang.String getSubstitutionRule()
null for an absence without substitution. The empty string
will be returned if no absence is set. Do not use this property to determine whether the agent
is currently present. Use isPresentNow() instead.null if absence
is set without substitution and an empty string otherwise if no absence is set.setAbsent(long, long, String)void setAbsent(long from,
long to,
java.lang.String substitutionRule)
null for the rule indicates no
substitutes. This is useful for longterm absence.from - The absolute date from which on the agent is absent. 0 means
from now on.to - The absolute date until the agent is absent. 0 means the end
date is not known and it will last until setPresent().substitutionRule - The rule which qualifies the substituting agents. If this is
null or the empty string, the agent will not have a substitute for this
absence.long getAbsenceFromDate()
isPresentNow().long getAbsenceToDate()
isPresentNow().void setPresent()
boolean isPresentNow()
current time and
the provided absence information.