AnsweredAssumed Answered

More than one CalculateVersionLabelPolicy behaviour has been

Question asked by raaftjon on Apr 4, 2012
Latest reply on Apr 5, 2012 by raaftjon
hello
I would like to register my own CalculateVersionLabelPolicy for get more control about the version labes. The problem is, that the java bean registerContentWithVersionService just register a version policy:

file: core-services-context.xml
    <bean id="registerContentWithVersionService" class="org.alfresco.repo.version.VersionServiceVersionLabelRegistrationBean" init-method="register"> 
       <property name="versionService">
            <ref bean="versionService" />
        </property>
        <property name="namespacePrefixResolver">
            <ref bean="namespaceService" />
        </property>
        <property name="typeQName">
            <value>cm:content</value>
        </property>
        <property name="policy">
             <ref bean="serialVersionLabelPolicy" />
        </property>
    </bean>
Is possible to de-register or overwrite a policy for a model type? I have not found a method in the package org.alfresco.service.cmr.version.

Or is possible to define the policy to the point where I add the versionable asspect:
nodeService.addAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE, …)
I use Alfresco 4.0.d

Thanks,
Jonas

Outcomes