AnsweredAssumed Answered

Dynamic Multilingual Lists

Question asked by akaariai on Feb 9, 2009
Latest reply on May 13, 2009 by sergi.l
Hello all!

I am new to Alfresco and I am wondering about best practices implementation for the following problem:

I have a type, lets call it sc:Doc. I need to have a multilingual, multi value list of properties for this type, lets call them targetAudience. These properties should be ideally dynamically modifiable and it should be easy to search for the "associated" sc:Docs by these properties. I will use Alfresco remotely as a repository (most likely using REST), so web client configuration is not a problem. However it would be nice if at least prototyping could be done with the web client.

I have some ideas how to implement this, but I am not sure which is the right way to proceed:

1. Implement as a list constraint:
This is easy and I can get the multilingual part done in my own application layer. However this is not dynamic.

2. Implement as a custom list constraint (loading the constraint list from DB or file):
This would be dynamic but I am afraid of the complexity of implementing something like this. In addition, I would still need to do the multilingual part in my  application. Doing this dynamically and with the possibility that the application will be ran on different servers makes this non-optimal.

3. Implement this as association.
This is, every new targetAudience would be of type sc:targetAudience. sc:TargetAudience could have multilingual properties. I am afraid this would make searching using Lucene much harder. Maybe I could get all the sc:targetAudience nodeRefs (or whatever I need to search directly) into my application and search by these?

4. Implement as child association.
This could be done by having the association with <source><multiple>True</multiple></source> and <target><multiple>True</multiple></target>. Only problem with this is that I don't know what happens if I delete a document? Will all my sc:targetAudiences associated to that document get deleted also? Could I make a special node to contain all the primary references, so that as long as this node exists, the sc:targetAudiences would not be cascade deleted?

If anybody has any ideas how to properly implement this, or where to look for answers, I would be very happy.

Outcomes