Skip to content

Instantly share code, notes, and snippets.

@alex4u2nv
Last active Aug 29, 2015
Embed
What would you like to do?
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