Interface Converter<A extends Annotation,T>
- All Known Implementing Classes:
AbstractConverterSupport
,AbstractCustomConverterSupport
,AbstractCustomFormatterSupport
,BigDecimalConverter
,BooleanConverter
,ByteConverter
,CharacterConverter
,DateConverter
,DoubleConverter
,EnumConverter
,FloatConverter
,IntegerConverter
,LongConverter
,ShortConverter
Interface for form field validators used by
AnnotationValidationInterceptor
and
AnnotationValidationInterceptor2
that convert from string values to single values and vice versa.-
Method Summary
Modifier and TypeMethodDescriptionReturns result of conversion of form field.Returns single field value formatted for display in a form field.boolean
Returns whetherconvert(java.lang.String, java.lang.Class<? extends T>)
converts empty string value, andformat(T)
formats null value.Returns type of recipient fields that can receive converted form value.Returns name of field to receive converted form value, which can be empty string to use default.Methods inherited from interface name.matthewgreet.strutscommons.policy.Policy
getAnnotation, setAnnotation
Methods inherited from interface name.matthewgreet.strutscommons.policy.Validator
getMessage, getMessageKey, getMessageType
-
Method Details
-
convert
Returns result of conversion of form field. This is not called if the form value is empty string or null, unlessgetProcessNoValue()
returns true.- Throws:
Exception
-
format
Returns single field value formatted for display in a form field. Only applies single value recipients. Not called if the unformatted value is null, unlessgetProcessNoValue()
returns true..- Throws:
Exception
-
getRecipientClass
Returns type of recipient fields that can receive converted form value. -
getRecipientFieldName
String getRecipientFieldName()Returns name of field to receive converted form value, which can be empty string to use default. -
getProcessNoValue
boolean getProcessNoValue()Returns whetherconvert(java.lang.String, java.lang.Class<? extends T>)
converts empty string value, andformat(T)
formats null value.
-