org.openeai.scrubbers
Interface EnterpriseScrubber

All Known Implementing Classes:
CaseConverter, CityLocalityScrubber, DayScrubber, LowerCaseScrubber, MonthScrubber, YearScrubber

public interface EnterpriseScrubber

This is the interface which specifies the methods all OpenEAI EnterpriseScubber objects must implement. These scrubbers are associated to a particular field in the EnterpriseObjects document. When a setter method is called for a particular field, the EnterpriseFields object associated to that field, uses it's EnterpriseFormatter which may contain one or more EnterpriseScrubber implementations that are then used to "scrub" the data being passed to the setter method according to the rules of that scrubber implementation.

Version:
3.0 beta2 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)
See Also:
EnterpriseFields, EnterpriseFormatter

Method Summary
 int getSequence()
          Method is used by the EnterpriseFields object to determine in what order scrubbers should be executed if a field has more than one scrubber associated to it.
 java.lang.String scrub(java.lang.String value)
          Method used to "scrub" in input value and return some other version of that value.
 void setSequence(int sequence)
          Method is used to establish an order inwhich scrubbers should be executed if a field has more than one scrubber associated to it.
 

Method Detail

scrub


public java.lang.String scrub(java.lang.String value)
                       throws EnterpriseScrubberException
Method used to "scrub" in input value and return some other version of that value. Examples of scrubbers include scrubbers that convert a String to all Lower Case or to Mixed Case.

If a field has a scrubber implementation associated to it, this method will be called on that scrubber implementation when data is set on the field in an object's setter method for that field. This is automatically done when the 'getEnterpriseValue(...)' method is called in the setter method. The value being set on the field, is first run through the EnterpriseFields object that all XmlEnterpriseObjects inherit. At that point, the data will be scrubbed using the scrubber implementation associated to the field in the EnterpriseObjects document.

As mentioned below, depending on how many scrubbers a field has associated to it and in what order they're specified, there may be more than one scrubber implementation executed on a field.

Returns:
String the after it's been scrubbed.
Throws:
EnterpriseScrubberException - if any errors occur scrubbing the input.
See Also:
EnterpriseFields, EnterpriseFormatter

setSequence


public void setSequence(int sequence)
Method is used to establish an order inwhich scrubbers should be executed if a field has more than one scrubber associated to it.

Returns:
void

getSequence


public int getSequence()
Method is used by the EnterpriseFields object to determine in what order scrubbers should be executed if a field has more than one scrubber associated to it.

Returns:
int the order inwhich this scrubber should be executed.


Copyright © 2002, OpenEAI Software Foundation