As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
-Type_A, Meta_A,Meta_B -Type_B, Meta_A,Meta_C,Meta_D -Type_C, …
Type : facture Meta : numéro client Meta : numéro entreprise
1 facture : numéroClient=4, numéroEntreprise=1 1 facture : numéroClient=5, numéroEntreprise=1 1 facture : numéroClient=4, numéroEntreprise=2
1 facture : numéroClient=4, numéroEntreprise=2 1 facture : numéroClient=4, numéroEntreprise=2
… <constraint name="sg:SingleDoc" type="ch.custom.model.constraint.SingleDocConstraint"> </constraint> </constraints>
package ch.custom.model.constraint; import org.alfresco.repo.dictionary.constraint.AbstractConstraint; import org.alfresco.service.cmr.dictionary.ConstraintException; /** * Check that the document is single in Alfresco. (Check attributes) * */ public class SingleDocConstraint extends AbstractConstraint { @Override protected void evaluateSingleValue(Object value) { // Check if same type with same attributs values exist in alfresco … } }
<types> <type name="cm:cmobject"> <title>Object</title> <parent>sys:base</parent> <properties> <property name="cm:name"> <title>Name</title> <type>d:text</type> <mandatory enforced="true">true</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>both</tokenised> </index> <constraints> <constraint ref="cm:filename" /> </constraints> </property> </properties> <mandatory-aspects> <aspect>cm:auditable</aspect> </mandatory-aspects> </type> …