com.ibm.commerce.contract.commands
Class ContractSetInSessionCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.contract.commands.ContractSetInSessionCmdImpl
All Implemented Interfaces:
AccCommand, ContractSetInSessionCmd, ControllerCommand, ECCommand, ECTargetableCommand

public class ContractSetInSessionCmdImpl
extends ControllerCommandImpl
implements ContractSetInSessionCmd

Sets a list of contracts to the current session (WebSphere Commerce Business Edition only). This command will check if the user entitled to use these contracts.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of this class.
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
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.contract.commands. ContractSetInSessionCmd
defaultCommandClassName, NAME
 
Constructor Summary
ContractSetInSessionCmdImpl()
           
 
Method Summary
 void performExecute()
          The method check if the user entitled to these contracts in the list.
 void setContractIdList(java.lang.String[] asaContractId)
          Sets the contracts to use in the current section.
 void setRequestProperties( TypedProperty aRequestProperties)
          Retrieves input parameters from the request properties.
 void validateParameters()
          Checks if the user logon to a store.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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 this class.
See Also:
Constant Field Values
Constructor Detail

ContractSetInSessionCmdImpl

public ContractSetInSessionCmdImpl()
Method Detail

performExecute

public void performExecute()
                    throws ECException
The method check if the user entitled to these contracts in the list. If so, we set these contracts to current session.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - Raised with message _ERR_NOT_ENTITLE_TO_THIS_CONTRACT if the user does not entitle to one of the contracts in the list.
See Also:
AbstractECTargetableCommand.performExecute()

setContractIdList

public void setContractIdList(java.lang.String[] asaContractId)
Sets the contracts to use in the current section.
Specified by:
setContractIdList in interface ContractSetInSessionCmd
Parameters:
asaContractId - list of contract IDs

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
Retrieves input parameters from the request properties.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
aRequestProperties - An TypedProperty object contains the input parameters. For this default implementation, contractId is required parameter.
Throws:
ECApplicationException - Raised with message _ERR_MISSING_CMD_PARAMETER when contractId is missed from the URL.
See Also:
ControllerCommandImpl.setRequestProperties(TypedProperty)

validateParameters

public void validateParameters()
                        throws ECException
Checks if the user logon to a store.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - Raised with message _ERR_DIDNT_LOGON if the user did not logon to a store.
See Also:
AbstractECTargetableCommand.validateParameters()