mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added LIST constraint
- An optionally case-insensitive list of supported values - Supports any types that can be converted to String by our type-converter. Simple parameter values for constraints must not be in a <value> element, just like Spring properties (sorry) Constraint parameters of type java.util.List are now supported: <list> <value> <value> </list> git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2660 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,7 +20,6 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.alfresco.service.cmr.dictionary.ConstraintException;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryException;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
|
||||
/**
|
||||
@@ -94,13 +93,11 @@ public class RegexConstraint extends AbstractConstraint
|
||||
{
|
||||
this.requiresMatch = requiresMatch;
|
||||
}
|
||||
|
||||
|
||||
public void initialize()
|
||||
{
|
||||
if (expression == null)
|
||||
{
|
||||
throw new DictionaryException(AbstractConstraint.ERR_PROP_NOT_SET, "expression");
|
||||
}
|
||||
checkPropertyNotNull("expression", expression);
|
||||
|
||||
this.patternMatcher = Pattern.compile(expression);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user