org.apache.myfaces.extensions.cdi.message.api
Interface FormatterFactory

All Superinterfaces:
ConfigRegistry<Formatter,FormatterFactory>, Serializable

public interface FormatterFactory
extends ConfigRegistry<Formatter,FormatterFactory>, Serializable

creates and initialize a formatter for a given type


Method Summary
 FormatterFactory addFormatterConfig(Class<?> type, GenericConfig formatterConfig)
          allows to add a config for formatting the given type
 FormatterFactory addFormatterConfig(Class<?> type, GenericConfig formatterConfig, Locale locale)
          allows to add a config for formatting the given type
 Formatter findFormatter(Class<?> type)
           
 GenericConfig findFormatterConfig(Class<?> type, Locale locale)
           
 
Methods inherited from interface org.apache.myfaces.extensions.cdi.message.api.ConfigRegistry
add, reset
 

Method Detail

findFormatter

Formatter findFormatter(Class<?> type)
Parameters:
type - the type of the instance which has to be formatted
Returns:
an initialized formatter which is able to format instances of the given type (or a default formatter)

addFormatterConfig

FormatterFactory addFormatterConfig(Class<?> type,
                                    GenericConfig formatterConfig)
allows to add a config for formatting the given type

Parameters:
type - the type the config belongs to
formatterConfig - config for the formatter of the given type
Returns:
the instance of the factory to allow a fluent api

addFormatterConfig

FormatterFactory addFormatterConfig(Class<?> type,
                                    GenericConfig formatterConfig,
                                    Locale locale)
allows to add a config for formatting the given type

Parameters:
type - the type the config belongs to
formatterConfig - config for the formatter of the given type
locale - the locale the config belongs to
Returns:
the instance of the factory to allow a fluent api

findFormatterConfig

GenericConfig findFormatterConfig(Class<?> type,
                                  Locale locale)
Parameters:
type - the type which has to be formatted and maybe need a config for it
locale - the current locale
Returns:
the config for a given type and locale - null otherwise


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.