org.omnifaces.application
Class ConverterProvider

java.lang.Object
  extended by org.omnifaces.application.ConverterProvider
Direct Known Subclasses:
ConverterManager

public abstract class ConverterProvider
extends java.lang.Object

An abstraction of converter provider. Concrete converter provider implementations (such as the one from CDI) must store themselves in the EL scope under the NAME.

Since:
1.6
Author:
Bauke Scholtz
See Also:
OmniApplication

Field Summary
static java.lang.String NAME
          The name on which the converter provider implementation should be stored in the EL scope.
 
Constructor Summary
ConverterProvider()
           
 
Method Summary
abstract  javax.faces.convert.Converter createConverter(java.lang.Class<?> converterForClass)
          Returns the converter instance associated with the given converter for-class, or null if there is none.
abstract  javax.faces.convert.Converter createConverter(java.lang.String converterId)
          Returns the converter instance associated with the given converter ID, or null if there is none.
static ConverterProvider getInstance()
          Returns the converter provider implementation from the EL context, or null if there is none.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
The name on which the converter provider implementation should be stored in the EL scope.

See Also:
Constant Field Values
Constructor Detail

ConverterProvider

public ConverterProvider()
Method Detail

createConverter

public abstract javax.faces.convert.Converter createConverter(java.lang.String converterId)
Returns the converter instance associated with the given converter ID, or null if there is none.

Parameters:
converterId - The converter ID of the desired converter instance.
Returns:
the converter instance associated with the given converter ID, or null if there is none.

createConverter

public abstract javax.faces.convert.Converter createConverter(java.lang.Class<?> converterForClass)
Returns the converter instance associated with the given converter for-class, or null if there is none.

Parameters:
converterForClass - The converter for-class of the desired converter instance.
Returns:
the converter instance associated with the given converter for-class, or null if there is none.

getInstance

public static ConverterProvider getInstance()
Returns the converter provider implementation from the EL context, or null if there is none.

Returns:
The converter provider implementation from the EL context, or null if there is none.