|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.DefaultValidationRule
biz.c24.io.api.data.ISO3166CountryValidationRule
public class ISO3166CountryValidationRule
author: Matteo De Luise
Constructor Summary | |
---|---|
ISO3166CountryValidationRule()
|
Method Summary | |
---|---|
Annotation |
getAnnotation()
Returns the annotation associated with this rule. |
Annotation |
getAnnotation(int index)
|
int |
getCount()
|
static String[] |
getCountryCodes()
Getter method for the array of country codes. |
static String[] |
getCountryNames()
Getter method for the array of country names. |
String |
getErrorCode()
Returns the error code associated with this rule. |
int |
getIndex(String value)
|
String |
getName()
Returns the name of this component. |
String |
getName(int index)
|
String |
getValue(int index)
|
static void |
init()
Reinitializes the validator from the system property. |
boolean |
validate(Object object,
DataComponent component,
ComplexDataObject context,
ValidationManager manager)
Validate the given object. |
boolean |
validateString(String countryCode)
|
Methods inherited from class biz.c24.io.api.data.DefaultValidationRule |
---|
addDependentPredicateCode, getContextForPredicateChecking, getDependentPredicateCode, getDependentPredicateCodeCount, getPredicateCode, getSeverity, removeDependentPredicateCode, setAnnotation, setErrorCode, setName, setPredicateCode, setSeverity, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ISO3166CountryValidationRule()
Method Detail |
---|
public static void init()
Use this method if you change the system property setting during the invocation of the JVM.
public static String[] getCountryCodes()
public int getIndex(String value)
public static String[] getCountryNames()
public boolean validate(Object object, DataComponent component, ComplexDataObject context, ValidationManager manager) throws ValidationException
Validator
validate
in interface Validator
validate
in class DefaultValidationRule
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 boolean validateString(String countryCode)
public String getValue(int index)
public String getName(int index)
public Annotation getAnnotation(int index)
public int getCount()
public Annotation getAnnotation()
ValidationRule
getAnnotation
in interface ValidationRule
getAnnotation
in class DefaultValidationRule
public String getName()
ModelComponent
getName
in interface ModelComponent
getName
in class DefaultValidationRule
public String getErrorCode()
ValidationRule
getErrorCode
in interface ValidationRule
getErrorCode
in class DefaultValidationRule
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |