com.ibm.commerce.pvc.commands
Class PVCRegistrationCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.pvc.commands.PVCRegistrationCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, PVCRegistrationCmd

public class PVCRegistrationCmdImpl
extends ControllerCommandImpl
implements PVCRegistrationCmd

Registers or updates a shopper who uses pervasive computing(PvC) devices for shopping. If the shopper is a guest user,this command executes new registration. If the shopper is already registered, this command updates existing registration.

Behaviour

  1. Registers or Updates a user by invoking UserRegistration command internally.
  2. Registers or Updates a PvC device of the user by invoking PVCRegisterDevice command internally
  3. Redirects to the specified location.


Field Summary
static java.lang.String CLASSNAME
           
static java.lang.String COPYRIGHT
           
static java.lang.String ERRTASK_NAME
           
 
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.pvc.commands.PVCRegistrationCmd
NAME
 
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
 
Constructor Summary
PVCRegistrationCmdImpl()
           
 
Method Summary
 TypedProperty getReqProp()
          Get the requestProperties value for this command.
 java.lang.String getURL()
          Get the redirect URL for this command.
 boolean isGeneric()
          Check to see if this is a generic command.
 boolean isRetriable()
          Check to see if this command is retriable on transaction rollback exception.
 void performExecute()
          The business logic for this command.
 void setReqProp(TypedProperty newReqProp)
          Set request properties for the UserRegistration command to be executed internally.
 void setRequestProperties(TypedProperty reqProp)
          Extracts parameters in the request, and stored them locally.
 void setURL(java.lang.String newURL)
          Set the redirect URL for this command.
 void validateParameters()
          Checks validity of specified parameters.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME

COPYRIGHT

public static final java.lang.String COPYRIGHT

ERRTASK_NAME

public static final java.lang.String ERRTASK_NAME
Constructor Detail

PVCRegistrationCmdImpl

public PVCRegistrationCmdImpl()
Method Detail

getReqProp

public TypedProperty getReqProp()
Get the requestProperties value for this command.
Returns:
The requestProperties value for this command.

getURL

public java.lang.String getURL()
Get the redirect URL for this command.
Returns:
The redirect URL.

isGeneric

public boolean isGeneric()
Check to see if this is a generic command. A generic command is a command that can be invoked by a generic user. The default is false for all controller commands and true for all view commands.
Specified by:
isGeneric in interface ControllerCommand
Overrides:
isGeneric in class ControllerCommandImpl
Returns:
Always false.

isRetriable

public boolean isRetriable()
Check to see if this command is retriable on transaction rollback exception. A retriable command will be retried once on transaction rollback exception.
Specified by:
isRetriable in interface ControllerCommand
Overrides:
isRetriable in class ControllerCommandImpl
Returns:
Always false.

performExecute

public void performExecute()
                    throws ECException
The business logic for this command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If an error occures while processing this method.

setReqProp

public void setReqProp(TypedProperty newReqProp)
Set request properties for the UserRegistration command to be executed internally.
Specified by:
setReqProp in interface PVCRegistrationCmd
Parameters:
newReqProp - The requestProperties value.

setRequestProperties

public void setRequestProperties(TypedProperty reqProp)
                          throws ECApplicationException
Extracts parameters in the request, and stored them locally.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
reqProp - The parameters for this command.
Throws:
ECException - If an error occurs while processing this method.

setURL

public void setURL(java.lang.String newURL)
Set the redirect URL for this command.
Specified by:
setURL in interface PVCRegistrationCmd
Parameters:
newURL - The redirect URL.

validateParameters

public void validateParameters()
                        throws ECException
Checks validity of specified parameters.

Check to exist the value of the URL parameter.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - If an error occurs while checking parameters