The AuditAddressCmd task command checks the parameters that are passed into the AddressAdd and AddressUpdate commands according what is specified in the Address property file. The command will get store directory from CommandContex and uses store directory to find property files. If property file is not found, the command will not check any parameters Following is a sample of the Address property file:
... lastName.Label=Last Name lastName.Displayed=yes lastName.Required=yes firstName.Label=First Name firstName.Displayed=yes firstName.Required=no... Following is a sample of the Address property file of new format:
... 40.Name=lastName 40.Label=Last Name 40.Displayed=yes 40.Required=yes 40.Size=20 45.Name=firstName 45.Label=First Name 45.Displayed=yes 45.Required=no 45.Size=20... Because the 'Required' attribute for lastName equals 'yes', the command will check the lastName parameter. If the lastName is missing or its length equals 0, the AuditAddressCmd will throw a excepiton. Because the 'Required' attribute for firstName equals 'no', the command will not check the firstName parameter.
If all parameters check are passed, the getAuditResult() method will return true; otherwise return false.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM Copyright notice field. |
static java.lang.String |
defaultCommandClassName The default implementation of this command. |
static java.lang.String |
NAME The name of this command. |
Method Summary | |
---|---|
void |
setAddress1(java.lang.String astrAddressLine1) Sets the first line of the address. |
void |
setCity(java.lang.String astrCity) Sets the city name. |
void |
setCountry(java.lang.String astrCountry) Sets the country name. |
void |
setLastName(java.lang.String astrLastName) Sets the last name of the individual. |
void |
setRequestProperties(
TypedProperty requestProperties) Sets the request properties. |
void |
setState(java.lang.String astrState) Sets the name of the state, province, or equivalent where the individual resides. |
void |
setZipCode(java.lang.String astrZipCode) Sets the zip code or equivalent postal code of the individual's adddres. |
Methods inherited from interface com.ibm.commerce.usermanagement.commands. AuditBaseCmd |
getRequestProperties,
setErrorViewName,
setPropertyFileName |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String NAME
public static final java.lang.String defaultCommandClassName
Method Detail |
---|
public void setAddress1(java.lang.String astrAddressLine1)
astrAddressLine1
- The first line of the
addresspublic void setCity(java.lang.String astrCity)
astrCity
- The city name.public void setCountry(java.lang.String astrCountry)
astrCountry
- The country name.public void setLastName(java.lang.String astrLastName)
astrLastName
- The last name.public void setRequestProperties(TypedProperty requestProperties) throws ECApplicationException
setRequestProperties
in interface
AuditBaseCmd
requestProperties
- the parameters passed to the command.
ECApplicationException
- if there is a problem processing the
command parameters.public void setState(java.lang.String astrState)
astrState
- The name of the state.public void setZipCode(java.lang.String astrZipCode)
astrZipCode
- The zip code.