|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.util.AddressValidatorImpl atg.commerce.order.processor.BillingAddrValidatorImpl
public class BillingAddrValidatorImpl
This class provides a default implementation of BillingAddrValidator. By default the following address properties are checked :
If the address is an instance of atg.core.util.ContactInfo, the following properties may also be checked:
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
BillingAddrValidatorImpl()
|
Method Summary | |
---|---|
protected java.util.Map |
compileResourceAndErrorMaps()
This method compiles and returns a alternate resource and error key maps. |
void |
validateBillingAddress(Address pAddr,
java.lang.String pId,
PipelineResult pResult,
java.util.Locale pLocale)
Verify that all required properties are present in a billing address. |
void |
validateBillingAddress(Address pAddr,
java.lang.String pId,
PipelineResult pResult,
java.util.ResourceBundle pResources)
Verify that all required properties are present in a billing address. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public BillingAddrValidatorImpl()
Method Detail |
---|
public void validateBillingAddress(Address pAddr, java.lang.String pId, PipelineResult pResult, java.util.Locale pLocale)
validateBillingAddress
in interface BillingAddrValidator
pAddr
- The billing address being examined.pId
- The id of the object that owns the billing address, used in
constructing error messages. For example, when validating the
address in a credit card, the caller might provide the credit card
id here.pResult
- A PipelineResult object in which to store error messages if any
required values are missing from the address.pLocale
- The optional locale to use when looking up the resource bundle
that contains error messages. If null, the default server locale
will be used.validateBillingAddress(Address, String, PipelineResult, ResourceBundle)
public void validateBillingAddress(Address pAddr, java.lang.String pId, PipelineResult pResult, java.util.ResourceBundle pResources)
validateBillingAddress
in interface BillingAddrValidator
pAddr
- The billing address being examined.pId
- The id of the object that owns the billing address, used in
constructing error messages. For example, when validating the
address in a credit card, the caller might provide the credit card
id here.pResult
- A PipelineResult object in which to store error messages if any
required values are missing from the address.pResources
- A resource bundle which contains the error stringsAddressValidatorImpl.validateAddress(Address, String, PipelineResult, ResourceBundle, Map)
,
compileResourceAndErrorMaps()
protected java.util.Map compileResourceAndErrorMaps()
For example, the base class defines FirstNameMissing
as the resource key and error key and uses
same key to look up error message for missing first name and save the resourced error message in a map.
This class requires a different resource and error key for the same field error message such as BillFirstNameMissing
and MissingBillingingFirstName
to look up and save the error message.
Similarly this method looks keys for all the fields and and creates two maps.
one of the map for resource key map and another for error key map.
You can lookup the resource map with resourceMapKey
and error map with errorMapKey
keys.
-- The resource key map can be accessed using this key. This key contains a map of base class key and alternate resource key.
,
The error key map can be accessed using this key. This key contains a map of base class key key and alternate error key.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |