com.ibm.commerce.usermanagement.commands

Class AddressCheckCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, AddressBaseCmd, AddressCheckCmd, 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


    public class AddressCheckCmdImpl
    extends AddressBaseCmdImpl
    implements AddressCheckCmd
    Determines whether or not a user or organization has at least one permanent address.

    Use this command with SSL (Secure Sockets Layer) to ensure that the information are encrypted. To do so, type the command with the HTTPS secure protocol.

    The parameters yesURL and noURL are mandatory. The rest of the parameters are all optional.

    Behavior

    • Calls an empty task command PreAddressCheckCmd which can be customized for any pre-processing prior to execution of this command.
    • memberId is used to specify the member (user, organization or organizational unit) to be checked. If memberId is not specified, the default is current user.
    • Calls the URL specified by yesURL if at least one permanent address exists for the user Otherwise, calls the URL specified by noURL.
    • Calls the AddressCheckErrorView view command is called if the command fails. Upon successful completion, the specified URL is called.
    • Calls an empty task command PostAddressCheckCmd which can be customized for any further procesing post the execution of this command.

    Exception Conditions

    • yesURL or noURL is null (_ERR_CMD_MISSING_PARAM)
    • The length of yesURL or noURL equals 0 (_ERR_CMD_INVALID_PARAM)
    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 class.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AddressCheckCmdImpl

        public AddressCheckCmdImpl()
    • Method Detail

      • getAddressCheck

        public boolean getAddressCheck()
        Returns whether a permanent address exists.
        Specified by:
        getAddressCheck in interface AddressCheckCmd
        Returns:
        true if a permanent address exists, otherwise false.
      • getAddressNoURL

        public java.lang.String getAddressNoURL()
        Returns the URL to go to if there is no permanent address.
        Specified by:
        getAddressNoURL in interface AddressCheckCmd
        Returns:
        A URL to redirect to.
      • getAddressYesURL

        public java.lang.String getAddressYesURL()
        Returns the URL to go to if there is a permanent address.
        Specified by:
        getAddressYesURL in interface AddressCheckCmd
        Returns:
        A URL to redirect to.
      • performExecute

        public void performExecute()
                            throws ECException
        Determines whether the specified member identifier has an address associated with it. Then calls the PostAddressCheck command to perform some customized function that should be executed after the address check.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AddressBaseCmdImpl
        Throws:
        ECException - if there is a problem with finding the addresses for the specified member or executing the PostAddressCheck command.
      • setAddressNoURL

        public void setAddressNoURL(java.lang.String astrAddressNoURL)
        Sets the URL to go to if no permanent address can be found for the member.
        Specified by:
        setAddressNoURL in interface AddressCheckCmd
        Parameters:
        url - the URL to go to after the command is executed.
      • setAddressYesURL

        public void setAddressYesURL(java.lang.String astrAddressYesURL)
        Sets the URL to go to if a permanent address can be found for the member.
        Specified by:
        setAddressYesURL in interface AddressCheckCmd
        Parameters:
        url - the URL to go to after the command is executed.