com.ibm.commerce.usermanagement.commands

Class AuditAddressCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, AuditAddressCmd, AuditBaseCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
    Direct Known Subclasses:
    AuditUserRegistrationCmdImpl


    public class AuditAddressCmdImpl
    extends AuditBaseCmdImpl
    implements AuditAddressCmd
    Checks the parameters that are passed into the AddressAdd and AddressUpdate commands according to what is specified in the Address property file.
    The command will get store directory from the CommandContext and use the store directory to find the property file. If the property file is not found, no parameter checks will be performed.
    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
     
    ... Last name parameter will be checked as the 'Required' attribute for lastName equals 'yes'. If the lastName parameter were missing or its length equaled 0, the AuditAddressCmd will throw an exception.
    First name parameter will NOT be checked since the 'Required' attribute for firstName equals 'no'.

    If all parameters checks pass successfully, the getAuditResult() method will return true; otherwise it will return false.

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of the command implementation.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AuditAddressCmdImpl

        public AuditAddressCmdImpl()
        Creates an instance of the AuditAddress command.
    • Method Detail

      • getAddress1

        public java.lang.String getAddress1()
        Returns the first line of the address.
        Returns:
        The first line of the address.
      • getCity

        public java.lang.String getCity()
        Returns the city name.
        Returns:
        The city name.
      • getCountry

        public java.lang.String getCountry()
        Returns the country name.
        Returns:
        The country name.
      • getLastName

        public java.lang.String getLastName()
        Returns the last name of the individual.
        Returns:
        The last name.
      • getState

        public java.lang.String getState()
        Returns the name of the state, province, or equivalent where the individual resides.
        Returns:
        The name of the state.
      • getZipCode

        public java.lang.String getZipCode()
        Returns the zip code or equivalent postal code of the individual's address.
        Returns:
        The zip code.
      • setAddress1

        public void setAddress1(java.lang.String astrAddress1)
        Sets the first line of the address.
        Specified by:
        setAddress1 in interface AuditAddressCmd
        Parameters:
        astrAddress1 - The first line of the address.
      • setCity

        public void setCity(java.lang.String astrCity)
        Sets the city name.
        Specified by:
        setCity in interface AuditAddressCmd
        Parameters:
        astrCity - The city name.
      • setCountry

        public void setCountry(java.lang.String astrCountry)
        Sets the country name.
        Specified by:
        setCountry in interface AuditAddressCmd
        Parameters:
        astrCountry - The country name.
      • setFirstName

        public void setFirstName(java.lang.String astrFirstName)
        Sets the First name of the individual.
        Parameters:
        astrFirstName - The First name.
      • setLastName

        public void setLastName(java.lang.String astrLastName)
        Sets the last name of the individual.
        Specified by:
        setLastName in interface AuditAddressCmd
        Parameters:
        astrLastName - The last name.
      • setState

        public void setState(java.lang.String astrState)
        Sets the name of the state, province, or equivalent where the individual resides.
        Specified by:
        setState in interface AuditAddressCmd
        Parameters:
        astrState - The name of the state.
      • setZipCode

        public void setZipCode(java.lang.String astrZipCode)
        Sets the zip code or equivalent postal code of the individual's address.
        Specified by:
        setZipCode in interface AuditAddressCmd
        Parameters:
        astrZipCode - The zip code.