|
|||||||||
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.ShippingAddrValidatorImpl
public class ShippingAddrValidatorImpl
This class provides a default implementation of ShippingAddrValidator. 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 | |
---|---|
ShippingAddrValidatorImpl()
|
Method Summary | |
---|---|
protected java.util.Map |
compileResourceAndErrorMaps()
This method compiles and returns a alternate resource and error key maps. |
void |
validateShippingAddress(Address pAddr,
java.lang.String pId,
PipelineResult pResult,
java.util.Locale pLocale)
Verify that all required properties are present in a shipping address. |
void |
validateShippingAddress(Address pAddr,
java.lang.String pId,
PipelineResult pResult,
java.util.ResourceBundle pResources)
Verify that all required properties are present in a shipping 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 ShippingAddrValidatorImpl()
Method Detail |
---|
public void validateShippingAddress(Address pAddr, java.lang.String pId, PipelineResult pResult, java.util.Locale pLocale)
validateShippingAddress
in interface ShippingAddrValidator
pAddr
- The shipping address being examined.pId
- The id of the object that owns the shipping address, used in
constructing error messages. For example, when validating the
address in a shipping group, the caller might provide the shipping
group 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.validateShippingAddress(Address, String, PipelineResult, ResourceBundle)
public void validateShippingAddress(Address pAddr, java.lang.String pId, PipelineResult pResult, java.util.ResourceBundle pResources)
validateShippingAddress
in interface ShippingAddrValidator
pAddr
- The shipping address being examined.pId
- The id of the object that owns the shipping address, used in
constructing error messages. For example, when validating the
address in a shipping group, the caller might provide the shipping
group id here.pResult
- A PipelineResult object in which to store error messages if any
required values are missing from the address.pResources
- The resource bundle from which to retrieve error messages.AddressValidatorImpl.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 ShipFirstNameMissing
and MissingShippingFirstName
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 |