public class StringLengthConstraint extends AbstractConstraint
setMinLength(int)
,
setMaxLength(int)
ERR_EVALUATE_EXCEPTION, ERR_PROP_NOT_SET
Constructor and Description |
---|
StringLengthConstraint() |
Modifier and Type | Method and Description |
---|---|
protected void |
evaluateSingleValue(Object value)
Support for evaluation of properties.
|
int |
getMaxLength() |
int |
getMinLength() |
Map<String,Object> |
getParameters()
Returns the parameters passed to the instance of the constraint.
|
String |
getType()
Returns the 'type' of the constraint, this is the identifier given to
constraint in the configuration.
|
void |
setMaxLength(int maxLength)
Set the maximum number of characters allowed.
|
void |
setMinLength(int minLength)
Set the minimum number of characters allowed.
|
String |
toString() |
checkPropertyNotNull, evaluate, evaluateCollection, getShortName, getTitle, initialize, set_shortName, setRegistry, setShortName, setTitle
public String getType()
getType
in interface Constraint
getType
in class AbstractConstraint
public int getMinLength()
public void setMinLength(int minLength)
Integer.MAX_VALUE
].minLength
- the minimum numbers of characters allowedpublic int getMaxLength()
public void setMaxLength(int maxLength)
Integer.MAX_VALUE
].maxLength
- the minimum numbers of characters allowedpublic Map<String,Object> getParameters()
Constraint
getParameters
in interface Constraint
getParameters
in class AbstractConstraint
protected void evaluateSingleValue(Object value)
AbstractConstraint
evaluateSingleValue
in class AbstractConstraint
Copyright © 2005–2017 Alfresco Software. All rights reserved.