public abstract class AbstractConstraint extends Object implements Constraint
This constraint ensures some date representation is in an enumeration.
This constraint can validate any Date or Calendar. This constraint also support Number types
whose long value is recognised as number of milliseconds since January 1, 1970, 00:00:00 GMT.
Constraint.DescriptionMESSAGES_BUNDLE, MESSAGES_DEFAULT_LANG, MESSAGES_KEY| Constructor and Description |
|---|
AbstractConstraint() |
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage(Object invalidValue,
Locale locale)
Provides an error message to display when some invalid value does not match existing entity.
|
static String |
getMessageString(String bundleName,
String key,
Object[] params,
Locale locale)
Try to get the message from the given message bundle.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, validatepublic AbstractConstraint()
public String getErrorMessage(Object invalidValue, Locale locale)
ConstraintgetErrorMessage in interface ConstraintinvalidValue - The invalid value that don't match any entity.locale - The language in which the message should be generated.Copyright © 2015 Nuxeo SA. All rights reserved.