|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.profile.Validator
public class Validator
Profile standard field validation class. It has two public methods, one takes a vector of FieldGroup that is any combination of standard fields, the other takes one Profile. Output is a String array, each element stands for one error found. Null output means no error found.
Constructor Summary | |
---|---|
Validator()
|
Method Summary | |
---|---|
static java.lang.String[] |
appendString(java.lang.String[] sList,
java.lang.String s)
|
static java.lang.String[] |
appendStringList(java.lang.String[] oldS,
java.lang.String[] newS)
|
static java.lang.String[] |
validateAddress(Address addr,
java.lang.String[] existErrors,
java.lang.String who,
java.lang.String idx)
Validate a Corporate Address or a Contact Address. |
static java.lang.String[] |
validateContact(Contact contact,
java.lang.String[] existErrors)
Validate a Corporate Contact. |
static java.lang.String[] |
validateCorporation(Corporation corp,
java.lang.String[] existErrors)
Validate a Corporation. |
static java.lang.String[] |
validateDestination(Destination dest,
java.lang.String[] existErrors,
boolean isPreferred)
Validate a Destination (Delivery Method). |
static java.lang.String[] |
validateDestination(Destination dest,
java.lang.String[] existErrors,
java.lang.String nativeProtocol,
boolean isPreferred)
Validate a Destination (Delivery Method). |
static java.lang.String[] |
validateExtendedFields(java.util.Vector vExtFlds)
Validates extended profile fields. |
static java.lang.String[] |
validateID(ID id,
java.lang.String[] existErrors)
Validate an ID. |
static java.lang.String[] |
validateStandardFields(java.util.Vector vFldGrp)
Validates standard profile fields. |
static java.lang.String[] |
validateStandardProfile(Profile profile)
Validates a partner profile with standard fields only. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Validator()
Method Detail |
---|
public static java.lang.String[] validateStandardFields(java.util.Vector vFldGrp)
vFldGrp
- a vector of FieldGroup objects. Can be any combination of Address, Contact, Corporation,
Destination, and ID.
public static java.lang.String[] validateStandardProfile(Profile profile)
profile
- a partner profile.
public static java.lang.String[] validateAddress(Address addr, java.lang.String[] existErrors, java.lang.String who, java.lang.String idx)
addr
- an Address object to be validatedexistErrors
- a String array of errors found before entering current address validationwho
- a String representation of the Address addr owner, e.g. FedEx (Delivery Dept), or FedEx (Delivery
Dept) Contact (Smith, John), use empty string if not applicableidx
- 1-based integer string for indication of Address array element for calling from validateCorporation(),
use empty string if not applicable
public static java.lang.String[] validateContact(Contact contact, java.lang.String[] existErrors)
contact
- a Contact object to be validatedexistErrors
- a String array of errors found before entering current contact validation
validateAddress(Address,String[],String,String)
public static java.lang.String[] validateCorporation(Corporation corp, java.lang.String[] existErrors)
corp
- a Corporation object to be validatedexistErrors
- a String array of errors found before entering current corp validation
validateAddress(Address,String[],String,String)
public static java.lang.String[] validateDestination(Destination dest, java.lang.String[] existErrors, boolean isPreferred)
dest
- a Destination object to be validatedexistErrors
- a String array of errors found before entering current corp validationisPreferred
- true for preferred protocol. Enforce validation of preferred protocol, i.e. ensure preferred
protocol is not an empty Destination object
public static java.lang.String[] validateDestination(Destination dest, java.lang.String[] existErrors, java.lang.String nativeProtocol, boolean isPreferred)
dest
- a Destination object to be validatedexistErrors
- a String array of errors found before entering current corp validationnativeProtocol
- If the destination is a named delivery method, this argument will represent the underlying
protocol (like http, etc)isPreferred
- true for preferred protocol. Enforce validation of preferred protocol, i.e. ensure preferred
protocol is not an empty Destination object
public static java.lang.String[] validateID(ID id, java.lang.String[] existErrors)
id
- an ID object to be validatedexistErrors
- a String array of errors found before entering current corp validation
public static java.lang.String[] appendStringList(java.lang.String[] oldS, java.lang.String[] newS)
public static java.lang.String[] appendString(java.lang.String[] sList, java.lang.String s)
public static java.lang.String[] validateExtendedFields(java.util.Vector vExtFlds)
vExtFlds
- vector of extended fields
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |