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:
@@ -33,6 +33,22 @@ public abstract class AbstractConstraint implements Constraint
|
||||
public static final String ERR_PROP_NOT_SET = "d_dictionary.constraint.err.property_not_set";
|
||||
public static final String ERR_EVALUATE_EXCEPTION = "d_dictionary.constraint.err.evaluate_exception";
|
||||
|
||||
/**
|
||||
* Check that the given value is not <tt>null</tt>.
|
||||
*
|
||||
* @param name the name of the property
|
||||
* @param value the value to check for <tt>null</tt>
|
||||
*
|
||||
* @throws DictionaryException if the the property is null
|
||||
*/
|
||||
protected void checkPropertyNotNull(String name, Object value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new DictionaryException(AbstractConstraint.ERR_PROP_NOT_SET, value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #evaluateSingleValue(Object)
|
||||
* @see #evaluateCollection(Collection)
|
||||
|
Reference in New Issue
Block a user