Class RecordServiceImpl
- java.lang.Object
-
- org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl
-
- org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean
-
- org.alfresco.module.org_alfresco_module_rm.record.RecordServiceImpl
-
- All Implemented Interfaces:
RecordsManagementCustomModel
,RecordsManagementModel
,RecordService
,ContentServicePolicies.OnContentUpdatePolicy
,NodeServicePolicies.OnAddAspectPolicy
,NodeServicePolicies.OnCreateChildAssociationPolicy
,NodeServicePolicies.OnRemoveAspectPolicy
,NodeServicePolicies.OnUpdatePropertiesPolicy
,BehaviourRegistry
,AssociationPolicy
,ClassPolicy
,Policy
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class RecordServiceImpl extends BaseBehaviourBean implements RecordService, RecordsManagementModel, RecordsManagementCustomModel, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnCreateChildAssociationPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, ContentServicePolicies.OnContentUpdatePolicy
Record service implementation.- Since:
- 2.1
- Author:
- Roy Wetherall
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_NEW_RECORDS
-
Fields inherited from class org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean
behaviourFilter, behaviours, MULTIPLE_CHILDREN_TYPE_ERROR, UNIQUE_CHILD_TYPE_ERROR
-
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.content.ContentServicePolicies.OnContentUpdatePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnRemoveAspectPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, 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 RecordServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addRecordType(NodeRef nodeRef, QName typeQName)
Adds the specified type to the recordvoid
complete(NodeRef nodeRef)
Completes a recordvoid
createRecord(NodeRef filePlan, NodeRef nodeRef)
Links the newly created record to it's original location.void
createRecord(NodeRef filePlan, NodeRef nodeRef, boolean isLinked)
Creates a new unfiled record from an existing node.void
createRecord(NodeRef filePlan, NodeRef nodeRef, NodeRef destinationNodeRef)
Creates a new record from an existing node and files it into the specified location.void
createRecord(NodeRef filePlan, NodeRef nodeRef, NodeRef destinationNodeRef, boolean isLinked)
Creates a new record from an existing node and files it into the specified location.NodeRef
createRecordFromContent(NodeRef parent, String name, QName type, Map<QName,Serializable> properties, ContentReader reader)
Creates a new document in the unfiled records container if the given node reference is a file plan node reference otherwise the node reference will be used as the destination for the new record.NodeRef
createRecordFromCopy(NodeRef filePlan, NodeRef nodeRef)
Creates a record from a copy of the node reference provided.void
disablePropertyEditableCheck()
Disables the property editable check.void
disablePropertyEditableCheck(NodeRef nodeRef)
Disables the property editable check for a given node in this transaction only.void
enablePropertyEditableCheck()
Enables the property editable check.void
file(NodeRef record)
Helper method to 'file' a new document that arrived in the file plan structure.protected List<String>
getAlwaysEditURIs()
RecordableVersionService
getRecordableVersionService()
Set<QName>
getRecordMetadataAspects(NodeRef nodeRef)
Gets a list of all the record metadata aspects relevant to the file plan type of the file plan component provided.Set<QName>
getRecordMetadataAspects(QName filePlanType)
Gets a list of all the record metadata aspect that relate to the provided file plan type.Set<QName>
getRecordMetaDataAspects()
Deprecated.since 2.2, file plan is required to provide contextprotected Map<QName,Set<QName>>
getRecordMetadataAspectsMap()
Get map containing record metadata aspects.List<NodeRef>
getRecords(NodeRef recordFolder)
Gets a list of all the records within a record foldervoid
init()
Init methodprotected void
invokeBeforeRecordDeclaration(NodeRef nodeRef)
Invoke invokeBeforeRecordDeclaration policyprotected void
invokeBeforeRecordRejection(NodeRef nodeRef)
Invoke invokeBeforeRecordRejection policyprotected void
invokeOnRecordDeclaration(NodeRef nodeRef)
Invoke invokeOnRecordDeclaration policyprotected void
invokeOnRecordRejection(NodeRef nodeRef)
Invoke invokeOnRecordRejection policyboolean
isFiled(NodeRef nodeRef)
Indicates whether the record is filed or notboolean
isMetadataStub(NodeRef nodeRef)
Indicates whether the given node (record or record folder) is a metadata stub or not.boolean
isPropertyEditable(NodeRef record, QName property)
Indicates whether a property of a record is editable for the current user or not.boolean
isRecordMetadataAspect(QName aspect)
Indicates whether the provided aspect is a registered record meta-data aspect.boolean
isRecordMetadataProperty(QName property)
Indicates whther the provided property is declared on a registered record meta-data aspect.void
link(NodeRef record, NodeRef recordFolder)
Links a record to a record foldervoid
makeRecord(NodeRef document)
Creates a record from the given documentvoid
onAddAspect(NodeRef nodeRef, QName aspect)
void
onContentUpdate(NodeRef nodeRef, boolean newContent)
void
onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
Behaviour executed when a new item is added to a record folder.void
onRemoveAspect(NodeRef nodeRef, QName aspect)
void
onUpdateProperties(NodeRef nodeRef, Map<QName,Serializable> before, Map<QName,Serializable> after)
Ensure that the user only updates record properties that they have permission to.void
registerRecordMetadataAspect(QName recordMetadataAspect, QName filePlanType)
Register a record metadata aspect.void
rejectRecord(NodeRef nodeRef, String reason)
Rejects a record with the provided reasonvoid
setAlwaysEditURIs(List<String> alwaysEditURIs)
void
setCapabilityService(CapabilityService capabilityService)
void
setCheckMandatoryPropertiesEnabled(boolean checkMandatoryPropertiesEnabled)
void
setDispositionService(DispositionService dispositionService)
void
setExtendedPermissionService(ExtendedPermissionService extendedPermissionService)
void
setExtendedSecurityService(ExtendedSecurityService extendedSecurityService)
void
setFileFolderService(FileFolderService fileFolderService)
void
setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
void
setFilePlanService(FilePlanService filePlanService)
void
setFreezeService(FreezeService freezeService)
void
setIdentifierService(IdentifierService identifierService)
void
setIncompleteNodeTagger(IncompleteNodeTagger incompleteNodeTagger)
void
setNamespaceService(NamespaceService namespaceService)
void
setNotificationHelper(RecordsManagementNotificationHelper notificationHelper)
void
setOwnableService(OwnableService ownableService)
void
setPermissionService(PermissionService permissionService)
void
setPolicyComponent(PolicyComponent policyComponent)
void
setRecordableVersionService(RecordableVersionService recordableVersionService)
void
setRecordFolderService(RecordFolderService recordFolderService)
void
setRecordModelURIs(List<String> recordModelURIs)
void
setRecordsManagementContainerType(RecordsManagementContainerType recordsManagementContainerType)
void
setRelationshipService(RelationshipService relationshipService)
void
setRuleService(RuleService ruleService)
void
setVersionService(VersionService versionService)
void
unlink(NodeRef record, NodeRef recordFolder)
Unlinks a record from a specified record folder.-
Methods inherited from class org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean
getBehaviour, registerBehaviour, setBehaviourFilter, validateNewChildAssociation, validateNewChildAssociationSubTypesIncluded
-
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.record.RecordService
isDeclared, isRecord
-
-
-
-
Field Detail
-
KEY_NEW_RECORDS
public static final String KEY_NEW_RECORDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setAlwaysEditURIs
public void setAlwaysEditURIs(List<String> alwaysEditURIs)
- Parameters:
alwaysEditURIs
- the alwaysEditURIs to set
-
setRecordModelURIs
public void setRecordModelURIs(List<String> recordModelURIs)
- Parameters:
recordModelURIs
- namespaces specific to records
-
getRecordableVersionService
public RecordableVersionService getRecordableVersionService()
-
setIdentifierService
public void setIdentifierService(IdentifierService identifierService)
- Parameters:
identifierService
- identifier service
-
setExtendedPermissionService
public void setExtendedPermissionService(ExtendedPermissionService extendedPermissionService)
- Parameters:
extendedPermissionService
- extended permission service
-
setExtendedSecurityService
public void setExtendedSecurityService(ExtendedSecurityService extendedSecurityService)
- Parameters:
extendedSecurityService
- extended security service
-
setFilePlanService
public void setFilePlanService(FilePlanService filePlanService)
- Parameters:
filePlanService
- file plan service
-
setNotificationHelper
public void setNotificationHelper(RecordsManagementNotificationHelper notificationHelper)
- Parameters:
notificationHelper
- notification helper
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
- Parameters:
policyComponent
- policy component
-
setOwnableService
public void setOwnableService(OwnableService ownableService)
- Parameters:
ownableService
- ownable service
-
setCapabilityService
public void setCapabilityService(CapabilityService capabilityService)
- Parameters:
capabilityService
- capability service
-
setRuleService
public void setRuleService(RuleService ruleService)
- Parameters:
ruleService
- rule service
-
setFileFolderService
public void setFileFolderService(FileFolderService fileFolderService)
- Parameters:
fileFolderService
- file folder service
-
setRecordFolderService
public void setRecordFolderService(RecordFolderService recordFolderService)
- Parameters:
recordFolderService
- record folder service
-
setFilePlanRoleService
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
- Parameters:
filePlanRoleService
- file plan role service
-
setPermissionService
public void setPermissionService(PermissionService permissionService)
- Parameters:
permissionService
- permission service
-
setVersionService
public void setVersionService(VersionService versionService)
- Parameters:
versionService
- version service
-
setRelationshipService
public void setRelationshipService(RelationshipService relationshipService)
- Parameters:
relationshipService
- relationship service
-
setDispositionService
public void setDispositionService(DispositionService dispositionService)
- Parameters:
dispositionService
- disposition service
-
setRecordsManagementContainerType
public void setRecordsManagementContainerType(RecordsManagementContainerType recordsManagementContainerType)
- Parameters:
recordsManagementContainerType
- records management container type
-
setRecordableVersionService
public void setRecordableVersionService(RecordableVersionService recordableVersionService)
- Parameters:
recordableVersionService
- recordable version service
-
setIncompleteNodeTagger
public void setIncompleteNodeTagger(IncompleteNodeTagger incompleteNodeTagger)
-
setFreezeService
public void setFreezeService(FreezeService freezeService)
- Parameters:
freezeService
- freeze service
-
setNamespaceService
public void setNamespaceService(NamespaceService namespaceService)
- Parameters:
namespaceService
- namespace service
-
setCheckMandatoryPropertiesEnabled
public void setCheckMandatoryPropertiesEnabled(boolean checkMandatoryPropertiesEnabled)
- Parameters:
checkMandatoryPropertiesEnabled
- true if check mandatory properties is enabled, false otherwise
-
init
public void init()
Init method
-
onCreateChildAssociation
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
Behaviour executed when a new item is added to a record folder.
-
disablePropertyEditableCheck
public void disablePropertyEditableCheck()
Description copied from interface:RecordService
Disables the property editable check.- Specified by:
disablePropertyEditableCheck
in interfaceRecordService
- See Also:
RecordService.disablePropertyEditableCheck()
-
disablePropertyEditableCheck
public void disablePropertyEditableCheck(NodeRef nodeRef)
Description copied from interface:RecordService
Disables the property editable check for a given node in this transaction only.- Specified by:
disablePropertyEditableCheck
in interfaceRecordService
- Parameters:
nodeRef
- node reference- See Also:
RecordService.disablePropertyEditableCheck(org.alfresco.service.cmr.repository.NodeRef)
-
enablePropertyEditableCheck
public void enablePropertyEditableCheck()
Description copied from interface:RecordService
Enables the property editable check. By default this is always enabled.- Specified by:
enablePropertyEditableCheck
in interfaceRecordService
- See Also:
RecordService.enablePropertyEditableCheck()
-
onUpdateProperties
public void onUpdateProperties(NodeRef nodeRef, Map<QName,Serializable> before, Map<QName,Serializable> after)
Ensure that the user only updates record properties that they have permission to.
-
getRecordMetadataAspectsMap
protected Map<QName,Set<QName>> getRecordMetadataAspectsMap()
Get map containing record metadata aspects.
-
registerRecordMetadataAspect
public void registerRecordMetadataAspect(QName recordMetadataAspect, QName filePlanType)
Description copied from interface:RecordService
Register a record metadata aspect.The file plan type indicates which file plan type the aspect applied to. Null indicates that the aspect applies to rma:filePlan.
A record metadata aspect can be registered more than once if it applies to more than one file plan type.
- Specified by:
registerRecordMetadataAspect
in interfaceRecordService
- Parameters:
recordMetadataAspect
- record metadata aspect qualified namefilePlanType
- file plan type- See Also:
RecordService.registerRecordMetadataAspect(org.alfresco.service.namespace.QName, org.alfresco.service.namespace.QName)
-
getRecordMetaDataAspects
@Deprecated public Set<QName> getRecordMetaDataAspects()
Deprecated.since 2.2, file plan is required to provide contextDescription copied from interface:RecordService
Gets a list of all the record meta-data aspects- Specified by:
getRecordMetaDataAspects
in interfaceRecordService
- Returns:
Set
<QName
> list of record meta-data aspects
-
isRecordMetadataAspect
public boolean isRecordMetadataAspect(QName aspect)
Description copied from interface:RecordService
Indicates whether the provided aspect is a registered record meta-data aspect.- Specified by:
isRecordMetadataAspect
in interfaceRecordService
- Parameters:
aspect
- aspectQName
- Returns:
- boolean true if the aspect is a registered record meta-data aspect, false otherwise
- See Also:
RecordService.isRecordMetadataAspect(org.alfresco.service.namespace.QName)
-
isRecordMetadataProperty
public boolean isRecordMetadataProperty(QName property)
Description copied from interface:RecordService
Indicates whther the provided property is declared on a registered record meta-data aspect.- Specified by:
isRecordMetadataProperty
in interfaceRecordService
- Parameters:
property
- propertyQName
- Returns:
- boolean true if the property is declared on a registered record meta-data aspect, false otherwise
- See Also:
RecordService.isRecordMetadataProperty(org.alfresco.service.namespace.QName)
-
getRecordMetadataAspects
public Set<QName> getRecordMetadataAspects(NodeRef nodeRef)
Description copied from interface:RecordService
Gets a list of all the record metadata aspects relevant to the file plan type of the file plan component provided.If a null context is provided all record meta-data aspects are returned, but this is not recommended.
- Specified by:
getRecordMetadataAspects
in interfaceRecordService
- Parameters:
nodeRef
- node reference to file plan component providing context- Returns:
Set
<QName
> list of record meta-data aspects- See Also:
RecordService.getRecordMetadataAspects(NodeRef)
-
getRecordMetadataAspects
public Set<QName> getRecordMetadataAspects(QName filePlanType)
Description copied from interface:RecordService
Gets a list of all the record metadata aspect that relate to the provided file plan type.If null is provided for the file plan type then record metadata aspects for the default file plan type (rma:filePlan) are returned.
- Specified by:
getRecordMetadataAspects
in interfaceRecordService
- Parameters:
filePlanType
- file plan type- Returns:
Set
<QName
> list of record meta-data aspects- See Also:
RecordService.getRecordMetadataAspects(org.alfresco.service.namespace.QName)
-
createRecord
public void createRecord(NodeRef filePlan, NodeRef nodeRef)
Description copied from interface:RecordService
Links the newly created record to it's original location.- Specified by:
createRecord
in interfaceRecordService
- See Also:
RecordService.createRecord(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
-
createRecord
public void createRecord(NodeRef filePlan, NodeRef nodeRef, boolean isLinked)
Description copied from interface:RecordService
Creates a new unfiled record from an existing node.Note that the node reference of the record will be the same as the original document.
- Specified by:
createRecord
in interfaceRecordService
- Parameters:
filePlan
- The filePlan in which the record should be placed. filePlan can benull
in this case the default RM site will be used.nodeRef
- The node from which the record will be createdisLinked
- indicates if the newly created record is linked to it's original location or not.- See Also:
RecordService.createRecord(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, boolean)
-
createRecord
public void createRecord(NodeRef filePlan, NodeRef nodeRef, NodeRef destinationNodeRef)
Description copied from interface:RecordService
Creates a new record from an existing node and files it into the specified location.Note that the node reference of the record will be the same as the original document.
- Specified by:
createRecord
in interfaceRecordService
- Parameters:
filePlan
- The filePlan in which the record should be placed. filePlan can benull
in this case the default RM site will be used.nodeRef
- The node from which the record will be createddestinationNodeRef
- The container in which the record will be created- See Also:
RecordService.createRecord(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
-
createRecord
public void createRecord(NodeRef filePlan, NodeRef nodeRef, NodeRef destinationNodeRef, boolean isLinked)
Description copied from interface:RecordService
Creates a new record from an existing node and files it into the specified location.Note that the node reference of the record will be the same as the original document.
- Specified by:
createRecord
in interfaceRecordService
- Parameters:
filePlan
- The filePlan in which the record should be placed. filePlan can benull
in this case the default RM site will be used.nodeRef
- The node from which the record will be createddestinationNodeRef
- The container in which the record will be createdisLinked
- indicates if the newly created record is linked to it's original location or not.- See Also:
RecordService.createRecord(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, boolean)
-
createRecordFromCopy
public NodeRef createRecordFromCopy(NodeRef filePlan, NodeRef nodeRef)
Description copied from interface:RecordService
Creates a record from a copy of the node reference provided.- Specified by:
createRecordFromCopy
in interfaceRecordService
- Parameters:
filePlan
- file plannodeRef
- node reference- See Also:
RecordService.createRecordFromCopy(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
-
createRecordFromContent
public NodeRef createRecordFromContent(NodeRef parent, String name, QName type, Map<QName,Serializable> properties, ContentReader reader)
Description copied from interface:RecordService
Creates a new document in the unfiled records container if the given node reference is a file plan node reference otherwise the node reference will be used as the destination for the new record.- Specified by:
createRecordFromContent
in interfaceRecordService
- Parameters:
parent
- parent node referencename
- name of the new recordtype
- content type, cm:content if nullproperties
- propertiesreader
- content reader- See Also:
RecordService.createRecordFromContent(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, org.alfresco.service.namespace.QName, java.util.Map, org.alfresco.service.cmr.repository.ContentReader)
-
makeRecord
public void makeRecord(NodeRef document)
Creates a record from the given document- Specified by:
makeRecord
in interfaceRecordService
- Parameters:
document
- the document from which a record will be created
-
isFiled
public boolean isFiled(NodeRef nodeRef)
Description copied from interface:RecordService
Indicates whether the record is filed or not- Specified by:
isFiled
in interfaceRecordService
- Parameters:
nodeRef
- nodeRef of record- Returns:
- boolean true if filed, false otherwise
- See Also:
RecordService.isFiled(org.alfresco.service.cmr.repository.NodeRef)
-
file
public void file(NodeRef record)
Helper method to 'file' a new document that arrived in the file plan structure. TODO atm we only 'file' content as a record .. may need to consider other types if we are to support the notion of composite records.- Specified by:
file
in interfaceRecordService
- Parameters:
record
- node reference to record (or soon to be record!)
-
rejectRecord
public void rejectRecord(NodeRef nodeRef, String reason)
Description copied from interface:RecordService
Rejects a record with the provided reason- Specified by:
rejectRecord
in interfaceRecordService
- Parameters:
nodeRef
- The record which will be rejectedreason
- The reason for rejection- See Also:
RecordService.rejectRecord(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
-
isPropertyEditable
public boolean isPropertyEditable(NodeRef record, QName property)
Description copied from interface:RecordService
Indicates whether a property of a record is editable for the current user or not.- Specified by:
isPropertyEditable
in interfaceRecordService
- Parameters:
record
- recordproperty
- property- Returns:
- boolean true if editable, false otherwise.
- See Also:
RecordService.isPropertyEditable(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName)
-
isMetadataStub
public boolean isMetadataStub(NodeRef nodeRef)
Description copied from interface:RecordService
Indicates whether the given node (record or record folder) is a metadata stub or not.- Specified by:
isMetadataStub
in interfaceRecordService
- Parameters:
nodeRef
- node reference- Returns:
- boolean true if a metadata stub, false otherwise
- See Also:
RecordService.isMetadataStub(NodeRef)
-
getRecords
public List<NodeRef> getRecords(NodeRef recordFolder)
Description copied from interface:RecordService
Gets a list of all the records within a record folder- Specified by:
getRecords
in interfaceRecordService
- Parameters:
recordFolder
- record folder- Returns:
- List<NodeRef> list of records in the record folder
- See Also:
RecordService.getRecords(NodeRef)
-
addRecordType
public void addRecordType(NodeRef nodeRef, QName typeQName)
Description copied from interface:RecordService
Adds the specified type to the record- Specified by:
addRecordType
in interfaceRecordService
- Parameters:
nodeRef
- Record node referencetypeQName
- Type to add- See Also:
RecordService.addRecordType(NodeRef, QName)
-
link
public void link(NodeRef record, NodeRef recordFolder)
Description copied from interface:RecordService
Links a record to a record folder- Specified by:
link
in interfaceRecordService
- Parameters:
record
- the record to linkrecordFolder
- the record folder to link it to- See Also:
RecordService.link(NodeRef, NodeRef)
-
unlink
public void unlink(NodeRef record, NodeRef recordFolder)
Description copied from interface:RecordService
Unlinks a record from a specified record folder.- Specified by:
unlink
in interfaceRecordService
- Parameters:
record
- the record to unlinkrecordFolder
- the record folder to unlink it from- See Also:
RecordService.unlink(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
-
onContentUpdate
public void onContentUpdate(NodeRef nodeRef, boolean newContent)
- Specified by:
onContentUpdate
in interfaceContentServicePolicies.OnContentUpdatePolicy
-
invokeBeforeRecordDeclaration
protected void invokeBeforeRecordDeclaration(NodeRef nodeRef)
Invoke invokeBeforeRecordDeclaration policy- Parameters:
nodeRef
- node reference
-
invokeOnRecordDeclaration
protected void invokeOnRecordDeclaration(NodeRef nodeRef)
Invoke invokeOnRecordDeclaration policy- Parameters:
nodeRef
- node reference
-
invokeBeforeRecordRejection
protected void invokeBeforeRecordRejection(NodeRef nodeRef)
Invoke invokeBeforeRecordRejection policy- Parameters:
nodeRef
- node reference
-
invokeOnRecordRejection
protected void invokeOnRecordRejection(NodeRef nodeRef)
Invoke invokeOnRecordRejection policy- Parameters:
nodeRef
- node reference
-
complete
public void complete(NodeRef nodeRef)
Completes a record- Specified by:
complete
in interfaceRecordService
- Parameters:
nodeRef
- Record node reference
-
-