Further constraints

- MINMAX (NumericRangeConstraint)
 - LENGTH (StringLengthConstraint)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2622 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-04-05 09:42:00 +00:00
parent 4dcd14a59a
commit 303d518cbe
9 changed files with 456 additions and 53 deletions

View File

@@ -18,7 +18,9 @@ package org.alfresco.repo.dictionary;
import java.util.List;
import org.alfresco.repo.dictionary.constraint.NumericRangeConstraint;
import org.alfresco.repo.dictionary.constraint.RegexConstraint;
import org.alfresco.repo.dictionary.constraint.StringLengthConstraint;
import org.alfresco.service.cmr.dictionary.Constraint;
import org.alfresco.service.cmr.dictionary.ConstraintDefinition;
import org.alfresco.service.cmr.dictionary.DictionaryException;
@@ -226,6 +228,22 @@ import org.springframework.beans.TypeMismatchException;
{
return new RegexConstraint();
}
},
MINMAX
{
@Override
protected Constraint newInstance()
{
return new NumericRangeConstraint();
}
},
LENGTH
{
@Override
protected Constraint newInstance()
{
return new StringLengthConstraint();
}
};
/**