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 Details

    • nodeService

      protected NodeService nodeService
      The common node service
    • policyComponent

      protected PolicyComponent policyComponent
      Policy component
    • dictionaryService

      protected DictionaryService dictionaryService
      The dictionary service
  • Constructor Details

    • AbstractVersionServiceImpl

      public AbstractVersionServiceImpl()
  • Method Details

    • 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 reverted
      version - 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 versioned
      version - 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 - QName
      revertDetails - 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 - QName
      assocName - QName
      revertDetails - 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 - QName
      nodeRef - NodeRef
      nodeDetails - PolicyScope
    • invokeCalculateVersionLabel

      protected String invokeCalculateVersionLabel(QName classRef, Version preceedingVersion, int versionNumber, Map<String,Serializable> versionProperties)
      Invoke the calculate version label policy behaviour
      Parameters:
      classRef - QName
      preceedingVersion - Version
      versionNumber - int
      Returns:
      String
    • getVersionStoreReference

      public abstract StoreRef getVersionStoreReference()