|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.ISO9362BICValidator
public class ISO9362BICValidator
A class for validating a BIC field against a list of valid ISO9362 BICs.
This class checks to see that the BIC matches any of the BICs in the list whether it is 8 or 11 characters long.
It uses the System property Utils.SYSTEM_PROPERTY_ISO9362_BIC_CODE_FILE
to locate the source of the enumeration.
Constructor Summary | |
---|---|
ISO9362BICValidator()
|
Method Summary | |
---|---|
Annotation |
getAnnotation()
Returns the annotation associated with this enumeration. |
Annotation |
getAnnotation(int index)
Returns the annotation associated with the enumeration value at index. |
static String[] |
getBICValues()
Getter method for the array containing the list of valid BICs. |
int |
getCount()
Returns the number of enumeration values. |
String |
getErrorCode()
Returns the error code for this enumeration. |
int |
getIndex(String value)
Returns the first index of value or -1 if it was not found. |
String |
getName()
Returns the name of this component. |
String |
getName(int index)
Returns the name associated with the enumeration value at index. |
String |
getValue(int index)
Returns the enumeration value at index. |
static void |
init()
Reinitializes the validator from the system property. |
static boolean |
isBank(String bicCode)
|
boolean |
validate(Object object,
DataComponent component,
ComplexDataObject context,
ValidationManager manager)
Validate the given object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ISO9362BICValidator()
Method Detail |
---|
public static void init()
Use this method if you change the system property setting during the invocation of the JVM.
public static boolean isBank(String bicCode)
public static String[] getBICValues()
public int getIndex(String value)
Enumeration
value
or -1
if it was not found.
getIndex
in interface Enumeration
value
- The value to look for.
value
or -1
if it was not found.public boolean validate(Object object, DataComponent component, ComplexDataObject context, ValidationManager manager) throws ValidationException
Validator
validate
in interface Validator
object
- The object to be validated - commonly a String, Integer, Double, Date etc.component
- The Element
or Attribute
inside context
which defines object
.context
- The parent of object
- could be null
.manager
- The validation manager which is performing this validation.
ValidationException
- If the object is not valid and the validation maanger is operating in exception mode.public String getValue(int index)
Enumeration
index.
- Specified by:
getValue
in interface Enumeration
- Parameters:
index
- The index of the value to return.
- Returns:
- The value at
index
.
public String getName(int index)
Enumeration
index.
- Specified by:
getName
in interface Enumeration
- Parameters:
index
- The index of the name to return.
- Returns:
- The name at
index
.
public Annotation getAnnotation(int index)
Enumeration
index.
- Specified by:
getAnnotation
in interface Enumeration
- Parameters:
index
- The index of the annotation to return.
- Returns:
- The name at
index
.
public int getCount()
Enumeration
getCount
in interface Enumeration
public Annotation getAnnotation()
Enumeration
getAnnotation
in interface Enumeration
public String getName()
ModelComponent
getName
in interface ModelComponent
public String getErrorCode()
Enumeration
getErrorCode
in interface Enumeration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |