cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Multilingual Lists

akaariai
Champ in-the-making
Champ in-the-making
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 scSmiley Very Happyoc. 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" scSmiley Very Happyocs 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.
1 REPLY 1

sergi_l
Champ on-the-rise
Champ on-the-rise
Hi akaariai!

What does the first point mean?
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.

I'm trying to create a list constraint with key and value. Is my value your multilingual part? Can you share with us how could I create these key-value pairs of the list and how could I retrieve the multilingual part in the application layer?

Please, help! I can't undestand how's something so basic is not covered by Alfresco.
Thanks,
Sergi