org.apache.myfaces.extensions.validator.beanval
Class ExtValBeanValidationContext

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.beanval.ExtValBeanValidationContext
All Implemented Interfaces:
ModelValidationStorage, GroupStorage

public class ExtValBeanValidationContext
extends Object
implements GroupStorage, ModelValidationStorage

Since:
x.x.3
Author:
Gerhard Petracek

Field Summary
protected  javax.validation.MessageInterpolator defaultMessageInterpolator
           
protected  boolean developmentMode
           
protected  GroupStorage groupStorage
           
protected  Logger logger
           
protected  MessageResolver messageResolver
           
protected  ModelValidationStorage modelValidationStorage
           
protected  javax.validation.ValidatorFactory validatorFactory
           
 
Constructor Summary
protected ExtValBeanValidationContext()
           
 
Method Summary
 void addGroup(Class groupClass, String viewId, String clientId)
          Add the group, identified by the groupClass parameter, for the component identified by the clientId for the view viewId.
 void addModelValidationEntry(ModelValidationEntry modelValidationEntry)
           
static ExtValBeanValidationContext getCurrentInstance()
           
 Class[] getGroups(String viewId, String clientId)
          Gets the list of groups defined for the component with the clientId specified as parameter in the view.
 javax.validation.MessageInterpolator getMessageInterpolator()
           
 List<ModelValidationEntry> getModelValidationEntriesToValidate()
           
 javax.validation.ValidatorFactory getValidatorFactory()
           
protected  void initGroupStorage()
           
protected  void initMessageInterpolator()
           
protected  void initMessageResolver()
           
protected  void initModelValidationStorage()
           
 void restrictGroup(Class groupClass, String viewId, String clientId)
          Add the group in the restricted group list ,identified by the groupClass parameter, for the component identified by the clientId for the view viewId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Logger logger

validatorFactory

protected javax.validation.ValidatorFactory validatorFactory

defaultMessageInterpolator

protected javax.validation.MessageInterpolator defaultMessageInterpolator

messageResolver

protected MessageResolver messageResolver

groupStorage

protected GroupStorage groupStorage

modelValidationStorage

protected ModelValidationStorage modelValidationStorage

developmentMode

protected boolean developmentMode
Constructor Detail

ExtValBeanValidationContext

protected ExtValBeanValidationContext()
Method Detail

getCurrentInstance

public static ExtValBeanValidationContext getCurrentInstance()

getValidatorFactory

public javax.validation.ValidatorFactory getValidatorFactory()

getMessageInterpolator

public javax.validation.MessageInterpolator getMessageInterpolator()

addGroup

public void addGroup(Class groupClass,
                     String viewId,
                     String clientId)
Description copied from interface: GroupStorage
Add the group, identified by the groupClass parameter, for the component identified by the clientId for the view viewId.

Specified by:
addGroup in interface GroupStorage
Parameters:
groupClass - The group to add.
viewId - The view where the uiComponent is located where we want to add the group.
clientId - The clientId value of the component within the view.

restrictGroup

public void restrictGroup(Class groupClass,
                          String viewId,
                          String clientId)
Description copied from interface: GroupStorage
Add the group in the restricted group list ,identified by the groupClass parameter, for the component identified by the clientId for the view viewId.

Specified by:
restrictGroup in interface GroupStorage
Parameters:
groupClass - The group to add in the restricted group list.
viewId - The view where the uiComponent is located where we want to add the group.
clientId - The clientId value of the component within the view.

getGroups

public Class[] getGroups(String viewId,
                         String clientId)
Description copied from interface: GroupStorage
Gets the list of groups defined for the component with the clientId specified as parameter in the view. The array is the values of the groups added minus the groups from the restricted group list.

Specified by:
getGroups in interface GroupStorage
Parameters:
viewId - The view where the uiComponent is located.
clientId - The clientId value of the component within the view.
Returns:
Array of groups defined for the component.

addModelValidationEntry

public void addModelValidationEntry(ModelValidationEntry modelValidationEntry)
Specified by:
addModelValidationEntry in interface ModelValidationStorage

getModelValidationEntriesToValidate

public List<ModelValidationEntry> getModelValidationEntriesToValidate()
Specified by:
getModelValidationEntriesToValidate in interface ModelValidationStorage

initGroupStorage

protected void initGroupStorage()

initModelValidationStorage

protected void initModelValidationStorage()

initMessageInterpolator

protected void initMessageInterpolator()

initMessageResolver

protected void initMessageResolver()


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