org.apache.myfaces.extensions.validator.core.storage
Class DefaultGroupStorage

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.core.storage.DefaultGroupStorage
All Implemented Interfaces:
GroupStorage
Direct Known Subclasses:
DefaultBeanValidationGroupStorage

public class DefaultGroupStorage
extends Object
implements GroupStorage

default storage implementation for groups

Since:
x.x.3

Field Summary
protected  Logger logger
           
 
Constructor Summary
DefaultGroupStorage()
           
 
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.
 Class[] getGroups(String viewId, String clientId)
          Gets the list of groups defined for the component with the clientId specified as parameter in the view.
 void lockGroups(String viewId)
          If the storage is locked, it isn't possible to change the state
 void resetGroups(String viewId)
          Allows to reset all groups which have been added so far.
 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.
 void unlockGroups(String viewId)
          Allows to change the storage again
 
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
Constructor Detail

DefaultGroupStorage

public DefaultGroupStorage()
Method Detail

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.

resetGroups

public void resetGroups(String viewId)
Description copied from interface: GroupStorage
Allows to reset all groups which have been added so far.

Specified by:
resetGroups in interface GroupStorage
Parameters:
viewId - allows to reset groups only for one view-id that allows to keep the groups e.g. of the current or the target view (depending on the given value). if it is null, all stored view-ids will be affected.

lockGroups

public void lockGroups(String viewId)
Description copied from interface: GroupStorage
If the storage is locked, it isn't possible to change the state

Specified by:
lockGroups in interface GroupStorage
Parameters:
viewId - allows to lock groups only for one view-id that allows to keep the groups e.g. of the current or the target view (depending on the given value) if it is null, all stored view-ids will be affected.

unlockGroups

public void unlockGroups(String viewId)
Description copied from interface: GroupStorage
Allows to change the storage again

Specified by:
unlockGroups in interface GroupStorage
Parameters:
viewId - allows to lock groups only for one view-id that allows to keep the groups e.g. of the current or the target view (depending on the given value) if it is null, all stored view-ids will be affected.


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