org.parancoe.plugin.dwr.validation
Class DWRAnnotationValidator

java.lang.Object
  extended by org.springmodules.validation.bean.RuleBasedValidator
      extended by org.springmodules.validation.bean.BeanValidator
          extended by org.parancoe.plugin.dwr.validation.DWRAnnotationValidator
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.validation.Validator

@Component
public class DWRAnnotationValidator
extends org.springmodules.validation.bean.BeanValidator
implements org.springframework.context.ApplicationContextAware

Gives convenience methods for validation through direct web remoting (DWR)

Author:
gtrev

Constructor Summary
DWRAnnotationValidator()
           
DWRAnnotationValidator(org.springmodules.validation.bean.conf.loader.BeanValidationConfigurationLoader configurationLoader)
           
 
Method Summary
protected  java.lang.String getValidationMessage(org.springframework.validation.Errors errors, java.lang.String fieldName)
          Returns a localized validation message for the given field (if any)
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 java.lang.String validateDWR(java.lang.String controllerId, java.lang.String propertyName, java.lang.String propertyValue)
          Validate a propertyValue of the commandClass of controller controllerId
 
Methods inherited from class org.springmodules.validation.bean.BeanValidator
applyBeanValidation, applyCustomValidator, applyGlobalValidationRules, applyPropertiesValidationRules, setConfigurationLoader, setErrorCodeConverter, supports, validate, validateAndShortCircuitRules, validateArrayProperty, validatedSubBean, validateListOrSetProperty, validateMapProperty, validateObjectGraphConstraints, wrapBean
 
Methods inherited from class org.springmodules.validation.bean.RuleBasedValidator
addGlobalRule, addGlobalRule, addGlobalRule, addGlobalRule, addGlobalRule, addPropertyGlobalRule, addPropertyRule, addPropertyRule, addPropertyRule, addPropertyRule, setExtraGlobalVadlidationRules, setExtraPropertyValidationRules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DWRAnnotationValidator

public DWRAnnotationValidator()

DWRAnnotationValidator

public DWRAnnotationValidator(org.springmodules.validation.bean.conf.loader.BeanValidationConfigurationLoader configurationLoader)
Method Detail

validateDWR

public java.lang.String validateDWR(java.lang.String controllerId,
                                    java.lang.String propertyName,
                                    java.lang.String propertyValue)
Validate a propertyValue of the commandClass of controller controllerId

Parameters:
controllerId -
propertyName -
propertyValue -
Returns:
Throws:
java.lang.Exception

getValidationMessage

protected java.lang.String getValidationMessage(org.springframework.validation.Errors errors,
                                                java.lang.String fieldName)
Returns a localized validation message for the given field (if any)


setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


Copyright © 2008. All Rights Reserved.