|
JSF-Spring | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConverterFactory
Factory for managing Converters. Used by
ApplicationImpl.
| Method Summary | |
|---|---|
void |
addConverter(Application application,
java.lang.Class targetClass,
java.lang.String converterClass)
Register a new converter class that is capable of performing conversions for the specified target class. |
void |
addConverter(Application application,
java.lang.String converterId,
java.lang.String converterClass)
Register a new mapping of converter id to the name of the corresponding Converter class. |
Converter |
createConverter(Application application,
java.lang.Class targetClass)
Instantiate and return a new Converter instance of the class that
has registered itself as capable of performing conversions for objects of
the specified type. |
Converter |
createConverter(Application application,
java.lang.String converterId)
Instantiate and return a new Converter instance of the class
specified by a previous call to addConverter() for the
specified converter id. |
java.util.Iterator |
getConverterIds(Application application)
Return an Iterator over the set of currently registered
converter ids for this Application. |
java.util.Iterator |
getConverterTypes(Application application)
Return an Iterator over the set of Class
instances for which Converter classes have been explicitly
registered. |
| Method Detail |
|---|
void addConverter(Application application,
java.lang.String converterId,
java.lang.String converterClass)
Converter class. This allows subsequent calls to
createConverter() to serve as a factory for
Converter instances.
application - the original Application of the underlying
JSF implementationconverterId - The converter id to be registeredconverterClass - The fully qualified class name of the corresponding
Converter implementation
java.lang.NullPointerException - if converterId or
converterClass is null
void addConverter(Application application,
java.lang.Class targetClass,
java.lang.String converterClass)
application - the original Application of the underlying
JSF implementationtargetClass - The class for which this converter is registeredconverterClass - The fully qualified class name of the corresponding
Converter implementation
java.lang.NullPointerException - if targetClass or
converterClass is null
Converter createConverter(Application application,
java.lang.String converterId)
Converter instance of the class
specified by a previous call to addConverter() for the
specified converter id. If there is no such registration for this
converter id, return null.
application - the original Application of the underlying
JSF implementationconverterId - The converter id for which to create and return a new
Converter instance
FacesException - if the Converter cannot be created
java.lang.NullPointerException - if converterId is null
Converter createConverter(Application application,
java.lang.Class targetClass)
Converter instance of the class that
has registered itself as capable of performing conversions for objects of
the specified type. If no such Converter class can be identified,
return null.
To locate an appropriate Converter class, the following algorithm
is performed, stopping as soon as an appropriate Converter class
is found:
Converter registered for the target class itself.
Converter registered for interfaces that are
implemented by the target class (directly or indirectly).Converter registered for the superclass (if any) of
the target class, recursively working up the inheritance hierarchy.
application - the original Application of the underlying
JSF implementationtargetClass - Target class for which to return a Converter
FacesException - if the Converter cannot be created
java.lang.NullPointerException - if targetClass is nulljava.util.Iterator getConverterIds(Application application)
Iterator over the set of currently registered
converter ids for this Application.
application - the original Application of the underlying
JSF implementation
java.util.Iterator getConverterTypes(Application application)
Iterator over the set of Class
instances for which Converter classes have been explicitly
registered.
application - the original Application of the underlying
JSF implementation
Class instances for
which Converter classes have been explicitly registered
|
JSF-Spring | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||