Interface InternalWorklist<T extends InternalWorklistItem>
- Type Parameters:
T- theInternalWorklistonly holdsInternalWorklistItems and subtypes thereof.
- All Superinterfaces:
UserAttributeContainer,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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddUpdateableClientWorklist(ClientWorklist clientWorklist) Adds the given client worklist as recipient for push updates.booleanaddWorklistItem(T item) Adds a worklist item (subtype of) to this worklist.InternalWorklistItemlongGets the date (as long) from which on the agent of this internal worklist is absent.longGets the date (as long) until the agent of this internal worklist is absent.longGets the next ID for the client worklist of this internal worklist.longgetNextClientWorklistId(boolean inc) Gets the next ID for the client worklist of this internal worklist only optionally increasing the internal count.If absence information is set for this worklist, this method will return either a valid substitution rule ornullfor an absence without substitution.Returns all client worklists that are registered as recipient for push updates.getUpdates(long sinceRevision, Filter worklistFilter) Returns all updates since the given revision of this worklist.booleanReturns whether the owning agent of this worklist is present at this moment, based on thecurrent timeand theprovided absence information.voidremoveUpdateableClientWorklist(long clientWorklistID) Removes the given client worklist as recipient for push updatesvoidremoveUpdateableClientWorklist(ClientWorklist clientWorklist) Removes the given client worklist as recipient for push updatesvoidremoveWorklistItem(T item) Removes a worklist item (subtype of) that is no longer in this worklist.InternalWorklistItemvoidSets the absence of the agent of this internal worklist for the designated time.voidDisables the absence of the agent of this internal worklist.voidupdateIndividualSettings(ClientWorklistItem clientWorklistItem) Updates the individual item settings by taking them from the given client worklist item.voidupdateWorklistItem(T item) Updates a worklist item (subtype of) already managed by this worklist.InternalWorklistItemMethods inherited from interface de.aristaflow.adept2.model.common.UserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValueMethods inherited from interface de.aristaflow.adept2.model.worklistmodel.Worklist
equals, getAgent, getAggregateGroups, getGroupingWorklistItem, getID, getRevision, getWorklistItem, getWorklistItemGroup, getWorklistItems, getWorklistItemsFlat, hashCode, setAggregateGroups
-
Method Details
-
addWorklistItem
Adds a worklist item (subtype of) to this worklist. The revision will be increased byInternalWorklistItem1and the change will be recorded in order to make it available throughgetUpdates(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.- Parameters:
item- The worklist item to add.- Returns:
- Whether the worklist item has been really added to this worklist. It will not be added (again) if it is already on this worklist.
-
updateWorklistItem
Updates a worklist item (subtype of) already managed by this worklist. The revision will be increased byInternalWorklistItem1and the change will be recorded in order to make it available throughgetUpdates(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.- Parameters:
item- The worklist item to update.
-
removeWorklistItem
Removes a worklist item (subtype of) that is no longer in this worklist. The revision will be increased byInternalWorklistItem1and the change will be recorded in order to make it available throughgetUpdates(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.- Parameters:
item- The worklist item to remove.
-
updateIndividualSettings
Updates the individual item settings by taking them from the given client worklist item.- Parameters:
clientWorklistItem- the client worklist item to read the individual settings from
-
getNextClientWorklistId
long getNextClientWorklistId()Gets the next ID for the client worklist of this internal worklist.- Returns:
- The next ID for the client worklist of this internal worklist.
-
getNextClientWorklistId
long getNextClientWorklistId(boolean inc) Gets the next ID for the client worklist of this internal worklist only optionally increasing the internal count. Only use this for storing the internal worklist but not for creating new client worklists!- Parameters:
inc- Whether to increase the internal count for client worklist IDs.- Returns:
- The next ID for the client worklist of this internal worklist.
-
addUpdateableClientWorklist
Adds the given client worklist as recipient for push updates.- Parameters:
clientWorklist- The client worklist as recipient for push updates.
-
removeUpdateableClientWorklist
Removes the given client worklist as recipient for push updates- Parameters:
clientWorklist- The client worklist to be removed.
-
removeUpdateableClientWorklist
void removeUpdateableClientWorklist(long clientWorklistID) Removes the given client worklist as recipient for push updates- Parameters:
clientWorklistID- The client worklist to be removed.
-
getUpdateableClientWorklists
Map<Long,ClientWorklist> getUpdateableClientWorklists()Returns all client worklists that are registered as recipient for push updates.- Returns:
- All client worklists that are registered as recipient for push updates.
-
getUpdates
Returns all updates since the given revision of this worklist.
If no updates have been made (i.e. the given revision equals thisworklist's current revision (update count)) an emptyWorklistUpdate-instance is returned.
If the "since" revision is no longer available, aWorklistUpdatewith the source revision0is returned, containing all worklist items with theWorklistItemUpdateStateWorklistConstants.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.- Parameters:
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 ofClientWorklists- Returns:
- A
WorklistUpdatecontaining all update information since the designated revision or a full update with source revision0in case that information is no longer available. - See Also:
-
getSubstitutionRule
String getSubstitutionRule()If absence information is set for this worklist, this method will return either a valid substitution rule ornullfor 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. UseisPresentNow()instead.- Returns:
- A valid substitution rule if absence information is set,
nullif absence is set without substitution and an empty string otherwise if no absence is set. - See Also:
-
setAbsent
Sets the absence of the agent of this internal worklist for the designated time. If a worklist item is to be added to worklists which are all absent, the corresponding substitution rules apply and add the item accordingly. Usenullfor the rule indicates no substitutes. This is useful for longterm absence.- Parameters:
from- The absolutedatefrom which on the agent is absent. 0 means from now on.to- The absolutedateuntil the agent is absent. 0 means the end date is not known and it will last untilsetPresent().substitutionRule- The rule which qualifies the substituting agents. If this isnullor the empty string, the agent will not have a substitute for this absence.
-
getAbsenceFromDate
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. To determine whether the agent is currently present callisPresentNow().- Returns:
- The date as long from which the agent of this internal worklist is absent, 0 for "already absent", a negative number for a present agent.
-
getAbsenceToDate
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. To determine whether the agent is currently present callisPresentNow().- Returns:
- The date as long until the agent of this internal worklist is absent, 0 for indefinitely, a negative number for a present agent.
-
setPresent
void setPresent()Disables the absence of the agent of this internal worklist. -
isPresentNow
boolean isPresentNow()Returns whether the owning agent of this worklist is present at this moment, based on thecurrent timeand theprovided absence information.- Returns:
- whether the owning agent of this worklist is present at this moment
-