|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nl.openedge.baritus.validation.AbstractValidator
convenience class
Constructor Summary | |
AbstractValidator()
construct |
|
AbstractValidator(ValidationActivationRule rule)
construct with validator activation rule |
Method Summary | |
protected java.lang.String |
getFieldName(FormBeanContext formBeanContext,
java.lang.String name)
Get the - possibly translated - name of the field. |
java.lang.String |
getLocalizedMessage(java.lang.String key)
get localized message for given key |
java.lang.String |
getLocalizedMessage(java.lang.String key,
java.util.Locale locale)
get localized message for given key and locale. |
java.lang.String |
getLocalizedMessage(java.lang.String key,
java.util.Locale locale,
java.lang.Object[] parameters)
Get localized message for given key and locale and format it with the given parameters. |
java.lang.String |
getLocalizedMessage(java.lang.String key,
java.lang.Object[] parameters)
Get localized message for given key and format it with the given parameters. |
ValidationActivationRule |
getValidationActivationRule()
Get the registered validation rule. |
void |
removeValidationActivationRule()
Remove the validation rule. |
protected void |
setErrorMessage(FormBeanContext formBeanContext,
java.lang.String name,
java.lang.String errorMessageKey,
java.lang.Object[] messageArguments)
set error message in formBeanContext using the provided name, the current locale that is stored in the form bean context, the provided errorMessageKey and the provided arguments for parsing the localized message; the message will be stored in the form bean context with key that was provided as argument name. |
void |
setValidationRule(ValidationActivationRule rule)
Set the validation rule. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractValidator()
public AbstractValidator(ValidationActivationRule rule)
rule
- validator activation ruleMethod Detail |
public java.lang.String getLocalizedMessage(java.lang.String key)
key
- key of message
public java.lang.String getLocalizedMessage(java.lang.String key, java.util.Locale locale)
key
- key of messagelocale
- locale for message
public java.lang.String getLocalizedMessage(java.lang.String key, java.lang.Object[] parameters)
key
- key of messageparameters
- parameters for the message
public java.lang.String getLocalizedMessage(java.lang.String key, java.util.Locale locale, java.lang.Object[] parameters)
key
- key of messagelocale
- locale for messageparameters
- parameters for the message
public ValidationActivationRule getValidationActivationRule()
ValidationRuleDependend
getValidationActivationRule
in interface ValidationRuleDependend
ValidationRuleDependend.getValidationActivationRule()
public void removeValidationActivationRule()
ValidationRuleDependend
removeValidationActivationRule
in interface ValidationRuleDependend
ValidationRuleDependend.removeValidationActivationRule()
public void setValidationRule(ValidationActivationRule rule)
ValidationRuleDependend
setValidationRule
in interface ValidationRuleDependend
rule
- the ruleValidationRuleDependend.setValidationRule(nl.openedge.baritus.validation.ValidationActivationRule)
protected java.lang.String getFieldName(FormBeanContext formBeanContext, java.lang.String name)
formBeanContext
- form bean contextname
- original name of field
protected void setErrorMessage(FormBeanContext formBeanContext, java.lang.String name, java.lang.String errorMessageKey, java.lang.Object[] messageArguments)
formBeanContext
- form bean contextname
- untransalated name of the fielderrorMessageKey
- message key for errormessageArguments
- arguments for parsing the message
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |