Class AbstractCustomConverterSupport<T>
java.lang.Object
name.matthewgreet.strutscommons.validators.AbstractPolicySupport<CustomConversion>
name.matthewgreet.strutscommons.validators.AbstractValidatorSupport<CustomConversion>
name.matthewgreet.strutscommons.validators.AbstractConverterSupport<CustomConversion,T>
name.matthewgreet.strutscommons.validators.AbstractCustomConverterSupport<T>
- All Implemented Interfaces:
Converter<CustomConversion,
,T> Policy<CustomConversion>
,Validator<CustomConversion>
public abstract class AbstractCustomConverterSupport<T>
extends AbstractConverterSupport<CustomConversion,T>
Template class for client supplied validators that convert a string-based form field to a single, other data type.
Subclasses must implement
Converter.getRecipientClass()
, Converter.format(T)
and Converter.convert(java.lang.String, java.lang.Class<T>)
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns message set by annotation.Returns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.Returns whether to write any error message to action errors, field errors, or action messages.Returns name of field to receive converted form value, which can be empty string to use default.Methods inherited from class name.matthewgreet.strutscommons.validators.AbstractPolicySupport
getAnnotation, setAnnotation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface name.matthewgreet.strutscommons.validators.Converter
convert, format, getRecipientClass
Methods inherited from interface name.matthewgreet.strutscommons.validators.Policy
getAnnotation, setAnnotation
-
Constructor Details
-
AbstractCustomConverterSupport
public AbstractCustomConverterSupport()
-
-
Method Details
-
getRecipientFieldName
Description copied from interface:Converter
Returns name of field to receive converted form value, which can be empty string to use default. -
getMessageType
Description copied from interface:Validator
Returns whether to write any error message to action errors, field errors, or action messages. -
getMessage
Description copied from interface:Validator
Returns message set by annotation. Used ifValidator.getMessageKey()
is empty string or it fails to find a message. -
getMessageKey
Description copied from interface:Validator
Returns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.
-