Interface RecordableVersionService

All Known Implementing Classes:
RecordableVersionServiceImpl

@AlfrescoPublicApi public interface RecordableVersionService
Recordable version service interface.
Since:
2.3
Author:
Roy Wetherall
  • Method Details

    • isCurrentVersionRecorded

      boolean isCurrentVersionRecorded(NodeRef nodeRef)
      Indicates whether the current version of a node is recorded or not.

      Returns false if not versionable or no version.

      Parameters:
      nodeRef - node reference
      Returns:
      boolean true if latest version recorded, false otherwise
    • isRecordedVersion

      boolean isRecordedVersion(Version version)
      Indicates whether a version is recorded or not.
      Parameters:
      version - version
      Returns:
      boolean true if recorded version, false otherwise
    • getVersionRecord

      NodeRef getVersionRecord(Version version)
      If the version is a recorded version, gets the related version record.
      Parameters:
      version - version
      Returns:
      NodeRef node reference of version record
    • getRecordedVersion

      Version getRecordedVersion(NodeRef record)
      Gets the version that relates to the version record
      Parameters:
      record - version record node reference
      Returns:
      Version version or null if not found
    • createRecordFromLatestVersion

      NodeRef createRecordFromLatestVersion(NodeRef filePlan, NodeRef nodeRef)
      Creates a record from the latest frozen version, marking it as recorded.

      Does not create a record if the node is not versionable or the latest version is already recorded.

      Parameters:
      nodeRef - node reference
      Returns:
      NodeRef node reference to the created record.
    • createRecordFromLatestVersion

      NodeRef createRecordFromLatestVersion(NodeRef filePlan, NodeRef nodeRef, boolean autoVersion)
      Creates a record from the latest version, marking it as recorded.

      Does not create a record if the node is not versionable or the latest version is already recorded.

      Parameters:
      filePlan - parent node reference
      nodeRef - node reference
      autoVersion - true, create new record version from latest version, false creates a record from the latest frozen version
      Returns:
      NodeRef node reference to the created record.
    • isRecordedVersionDestroyed

      boolean isRecordedVersionDestroyed(Version version)
      Indicates whether a record version is destroyed or not.
      Parameters:
      version - version
      Returns:
      boolean true if destroyed, false otherwise
    • destroyRecordedVersion

      void destroyRecordedVersion(Version version)
      Marks a recorded version as destroyed.

      Note this method does not destroy the associated record, instead it marks the version as destroyed.

      Parameters:
      version - version
    • isEnableAutoVersionOnRecordCreation

      boolean isEnableAutoVersionOnRecordCreation()
      Flag that indicate to create new version on record creation if current node is modified
      Returns:
      boolean true to auto-version on record creation, false to use latest versioned version
    • createSnapshotVersion

      void createSnapshotVersion(NodeRef nodeRef)
      Create a snapshot version of current node
      Parameters:
      nodeRef - node reference