I would like to have some custom behaviour invoked when an association is changed on an item that has a given aspect. I think that I need to use PolicyComponent.bindAssociationBehaviour(QName policy, QName className, QName assocName, Behaviour behaviour) but could use some advice regarding the arguments I need to pass.
I presume that:
- "className" should be the qualified name of the aspect on which the association is defined;
- "assocName" should be the qualified name of the association type as defined on the aspect;
- "behaviour" should be a JavaBehaviour that points at my code.
What I am less clear on is what I should be using for the "policy" argument. I think that the relevant policies are likely to be OnCreateAssociationPolicy and OnDeleteAssociationPolicy, but I have no idea what their QNames are.
Can anyone give me some guidance?
Regards
Brian