com.ibm.commerce.usermanagement.commands
Class AddressCheckCmdImpl

java.lang.Object
  |
  +--AddressBaseCmdImpl
        |
        +--com.ibm.commerce.usermanagement.commands.AddressCheckCmdImpl
All Implemented Interfaces:
AccCommand, AddressCheckCmd, ControllerCommand, ECCommand

public class AddressCheckCmdImpl
extends AddressBaseCmdImpl
implements AddressCheckCmd

This command 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

Exception Conditions

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of the class.
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
protected  boolean ibAddressExists
          Whether a permanent address exists.
protected  java.lang.String istrAddressNoURL
          The URL to call if no permanent address exists.
protected  java.lang.String istrAddressYesURL
          The URL to call if one permanent address exists.
 
Fields inherited from interface com.ibm.commerce.usermanagement.commands. AddressCheckCmd
NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
AddressCheckCmdImpl()
           
 
Method Summary
 boolean getAddressCheck()
          Returns whether a permanent address exists.
 java.lang.String getAddressNoURL()
          Returns the URL to go to if there is no permanent address.
 java.lang.String getAddressYesURL()
          Returns the URL to go to if there is a permanent address.
 void performExecute()
          Determines whether the specified member identifier has an address associated with it.
 void reset()
          Reset the values in the values in the command.
 void setAddressNoURL(java.lang.String astrAddressNoURL)
          Sets the URL to goto if no permant address can be found for the member.
 void setAddressYesURL(java.lang.String astrAddressYesURL)
          Sets the URL to goto if a permant address can be found for the member.
 void setRequestProperties( TypedProperty reqProperties)
          Sets the parameters that were passed to the command.
 void validateParameters()
          Validates the parameters passed to the command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.usermanagement.commands. AddressCheckCmd
setMemberId
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Field Detail
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

istrAddressYesURL

protected java.lang.String istrAddressYesURL
The URL to call if one permanent address exists.

istrAddressNoURL

protected java.lang.String istrAddressNoURL
The URL to call if no permanent address exists.

ibAddressExists

protected boolean ibAddressExists
Whether a permanent address exists.
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 customize function that should be executed after the address check.
Specified by:
performExecute in interface ECCommand
Throws:
ECException - if there is a problem with finding the addresses for the specified member or executing te PostAddressCheck command.

reset

public void reset()
Reset the values in the values in the command.
Specified by:
reset in interface AddressCheckCmd

setAddressNoURL

public void setAddressNoURL(java.lang.String astrAddressNoURL)
Sets the URL to goto if no permant address can be found for the member.
Specified by:
setAddressNoURL in interface AddressCheckCmd
Parameters:
astrAddressNoURL - The URL that is called if the member does not have any address entry.

setAddressYesURL

public void setAddressYesURL(java.lang.String astrAddressYesURL)
Sets the URL to goto if a permant address can be found for the member.
Specified by:
setAddressYesURL in interface AddressCheckCmd

setRequestProperties

public void setRequestProperties(TypedProperty reqProperties)
                          throws ECApplicationException
Sets the parameters that were passed to the command. This is done by calling the ProcessRequestProperties and PreAddressCheck command.
Specified by:
setRequestProperties in interface ControllerCommand
Parameters:
reqProperties - request properties
Throws:
ECApplicationException - if there was an exception from calling the ProcessRequestProperties and PreAddressCheck command.

validateParameters

public void validateParameters()
                        throws ECException
Validates the parameters passed to the command.
Specified by:
validateParameters in interface ECCommand
Throws:
ECException - if a require parameter is missing or a given parameter has an invalid value.