org.omnifaces.application
Class ValidatorProvider

java.lang.Object
  extended by org.omnifaces.application.ValidatorProvider
Direct Known Subclasses:
ValidatorManager

public abstract class ValidatorProvider
extends java.lang.Object

An abstraction of validator provider. Concrete validator 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 validator provider implementation should be stored in the EL scope.
 
Constructor Summary
ValidatorProvider()
           
 
Method Summary
abstract  javax.faces.validator.Validator createValidator(java.lang.String validatorId)
          Returns the validator instance associated with the given validator ID, or null if there is none.
static ValidatorProvider getInstance()
          Returns the validator 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 validator provider implementation should be stored in the EL scope.

See Also:
Constant Field Values
Constructor Detail

ValidatorProvider

public ValidatorProvider()
Method Detail

createValidator

public abstract javax.faces.validator.Validator createValidator(java.lang.String validatorId)
Returns the validator instance associated with the given validator ID, or null if there is none.

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

getInstance

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

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