Package org.alfresco.repo.version.common
Class AbstractVersionServiceImpl
java.lang.Object
org.alfresco.repo.version.common.AbstractVersionServiceImpl
- Direct Known Subclasses:
VersionServiceImpl
Abstract version service implementation.
- Author:
- Roy Wetherall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DictionaryServiceThe dictionary serviceprotected NodeServiceThe common node serviceprotected PolicyComponentPolicy component -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddefaultOnCreateVersion(QName classRef, NodeRef nodeRef, Map<String, Serializable> versionProperties, PolicyScope nodeDetails) Default implementation of the on create version policy.protected VersionRevertCallback.RevertAspectActiongetRevertAspectAction(QName aspectName, VersionRevertDetails revertDetails) How should revert deal with this aspect?protected VersionRevertCallback.RevertAssocActiongetRevertAssocAction(QName className, QName assocName, VersionRevertDetails revertDetails) How should revert deal with this associationabstract StoreRefvoidInitialise methodprotected voidinvokeAfterCreateVersion(NodeRef nodeRef, Version version) Invoke the after create version policy behaviourprotected voidinvokeAfterVersionRevert(NodeRef nodeRef, Version version) Invokes after version has been revertedprotected voidinvokeBeforeCreateVersion(NodeRef nodeRef) Invokes the before create version policy behaviourprotected StringinvokeCalculateVersionLabel(QName classRef, Version preceedingVersion, int versionNumber, Map<String, Serializable> versionProperties) Invoke the calculate version label policy behaviourprotected voidinvokeOnCreateVersion(NodeRef nodeRef, Map<String, Serializable> versionProperties, PolicyScope nodeDetails) Invoke the on create version policy behaviourvoidsetDictionaryService(DictionaryService dictionaryService) Sets the dictionary servicevoidsetNodeService(NodeService nodeService) Sets the general node servicevoidsetPolicyComponent(PolicyComponent policyComponent) Sets the policy component
-
Field Details
-
nodeService
The common node service -
policyComponent
Policy component -
dictionaryService
The dictionary service
-
-
Constructor Details
-
AbstractVersionServiceImpl
public AbstractVersionServiceImpl()
-
-
Method Details
-
setNodeService
Sets the general node service- Parameters:
nodeService- the node service
-
setPolicyComponent
Sets the policy component- Parameters:
policyComponent- the policy component
-
setDictionaryService
Sets the dictionary service- Parameters:
dictionaryService- the dictionary service
-
initialise
public void initialise()Initialise method -
invokeAfterVersionRevert
Invokes after version has been reverted- Parameters:
nodeRef- the node that has been revertedversion- the reverted version
-
invokeBeforeCreateVersion
Invokes the before create version policy behaviour- Parameters:
nodeRef- the node being versioned
-
invokeAfterCreateVersion
Invoke the after create version policy behaviour- Parameters:
nodeRef- the nodeRef versionedversion- the created version
-
invokeOnCreateVersion
protected void invokeOnCreateVersion(NodeRef nodeRef, Map<String, Serializable> versionProperties, PolicyScope nodeDetails) Invoke the on create version policy behaviour -
getRevertAspectAction
protected VersionRevertCallback.RevertAspectAction getRevertAspectAction(QName aspectName, VersionRevertDetails revertDetails) How should revert deal with this aspect?- Parameters:
aspectName- QNamerevertDetails- VersionRevertDetails- Returns:
- the action to be taken
-
getRevertAssocAction
protected VersionRevertCallback.RevertAssocAction getRevertAssocAction(QName className, QName assocName, VersionRevertDetails revertDetails) How should revert deal with this association- Parameters:
className- QNameassocName- QNamerevertDetails- VersionRevertDetails- Returns:
- the action to be taken
-
defaultOnCreateVersion
protected abstract void defaultOnCreateVersion(QName classRef, NodeRef nodeRef, Map<String, Serializable> versionProperties, PolicyScope nodeDetails) Default implementation of the on create version policy. Override if you wish to supply your own policy.- Parameters:
classRef- QNamenodeRef- NodeRefnodeDetails- PolicyScope
-
invokeCalculateVersionLabel
protected String invokeCalculateVersionLabel(QName classRef, Version preceedingVersion, int versionNumber, Map<String, Serializable> versionProperties) Invoke the calculate version label policy behaviour- Parameters:
classRef- QNamepreceedingVersion- VersionversionNumber- int- Returns:
- String
-
getVersionStoreReference
-