org.omnifaces.application
Class ValidatorProvider
java.lang.Object
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. |
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 |
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
ValidatorProvider
public ValidatorProvider()
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.