com.ibm.commerce.usermanagement.commands
Class AuditUserRegistrationCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.usermanagement.commands.AuditBaseCmdImpl
                          |
                          +--com.ibm.commerce.usermanagement.commands.AuditAddressCmdImpl
                                |
                                +--com.ibm.commerce.usermanagement.commands.AuditUserRegistrationCmdImpl
All Implemented Interfaces:
AuditAddressCmd, AuditBaseCmd, AuditUserRegistrationCmd, ECCommand, ECTargetableCommand, TaskCommand

public class AuditUserRegistrationCmdImpl
extends AuditAddressCmdImpl
implements AuditUserRegistrationCmd

The AuditUserRegistration task command checks the parameters that are passed into the UserRegistrationAdd and UserRegistrationUpdate commands according what is specified in the UserRegistration property file (base name 'UserRegistration.properties'). 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 UserRegistration property file of old format:

...
 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 UserRegistration 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.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of this command implementation.
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
 
Fields inherited from class com.ibm.commerce.usermanagement.commands. AuditAddressCmdImpl
istrAddress1, istrCity, istrCountry, istrFirstName, istrLastName, istrState, istrZipCode
 
Fields inherited from class com.ibm.commerce.usermanagement.commands. AuditBaseCmdImpl
ibResult, ihshProperties, ismpProperties, istrErrorViewName, istrPathSeparator, istrPropertyFileName, istrStoreDirectory, requestProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.usermanagement.commands. AuditUserRegistrationCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
AuditUserRegistrationCmdImpl()
          Creates an instance of the AuditUserRegistration command.
 
Method Summary
 void performExecute()
          Executes the business function.
 void setChallengeAnswer(java.lang.String astrChallengeAnswer)
          Sets Chanlenge Answer for confirmation of the user's identify.
 void setChallengeQuestion(java.lang.String astrChallengeQuestion)
          Sets Chanlenge question for confirmation of the user's identify.
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the request properties.
 
Methods inherited from class com.ibm.commerce.usermanagement.commands. AuditAddressCmdImpl
getAddress1, getCity, getCountry, getLastName, getState, getZipCode, setAddress1, setCity, setCountry, setFirstName, setLastName, setState, setZipCode
 
Methods inherited from class com.ibm.commerce.usermanagement.commands. AuditBaseCmdImpl
getAuditResult, getPathSeparator, getPropertyFileName, getRequestProperties, getStoreDirectory, setErrorViewName, setPathSeparator, setPropertyFileName, setStoreDirectory
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.usermanagement.commands. AuditAddressCmd
setAddress1, setCity, setCountry, setLastName, setState, setZipCode
 
Methods inherited from interface com.ibm.commerce.usermanagement.commands. AuditBaseCmd
getRequestProperties, setErrorViewName, setPropertyFileName
 

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 this command implementation.
See Also:
Constant Field Values
Constructor Detail

AuditUserRegistrationCmdImpl

public AuditUserRegistrationCmdImpl()
Creates an instance of the AuditUserRegistration command.
Method Detail

performExecute

public void performExecute()
                    throws ECException
Executes the business function.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AuditAddressCmdImpl
Throws:
ECException - If there is a problem executing the business function.

setChallengeAnswer

public void setChallengeAnswer(java.lang.String astrChallengeAnswer)
Sets Chanlenge Answer for confirmation of the user's identify.
Specified by:
setChallengeAnswer in interface AuditUserRegistrationCmd
Parameters:
astrChallengeAnswer - Chanlenge answer.

setChallengeQuestion

public void setChallengeQuestion(java.lang.String astrChallengeQuestion)
Sets Chanlenge question for confirmation of the user's identify.
Specified by:
setChallengeQuestion in interface AuditUserRegistrationCmd
Parameters:
astrChallengeQuestion - Chanlenge question.

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
Sets the request properties.
Specified by:
setRequestProperties in interface AuditAddressCmd
Overrides:
setRequestProperties in class AuditAddressCmdImpl
Parameters:
aRequestProperties - the parameters passed to the command.
Throws:
ECApplicationException - If there is a problem with the parameters passed to the command.