Class AbstractVersionServiceImpl

  • Direct Known Subclasses:
    VersionServiceImpl

    public abstract class AbstractVersionServiceImpl
    extends java.lang.Object
    Abstract version service implementation.
    Author:
    Roy Wetherall
    • 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
      • invokeAfterVersionRevert

        protected void invokeAfterVersionRevert​(org.alfresco.service.cmr.repository.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​(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 behaviour
        Parameters:
        nodeRef - the nodeRef versioned
        version - the created version
      • invokeOnCreateVersion

        protected void invokeOnCreateVersion​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                             java.util.Map<java.lang.String,​java.io.Serializable> versionProperties,
                                             PolicyScope nodeDetails)
        Invoke the on create version policy behaviour
      • getRevertAspectAction

        protected VersionRevertCallback.RevertAspectAction getRevertAspectAction​(org.alfresco.service.namespace.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​(org.alfresco.service.namespace.QName className,
                                                                               org.alfresco.service.namespace.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​(org.alfresco.service.namespace.QName classRef,
                                                       org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                                       java.util.Map<java.lang.String,​java.io.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 java.lang.String invokeCalculateVersionLabel​(org.alfresco.service.namespace.QName classRef,
                                                               Version preceedingVersion,
                                                               int versionNumber,
                                                               java.util.Map<java.lang.String,​java.io.Serializable> versionProperties)
        Invoke the calculate version label policy behaviour
        Parameters:
        classRef - QName
        preceedingVersion - Version
        versionNumber - int
        Returns:
        String
      • getVersionStoreReference

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