Interface RecordService
- All Known Implementing Classes:
RecordServiceImpl
@AlfrescoPublicApi
public interface RecordService
Record Service Interface.
- Since:
- 2.1
- Author:
- Roy Wetherall
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRecordType
(NodeRef nodeRef, QName typeQName) Adds the specified type to the recordvoid
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 locationNodeRef) Creates a new record from an existing node and files it into the specified location.void
createRecord
(NodeRef filePlan, NodeRef nodeRef, NodeRef locationNodeRef, boolean isLinked) Creates a new record from an existing node and files it into the specified location.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.createRecordFromCopy
(NodeRef filePlan, NodeRef nodeRef) Creates a record from a copy of the node reference provided.void
Disables the property editable check.void
disablePropertyEditableCheck
(NodeRef nodeRef) Disables the property editable check for a given node in this transaction only.void
Enables the property editable check.void
'File' a new document that arrived in the file plan structure.getRecordMetadataAspects
(NodeRef nodeRef) Gets a list of all the record metadata aspects relevant to the file plan type of the file plan component provided.getRecordMetadataAspects
(QName filePlanType) Gets a list of all the record metadata aspect that relate to the provided file plan type.Deprecated.since 2.2, file plan component required to provide contextgetRecords
(NodeRef recordFolder) Gets a list of all the records within a record folderboolean
isDeclared
(NodeRef nodeRef) Indicates whether the record is declaredboolean
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
Checks whether if the given node reference is a record or notboolean
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
Links a record to a record foldervoid
makeRecord
(NodeRef nodeRef) Creates a record from the given documentvoid
registerRecordMetadataAspect
(QName recordMetadataAspect, QName filePlanType) Register a record metadata aspect.void
rejectRecord
(NodeRef nodeRef, String reason) Rejects a record with the provided reasonvoid
Unlinks a record from a specified record folder.
-
Method Details
-
registerRecordMetadataAspect
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
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.since 2.2, file plan component required to provide contextGets a list of all the record meta-data aspects -
isRecordMetadataAspect
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
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
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.
-
getRecordMetadataAspects
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.
-
isRecord
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
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
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
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
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
Links the newly created record to it's original location.- See Also:
-
createRecordFromCopy
Creates a record from a copy of the node reference provided.- Parameters:
filePlan
- file plannodeRef
- node reference
-
createRecordFromContent
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.- Parameters:
parent
- parent node referencename
- name of the new recordtype
- content type, cm:content if nullproperties
- propertiesreader
- content reader
-
isFiled
Indicates whether the record is filed or not- Parameters:
record
- nodeRef of record- Returns:
- boolean true if filed, false otherwise
-
file
'File' a new document that arrived in the file plan structure.- Parameters:
record
- noderef of record
-
rejectRecord
Rejects a record with the provided reason- Parameters:
nodeRef
- The record which will be rejectedreason
- The reason for rejection
-
isPropertyEditable
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
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
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
Adds the specified type to the record- Parameters:
nodeRef
- Record node referencetypeQName
- Type to add
-
makeRecord
Creates a record from the given document- Parameters:
nodeRef
- The document node reference from which a record will be created
-
link
Links a record to a record folder- Parameters:
record
- the record to linkrecordFolder
- the record folder to link it to
-
unlink
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
Completes a record- Parameters:
nodeRef
- Record node reference
-