AnsweredAssumed Answered

Get property constraints

Question asked by joblo on Jul 23, 2013
Latest reply on Sep 23, 2013 by jpotts

Im trying to get all the constraints from my Alfresco data-model in Java. Right now I'm able to get the maxLength of a String property. In the Alfresco data-model is it also possible to put the minLength of a d:text. In the openCMIS PropertyStringDefinition interface there is only a function to get the maxLength. My question is: how can I get the minLength in Java?

Same for regular expressions. Is it possible to get them?

PropertyStringDefinition propDefString = (PropertyStringDefinition) propDef;
if (propDefString.getMaxLength() != null) {
    // Do something

<property name="ex:example">
        <constraint type="LENGTH">
            <parameter name="minLength">
      <parameter name="maxLength">

Thanks in advance