nl.openedge.baritus
Class PopulatorRegistry

java.lang.Object
  extended bynl.openedge.baritus.PopulatorRegistry

public final class PopulatorRegistry
extends java.lang.Object

Registry for populators. Each instance of FormBeanBase has its own instance.

Author:
Eelco Hillenius

Constructor Summary
PopulatorRegistry(FormBeanCtrlBase formBeanCtrl)
          construct registry with the current instance of FormBeanBase
 
Method Summary
 void addPopulator(java.util.regex.Pattern pattern, FieldPopulator populator)
          Register a custom populator that overrides the default population process for all request parameters that match the regular expression stored in the provided pattern.
 void addPopulator(java.lang.String fieldName, FieldPopulator populator)
          Register a field populator for the given fieldName.
 FieldPopulator getDefaultFieldPopulator()
          get the default field populator
 FieldPopulator getFieldPopulator(java.lang.String fieldName)
          get the field populator for the provided fieldName, null if none registered
 java.util.Map getFieldPopulators()
          get the field populators
 java.util.Map getRegexFieldPopulators()
          get the populators that were registered with regex patterns
 void removePopulator(java.util.regex.Pattern pattern)
          Remove a populator that was registered for the provided pattern
 void removePopulator(java.lang.String fieldName)
          de-register the field populator that was registered with the given fieldName
 void setDefaultFieldPopulator(FieldPopulator populator)
          set the default field populator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopulatorRegistry

public PopulatorRegistry(FormBeanCtrlBase formBeanCtrl)
construct registry with the current instance of FormBeanBase

Parameters:
formBeanCtrl -
Method Detail

addPopulator

public void addPopulator(java.lang.String fieldName,
                         FieldPopulator populator)
Register a field populator for the given fieldName. Field populators override the default population of a property on the current form

Parameters:
fieldName - name of field
populator - populator instance

removePopulator

public void removePopulator(java.lang.String fieldName)
de-register the field populator that was registered with the given fieldName

Parameters:
fieldName - name of field

addPopulator

public void addPopulator(java.util.regex.Pattern pattern,
                         FieldPopulator populator)
Register a custom populator that overrides the default population process for all request parameters that match the regular expression stored in the provided pattern.

Parameters:
pattern - regex pattern
populator - populator instance

removePopulator

public void removePopulator(java.util.regex.Pattern pattern)
Remove a populator that was registered for the provided pattern

Parameters:
pattern - regex pattern

getRegexFieldPopulators

public java.util.Map getRegexFieldPopulators()
get the populators that were registered with regex patterns

Returns:
Map the populators that were registered with regex patterns

getFieldPopulator

public FieldPopulator getFieldPopulator(java.lang.String fieldName)
get the field populator for the provided fieldName, null if none registered

Parameters:
fieldName - name of the field
Returns:
the field populator for the provided fieldName, null if none registered

getFieldPopulators

public java.util.Map getFieldPopulators()
get the field populators

Returns:
Map the field populators

getDefaultFieldPopulator

public FieldPopulator getDefaultFieldPopulator()
get the default field populator

Returns:
FieldPopulator the default field populator

setDefaultFieldPopulator

public void setDefaultFieldPopulator(FieldPopulator populator)
set the default field populator

Parameters:
populator - the default field populator


Copyright © 2003-2004 Open Edge. All Rights Reserved.