Class HoldServiceImpl
- java.lang.Object
-
- org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
-
- org.alfresco.module.org_alfresco_module_rm.hold.HoldServiceImpl
-
- All Implemented Interfaces:
HoldService
,RecordsManagementCustomModel
,RecordsManagementModel
,NodeServicePolicies.BeforeDeleteNodePolicy
,ClassPolicy
,Policy
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class HoldServiceImpl extends ServiceBaseImpl implements HoldService, NodeServicePolicies.BeforeDeleteNodePolicy, RecordsManagementModel
Hold service implementation- Since:
- 2.2
- Author:
- Tuna Aksoy
-
-
Nested Class Summary
-
Nested 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.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAME
-
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
-
-
Constructor Summary
Constructors Constructor Description HoldServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToHold(NodeRef hold, List<NodeRef> nodeRefs)
Adds the items to the the given holdvoid
addToHold(NodeRef hold, NodeRef nodeRef)
Adds the item to the given holdvoid
addToHolds(List<NodeRef> holds, List<NodeRef> nodeRefs)
Adds the given items to the given list of holdsvoid
addToHolds(List<NodeRef> holds, NodeRef nodeRef)
Adds the item to the given list of holdsvoid
beforeDeleteNode(NodeRef hold)
Behaviour unfreezes node's that will no longer he held after delete.NodeRef
createHold(NodeRef filePlan, String name, String reason, String description)
Creates a hold with the given name, reason and description for the given file planvoid
deleteHold(NodeRef hold)
Deletes the holdList<NodeRef>
getHeld(NodeRef hold)
Gets the list of item node references which are in the given holdNodeRef
getHold(NodeRef filePlan, String name)
Gets the node reference for the hold with the given name in the given file planString
getHoldReason(NodeRef hold)
Gets the hold reason for the given hold node referenceList<NodeRef>
getHolds(NodeRef filePlan)
Gets the list of all the holds within the holds container in the given file planprotected PolicyComponent
getPolicyComponent()
Gets the policy component instanceList<NodeRef>
heldBy(NodeRef nodeRef, boolean includedInHold)
Gets the list of all the holds within the holds container for the given node referencevoid
init()
Initialise hold serviceprotected void
invokeBeforeAddToHold(NodeRef hold, NodeRef contentNodeRef)
Invoke beforeAddToHold policyprotected void
invokeBeforeCreateHold(NodeRef nodeRef, String name, String reason)
Invoke beforeCreateHold policyprotected void
invokeBeforeDeleteHold(NodeRef nodeRef)
Invoke beforeDeleteHold policyprotected void
invokeBeforeRemoveFromHold(NodeRef hold, NodeRef contentNodeRef)
Invoke beforeRemoveFromHold policyprotected void
invokeOnAddToHold(NodeRef hold, NodeRef contentNodeRef)
Invoke onAddToHold policyprotected void
invokeOnCreateHold(NodeRef nodeRef)
Invoke onCreateHold policyprotected void
invokeOnDeleteHold(String holdName, Set<QName> classQNames)
Invoke onDeleteHold policyprotected void
invokeOnRemoveFromHold(NodeRef hold, NodeRef contentNodeRef)
Invoke onRemoveFromHold policyvoid
removeFromAllHolds(List<NodeRef> nodeRefs)
Removes the given list ofNodeRef
s from all the holdsvoid
removeFromAllHolds(NodeRef nodeRef)
Removes the givenNodeRef
from all the holdsvoid
removeFromHold(NodeRef hold, List<NodeRef> nodeRefs)
Removes the given items from the given holdvoid
removeFromHold(NodeRef hold, NodeRef nodeRef)
Removes the record from the given holdvoid
removeFromHolds(List<NodeRef> holds, List<NodeRef> nodeRefs)
Removes the items from the given holdsvoid
removeFromHolds(List<NodeRef> holds, NodeRef nodeRef)
Removes the item from the given list of holdvoid
setCapabilityService(CapabilityService capabilityService)
void
setFilePlanService(FilePlanService filePlanService)
Set the file plan servicevoid
setHoldReason(NodeRef hold, String reason)
Sets the hold reasonvoid
setPermissionService(PermissionService permissionService)
Set the permission servicevoid
setPolicyComponent(PolicyComponent policyComponent)
Sets the policy component instancevoid
setRecordFolderService(RecordFolderService recordFolderService)
Set the record folder servicevoid
setRecordService(RecordService recordService)
Set the record service-
Methods 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, setDictionaryService, setNodeService, setNodeTypeUtility, setRenditionService, setTransactionalResourceHelper
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.module.org_alfresco_module_rm.hold.HoldService
isHold
-
-
-
-
Method Detail
-
setFilePlanService
public void setFilePlanService(FilePlanService filePlanService)
Set the file plan service- Parameters:
filePlanService
- the file plan service
-
setRecordService
public void setRecordService(RecordService recordService)
Set the record service- Parameters:
recordService
- the record service
-
setRecordFolderService
public void setRecordFolderService(RecordFolderService recordFolderService)
Set the record folder service- Parameters:
recordFolderService
- the record folder service
-
setPermissionService
public void setPermissionService(PermissionService permissionService)
Set the permission service- Parameters:
permissionService
- the permission services
-
setCapabilityService
public void setCapabilityService(CapabilityService capabilityService)
- Parameters:
capabilityService
- capability service
-
getPolicyComponent
protected PolicyComponent getPolicyComponent()
Gets the policy component instance- Returns:
- The policy component instance
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
Sets the policy component instance- Parameters:
policyComponent
- The policy component instance
-
init
public void init()
Initialise hold service
-
beforeDeleteNode
public void beforeDeleteNode(NodeRef hold)
Behaviour unfreezes node's that will no longer he held after delete.
-
getHolds
public List<NodeRef> getHolds(NodeRef filePlan)
Description copied from interface:HoldService
Gets the list of all the holds within the holds container in the given file plan- Specified by:
getHolds
in interfaceHoldService
- Parameters:
filePlan
- TheNodeRef
of the file plan- Returns:
- List of hold node references
- See Also:
HoldService.getHolds(org.alfresco.service.cmr.repository.NodeRef)
-
heldBy
public List<NodeRef> heldBy(NodeRef nodeRef, boolean includedInHold)
Description copied from interface:HoldService
Gets the list of all the holds within the holds container for the given node reference- Specified by:
heldBy
in interfaceHoldService
- Parameters:
nodeRef
- TheNodeRef
of the record / record folder /active contentincludedInHold
-true
to retrieve the list of hold node references which will include the node referencefalse
to get a list of node references which will not have the given node reference- Returns:
- List of hold node references
- See Also:
HoldService.heldBy(org.alfresco.service.cmr.repository.NodeRef, boolean)
-
getHold
public NodeRef getHold(NodeRef filePlan, String name)
Description copied from interface:HoldService
Gets the node reference for the hold with the given name in the given file plan- Specified by:
getHold
in interfaceHoldService
name
-String
The name of the hold- Returns:
NodeRef
of the hold with the given name- See Also:
HoldService.getHold(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
getHeld
public List<NodeRef> getHeld(NodeRef hold)
Description copied from interface:HoldService
Gets the list of item node references which are in the given hold- Specified by:
getHeld
in interfaceHoldService
- Parameters:
hold
-NodeRef
of the hold- Returns:
- Lost of item
NodeRef
s which are in the given hold - See Also:
HoldService.getHeld(org.alfresco.service.cmr.repository.NodeRef)
-
createHold
public NodeRef createHold(NodeRef filePlan, String name, String reason, String description)
Description copied from interface:HoldService
Creates a hold with the given name, reason and description for the given file plan- Specified by:
createHold
in interfaceHoldService
- Parameters:
filePlan
- TheNodeRef
of the file planname
-String
The name of the holdreason
-String
The reason of the holddescription
-String
The description of the hold- Returns:
- The
NodeRef
of the created hold - See Also:
HoldService.createHold(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String, java.lang.String)
-
getHoldReason
public String getHoldReason(NodeRef hold)
Description copied from interface:HoldService
Gets the hold reason for the given hold node reference- Specified by:
getHoldReason
in interfaceHoldService
- Parameters:
hold
- TheNodeRef
of the hold- Returns:
String
The reason of the hold- See Also:
HoldService.getHoldReason(org.alfresco.service.cmr.repository.NodeRef)
-
setHoldReason
public void setHoldReason(NodeRef hold, String reason)
Description copied from interface:HoldService
Sets the hold reason- Specified by:
setHoldReason
in interfaceHoldService
- Parameters:
hold
- TheNodeRef
of the holdreason
-String
The reason for the hold- See Also:
HoldService.setHoldReason(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
deleteHold
public void deleteHold(NodeRef hold)
Description copied from interface:HoldService
Deletes the hold- Specified by:
deleteHold
in interfaceHoldService
- Parameters:
hold
- TheNodeRef
of the hold- See Also:
HoldService.deleteHold(org.alfresco.service.cmr.repository.NodeRef)
-
addToHold
public void addToHold(NodeRef hold, NodeRef nodeRef)
Description copied from interface:HoldService
Adds the item to the given hold- Specified by:
addToHold
in interfaceHoldService
- Parameters:
hold
- TheNodeRef
of the holdnodeRef
- TheNodeRef
of the record / record folder / active content which will be added to the given hold- See Also:
HoldService.addToHold(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
-
addToHold
public void addToHold(NodeRef hold, List<NodeRef> nodeRefs)
Description copied from interface:HoldService
Adds the items to the the given hold- Specified by:
addToHold
in interfaceHoldService
- Parameters:
hold
- TheNodeRef
of the hold to which the items will be addednodeRefs
- The itemNodeRef
s which will be added to the hold- See Also:
HoldService.addToHold(org.alfresco.service.cmr.repository.NodeRef, java.util.List)
-
addToHolds
public void addToHolds(List<NodeRef> holds, NodeRef nodeRef)
Description copied from interface:HoldService
Adds the item to the given list of holds- Specified by:
addToHolds
in interfaceHoldService
- Parameters:
holds
- The list ofNodeRef
s of the holdsnodeRef
- TheNodeRef
of the record / record folder / active content which will be added to the given holds- See Also:
HoldService.addToHolds(java.util.List, org.alfresco.service.cmr.repository.NodeRef)
-
addToHolds
public void addToHolds(List<NodeRef> holds, List<NodeRef> nodeRefs)
Description copied from interface:HoldService
Adds the given items to the given list of holds- Specified by:
addToHolds
in interfaceHoldService
- Parameters:
holds
- List of holds to which the given items will be addednodeRefs
- The list of items which will be added to the given holds- See Also:
HoldService.addToHolds(java.util.List, java.util.List)
-
removeFromHold
public void removeFromHold(NodeRef hold, NodeRef nodeRef)
Description copied from interface:HoldService
Removes the record from the given hold- Specified by:
removeFromHold
in interfaceHoldService
- Parameters:
hold
- TheNodeRef
of the holdnodeRef
- TheNodeRef
of the record / record folder which will be removed from the given hold- See Also:
HoldService.removeFromHold(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
-
removeFromHold
public void removeFromHold(NodeRef hold, List<NodeRef> nodeRefs)
Description copied from interface:HoldService
Removes the given items from the given hold- Specified by:
removeFromHold
in interfaceHoldService
- Parameters:
hold
- The holdNodeRef
from which the given items will be removednodeRefs
- The list of items which will be removed from the given holds- See Also:
HoldService.removeFromHold(org.alfresco.service.cmr.repository.NodeRef, java.util.List)
-
removeFromHolds
public void removeFromHolds(List<NodeRef> holds, NodeRef nodeRef)
Description copied from interface:HoldService
Removes the item from the given list of hold- Specified by:
removeFromHolds
in interfaceHoldService
- Parameters:
holds
- The listNodeRef
s of the holdsnodeRef
- TheNodeRef
of the record / record folder which will be removed from the given holds- See Also:
HoldService.removeFromHolds(java.util.List, org.alfresco.service.cmr.repository.NodeRef)
-
removeFromHolds
public void removeFromHolds(List<NodeRef> holds, List<NodeRef> nodeRefs)
Description copied from interface:HoldService
Removes the items from the given holds- Specified by:
removeFromHolds
in interfaceHoldService
- Parameters:
holds
- List of holdNodeRef
s from which the items will be removednodeRefs
- List of itemNodeRef
s which will be removed from the given holds- See Also:
HoldService.removeFromHolds(java.util.List, java.util.List)
-
removeFromAllHolds
public void removeFromAllHolds(NodeRef nodeRef)
Description copied from interface:HoldService
Removes the givenNodeRef
from all the holds- Specified by:
removeFromAllHolds
in interfaceHoldService
- Parameters:
nodeRef
- TheNodeRef
of item which will be removed from all the holds- See Also:
HoldService.removeFromAllHolds(org.alfresco.service.cmr.repository.NodeRef)
-
removeFromAllHolds
public void removeFromAllHolds(List<NodeRef> nodeRefs)
Description copied from interface:HoldService
Removes the given list ofNodeRef
s from all the holds- Specified by:
removeFromAllHolds
in interfaceHoldService
- Parameters:
nodeRefs
- The list of itemNodeRef
s which will be removed from all the holds- See Also:
HoldService.removeFromAllHolds(java.util.List)
-
invokeBeforeCreateHold
protected void invokeBeforeCreateHold(NodeRef nodeRef, String name, String reason)
Invoke beforeCreateHold policy- Parameters:
nodeRef
- node referencename
- hold namereason
- hold reason
-
invokeOnCreateHold
protected void invokeOnCreateHold(NodeRef nodeRef)
Invoke onCreateHold policy- Parameters:
nodeRef
- node reference
-
invokeBeforeDeleteHold
protected void invokeBeforeDeleteHold(NodeRef nodeRef)
Invoke beforeDeleteHold policy- Parameters:
nodeRef
- node reference
-
invokeOnDeleteHold
protected void invokeOnDeleteHold(String holdName, Set<QName> classQNames)
Invoke onDeleteHold policy- Parameters:
holdName
- name of the holdclassQNames
- hold types and aspects
-
invokeBeforeAddToHold
protected void invokeBeforeAddToHold(NodeRef hold, NodeRef contentNodeRef)
Invoke beforeAddToHold policy- Parameters:
hold
- hold node referencecontentNodeRef
- content node reference
-
invokeOnAddToHold
protected void invokeOnAddToHold(NodeRef hold, NodeRef contentNodeRef)
Invoke onAddToHold policy- Parameters:
hold
- hold node referencecontentNodeRef
- content node reference
-
invokeBeforeRemoveFromHold
protected void invokeBeforeRemoveFromHold(NodeRef hold, NodeRef contentNodeRef)
Invoke beforeRemoveFromHold policy- Parameters:
hold
- hold node referencecontentNodeRef
- content node reference
-
-