Interface RecordableVersionService
- All Known Implementing Classes:
RecordableVersionServiceImpl
@AlfrescoPublicApi
public interface RecordableVersionService
Recordable version service interface.
- Since:
- 2.3
- Author:
- Roy Wetherall
-
Method Summary
Modifier and TypeMethodDescriptioncreateRecordFromLatestVersion
(NodeRef filePlan, NodeRef nodeRef) Creates a record from the latest frozen version, marking it as recorded.createRecordFromLatestVersion
(NodeRef filePlan, NodeRef nodeRef, boolean autoVersion) Creates a record from the latest version, marking it as recorded.void
createSnapshotVersion
(NodeRef nodeRef) Create a snapshot version of current nodevoid
destroyRecordedVersion
(Version version) Marks a recorded version as destroyed.getRecordedVersion
(NodeRef record) Gets the version that relates to the version recordgetVersionRecord
(Version version) If the version is a recorded version, gets the related version record.boolean
isCurrentVersionRecorded
(NodeRef nodeRef) Indicates whether the current version of a node is recorded or not.boolean
Flag that indicate to create new version on record creation if current node is modifiedboolean
isRecordedVersion
(Version version) Indicates whether a version is recorded or not.boolean
isRecordedVersionDestroyed
(Version version) Indicates whether a record version is destroyed or not.
-
Method Details
-
isCurrentVersionRecorded
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
Indicates whether a version is recorded or not.- Parameters:
version
- version- Returns:
- boolean true if recorded version, false otherwise
-
getVersionRecord
If the version is a recorded version, gets the related version record.- Parameters:
version
- version- Returns:
- NodeRef node reference of version record
-
getRecordedVersion
Gets the version that relates to the version record- Parameters:
record
- version record node reference- Returns:
- Version version or null if not found
-
createRecordFromLatestVersion
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
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 referencenodeRef
- node referenceautoVersion
- 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
Indicates whether a record version is destroyed or not.- Parameters:
version
- version- Returns:
- boolean true if destroyed, false otherwise
-
destroyRecordedVersion
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
Create a snapshot version of current node- Parameters:
nodeRef
- node reference
-