Interface RecordService
-
- All Known Implementing Classes:
RecordServiceImpl
@AlfrescoPublicApi public interface RecordService
Record Service Interface.- Since:
- 2.1
- Author:
- Roy Wetherall
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addRecordType(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName typeQName)
Adds the specified type to the recordvoid
complete(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Completes a recordvoid
createRecord(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef)
Links the newly created record to it's original location.void
createRecord(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean isLinked)
Creates a new unfiled record from an existing node.void
createRecord(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef locationNodeRef)
Creates a new record from an existing node and files it into the specified location.void
createRecord(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef locationNodeRef, boolean isLinked)
Creates a new record from an existing node and files it into the specified location.org.alfresco.service.cmr.repository.NodeRef
createRecordFromContent(org.alfresco.service.cmr.repository.NodeRef parent, String name, org.alfresco.service.namespace.QName type, Map<org.alfresco.service.namespace.QName,Serializable> properties, org.alfresco.service.cmr.repository.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.org.alfresco.service.cmr.repository.NodeRef
createRecordFromCopy(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef)
Creates a record from a copy of the node reference provided.void
disablePropertyEditableCheck()
Disables the property editable check.void
disablePropertyEditableCheck(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Disables the property editable check for a given node in this transaction only.void
enablePropertyEditableCheck()
Enables the property editable check.void
file(org.alfresco.service.cmr.repository.NodeRef record)
'File' a new document that arrived in the file plan structure.Set<org.alfresco.service.namespace.QName>
getRecordMetadataAspects(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets a list of all the record metadata aspects relevant to the file plan type of the file plan component provided.Set<org.alfresco.service.namespace.QName>
getRecordMetadataAspects(org.alfresco.service.namespace.QName filePlanType)
Gets a list of all the record metadata aspect that relate to the provided file plan type.Set<org.alfresco.service.namespace.QName>
getRecordMetaDataAspects()
Deprecated.since 2.2, file plan component required to provide contextList<org.alfresco.service.cmr.repository.NodeRef>
getRecords(org.alfresco.service.cmr.repository.NodeRef recordFolder)
Gets a list of all the records within a record folderboolean
isDeclared(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the record is declaredboolean
isFiled(org.alfresco.service.cmr.repository.NodeRef record)
Indicates whether the record is filed or notboolean
isMetadataStub(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node (record or record folder) is a metadata stub or not.boolean
isPropertyEditable(org.alfresco.service.cmr.repository.NodeRef record, org.alfresco.service.namespace.QName property)
Indicates whether a property of a record is editable for the current user or not.boolean
isRecord(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Checks whether if the given node reference is a record or notboolean
isRecordMetadataAspect(org.alfresco.service.namespace.QName aspect)
Indicates whether the provided aspect is a registered record meta-data aspect.boolean
isRecordMetadataProperty(org.alfresco.service.namespace.QName property)
Indicates whther the provided property is declared on a registered record meta-data aspect.void
link(org.alfresco.service.cmr.repository.NodeRef record, org.alfresco.service.cmr.repository.NodeRef recordFolder)
Links a record to a record foldervoid
makeRecord(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Creates a record from the given documentvoid
registerRecordMetadataAspect(org.alfresco.service.namespace.QName recordMetadataAspect, org.alfresco.service.namespace.QName filePlanType)
Register a record metadata aspect.void
rejectRecord(org.alfresco.service.cmr.repository.NodeRef nodeRef, String reason)
Rejects a record with the provided reasonvoid
unlink(org.alfresco.service.cmr.repository.NodeRef record, org.alfresco.service.cmr.repository.NodeRef recordFolder)
Unlinks a record from a specified record folder.
-
-
-
Method Detail
-
registerRecordMetadataAspect
void registerRecordMetadataAspect(org.alfresco.service.namespace.QName recordMetadataAspect, org.alfresco.service.namespace.QName filePlanType)
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.
- Parameters:
recordMetadataAspect
- record metadata aspect qualified namefilePlanType
- file plan type- Since:
- 2.2
-
disablePropertyEditableCheck
void disablePropertyEditableCheck()
Disables the property editable check.- Since:
- 2.2
-
disablePropertyEditableCheck
void disablePropertyEditableCheck(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Disables the property editable check for a given node in this transaction only.- Parameters:
nodeRef
- node reference- Since:
- 2.2
-
enablePropertyEditableCheck
void enablePropertyEditableCheck()
Enables the property editable check. By default this is always enabled.
-
getRecordMetaDataAspects
@Deprecated Set<org.alfresco.service.namespace.QName> getRecordMetaDataAspects()
Deprecated.since 2.2, file plan component required to provide contextGets a list of all the record meta-data aspects- Returns:
Set
<QName
> list of record meta-data aspects
-
isRecordMetadataAspect
boolean isRecordMetadataAspect(org.alfresco.service.namespace.QName aspect)
Indicates whether the provided aspect is a registered record meta-data aspect.- Parameters:
aspect
- aspectQName
- Returns:
- boolean true if the aspect is a registered record meta-data aspect, false otherwise
- Since:
- 2.3
-
isRecordMetadataProperty
boolean isRecordMetadataProperty(org.alfresco.service.namespace.QName property)
Indicates whther the provided property is declared on a registered record meta-data aspect.- Parameters:
property
- propertyQName
- Returns:
- boolean true if the property is declared on a registered record meta-data aspect, false otherwise
- Since:
- 2.3
-
getRecordMetadataAspects
Set<org.alfresco.service.namespace.QName> getRecordMetadataAspects(org.alfresco.service.cmr.repository.NodeRef nodeRef)
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.
- Parameters:
nodeRef
- node reference to file plan component providing context- Returns:
Set
<QName
> list of record meta-data aspects- Since:
- 2.2
-
getRecordMetadataAspects
Set<org.alfresco.service.namespace.QName> getRecordMetadataAspects(org.alfresco.service.namespace.QName filePlanType)
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.
- Parameters:
filePlanType
- file plan type- Returns:
Set
<QName
> list of record meta-data aspects- Since:
- 2.2
-
isRecord
boolean isRecord(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Checks whether if the given node reference is a record or not- Parameters:
nodeRef
- node reference to be checked- Returns:
- boolean true if the node reference is a record, false otherwise
-
isDeclared
boolean isDeclared(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the record is declared- Parameters:
nodeRef
- node reference of the record for which the check would be performed- Returns:
- boolean true if record is declared, false otherwise
-
createRecord
void createRecord(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef locationNodeRef, boolean isLinked)
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.
- 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 createdlocationNodeRef
- The container in which the record will be createdisLinked
- indicates if the newly created record is linked to it's original location or not.
-
createRecord
void createRecord(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef locationNodeRef)
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.
- 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 createdlocationNodeRef
- The container in which the record will be created
-
createRecord
void createRecord(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean isLinked)
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.
- 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.
-
createRecord
void createRecord(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef)
Links the newly created record to it's original location.- See Also:
createRecord(NodeRef, NodeRef, boolean)
-
createRecordFromCopy
org.alfresco.service.cmr.repository.NodeRef createRecordFromCopy(org.alfresco.service.cmr.repository.NodeRef filePlan, org.alfresco.service.cmr.repository.NodeRef nodeRef)
Creates a record from a copy of the node reference provided.- Parameters:
filePlan
- file plannodeRef
- node reference
-
createRecordFromContent
org.alfresco.service.cmr.repository.NodeRef createRecordFromContent(org.alfresco.service.cmr.repository.NodeRef parent, String name, org.alfresco.service.namespace.QName type, Map<org.alfresco.service.namespace.QName,Serializable> properties, org.alfresco.service.cmr.repository.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.- Parameters:
parent
- parent node referencename
- name of the new recordtype
- content type, cm:content if nullproperties
- propertiesreader
- content reader
-
isFiled
boolean isFiled(org.alfresco.service.cmr.repository.NodeRef record)
Indicates whether the record is filed or not- Parameters:
record
- nodeRef of record- Returns:
- boolean true if filed, false otherwise
-
file
void file(org.alfresco.service.cmr.repository.NodeRef record)
'File' a new document that arrived in the file plan structure.- Parameters:
record
- noderef of record
-
rejectRecord
void rejectRecord(org.alfresco.service.cmr.repository.NodeRef nodeRef, String reason)
Rejects a record with the provided reason- Parameters:
nodeRef
- The record which will be rejectedreason
- The reason for rejection
-
isPropertyEditable
boolean isPropertyEditable(org.alfresco.service.cmr.repository.NodeRef record, org.alfresco.service.namespace.QName property)
Indicates whether a property of a record is editable for the current user or not.- Parameters:
record
- recordproperty
- property- Returns:
- boolean true if editable, false otherwise.
-
isMetadataStub
boolean isMetadataStub(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Indicates whether the given node (record or record folder) is a metadata stub or not.- Parameters:
nodeRef
- node reference- Returns:
- boolean true if a metadata stub, false otherwise
-
getRecords
List<org.alfresco.service.cmr.repository.NodeRef> getRecords(org.alfresco.service.cmr.repository.NodeRef recordFolder)
Gets a list of all the records within a record folder- Parameters:
recordFolder
- record folder- Returns:
- List<NodeRef> list of records in the record folder
-
addRecordType
void addRecordType(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName typeQName)
Adds the specified type to the record- Parameters:
nodeRef
- Record node referencetypeQName
- Type to add
-
makeRecord
void makeRecord(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Creates a record from the given document- Parameters:
nodeRef
- The document node reference from which a record will be created
-
link
void link(org.alfresco.service.cmr.repository.NodeRef record, org.alfresco.service.cmr.repository.NodeRef recordFolder)
Links a record to a record folder- Parameters:
record
- the record to linkrecordFolder
- the record folder to link it to
-
unlink
void unlink(org.alfresco.service.cmr.repository.NodeRef record, org.alfresco.service.cmr.repository.NodeRef recordFolder)
Unlinks a record from a specified record folder.- Parameters:
record
- the record to unlinkrecordFolder
- the record folder to unlink it from- Since:
- 2.3
-
complete
void complete(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Completes a record- Parameters:
nodeRef
- Record node reference
-
-