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
getProcessNoValueMethods inherited from class name.matthewgreet.strutscommons.policy.AbstractPolicySupport
getAnnotation, setAnnotationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface name.matthewgreet.strutscommons.policy.Converter
format, getRecipientClassMethods inherited from interface name.matthewgreet.strutscommons.policy.Policy
getAnnotation, setAnnotation
-
Constructor Details
-
AbstractCustomFormatterSupport
public AbstractCustomFormatterSupport()
-
-
Method Details
-
convert
Description copied from interface:ConverterReturns 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:ConverterReturns name of field to receive converted form value, which can be empty string to use default.- Specified by:
getRecipientFieldNamein interfaceConverter<CustomConversion,T> - Overrides:
getRecipientFieldNamein classAbstractCustomConverterSupport<T>
-
getMessageType
Description copied from interface:ConverterReturns whether to write any error message to action errors, field errors, or action messages.- Specified by:
getMessageTypein interfaceConverter<CustomConversion,T> - Overrides:
getMessageTypein classAbstractCustomConverterSupport<T>
-
getMessage
Description copied from interface:ConverterReturns message set by annotation. Used ifConverter.getMessageKey()is empty string or it fails to find a message.- Specified by:
getMessagein interfaceConverter<CustomConversion,T> - Overrides:
getMessagein classAbstractCustomConverterSupport<T>
-
getMessageKey
Description copied from interface:ConverterReturns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.- Specified by:
getMessageKeyin interfaceConverter<CustomConversion,T> - Overrides:
getMessageKeyin classAbstractCustomConverterSupport<T>
-