Class Version2ServiceImpl
- java.lang.Object
-
- org.alfresco.repo.version.common.AbstractVersionServiceImpl
-
- org.alfresco.repo.version.VersionServiceImpl
-
- org.alfresco.repo.version.Version2ServiceImpl
-
- All Implemented Interfaces:
Version2Model,VersionBaseModel,VersionModel,VersionService,Extensible
public class Version2ServiceImpl extends VersionServiceImpl implements VersionService, Version2Model, Extensible
Version2 Service - implements version2Store (a lighter implementation of the lightWeightVersionStore)
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.version.VersionServiceImpl
dbNodeService, MSGID_ERR_NO_BRANCHES, MSGID_ERR_NOT_FOUND, MSGID_ERR_ONE_PRECEEDING, MSGID_ERR_RESTORE_EXISTS, MSGID_ERR_RESTORE_NO_VERSION, MSGID_ERR_REVERT_MISMATCH, policyBehaviourFilter, searcher, versionComparatorDesc
-
Fields inherited from class org.alfresco.repo.version.common.AbstractVersionServiceImpl
dictionaryService, nodeService, policyComponent
-
Fields inherited from interface org.alfresco.repo.version.Version2Model
ASPECT_LOCALNAME_VERSION, ASPECT_VERSION, ASPECT_VERSION_STORE_ROOT, ASSOC_ROOT_VERSION, ASSOC_SUCCESSOR, CHILD_QNAME_VERSION_HISTORIES, CHILD_QNAME_VERSIONED_ASSOCS, CHILD_QNAME_VERSIONS, NAMESPACE_URI, PROP_ASSOC_DBID, PROP_FROZEN_ACCESSED, PROP_FROZEN_CREATED, PROP_FROZEN_CREATOR, PROP_FROZEN_MODIFIED, PROP_FROZEN_MODIFIER, PROP_FROZEN_NODE_DBID, PROP_FROZEN_NODE_REF, PROP_METADATA_PREFIX, PROP_QNAME_ASSOC_DBID, PROP_QNAME_FROZEN_ACCESSED, PROP_QNAME_FROZEN_CREATED, PROP_QNAME_FROZEN_CREATOR, PROP_QNAME_FROZEN_MODIFIED, PROP_QNAME_FROZEN_MODIFIER, PROP_QNAME_FROZEN_NODE_DBID, PROP_QNAME_FROZEN_NODE_REF, PROP_QNAME_TRANSLATION_VERSIONS, PROP_QNAME_VERSION_DESCRIPTION, PROP_QNAME_VERSION_LABEL, PROP_QNAME_VERSION_NUMBER, PROP_QNAME_VERSIONED_NODE_ID, PROP_VERSION_DESCRIPTION, PROP_VERSION_TYPE, STORE_ID, TYPE_QNAME_VERSION_HISTORY, TYPE_QNAME_VERSIONED_ASSOC
-
Fields inherited from interface org.alfresco.repo.version.VersionBaseModel
ASPECT_LOCALNAME_VERSION_STORE_ROOT, ASSOC_LOCALNAME_ROOT_VERSION, CHILD_VERSION_HISTORIES, CHILD_VERSIONED_ASSOCS, CHILD_VERSIONS, PROP_CREATED_DATE, PROP_CREATOR, PROP_DESCRIPTION, PROP_TRANSLATION_VERSIONS, PROP_VERSION_DESCRIPTION, PROP_VERSION_LABEL, PROP_VERSION_NUMBER, PROP_VERSION_TYPE, PROP_VERSIONED_NODE_ID, STORE_PROTOCOL, TYPE_VERSION_HISTORY, TYPE_VERSIONED_ASSOC
-
Fields inherited from interface org.alfresco.repo.version.VersionModel
ASPECT_VERSION_STORE_ROOT, ASSOC_ROOT_VERSION, ASSOC_SUCCESSOR, CHILD_QNAME_VERSION_HISTORIES, CHILD_QNAME_VERSION_META_DATA, CHILD_QNAME_VERSIONED_ASSOCS, CHILD_QNAME_VERSIONED_ATTRIBUTES, CHILD_QNAME_VERSIONED_CHILD_ASSOCS, CHILD_QNAME_VERSIONS, CHILD_VERSION_META_DATA, CHILD_VERSIONED_ATTRIBUTES, CHILD_VERSIONED_CHILD_ASSOCS, NAMESPACE_URI, PROP_ASSOC_QNAME, PROP_ASSOC_TYPE_QNAME, PROP_FROZEN_ASPECTS, PROP_FROZEN_NODE_ID, PROP_FROZEN_NODE_STORE_ID, PROP_FROZEN_NODE_STORE_PROTOCOL, PROP_FROZEN_NODE_TYPE, PROP_IS_MULTI_VALUE, PROP_IS_PRIMARY, PROP_META_DATA_NAME, PROP_META_DATA_VALUE, PROP_MULTI_VALUE, PROP_NTH_SIBLING, PROP_QNAME, PROP_QNAME_ASSOC_QNAME, PROP_QNAME_ASSOC_TYPE_QNAME, PROP_QNAME_FROZEN_ASPECTS, PROP_QNAME_FROZEN_NODE_ID, PROP_QNAME_FROZEN_NODE_STORE_ID, PROP_QNAME_FROZEN_NODE_STORE_PROTOCOL, PROP_QNAME_FROZEN_NODE_TYPE, PROP_QNAME_IS_MULTI_VALUE, PROP_QNAME_IS_PRIMARY, PROP_QNAME_META_DATA_NAME, PROP_QNAME_META_DATA_VALUE, PROP_QNAME_MULTI_VALUE, PROP_QNAME_NTH_SIBLING, PROP_QNAME_QNAME, PROP_QNAME_TRANSLATION_VERSIONS, PROP_QNAME_VALUE, PROP_QNAME_VERSION_LABEL, PROP_QNAME_VERSION_NUMBER, PROP_QNAME_VERSIONED_NODE_ID, PROP_VALUE, STORE_ID, TYPE_QNAME_VERSION, TYPE_QNAME_VERSION_HISTORY, TYPE_QNAME_VERSION_META_DATA_VALUE, TYPE_QNAME_VERSIONED_ASSOC, TYPE_QNAME_VERSIONED_CHILD_ASSOC, TYPE_QNAME_VERSIONED_PROPERTY, TYPE_VERSION, TYPE_VERSION_META_DATA_VALUE, TYPE_VERSIONED_CHILD_ASSOC, TYPE_VERSIONED_PROPERTY
-
Fields inherited from interface org.alfresco.service.cmr.version.VersionService
VERSION_STORE_PROTOCOL
-
-
Constructor Summary
Constructors Constructor Description Version2ServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected VersionHistorybuildVersionHistory(org.alfresco.service.cmr.repository.NodeRef versionHistoryRef, org.alfresco.service.cmr.repository.NodeRef nodeRef)Builds a version history object from the version history reference.protected org.alfresco.service.cmr.repository.NodeRefcreateNewVersion(org.alfresco.service.namespace.QName sourceTypeRef, org.alfresco.service.cmr.repository.NodeRef versionHistoryRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> standardVersionProperties, java.util.Map<java.lang.String,java.io.Serializable> versionProperties, int versionNumber, PolicyScope nodeDetails)Creates a new version node, setting the properties both calculated and specified.java.util.Collection<Version>createVersion(java.util.Collection<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, java.util.Map<java.lang.String,java.io.Serializable> versionProperties)Note: we can't control the order of the list, so if we have children and parents in the list and the parents get versioned before the children and the children are not already versioned then the parents child references will be pointing to the node ref, rather than the verison history.VersioncreateVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<java.lang.String,java.io.Serializable> versionProperties)Creates a new version based on the referenced node.protected VersioncreateVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<java.lang.String,java.io.Serializable> origVersionProperties, int versionNumber)Creates a new version of the passed node assigning the version properties accordingly.protected org.alfresco.service.cmr.repository.NodeRefcreateVersionHistory(org.alfresco.service.cmr.repository.NodeRef nodeRef)Creates a new version history node, applying the root version aspect is requiredvoiddeleteVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef, Version version)Delete a specific version associated with a node reference.voiddeleteVersionHistory(org.alfresco.service.cmr.repository.NodeRef nodeRef)Delete the version history associated with a node reference.protected java.util.List<Version>getAllVersions(org.alfresco.service.cmr.repository.NodeRef versionHistoryRef)Gets all versions in version historyVersiongetCurrentVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef)Gets the version object for the current version of the node reference passed.protected java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable>getStandardVersionProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, long nodeDbId, java.util.Set<org.alfresco.service.namespace.QName> nodeAspects, int versionNumber, java.lang.String versionLabel, java.lang.String versionDescription)Get a map containing the standard list of version properties populated.<T extends Trait>
ExtendedTrait<T>getTrait(java.lang.Class<? extends T> traitAPI)protected VersiongetVersion(org.alfresco.service.cmr.repository.NodeRef versionRef)Constructs the a version object to contain the version information from the version node ref.VersionHistorygetVersionHistory(org.alfresco.service.cmr.repository.NodeRef nodeRef)Gets the version history information for a node.protected org.alfresco.service.cmr.repository.NodeRefgetVersionHistoryNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)Gets a reference to the version history node for a given 'real' node.org.alfresco.service.cmr.repository.StoreRefgetVersionStoreReference()Gets the reference to the version storevoidinitialise()Initialise methodbooleanisAVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef)Is the nodeRef a version node?booleanisVersioned(org.alfresco.service.cmr.repository.NodeRef nodeRef)Is the nodeRef versioned?org.alfresco.service.cmr.repository.NodeRefrestore(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)By default a deep restore is performed.org.alfresco.service.cmr.repository.NodeRefrestore(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, boolean deep)Restores a node not currently present in the store, but that has a version history.voidrevert(org.alfresco.service.cmr.repository.NodeRef nodeRef)Revert the state of the node to the current version.voidrevert(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean deep)Revert the state of the node to the current version.voidrevert(org.alfresco.service.cmr.repository.NodeRef nodeRef, Version version)Revert the state of the node to the specified version.voidrevert(org.alfresco.service.cmr.repository.NodeRef nodeRef, Version version, boolean deep)Revert the state of the node to the specified version.voidsetPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)-
Methods inherited from class org.alfresco.repo.version.VersionServiceImpl
createVersion, defaultOnCreateVersion, ensureVersioningEnabled, getRootNode, getVersionMetaData, registerVersionLabelPolicy, setDbNodeService, setPolicyBehaviourFilter, setSearcher, setVersionComparatorClass
-
Methods inherited from class org.alfresco.repo.version.common.AbstractVersionServiceImpl
getRevertAspectAction, getRevertAssocAction, invokeAfterCreateVersion, invokeAfterVersionRevert, invokeBeforeCreateVersion, invokeCalculateVersionLabel, invokeOnCreateVersion, setDictionaryService, setNodeService, setPolicyComponent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.service.cmr.version.VersionService
createVersion, ensureVersioningEnabled, registerVersionLabelPolicy
-
-
-
-
Method Detail
-
setPermissionService
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
-
initialise
public void initialise()
Initialise method- Overrides:
initialisein classVersionServiceImpl
-
getVersionStoreReference
public org.alfresco.service.cmr.repository.StoreRef getVersionStoreReference()
Description copied from class:VersionServiceImplGets the reference to the version store- Specified by:
getVersionStoreReferencein interfaceVersionService- Overrides:
getVersionStoreReferencein classVersionServiceImpl- Returns:
- reference to the version store
-
createVersion
public Version createVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<java.lang.String,java.io.Serializable> versionProperties) throws ReservedVersionNameException, AspectMissingException
Description copied from interface:VersionServiceCreates a new version based on the referenced node.If the node has not previously been versioned then a version history and initial version will be created.
If the node referenced does not or can not have the version aspect applied to it then an exception will be raised.
The version properties are stored as version meta-data against the newly created version.
- Specified by:
createVersionin interfaceVersionService- Overrides:
createVersionin classVersionServiceImpl- Parameters:
nodeRef- a node referenceversionProperties- the version properties that are stored with the newly created version, or null if there are no relevant properties- Returns:
- the created version object
- Throws:
ReservedVersionNameException- thrown if a reserved property name is used int he version properties providedAspectMissingException- thrown if the version aspect is missing- See Also:
VersionService.createVersion(NodeRef, Map)
-
createVersion
public java.util.Collection<Version> createVersion(java.util.Collection<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, java.util.Map<java.lang.String,java.io.Serializable> versionProperties) throws ReservedVersionNameException, AspectMissingException
Description copied from class:VersionServiceImplNote: we can't control the order of the list, so if we have children and parents in the list and the parents get versioned before the children and the children are not already versioned then the parents child references will be pointing to the node ref, rather than the verison history.- Specified by:
createVersionin interfaceVersionService- Overrides:
createVersionin classVersionServiceImpl- Parameters:
nodeRefs- a list of node referencesversionProperties- version property values- Returns:
- a collection of newly created versions
- Throws:
ReservedVersionNameException- thrown if a reserved property name is used in the version properties providedAspectMissingException- thrown if the version aspect is missing
-
createVersion
protected Version createVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<java.lang.String,java.io.Serializable> origVersionProperties, int versionNumber) throws ReservedVersionNameException
Description copied from class:VersionServiceImplCreates a new version of the passed node assigning the version properties accordingly.- Overrides:
createVersionin classVersionServiceImpl- Parameters:
nodeRef- a node referenceorigVersionProperties- the version propertiesversionNumber- the version number- Returns:
- the newly created version
- Throws:
ReservedVersionNameException- thrown if there is a name clash in the version properties
-
createVersionHistory
protected org.alfresco.service.cmr.repository.NodeRef createVersionHistory(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Creates a new version history node, applying the root version aspect is required- Parameters:
nodeRef- the node ref- Returns:
- the version history node reference
-
getVersionHistory
public VersionHistory getVersionHistory(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:VersionServiceGets the version history information for a node.If the node has not been versioned then null is returned.
If the node referenced does not or can not have the version aspect applied to it then an exception will be raised.
- Specified by:
getVersionHistoryin interfaceVersionService- Overrides:
getVersionHistoryin classVersionServiceImpl- Parameters:
nodeRef- a node reference- Returns:
- the version history information
- See Also:
VersionService.getVersionHistory(NodeRef)
-
getCurrentVersion
public Version getCurrentVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:VersionServiceGets the version object for the current version of the node reference passed.Returns
nullif the node is not versionable or has not been versioned.- Specified by:
getCurrentVersionin interfaceVersionService- Overrides:
getCurrentVersionin classVersionServiceImpl- Parameters:
nodeRef- the node reference of the 'live' node- Returns:
- the version object for the current version
- See Also:
VersionService.getCurrentVersion(NodeRef)
-
getStandardVersionProperties
protected java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> getStandardVersionProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, long nodeDbId, java.util.Set<org.alfresco.service.namespace.QName> nodeAspects, int versionNumber, java.lang.String versionLabel, java.lang.String versionDescription)Get a map containing the standard list of version properties populated.- Parameters:
nodeRef- the node reference- Returns:
- the standard version properties
-
createNewVersion
protected org.alfresco.service.cmr.repository.NodeRef createNewVersion(org.alfresco.service.namespace.QName sourceTypeRef, org.alfresco.service.cmr.repository.NodeRef versionHistoryRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> standardVersionProperties, java.util.Map<java.lang.String,java.io.Serializable> versionProperties, int versionNumber, PolicyScope nodeDetails)Creates a new version node, setting the properties both calculated and specified.- Parameters:
sourceTypeRef- the reference to the node being versionedversionHistoryRef- version history node referencestandardVersionProperties- version propertiesversionProperties- version propertiesversionNumber- the version numbernodeDetails- PolicyScope- Returns:
- the version node reference
-
getAllVersions
protected java.util.List<Version> getAllVersions(org.alfresco.service.cmr.repository.NodeRef versionHistoryRef)
Gets all versions in version history- Parameters:
versionHistoryRef- the version history nodeRef- Returns:
- list of all versions
-
buildVersionHistory
protected VersionHistory buildVersionHistory(org.alfresco.service.cmr.repository.NodeRef versionHistoryRef, org.alfresco.service.cmr.repository.NodeRef nodeRef)
Builds a version history object from the version history reference.The node ref is passed to enable the version history to be scoped to the appropriate branch in the version history.
- Overrides:
buildVersionHistoryin classVersionServiceImpl- Parameters:
versionHistoryRef- the node ref for the version historynodeRef- the node reference- Returns:
- a constructed version history object
-
getVersion
protected Version getVersion(org.alfresco.service.cmr.repository.NodeRef versionRef)
Constructs the a version object to contain the version information from the version node ref.- Overrides:
getVersionin classVersionServiceImpl- Parameters:
versionRef- the version reference- Returns:
- object containing verison data
-
getVersionHistoryNodeRef
protected org.alfresco.service.cmr.repository.NodeRef getVersionHistoryNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets a reference to the version history node for a given 'real' node.- Overrides:
getVersionHistoryNodeRefin classVersionServiceImpl- Parameters:
nodeRef- a node reference- Returns:
- a reference to the version history node, null of none
-
revert
public void revert(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:VersionServiceRevert the state of the node to the current version.The node reference will be reverted to the current version.
A deep revert will be performed.
- Specified by:
revertin interfaceVersionService- Overrides:
revertin classVersionServiceImpl- Parameters:
nodeRef- the node reference- See Also:
VersionService.revert(NodeRef)
-
revert
public void revert(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean deep)Description copied from interface:VersionServiceRevert the state of the node to the current version.The node will be reverted to the current version.
- Specified by:
revertin interfaceVersionService- Overrides:
revertin classVersionServiceImpl- Parameters:
nodeRef- the node referencedeep- true if a deep revert is to be performed, false otherwise- See Also:
VersionService.revert(org.alfresco.service.cmr.repository.NodeRef, boolean)
-
revert
public void revert(org.alfresco.service.cmr.repository.NodeRef nodeRef, Version version)Description copied from interface:VersionServiceRevert the state of the node to the specified version.A deep revert will take place by default.
- Specified by:
revertin interfaceVersionService- Overrides:
revertin classVersionServiceImpl- Parameters:
nodeRef- the node referenceversion- the version to revert to- See Also:
VersionService.revert(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.version.Version)
-
revert
public void revert(org.alfresco.service.cmr.repository.NodeRef nodeRef, Version version, boolean deep)Description copied from interface:VersionServiceRevert the state of the node to the specified version.Any changes made to the node will be lost and the state of the node will reflect that of the version specified.
The version label property on the node reference will remain unchanged.
If the node is further versioned then the new version will be created at the head of the version history graph. A branch will not be created.
If a deep revert is to be performed then any child nodes that are no longer present will be deep restored (if appropriate) otherwise child associations to deleted, versioned nodes will not be restored.
- Specified by:
revertin interfaceVersionService- Overrides:
revertin classVersionServiceImpl- Parameters:
nodeRef- the node referenceversion- the version to revert todeep- true is a deep revert is to be performed, false otherwise.- See Also:
VersionService.revert(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.version.Version, boolean)
-
restore
public org.alfresco.service.cmr.repository.NodeRef restore(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)Description copied from interface:VersionServiceBy default a deep restore is performed.- Specified by:
restorein interfaceVersionService- Overrides:
restorein classVersionServiceImpl- Parameters:
nodeRef- the node reference to a node that no longer exists in the storeparentNodeRef- the new parent of the restored nodeassocTypeQName- the assoc type qnameassocQName- the assoc qname- Returns:
- the newly restored node reference
- See Also:
VersionService.restore(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, org.alfresco.service.namespace.QName)
-
restore
public org.alfresco.service.cmr.repository.NodeRef restore(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, boolean deep)Description copied from interface:VersionServiceRestores a node not currently present in the store, but that has a version history.The restored node will be at the head (most resent version).
Restoration will fail if there is no version history for the specified node id in the specified store.
If the node already exists in the store then an exception will be raised.
Once the node is restored it is reverted to the head version in the appropriate version history tree. If deep is set to true then this will be a deep revert, false otherwise.
- Specified by:
restorein interfaceVersionService- Overrides:
restorein classVersionServiceImpl- Parameters:
nodeRef- the node reference to a node that no longer exists in the storeparentNodeRef- the new parent of the restored nodeassocTypeQName- the assoc type qnameassocQName- the assoc qnamedeep- true is a deep revert should be performed once the node has been restored, false otherwise- Returns:
- the newly restored node reference
- See Also:
VersionService.restore(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName, org.alfresco.service.namespace.QName, boolean)
-
deleteVersionHistory
public void deleteVersionHistory(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws AspectMissingExceptionDescription copied from interface:VersionServiceDelete the version history associated with a node reference.This operation is permanent, all versions in the version history are deleted and cannot be retrieved.
The current version label for the node reference is reset and any subsequent versions of the node will result in a new version history being created.
- Specified by:
deleteVersionHistoryin interfaceVersionService- Overrides:
deleteVersionHistoryin classVersionServiceImpl- Parameters:
nodeRef- the node reference- Throws:
AspectMissingException- thrown if the version aspect is missing- See Also:
VersionService.deleteVersionHistory(NodeRef)
-
deleteVersion
public void deleteVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef, Version version)Description copied from interface:VersionServiceDelete a specific version associated with a node reference.This operation is permanent, the specific version in the version history is deleted and cannot be retrieved.
If this is the last version, then the current version label for the node reference is reset and any subsequent versions of the node will result in a new version history being created.
- Specified by:
deleteVersionin interfaceVersionService- Overrides:
deleteVersionin classVersionServiceImpl- Parameters:
nodeRef- the node referenceversion- the version to delete
-
isAVersion
public boolean isAVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:VersionServiceIs the nodeRef a version node?- Specified by:
isAVersionin interfaceVersionService- Overrides:
isAVersionin classVersionServiceImpl- Returns:
- true, if the nodeRef is a version node, false otherwise
-
isVersioned
public boolean isVersioned(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:VersionServiceIs the nodeRef versioned?- Specified by:
isVersionedin interfaceVersionService- Overrides:
isVersionedin classVersionServiceImpl- Returns:
- true, if the nodeRef is versioned, false otherwise
-
getTrait
public <T extends Trait> ExtendedTrait<T> getTrait(java.lang.Class<? extends T> traitAPI)
- Specified by:
getTraitin interfaceExtensible
-
-