cancel
Showing results for 
Search instead for 
Did you mean: 

Constraint Service

alfrescot3ster
Champ in-the-making
Champ in-the-making
Hello guys!

It's monday and I'm here again with a question!

I have a contentModel with a constraint with type "LIST". Now I want to use the Java API to dynamically add values to this constraint (or parameter in the constraint).

<aspect name="doc:baseDocumentType">
         <title>Dokumenttyp</title>
         <constraints>
            <constraint name="doc:constraintDocumentClass" type="LIST">
               <parameter name="documentClasses">
                                       <value>test</value>
               </parameter>
            </constraint>
         </constraints>
      </aspect>


I didn't find a proper service to do this. I have found a getConstraints in the DictionaryService, but no way to add values to a constraint-list or even add a constraint.
The forum and google won't tell me the solution.

Someone got an idea?
1 REPLY 1

darionis
Champ on-the-rise
Champ on-the-rise
AFAIK, there is no easy solution for this. You may find this interesting
http://summit.alfresco.com/boston/sessions/lightning-talks-2
check Dynamic Datalist Driven Constraints in Share, Tony Parzgnat.

And also this:
http://ecmarchitect.com/archives/2008/08/13/845
https://forums.alfresco.com/forum/general/non-technical-alfresco-discussion/jean-barmash-blog-032120...
https://forums.alfresco.com/forum/developer-discussions/repository-services/custom-constraint-032620...

What about ListOfValuesConstraint#getAllowedValues()?


Please let us know if you find a solution.