Class AbstractCustomFormatterSupport<T>
java.lang.Object
name.matthewgreet.strutscommons.policy.AbstractPolicySupport<CustomConversion>
name.matthewgreet.strutscommons.policy.AbstractConverterSupport<CustomConversion,T>
name.matthewgreet.strutscommons.policy.AbstractCustomConverterSupport<T>
name.matthewgreet.strutscommons.policy.AbstractCustomFormatterSupport<T>
- All Implemented Interfaces:
Converter<CustomConversion,
,T> Policy<CustomConversion>
Template class for client supplied converters that just format for a view helper.
Subclasses must implement
Converter.getRecipientClass()
and Converter.format(T)
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns result of conversion of form field.Returns 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.policy.AbstractCustomConverterSupport
getProcessNoValue
Methods inherited from class name.matthewgreet.strutscommons.policy.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.policy.Converter
format, getRecipientClass
Methods inherited from interface name.matthewgreet.strutscommons.policy.Policy
getAnnotation, setAnnotation
-
Constructor Details
-
AbstractCustomFormatterSupport
public AbstractCustomFormatterSupport()
-
-
Method Details
-
convert
Description copied from interface:Converter
Returns result of conversion of form field. This is not called if the form value is empty string or null, unlessConverter.getProcessNoValue()
returns true. -
getRecipientFieldName
Description copied from interface:Converter
Returns name of field to receive converted form value, which can be empty string to use default.- Specified by:
getRecipientFieldName
in interfaceConverter<CustomConversion,
T> - Overrides:
getRecipientFieldName
in classAbstractCustomConverterSupport<T>
-
getMessageType
Description copied from interface:Converter
Returns whether to write any error message to action errors, field errors, or action messages.- Specified by:
getMessageType
in interfaceConverter<CustomConversion,
T> - Overrides:
getMessageType
in classAbstractCustomConverterSupport<T>
-
getMessage
Description copied from interface:Converter
Returns message set by annotation. Used ifConverter.getMessageKey()
is empty string or it fails to find a message.- Specified by:
getMessage
in interfaceConverter<CustomConversion,
T> - Overrides:
getMessage
in classAbstractCustomConverterSupport<T>
-
getMessageKey
Description copied from interface:Converter
Returns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.- Specified by:
getMessageKey
in interfaceConverter<CustomConversion,
T> - Overrides:
getMessageKey
in classAbstractCustomConverterSupport<T>
-