Class DispositionServiceImpl
java.lang.Object
org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
org.alfresco.module.org_alfresco_module_rm.disposition.DispositionServiceImpl
- All Implemented Interfaces:
DispositionService
,RecordsManagementCustomModel
,RecordsManagementModel
,RecordsManagementPolicies.OnFileRecord
,ClassPolicy
,Policy
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class DispositionServiceImpl
extends ServiceBaseImpl
implements DispositionService, RecordsManagementModel, RecordsManagementPolicies.OnFileRecord
Disposition service implementation.
- Author:
- Roy Wetherall
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Transaction mode for setting next actionNested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
Field Summary
Fields inherited from class org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
applicationContext, authenticationUtil, contentService, dictionaryService, nodeService, nodeTypeUtility, renditionService, transactionalResourceHelper
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementCustomModel
ASPECT_CUSTOM_ASSOCIATIONS, ASPECT_SUPPLEMENTAL_MARKING_LIST, CONSTRAINT_CUSTOM_SMLIST, CUSTOM_REF_CROSSREFERENCE, CUSTOM_REF_OBSOLETES, CUSTOM_REF_RENDITION, CUSTOM_REF_SUPERSEDES, CUSTOM_REF_SUPPORTS, CUSTOM_REF_VERSIONS, PROP_SUPPLEMENTAL_MARKING_LIST, RM_CUSTOM_MODEL, RM_CUSTOM_PREFIX, RM_CUSTOM_URI
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel
ASPECT_ARCHIVED, ASPECT_ASCENDED, ASPECT_CAVEAT_CONFIG_ROOT, ASPECT_COMMON_RECORD_DETAILS, ASPECT_COUNTABLE, ASPECT_CUSTOM_RM_DATA, ASPECT_CUT_OFF, ASPECT_DECLARED_RECORD, ASPECT_DISPOSITION_LIFECYCLE, ASPECT_DISPOSITION_PROCESSED, ASPECT_EMAIL_CONFIG_ROOT, ASPECT_EXTENDED_SECURITY, ASPECT_FILABLE, ASPECT_FILE_PLAN_COMPONENT, ASPECT_FROZEN, ASPECT_GHOSTED, ASPECT_HELD_CHILDREN, ASPECT_LOADED_DATA_SET_ID, ASPECT_RECORD, ASPECT_RECORD_COMPONENT_ID, ASPECT_RECORD_META_DATA, ASPECT_RECORD_ORIGINATING_DETAILS, ASPECT_RECORD_REJECTION_DETAILS, ASPECT_RECORDS_MANAGEMENT_ROOT, ASPECT_RM_SEARCH, ASPECT_SAVED_SEARCH, ASPECT_SCHEDULED, ASPECT_TRANSFERRED, ASPECT_TRANSFERRING, ASPECT_UNCUT_OFF, ASPECT_UNPUBLISHED_UPDATE, ASPECT_VERSIONED_RECORD, ASPECT_VITAL_RECORD, ASPECT_VITAL_RECORD_DEFINITION, ASSOC_CAVEAT_CONFIG, ASSOC_DISPOSITION_ACTION_DEFINITIONS, ASSOC_DISPOSITION_ACTION_HISTORY, ASSOC_DISPOSITION_SCHEDULE, ASSOC_EMAIL_CONFIG, ASSOC_EVENT_EXECUTIONS, ASSOC_FROZEN_CONTENT, ASSOC_FROZEN_RECORDS, ASSOC_HOLDS, ASSOC_NEXT_DISPOSITION_ACTION, ASSOC_TRANSFERRED, ASSOC_TRANSFERS, GL_URI, PROP_COMBINE_DISPOSITION_STEP_CONDITIONS, PROP_COUNT, PROP_CUT_OFF_DATE, PROP_DATE_FILED, PROP_DB_UNIQUENESS_ID, PROP_DECLARED_AT, PROP_DECLARED_BY, PROP_DISPOSITION_ACTION, PROP_DISPOSITION_ACTION_COMPLETED_AT, PROP_DISPOSITION_ACTION_COMPLETED_BY, PROP_DISPOSITION_ACTION_GHOST_ON_DESTROY, PROP_DISPOSITION_ACTION_ID, PROP_DISPOSITION_ACTION_NAME, PROP_DISPOSITION_ACTION_STARTED_AT, PROP_DISPOSITION_ACTION_STARTED_BY, PROP_DISPOSITION_AS_OF, PROP_DISPOSITION_AUTHORITY, PROP_DISPOSITION_DESCRIPTION, PROP_DISPOSITION_EVENT, PROP_DISPOSITION_EVENT_COMBINATION, PROP_DISPOSITION_EVENTS_ELIGIBLE, PROP_DISPOSITION_INSTRUCTIONS, PROP_DISPOSITION_LOCATION, PROP_DISPOSITION_PERIOD, PROP_DISPOSITION_PERIOD_PROPERTY, PROP_EVENT_EXECUTION_AUTOMATIC, PROP_EVENT_EXECUTION_COMPLETE, PROP_EVENT_EXECUTION_COMPLETED_AT, PROP_EVENT_EXECUTION_COMPLETED_BY, PROP_EVENT_EXECUTION_NAME, PROP_FROZEN_AT, PROP_FROZEN_BY, PROP_HELD_CHILDREN_COUNT, PROP_HOLD_REASON, PROP_IDENTIFIER, PROP_IS_CLOSED, PROP_LOADED_DATA_SET_IDS, PROP_LOCATION, PROP_MANUALLY_SET_AS_OF, PROP_ORIGIONAL_NAME, PROP_PUBLISH_IN_PROGRESS, PROP_READERS, PROP_RECORD_LEVEL_DISPOSITION, PROP_RECORD_ORIGINATING_CREATION_DATE, PROP_RECORD_ORIGINATING_LOCATION, PROP_RECORD_ORIGINATING_USER_ID, PROP_RECORD_REJECTION_DATE, PROP_RECORD_REJECTION_REASON, PROP_RECORD_REJECTION_USER_ID, PROP_REVIEW_AS_OF, PROP_REVIEW_PERIOD, PROP_ROOT_NODEREF, PROP_RS_DECLASSIFICATION_REVIEW_COMPLETED_AT, PROP_RS_DECLASSIFICATION_REVIEW_COMPLETED_BY, PROP_RS_DISPOITION_AUTHORITY, PROP_RS_DISPOITION_INSTRUCTIONS, PROP_RS_DISPOSITION_ACTION_AS_OF, PROP_RS_DISPOSITION_ACTION_NAME, PROP_RS_DISPOSITION_EVENTS, PROP_RS_DISPOSITION_EVENTS_ELIGIBLE, PROP_RS_DISPOSITION_PERIOD, PROP_RS_DISPOSITION_PERIOD_EXPRESSION, PROP_RS_HAS_DISPOITION_SCHEDULE, PROP_RS_HOLD_REASON, PROP_RS_VITAL_RECORD_REVIEW_PERIOD, PROP_RS_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION, PROP_TRANSFER_ACCESSION_INDICATOR, PROP_TRANSFER_LOCATION, PROP_TRANSFER_PDF_INDICATOR, PROP_UNPUBLISHED_UPDATE, PROP_UPDATE_TO, PROP_UPDATED_PROPERTIES, PROP_VITAL_RECORD_INDICATOR, PROP_WRITERS, RM_MODEL, RM_PREFIX, RM_URI, TYPE_CAVEAT_CONFIG, TYPE_DISPOSITION_ACTION, TYPE_DISPOSITION_ACTION_DEFINITION, TYPE_DISPOSITION_SCHEDULE, TYPE_EMAIL_CONFIG, TYPE_EVENT_EXECUTION, TYPE_FILE_PLAN, TYPE_HOLD, TYPE_HOLD_CONTAINER, TYPE_NON_ELECTRONIC_DOCUMENT, TYPE_RECORD_CATEGORY, TYPE_RECORD_FOLDER, TYPE_RECORDS_MANAGEMENT_CONTAINER, TYPE_RM_SITE, TYPE_TRANSFER, TYPE_TRANSFER_CONTAINER, TYPE_UNFILED_RECORD_CONTAINER, TYPE_UNFILED_RECORD_FOLDER, UPDATE_TO_DISPOSITION_ACTION_DEFINITION
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.OnFileRecord
QNAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDispositionActionDefinition
(DispositionSchedule schedule, Map<QName, Serializable> actionDefinitionParams) Adds a new disposition action definition to the given disposition schedule.calculateAsOfDate
(NodeRef nodeRef, DispositionActionDefinition dispositionActionDefinition) Compute the "disposition as of" date (if necessary) for a disposition action and a node.createDispositionSchedule
(NodeRef nodeRef, 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 dategetAssociatedDispositionSchedule
(NodeRef nodeRef) Get the disposition schedule directly associated with the node specified.getAssociatedRecordsManagementContainer
(DispositionSchedule dispositionSchedule) Gets the records management container that is directly associated with the disposition schedule.getCompletedDispositionActions
(NodeRef nodeRef) Gets a list of all the completed disposition action in the order they occured.getDisposableItems
(DispositionSchedule dispositionSchedule) Gets a list of all the disposable items (records, record folders) that are under the control of the disposition schedule.protected NextActionFromDisposition
Calculate next disposition action for a recordgetDispositionActionDate
(NodeRef record, NodeRef dispositionSchedule, String dispositionActionName) Gets date of the disposition action for the given disposition schedule with the given action namegetDispositionProperties
(boolean isRecordLevel, String dispositionAction) Returns the list of disposition period properties that apply given the context provided.getDispositionSchedule
(NodeRef nodeRef) Get the disposition schedule for a given record management node.getLastCompletedDispostionAction
(NodeRef nodeRef) Helper method to get the last completed disposition action.getNextDispositionAction
(NodeRef nodeRef) Gets the next disposition action for a given nodegetOriginDispositionSchedule
(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
onFileRecord
(NodeRef nodeRef) Behavior to initialize the disposition schedule of a newly filed record.void
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.void
setBehaviourFilter
(BehaviourFilter behaviourFilter) Set the behaviour filter.void
setDictionaryService
(DictionaryService dictionaryService) Set the dictionary servicevoid
setFilePlanService
(FilePlanService filePlanService) void
setNodeService
(NodeService nodeService) Set node servicevoid
setRecordFolderService
(RecordFolderService recordFolderService) void
setRecordService
(RecordService recordService) void
setRecordsManagementServiceRegistry
(RecordsManagementServiceRegistry serviceRegistry) Set the records management service registryvoid
setTransactionService
(TransactionService transactionService) 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 actionMethods inherited from class org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
getFilePlan, getFilePlanComponentKind, getFilePlanComponentKindFromType, getInternalNodeService, getNextCount, getTypeAndApsects, instanceOf, instanceOf, isDeclared, isFilePlan, isFilePlanComponent, isFilePlanContainer, isHold, isRecord, isRecordCategory, isRecordFolder, isTransfer, isUnfiledRecordsContainer, setApplicationContext, setAuthenticationUtil, setContentService, setNodeTypeUtility, setRenditionService, setTransactionalResourceHelper
-
Constructor Details
-
DispositionServiceImpl
public DispositionServiceImpl()
-
-
Method Details
-
setNodeService
Set node service- Overrides:
setNodeService
in classServiceBaseImpl
- Parameters:
nodeService
- the node service
-
setDictionaryService
Set the dictionary service- Overrides:
setDictionaryService
in classServiceBaseImpl
- Parameters:
dictionaryService
- the dictionary service
-
setBehaviourFilter
Set the behaviour filter.- Parameters:
behaviourFilter
- the behaviour filter
-
setRecordsManagementServiceRegistry
Set the records management service registry- Parameters:
serviceRegistry
- records management registry service
-
setFilePlanService
- Parameters:
filePlanService
- file plan service
-
setRecordFolderService
- Parameters:
recordFolderService
- record folder service
-
setRecordService
- Parameters:
recordService
- record service
-
setTransactionService
- Parameters:
transactionService
- transaction service
-
onFileRecord
Behavior to initialize the disposition schedule of a newly filed record.- Specified by:
onFileRecord
in interfaceRecordsManagementPolicies.OnFileRecord
- Parameters:
nodeRef
- node reference- See Also:
-
refreshDispositionAction
Description copied from interface:DispositionService
Refreshes the disposition action details of the given node.- Specified by:
refreshDispositionAction
in interfaceDispositionService
- Parameters:
nodeRef
- node reference- See Also:
-
registerDispositionProperty
Description copied from interface:DispositionService
Register a disposition property.- Specified by:
registerDispositionProperty
in interfaceDispositionService
- Parameters:
dispositionProperty
- disposition property- See Also:
-
getDispositionProperties
public Collection<DispositionProperty> getDispositionProperties(boolean isRecordLevel, String dispositionAction) Description copied from interface:DispositionService
Returns the list of disposition period properties that apply given the context provided.- Specified by:
getDispositionProperties
in interfaceDispositionService
- Returns:
- filtered list of disposition period properties
- See Also:
-
getDispositionProperties
- Specified by:
getDispositionProperties
in interfaceDispositionService
- See Also:
-
getDispositionSchedule
Description copied from interface:DispositionService
Get the disposition schedule for a given record management node. Traverses the hierarchy to find the first disposition schedule in the primary hierarchy.- Specified by:
getDispositionSchedule
in interfaceDispositionService
- Parameters:
nodeRef
- node reference to record category, record folder or record- Returns:
DispositionSchedule
disposition schedule- See Also:
-
getOriginDispositionSchedule
Description copied from interface:DispositionService
Gets the origin disposition schedule for the record, not the calculated one in case of multiple dispositions applied to record- Specified by:
getOriginDispositionSchedule
in interfaceDispositionService
- Parameters:
nodeRef
- record- Returns:
- the initial disposition
-
getAssociatedDispositionSchedule
Description copied from interface:DispositionService
Get the disposition schedule directly associated with the node specified. Returns null if none.- Specified by:
getAssociatedDispositionSchedule
in interfaceDispositionService
- Parameters:
nodeRef
- node reference- Returns:
DispositionSchedule
disposition schedule directly associated with the node reference, null if none- See Also:
-
getAssociatedRecordsManagementContainer
Description copied from interface:DispositionService
Gets the records management container that is directly associated with the disposition schedule.- Specified by:
getAssociatedRecordsManagementContainer
in interfaceDispositionService
- Parameters:
dispositionSchedule
- disposition schedule- Returns:
NodeRef
node reference of the associated container- See Also:
-
hasDisposableItems
Description copied from interface:DispositionService
Indicates whether a disposition schedule has any disposable items under its management- Specified by:
hasDisposableItems
in interfaceDispositionService
- Parameters:
dispositionSchdule
- disposition schedule- Returns:
- boolean true if there are disposable items being managed by, false otherwise
- See Also:
-
getDisposableItems
Description copied from interface:DispositionService
Gets a list of all the disposable items (records, record folders) that are under the control of the disposition schedule.- Specified by:
getDisposableItems
in interfaceDispositionService
- Parameters:
dispositionSchedule
- disposition schedule- Returns:
List
<NodeRef
> list of disposable items- See Also:
-
isDisposableItem
Description copied from interface:DispositionService
Indicates whether the node is a disposable item or not (ie is under the control of a disposition schedule)- Specified by:
isDisposableItem
in interfaceDispositionService
- Parameters:
nodeRef
- node reference- Returns:
- boolean true if node is a disposable item, false otherwise
- See Also:
-
createDispositionSchedule
public DispositionSchedule createDispositionSchedule(NodeRef nodeRef, Map<QName, Serializable> props) Description copied from interface:DispositionService
Creates a disposition schedule on the given record category.- Specified by:
createDispositionSchedule
in interfaceDispositionService
- Returns:
DispositionSchedule
- See Also:
-
addDispositionActionDefinition
public DispositionActionDefinition addDispositionActionDefinition(DispositionSchedule schedule, Map<QName, Serializable> actionDefinitionParams) Description copied from interface:DispositionService
Adds a new disposition action definition to the given disposition schedule.- Specified by:
addDispositionActionDefinition
in interfaceDispositionService
- Parameters:
schedule
- The DispositionSchedule to add toactionDefinitionParams
- Map of parameters to use to create the action definition
-
removeDispositionActionDefinition
public void removeDispositionActionDefinition(DispositionSchedule schedule, DispositionActionDefinition actionDefinition) Description copied from interface:DispositionService
Removes the given disposition action definition from the given disposition schedule.- Specified by:
removeDispositionActionDefinition
in interfaceDispositionService
- Parameters:
schedule
- The DispositionSchedule to remove fromactionDefinition
- The DispositionActionDefinition to remove- See Also:
-
updateDispositionActionDefinition
public DispositionActionDefinition updateDispositionActionDefinition(DispositionActionDefinition actionDefinition, Map<QName, Serializable> actionDefinitionParams) Updates the given disposition action definition belonging to the given disposition schedule.- Specified by:
updateDispositionActionDefinition
in interfaceDispositionService
- Parameters:
actionDefinition
- The DispositionActionDefinition to updateactionDefinitionParams
- Map of parameters to use to update the action definition- Returns:
- The updated DispositionActionDefinition
-
calculateAsOfDate
public Date calculateAsOfDate(NodeRef nodeRef, DispositionActionDefinition dispositionActionDefinition) Compute the "disposition as of" date (if necessary) for a disposition action and a node.- Specified by:
calculateAsOfDate
in interfaceDispositionService
- Parameters:
nodeRef
- The node which the schedule applies to.dispositionActionDefinition
- The definition of the disposition action.- Returns:
- The new "disposition as of" date.
-
isNextDispositionActionEligible
Description copied from interface:DispositionService
Indicates whether the next disposition action is eligible or not.- Specified by:
isNextDispositionActionEligible
in interfaceDispositionService
- Parameters:
nodeRef
- node reference to disposable item- Returns:
- boolean true if next disposition action is eligible, false otherwise
- See Also:
-
getNextDispositionAction
Description copied from interface:DispositionService
Gets the next disposition action for a given node- Specified by:
getNextDispositionAction
in interfaceDispositionService
- Parameters:
nodeRef
- node reference to disposable item- Returns:
- DispositionAction next disposition action, null if none
- See Also:
-
getCompletedDispositionActions
Description copied from interface:DispositionService
Gets a list of all the completed disposition action in the order they occured.- Specified by:
getCompletedDispositionActions
in interfaceDispositionService
- Parameters:
nodeRef
- record/record folder- Returns:
- List
list of completed disposition actions - See Also:
-
getLastCompletedDispostionAction
Description copied from interface:DispositionService
Helper method to get the last completed disposition action. Returns null if there is none.- Specified by:
getLastCompletedDispostionAction
in interfaceDispositionService
- Parameters:
nodeRef
- record/record folder- Returns:
- DispositionAction last completed disposition action, null if none
- See Also:
-
isDisposableItemCutoff
Description copied from interface:DispositionService
Indicates whether the disposable item (records, record folders) is cutoff or not.- Specified by:
isDisposableItemCutoff
in interfaceDispositionService
- Parameters:
nodeRef
- node reference- Returns:
- boolean true if the disposable item is cutoff, false otherwise
- See Also:
-
updateNextDispositionAction
Description copied from interface:DispositionService
Updates the next disposition action- Specified by:
updateNextDispositionAction
in interfaceDispositionService
- Parameters:
nodeRef
- node reference- See Also:
-
updateNextDispositionAction
Description copied from interface:DispositionService
Updates the next disposition action- Specified by:
updateNextDispositionAction
in interfaceDispositionService
- Parameters:
nodeRef
- node referencedispositionSchedule
- the schedule to be applied- See Also:
-
cutoffDisposableItem
Description copied from interface:DispositionService
Marks the disposable item (record or record folder) as cut off, calculating the cut off date- Specified by:
cutoffDisposableItem
in interfaceDispositionService
- Parameters:
nodeRef
- node reference- See Also:
-
getDispositionActionDate
public Date getDispositionActionDate(NodeRef record, NodeRef dispositionSchedule, String dispositionActionName) Description copied from interface:DispositionService
Gets date of the disposition action for the given disposition schedule with the given action name- Specified by:
getDispositionActionDate
in interfaceDispositionService
dispositionSchedule
- nodeRef- Returns:
- date
-
recalculateNextDispositionStep
Description copied from interface:DispositionService
Updates disposition action step when linking or unlinking the given record to/from a record folder- Specified by:
recalculateNextDispositionStep
in interfaceDispositionService
-
getDispositionActionByNameForRecord
Calculate next disposition action for a record- Parameters:
record
-- Returns:
- next disposition action (name, date) and the disposition associated
-