Interface DispositionService
-
- All Known Implementing Classes:
DispositionServiceImpl
public interface DispositionService
Disposition service interface.- Since:
- 2.0
- Author:
- Roy Wetherall
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DispositionActionDefinition
addDispositionActionDefinition(DispositionSchedule schedule, Map<QName,Serializable> actionDefinitionParams)
Adds a new disposition action definition to the given disposition schedule.Date
calculateAsOfDate(NodeRef nodeRef, DispositionActionDefinition dispositionActionDefinition)
Compute the "disposition as of" date (if necessary) for a disposition action and a node.DispositionSchedule
createDispositionSchedule(NodeRef recordCategory, Map<QName,Serializable> props)
Creates a disposition schedule on the given record category.void
cutoffDisposableItem(NodeRef nodeRef)
Marks the disposable item (record or record folder) as cut off, calculating the cut off dateDispositionSchedule
getAssociatedDispositionSchedule(NodeRef nodeRef)
Get the disposition schedule directly associated with the node specified.NodeRef
getAssociatedRecordsManagementContainer(DispositionSchedule dispositionSchedule)
Gets the records management container that is directly associated with the disposition schedule.List<DispositionAction>
getCompletedDispositionActions(NodeRef nodeRef)
Gets a list of all the completed disposition action in the order they occured.List<NodeRef>
getDisposableItems(DispositionSchedule dispositionSchedule)
Gets a list of all the disposable items (records, record folders) that are under the control of the disposition schedule.Date
getDispositionActionDate(NodeRef record, NodeRef dispositionSchedule, String dispositionActionName)
Gets date of the disposition action for the given disposition schedule with the given action nameCollection<DispositionProperty>
getDispositionProperties()
Collection<DispositionProperty>
getDispositionProperties(boolean isRecordLevel, String dispositionAction)
Returns the list of disposition period properties that apply given the context provided.DispositionSchedule
getDispositionSchedule(NodeRef nodeRef)
Get the disposition schedule for a given record management node.DispositionAction
getLastCompletedDispostionAction(NodeRef nodeRef)
Helper method to get the last completed disposition action.DispositionAction
getNextDispositionAction(NodeRef nodeRef)
Gets the next disposition action for a given nodeDispositionSchedule
getOriginDispositionSchedule(NodeRef nodeRef)
Gets the origin disposition schedule for the record, not the calculated one in case of multiple dispositions applied to recordboolean
hasDisposableItems(DispositionSchedule dispositionSchdule)
Indicates whether a disposition schedule has any disposable items under its managementboolean
isDisposableItem(NodeRef nodeRef)
Indicates whether the node is a disposable item or not (ie is under the control of a disposition schedule)boolean
isDisposableItemCutoff(NodeRef nodeRef)
Indicates whether the disposable item (records, record folders) is cutoff or not.boolean
isNextDispositionActionEligible(NodeRef nodeRef)
Indicates whether the next disposition action is eligible or not.void
recalculateNextDispositionStep(NodeRef record)
Updates disposition action step when linking or unlinking the given record to/from a record foldervoid
refreshDispositionAction(NodeRef nodeRef)
Refreshes the disposition action details of the given node.void
registerDispositionProperty(DispositionProperty dispositionProperty)
Register a disposition property.void
removeDispositionActionDefinition(DispositionSchedule schedule, DispositionActionDefinition actionDefinition)
Removes the given disposition action definition from the given disposition schedule.DispositionActionDefinition
updateDispositionActionDefinition(DispositionActionDefinition actionDefinition, Map<QName,Serializable> actionDefinitionParams)
Updates the given disposition action definition belonging to the given disposition schedule.void
updateNextDispositionAction(NodeRef nodeRef)
Updates the next disposition actionvoid
updateNextDispositionAction(NodeRef nodeRef, DispositionSchedule dispositionSchedule)
Updates the next disposition action
-
-
-
Method Detail
-
registerDispositionProperty
void registerDispositionProperty(DispositionProperty dispositionProperty)
Register a disposition property.- Parameters:
dispositionProperty
- disposition property
-
getDispositionProperties
Collection<DispositionProperty> getDispositionProperties(boolean isRecordLevel, String dispositionAction)
Returns the list of disposition period properties that apply given the context provided.- Returns:
- filtered list of disposition period properties
-
getDispositionProperties
Collection<DispositionProperty> getDispositionProperties()
-
getDispositionSchedule
DispositionSchedule getDispositionSchedule(NodeRef nodeRef)
Get the disposition schedule for a given record management node. Traverses the hierarchy to find the first disposition schedule in the primary hierarchy.- Parameters:
nodeRef
- node reference to record category, record folder or record- Returns:
DispositionSchedule
disposition schedule
-
getAssociatedDispositionSchedule
DispositionSchedule getAssociatedDispositionSchedule(NodeRef nodeRef)
Get the disposition schedule directly associated with the node specified. Returns null if none.- Parameters:
nodeRef
- node reference- Returns:
DispositionSchedule
disposition schedule directly associated with the node reference, null if none
-
getAssociatedRecordsManagementContainer
NodeRef getAssociatedRecordsManagementContainer(DispositionSchedule dispositionSchedule)
Gets the records management container that is directly associated with the disposition schedule.- Parameters:
dispositionSchedule
- disposition schedule- Returns:
NodeRef
node reference of the associated container
-
hasDisposableItems
boolean hasDisposableItems(DispositionSchedule dispositionSchdule)
Indicates whether a disposition schedule has any disposable items under its management- Parameters:
dispositionSchdule
- disposition schedule- Returns:
- boolean true if there are disposable items being managed by, false otherwise
-
getDisposableItems
List<NodeRef> getDisposableItems(DispositionSchedule dispositionSchedule)
Gets a list of all the disposable items (records, record folders) that are under the control of the disposition schedule.
-
isDisposableItem
boolean isDisposableItem(NodeRef nodeRef)
Indicates whether the node is a disposable item or not (ie is under the control of a disposition schedule)- Parameters:
nodeRef
- node reference- Returns:
- boolean true if node is a disposable item, false otherwise
-
createDispositionSchedule
DispositionSchedule createDispositionSchedule(NodeRef recordCategory, Map<QName,Serializable> props)
Creates a disposition schedule on the given record category.- Parameters:
recordCategory
-props
-- Returns:
DispositionSchedule
-
addDispositionActionDefinition
DispositionActionDefinition addDispositionActionDefinition(DispositionSchedule schedule, Map<QName,Serializable> actionDefinitionParams)
Adds a new disposition action definition to the given disposition schedule.- Parameters:
schedule
- The DispositionSchedule to add toactionDefinitionParams
- Map of parameters to use to create the action definition
-
removeDispositionActionDefinition
void removeDispositionActionDefinition(DispositionSchedule schedule, DispositionActionDefinition actionDefinition)
Removes the given disposition action definition from the given disposition schedule.- Parameters:
schedule
- The DispositionSchedule to remove fromactionDefinition
- The DispositionActionDefinition to remove
-
updateDispositionActionDefinition
DispositionActionDefinition updateDispositionActionDefinition(DispositionActionDefinition actionDefinition, Map<QName,Serializable> actionDefinitionParams)
Updates the given disposition action definition belonging to the given disposition schedule.- Parameters:
actionDefinition
- The DispositionActionDefinition to updateactionDefinitionParams
- Map of parameters to use to update the action definition- Returns:
- The updated DispositionActionDefinition
-
isNextDispositionActionEligible
boolean isNextDispositionActionEligible(NodeRef nodeRef)
Indicates whether the next disposition action is eligible or not.- Parameters:
nodeRef
- node reference to disposable item- Returns:
- boolean true if next disposition action is eligible, false otherwise
-
getNextDispositionAction
DispositionAction getNextDispositionAction(NodeRef nodeRef)
Gets the next disposition action for a given node- Parameters:
nodeRef
- node reference to disposable item- Returns:
- DispositionAction next disposition action, null if none
-
getCompletedDispositionActions
List<DispositionAction> getCompletedDispositionActions(NodeRef nodeRef)
Gets a list of all the completed disposition action in the order they occured.- Parameters:
nodeRef
- record/record folder- Returns:
- List
list of completed disposition actions
-
getLastCompletedDispostionAction
DispositionAction getLastCompletedDispostionAction(NodeRef nodeRef)
Helper method to get the last completed disposition action. Returns null if there is none.- Parameters:
nodeRef
- record/record folder- Returns:
- DispositionAction last completed disposition action, null if none
-
isDisposableItemCutoff
boolean isDisposableItemCutoff(NodeRef nodeRef)
Indicates whether the disposable item (records, record folders) is cutoff or not.- Parameters:
nodeRef
- node reference- Returns:
- boolean true if the disposable item is cutoff, false otherwise
- Since:
- 2.0
-
cutoffDisposableItem
void cutoffDisposableItem(NodeRef nodeRef)
Marks the disposable item (record or record folder) as cut off, calculating the cut off date- Parameters:
nodeRef
- node reference- Since:
- 2.2
-
updateNextDispositionAction
void updateNextDispositionAction(NodeRef nodeRef)
Updates the next disposition action- Parameters:
nodeRef
- node reference
-
updateNextDispositionAction
void updateNextDispositionAction(NodeRef nodeRef, DispositionSchedule dispositionSchedule)
Updates the next disposition action- Parameters:
nodeRef
- node referencedispositionSchedule
- the schedule to be applied
-
refreshDispositionAction
void refreshDispositionAction(NodeRef nodeRef)
Refreshes the disposition action details of the given node.- Parameters:
nodeRef
- node reference
-
getDispositionActionDate
Date getDispositionActionDate(NodeRef record, NodeRef dispositionSchedule, String dispositionActionName)
Gets date of the disposition action for the given disposition schedule with the given action name- Parameters:
record
-dispositionSchedule
- nodeRefdispositionActionName
-- Returns:
- date
-
calculateAsOfDate
Date calculateAsOfDate(NodeRef nodeRef, DispositionActionDefinition dispositionActionDefinition)
Compute the "disposition as of" date (if necessary) for a disposition action and a node.- Parameters:
nodeRef
- The node which the schedule applies to.dispositionActionDefinition
- The definition of the disposition action.- Returns:
- The new "disposition as of" date.
-
getOriginDispositionSchedule
DispositionSchedule getOriginDispositionSchedule(NodeRef nodeRef)
Gets the origin disposition schedule for the record, not the calculated one in case of multiple dispositions applied to record- Parameters:
nodeRef
- record- Returns:
- the initial disposition
-
recalculateNextDispositionStep
void recalculateNextDispositionStep(NodeRef record)
Updates disposition action step when linking or unlinking the given record to/from a record folder- Parameters:
record
-
-
-