Class AbstractCustomConverterSupport<T>

All Implemented Interfaces:
Converter<CustomConversion,T>, Policy<CustomConversion>
Direct Known Subclasses:
AbstractCustomFormatterSupport

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<? extends T>).
  • Constructor Details

    • AbstractCustomConverterSupport

      public AbstractCustomConverterSupport()
  • Method Details

    • getRecipientFieldName

      public String getRecipientFieldName()
      Description copied from interface: Converter
      Returns name of field to receive converted form value, which can be empty string to use default.
    • getMessageType

      public Required.MessageType getMessageType()
      Description copied from interface: Converter
      Returns whether to write any error message to action errors, field errors, or action messages.
    • getMessage

      public String getMessage()
      Description copied from interface: Converter
      Returns message set by annotation. Used if Converter.getMessageKey() is empty string or it fails to find a message.
    • getMessageKey

      public String 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.
    • getProcessNoValue

      public boolean getProcessNoValue()
      Description copied from interface: Converter
      Returns whether Converter.convert(java.lang.String, java.lang.Class<? extends T>) converts empty string value, and Converter.format(T) formats null value.