Package org.alfresco.repo.version.common
Class AbstractVersionServiceImpl
- java.lang.Object
-
- org.alfresco.repo.version.common.AbstractVersionServiceImpl
-
- Direct Known Subclasses:
VersionServiceImpl
public abstract class AbstractVersionServiceImpl extends Object
Abstract version service implementation.- Author:
- Roy Wetherall
-
-
Field Summary
Fields Modifier and Type Field Description protected DictionaryServicedictionaryServiceThe dictionary serviceprotected NodeServicenodeServiceThe common node serviceprotected PolicyComponentpolicyComponentPolicy component
-
Constructor Summary
Constructors Constructor Description AbstractVersionServiceImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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 StoreRefgetVersionStoreReference()voidinitialise()Initialise 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 Detail
-
nodeService
protected NodeService nodeService
The common node service
-
policyComponent
protected PolicyComponent policyComponent
Policy component
-
dictionaryService
protected DictionaryService dictionaryService
The dictionary service
-
-
Method Detail
-
setNodeService
public void setNodeService(NodeService nodeService)
Sets the general node service- Parameters:
nodeService- the node service
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
Sets the policy component- Parameters:
policyComponent- the policy component
-
setDictionaryService
public void setDictionaryService(DictionaryService dictionaryService)
Sets the dictionary service- Parameters:
dictionaryService- the dictionary service
-
initialise
public void initialise()
Initialise method
-
invokeAfterVersionRevert
protected void invokeAfterVersionRevert(NodeRef nodeRef, Version version)
Invokes after version has been reverted- Parameters:
nodeRef- the node that has been revertedversion- the reverted version
-
invokeBeforeCreateVersion
protected void invokeBeforeCreateVersion(NodeRef nodeRef)
Invokes the before create version policy behaviour- Parameters:
nodeRef- the node being versioned
-
invokeAfterCreateVersion
protected void invokeAfterCreateVersion(NodeRef nodeRef, Version version)
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
public abstract StoreRef getVersionStoreReference()
-
-