org.loom.converter.date
Class MinutesConverter

java.lang.Object
  extended by org.loom.converter.AbstractConverter
      extended by org.loom.converter.AbstractStringConverter
          extended by org.loom.converter.AbstractFormatConverter
              extended by org.loom.converter.date.MinutesConverter
All Implemented Interfaces:
Converter, FormInputDecorator

public final class MinutesConverter
extends AbstractFormatConverter

Converts a time string in the form hh:MM to an int with the number of minutes since the beginning of the day


Field Summary
 
Fields inherited from class org.loom.converter.AbstractConverter
convertedClass, cssClass
 
Constructor Summary
MinutesConverter()
           
 
Method Summary
protected  java.text.Format createFormat(MessagesRepository messagesRepository)
          Creates a new format instance.
 void decorate(FormInputTag t)
          Add CSS class extracted from this converter return type (number, string, file) to the tag.
 java.lang.String getAsTextImpl(java.lang.Object v, MessagesRepository repository)
          This method is the getAsText implementation, and has the guarantee that the value is not null
protected  java.lang.Object parse(java.lang.String text, java.text.ParsePosition pos, MessagesRepository repository)
           
 
Methods inherited from class org.loom.converter.AbstractFormatConverter
getAsObjectImpl, getFormatKey
 
Methods inherited from class org.loom.converter.AbstractStringConverter
getAsObject, getAsText, getNullValue, setNullValue
 
Methods inherited from class org.loom.converter.AbstractConverter
addErrorMessage, getConvertedClass, getCssClass, setConvertedClass, setCssClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.loom.converter.Converter
getConvertedClass
 

Constructor Detail

MinutesConverter

public MinutesConverter()
Method Detail

parse

protected java.lang.Object parse(java.lang.String text,
                                 java.text.ParsePosition pos,
                                 MessagesRepository repository)
Overrides:
parse in class AbstractFormatConverter

getAsTextImpl

public java.lang.String getAsTextImpl(java.lang.Object v,
                                      MessagesRepository repository)
Description copied from class: AbstractStringConverter
This method is the getAsText implementation, and has the guarantee that the value is not null

Overrides:
getAsTextImpl in class AbstractFormatConverter

createFormat

protected java.text.Format createFormat(MessagesRepository messagesRepository)
Description copied from class: AbstractFormatConverter
Creates a new format instance. Format instances may be different per locale and will be cached in the MessagesRepository

Specified by:
createFormat in class AbstractFormatConverter

decorate

public void decorate(FormInputTag t)
Description copied from class: AbstractConverter
Add CSS class extracted from this converter return type (number, string, file) to the tag.

Specified by:
decorate in interface FormInputDecorator
Overrides:
decorate in class AbstractConverter