cancel
Showing results for 
Search instead for 
Did you mean: 

Aspect Behavior

cmeinck
Champ in-the-making
Champ in-the-making
I have successfully added a new aspect with over 60 metadata fields in it. I would like to add behavior to this aspect such that when copied, all of the metadata values are copied as well. I notice this happens by default with the Dublin Core aspect; I would like to duplicate this behavior.

Any ideas on how to do this easily?
3 REPLIES 3

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

The default behaviour is to copy all aspects that are applied to a node, so you should find that your aspect and its properties will be copied.

If this is not the case then let me know and we'll look into it,

Cheers,
Roy

cmeinck
Champ in-the-making
Champ in-the-making
I realize my problem. I have some properties that I want modified on copy and move, so I bound my custom "OnCopy" behavior without including any of the default property copying behavior.

I got rid of my custom bind for "OnCopy", and just do my modifications in the "AddAspect" behavior. This works for new content, and copied content, but it does not work for nodes that are moved.

Is there an easy way to accomplish this?

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

When a node is moved the onCreateChildAssociation policy is fired, but this is probably going to be too general for you since this is also fired when a new node is created.

Is sounds like you have a requirement for an onNodeMove policy which we don't have at the moment.

I've added a JIRA task for this http://www.alfresco.org/jira/browse/AR-455.  If you are confident in doing so, please feel free to add the policy yourself and contribute the code.

Thanks,
Roy