java - Unable to call policy/behaviour in alfresco 5 -


previously using alfresco 4.1.3 in have done many customization like. policy,custom action etc.

now have migrated code alfresco 5.01 , deployed successfully. functionality working fine not able call custom policy/behaviour.

below sample code.

public class oncreateobjectpolicy extends abstractconfigurablepolicy implements nodeservicepolicies.oncreatenodepolicy{      @override     public void oncreatenode(childassociationref childassocref) {         system.out.println("************create node called successfully");     }      @override     public void bindbehavior() {         system.out.println("************bindbehavior called successfully");     }   } 

any 1 can help?

you need register policy/class in (any of) context xml files well. having them in module/jar/class not register them yet automatically. i'm sure did in 4.1.3 installation, copy over.

sample:

<bean id="oncreatenodepolicy" class="com.mycompany.alfresco.repo.policies.oncreatenodepolicy" init-method="init">     <property name="serviceregistry" ref="serviceregistry" />     ... </bean> 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -