org.alfresco.repo.version.common
Class AbstractVersionServiceImpl

java.lang.Object
  extended by org.alfresco.repo.version.common.AbstractVersionServiceImpl
Direct Known Subclasses:
VersionServiceImpl

public abstract class AbstractVersionServiceImpl
extends java.lang.Object

Abstract version service implementation.


Field Summary
protected  org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
          The dictionary service
protected  org.alfresco.service.cmr.repository.NodeService nodeService
          The common node service
protected  PolicyComponent policyComponent
          Policy component
 
Constructor Summary
AbstractVersionServiceImpl()
           
 
Method Summary
protected abstract  void defaultOnCreateVersion(org.alfresco.service.namespace.QName classRef, org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map versionProperties, PolicyScope nodeDetails)
          Default implementation of the on create version policy.
abstract  org.alfresco.service.cmr.repository.StoreRef getVersionStoreReference()
           
 void initialise()
          Initialise method
protected  void invokeAfterCreateVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef, Version version)
          Invoke the after create version policy bahaviour
protected  void invokeBeforeCreateVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Invokes the before create version policy behaviour
protected  java.lang.String invokeCalculateVersionLabel(org.alfresco.service.namespace.QName classRef, Version preceedingVersion, int versionNumber, java.util.Map versionProperties)
          Invoke the calculate version label policy behaviour
protected  void invokeOnCreateVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map versionProperties, PolicyScope nodeDetails)
          Invoke the on create version policy behaviour
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
          Sets the dictionary service
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
          Sets the general node service
 void setPolicyComponent(PolicyComponent policyComponent)
          Sets the policy component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeService

protected org.alfresco.service.cmr.repository.NodeService nodeService
The common node service


policyComponent

protected PolicyComponent policyComponent
Policy component


dictionaryService

protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
The dictionary service

Constructor Detail

AbstractVersionServiceImpl

public AbstractVersionServiceImpl()
Method Detail

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Sets the dictionary service

Parameters:
dictionaryService - the dictionary service

initialise

public void initialise()
Initialise method


invokeBeforeCreateVersion

protected void invokeBeforeCreateVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Invokes the before create version policy behaviour

Parameters:
nodeRef - the node being versioned

invokeAfterCreateVersion

protected void invokeAfterCreateVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                        Version version)
Invoke the after create version policy bahaviour

Parameters:
nodeRef - the nodeRef versioned
version - the created version

invokeOnCreateVersion

protected void invokeOnCreateVersion(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                     java.util.Map versionProperties,
                                     PolicyScope nodeDetails)
Invoke the on create version policy behaviour


defaultOnCreateVersion

protected abstract void defaultOnCreateVersion(org.alfresco.service.namespace.QName classRef,
                                               org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                               java.util.Map versionProperties,
                                               PolicyScope nodeDetails)
Default implementation of the on create version policy. Override if you wish to supply your own policy.

Parameters:
nodeRef -
versionProperties -
nodeDetails -

invokeCalculateVersionLabel

protected java.lang.String invokeCalculateVersionLabel(org.alfresco.service.namespace.QName classRef,
                                                       Version preceedingVersion,
                                                       int versionNumber,
                                                       java.util.Map versionProperties)
Invoke the calculate version label policy behaviour

Parameters:
classRef -
preceedingVersion -
versionNumber -
versionProperties -
Returns:

getVersionStoreReference

public abstract org.alfresco.service.cmr.repository.StoreRef getVersionStoreReference()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.