fr.ifremer.echobase.ui.validators
Class EchoBaseFieldValidatorSupport

java.lang.Object
  extended by com.opensymphony.xwork2.validator.validators.ValidatorSupport
      extended by com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
          extended by org.nuiton.validator.xwork2.field.NuitonFieldValidatorSupport
              extended by fr.ifremer.echobase.ui.validators.EchoBaseFieldValidatorSupport
All Implemented Interfaces:
com.opensymphony.xwork2.validator.FieldValidator, com.opensymphony.xwork2.validator.ShortCircuitableValidator, com.opensymphony.xwork2.validator.Validator
Direct Known Subclasses:
LoginValidator

public abstract class EchoBaseFieldValidatorSupport
extends org.nuiton.validator.xwork2.field.NuitonFieldValidatorSupport

Base EchoBase validator.

Since:
0.1
Author:
tchemit

Field Summary
 
Fields inherited from class org.nuiton.validator.xwork2.field.NuitonFieldValidatorSupport
skip
 
Fields inherited from class com.opensymphony.xwork2.validator.validators.ValidatorSupport
defaultMessage, log, messageKey
 
Constructor Summary
EchoBaseFieldValidatorSupport()
           
 
Method Summary
protected  String _(String key, Object... args)
          Translate the given i18n key with his optional arguments.
protected  void addFieldError(String propertyName, String error)
          Add directly a field error with the given sentence wihtout any translation from the xml validator file.
 
Methods inherited from class org.nuiton.validator.xwork2.field.NuitonFieldValidatorSupport
evaluateSkipParameter, getFieldValue, setSkip, validate, validateWhenNotSkip
 
Methods inherited from class com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
getFieldName, getValidatorType, setFieldName, setValidatorType
 
Methods inherited from class com.opensymphony.xwork2.validator.validators.ValidatorSupport
addActionError, addFieldError, conditionalParse, getDefaultMessage, getMessage, getMessageKey, getMessageParameters, getParse, getValidatorContext, isShortCircuit, setDefaultMessage, setMessageKey, setMessageParameters, setParse, setShortCircuit, setValidatorContext, setValueStack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.opensymphony.xwork2.validator.Validator
getDefaultMessage, getMessage, getMessageKey, getMessageParameters, getValidatorContext, setDefaultMessage, setMessageKey, setMessageParameters, setValidatorContext, setValueStack
 

Constructor Detail

EchoBaseFieldValidatorSupport

public EchoBaseFieldValidatorSupport()
Method Detail

addFieldError

protected void addFieldError(String propertyName,
                             String error)
Add directly a field error with the given sentence wihtout any translation from the xml validator file.

Parameters:
propertyName - name of the property where to push the error
error - the error

_

protected String _(String key,
                   Object... args)
Translate the given i18n key with his optional arguments.

Note: This method name is fixed to be detected via the nuiton i18n system, do NOT change this method name.

Parameters:
key - the i18n key to translate
args - the optional arguments of the sentence
Returns:
the translated sentence


Copyright © 2011-2012 Ifremer. All Rights Reserved.