cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying existing content model

nikhilaraballi
Champ in-the-making
Champ in-the-making
We would like to insert a class between two Alfresco class sys:base and cmSmiley Tongueerson. What are the options? Like type Party has 2 children, Person(individual) and Organisation, So how to model it as Type Party comes between sys:base and cmSmiley Tongueerson
4 REPLIES 4

jpotts
World-Class Innovator
World-Class Innovator
It is likely to be a lot less trouble (and safer) to create an aspect that you can add to the out-of-the-box person type rather than touching Alfresco's model. Is that a viable approach for what you are trying to do?

Jeff

nikhilaraballi
Champ in-the-making
Champ in-the-making
I'm trying to achieve it by bi-directional association (using Java) such that person (if it is a party) to be associated to party and same for business. Coding such a way that when party is created, edited or deleted associated person or business should get created, edited or deleted respectively. Please comment on it.

jpotts
World-Class Innovator
World-Class Innovator
For this I would definitely create an aspect and add it to the person objects that need to be treated differently than "normal" person objects. As part of the aspect you can define one or more associations that point to the other objects that need to be related to that person object.

If you would like to also add logic then I would create a behavior and bind it to the aspect and the creation of the association so that when the aspect is added or when the associations are created or deleted your code can do what it needs to.

All of this–creating custom aspects, creating associations, and creating behaviors–is documented so hopefully you can hook it all together to make it work according to your requirements.

Jeff

nikhilaraballi
Champ in-the-making
Champ in-the-making
Thank you very much, Jeff. I'll try that.