Last active
August 29, 2015 13:58
-
-
Save alex4u2nv/10000929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyBehaviourPolicy implements NodeServicePolicies.OnCreateChildAssociationPolicy { | |
private PolicyComponent policyComponent; | |
public PolicyComponent getPolicyComponent() { | |
return policyComponent; | |
} | |
public void setPolicyComponent(PolicyComponent policyComponent) { | |
this.policyComponent = policyComponent; | |
} | |
public void init() { | |
this.OnCreateChildAssociationPolicy.bindAssociationBehaviour( | |
NodeServicePolicies.OnCreateChildAssociationPolicy.QNAME, | |
ContentModel.TYPE_AUTHORITY_CONTAINER, | |
ContentModel.ASSOC_MEMBER, | |
new JavaBehaviour(this, "onCreateChildAssociation", NotificationFrequency.TRANSACTION_COMMIT) | |
); | |
} | |
@Override | |
public void onCreateChildAssociation(ChildAssociationRef arg0, boolean arg1) { | |
//do your magic | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment