Interface RecordService

All Known Implementing Classes:
RecordServiceImpl

@AlfrescoPublicApi public interface RecordService
Record Service Interface.
Since:
2.1
Author:
Roy Wetherall
  • Method Details

    • registerRecordMetadataAspect

      void registerRecordMetadataAspect(QName recordMetadataAspect, 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 name
      filePlanType - file plan type
      Since:
      2.2
    • disablePropertyEditableCheck

      void disablePropertyEditableCheck()
      Disables the property editable check.
      Since:
      2.2
    • disablePropertyEditableCheck

      void disablePropertyEditableCheck(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<QName> getRecordMetaDataAspects()
      Deprecated.
      since 2.2, file plan component required to provide context
      Gets a list of all the record meta-data aspects
      Returns:
      Set<QName> list of record meta-data aspects
    • isRecordMetadataAspect

      boolean isRecordMetadataAspect(QName aspect)
      Indicates whether the provided aspect is a registered record meta-data aspect.
      Parameters:
      aspect - aspect QName
      Returns:
      boolean true if the aspect is a registered record meta-data aspect, false otherwise
      Since:
      2.3
    • isRecordMetadataProperty

      boolean isRecordMetadataProperty(QName property)
      Indicates whther the provided property is declared on a registered record meta-data aspect.
      Parameters:
      property - property QName
      Returns:
      boolean true if the property is declared on a registered record meta-data aspect, false otherwise
      Since:
      2.3
    • getRecordMetadataAspects

      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.

      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<QName> getRecordMetadataAspects(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(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(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(NodeRef filePlan, NodeRef nodeRef, 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 be null in this case the default RM site will be used.
      nodeRef - The node from which the record will be created
      locationNodeRef - The container in which the record will be created
      isLinked - indicates if the newly created record is linked to it's original location or not.
    • createRecord

      void createRecord(NodeRef filePlan, NodeRef nodeRef, 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 be null in this case the default RM site will be used.
      nodeRef - The node from which the record will be created
      locationNodeRef - The container in which the record will be created
    • createRecord

      void createRecord(NodeRef filePlan, 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 be null in this case the default RM site will be used.
      nodeRef - The node from which the record will be created
      isLinked - indicates if the newly created record is linked to it's original location or not.
    • createRecord

      void createRecord(NodeRef filePlan, NodeRef nodeRef)
      Links the newly created record to it's original location.
      See Also:
    • createRecordFromCopy

      NodeRef createRecordFromCopy(NodeRef filePlan, NodeRef nodeRef)
      Creates a record from a copy of the node reference provided.
      Parameters:
      filePlan - file plan
      nodeRef - 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 reference
      name - name of the new record
      type - content type, cm:content if null
      properties - properties
      reader - content reader
    • isFiled

      boolean isFiled(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(NodeRef record)
      'File' a new document that arrived in the file plan structure.
      Parameters:
      record - noderef of record
    • rejectRecord

      void rejectRecord(NodeRef nodeRef, String reason)
      Rejects a record with the provided reason
      Parameters:
      nodeRef - The record which will be rejected
      reason - The reason for rejection
    • isPropertyEditable

      boolean isPropertyEditable(NodeRef record, QName property)
      Indicates whether a property of a record is editable for the current user or not.
      Parameters:
      record - record
      property - property
      Returns:
      boolean true if editable, false otherwise.
    • isMetadataStub

      boolean isMetadataStub(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<NodeRef> getRecords(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(NodeRef nodeRef, QName typeQName)
      Adds the specified type to the record
      Parameters:
      nodeRef - Record node reference
      typeQName - Type to add
    • makeRecord

      void makeRecord(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(NodeRef record, NodeRef recordFolder)
      Links a record to a record folder
      Parameters:
      record - the record to link
      recordFolder - the record folder to link it to
    • unlink

      void unlink(NodeRef record, NodeRef recordFolder)
      Unlinks a record from a specified record folder.
      Parameters:
      record - the record to unlink
      recordFolder - the record folder to unlink it from
      Since:
      2.3
    • complete

      void complete(NodeRef nodeRef)
      Completes a record
      Parameters:
      nodeRef - Record node reference