com.ibm.commerce.orderitems.commands
Class DynamicKitConfigurationAddCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.orderitems.commands.DynamicKitConfigurationAddCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, DynamicKitConfigurationAddCmd, ECCommand, ECTargetableCommand, Protectable
- public class DynamicKitConfigurationAddCmdImpl
- extends ControllerCommandImpl
- implements DynamicKitConfigurationAddCmd
This command can be used by an external Product Configurator to define the components of a dynamic kit. This command assumes
that each configuration of a kit has a unique configuration id. The kit definition can be passed in via the individual class
set methods, or by setting the entire XML definition of the dynamic kit. If both the class setters and the XML definiton are
used, the values defined in the XML document take precedence.
Field Summary |
static java.lang.String |
COPYRIGHT
The internal copyright field. |
Method Summary |
boolean |
isGeneric()
Check to see if this is a generic command. |
boolean |
isReadyToCallExecute()
isReadyToCallExecute method is called by the Targettable Command frame work
before the execution of the command. |
void |
performExecute()
Contains the actual business logic of the command
It should be implemented by all the command writer. |
void |
reset()
This method should be called after a command has been executed to reset its states variables. |
void |
setCatalogEntryId(java.lang.String astrCatalogEntryId)
Sets the Catalog Entry Id. |
void |
setConfigurationComponents(java.lang.String[] astrarComponents)
Sets the list of configuration components. |
void |
setConfigurationId(java.lang.String astrConfigurationId)
Sets the configurationId. |
void |
setCurrency(java.lang.String astrCurrency)
(Optional) Sets the currency of the Prices for the configuration components. |
void |
setPrices(java.lang.String[] astrarPrices)
(Optional) Sets the list of prices for each of the configuration components. |
void |
setQuantities(java.lang.String[] astrarQuantities)
Sets the list of quantites of the configuration components. |
void |
setRequestProperties(TypedProperty reqParms)
The WebController calls this method before invoking the execute method in this command to
set the request properties for this command. |
void |
setXMLDefinition(java.lang.String astrXMLDefinition)
Sets the XML Definition of the configuration. |
void |
validateParameters()
Performs server side parameter checking. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isRetriable, 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, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- The internal copyright field.
DynamicKitConfigurationAddCmdImpl
public DynamicKitConfigurationAddCmdImpl()
isGeneric
public boolean isGeneric()
- Description copied from interface:
ControllerCommand
- 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
- Following copied from interface:
com.ibm.commerce.command.ControllerCommand
- Returns:
- boolean - true if this command can be called by a generic user
- false if this command cannot be called by a generic user
isReadyToCallExecute
public boolean isReadyToCallExecute()
- Description copied from class:
AbstractECTargetableCommand
- isReadyToCallExecute method is called by the Targettable Command frame work
before the execution of the command. The default implementation is to return true.
- Overrides:
isReadyToCallExecute
in class AbstractECTargetableCommand
- Following copied from class:
com.ibm.commerce.command.AbstractECTargetableCommand
- Returns:
- boolean - true if we can execute the command
false if we canot execute the command
performExecute
public void performExecute()
throws ECException
- Description copied from interface:
ECCommand
- Contains the actual business logic of the command
It should be implemented by all the command writer.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
reset
public void reset()
- Description copied from class:
AbstractECTargetableCommand
- This method should be called after a command has been executed to reset its states variables.
After the call to reset, we should be able to execute the command again.
- Overrides:
reset
in class AbstractECTargetableCommand
setCatalogEntryId
public void setCatalogEntryId(java.lang.String astrCatalogEntryId)
- Sets the Catalog Entry Id. This is the Id of the DynamicKit.
- Specified by:
setCatalogEntryId
in interface DynamicKitConfigurationAddCmd
- Parameters:
astrCatalogEntryId
- java.lang.String
setConfigurationComponents
public void setConfigurationComponents(java.lang.String[] astrarComponents)
- Sets the list of configuration components.
- Specified by:
setConfigurationComponents
in interface DynamicKitConfigurationAddCmd
- Parameters:
astrarComponents
- java.lang.String[]
setConfigurationId
public void setConfigurationId(java.lang.String astrConfigurationId)
- Sets the configurationId. This id is assumed to be unique for each new configuration.
- Specified by:
setConfigurationId
in interface DynamicKitConfigurationAddCmd
- Parameters:
astrConfigurationId
- java.lang.String
setCurrency
public void setCurrency(java.lang.String astrCurrency)
- (Optional) Sets the currency of the Prices for the configuration components.
- Specified by:
setCurrency
in interface DynamicKitConfigurationAddCmd
- Parameters:
astrCurrency
- java.jang.String
setPrices
public void setPrices(java.lang.String[] astrarPrices)
- (Optional) Sets the list of prices for each of the configuration components.
- Specified by:
setPrices
in interface DynamicKitConfigurationAddCmd
- Parameters:
astrarPrices
- java.lang.String[]
setQuantities
public void setQuantities(java.lang.String[] astrarQuantities)
- Sets the list of quantites of the configuration components.
- Specified by:
setQuantities
in interface DynamicKitConfigurationAddCmd
- Parameters:
astrarQuantities
- java.lang.String[]
setRequestProperties
public void setRequestProperties(TypedProperty reqParms)
throws ECException
- Description copied from interface:
ControllerCommand
- The WebController calls this method before invoking the execute method in this command to
set the request properties for this command.
It is the responsibility of the implementer of the ControllerCommand to extract the
required input parameters from the request properties and perform parameter checking.
- Specified by:
setRequestProperties
in interface ControllerCommand
- Overrides:
setRequestProperties
in class ControllerCommandImpl
- Following copied from interface:
com.ibm.commerce.command.ControllerCommand
- Parameters:
requestProperties
- com.ibm.commerce.datatype.TypedProperty- Throws:
com.ibm.commerce.exception.ECException.
-
setXMLDefinition
public void setXMLDefinition(java.lang.String astrXMLDefinition)
- Sets the XML Definition of the configuration. If this parameter is set, the values in the XML definition override any other
parameters that have been set and that overlap with this definition.
- Specified by:
setXMLDefinition
in interface DynamicKitConfigurationAddCmd
- Parameters:
astrXMLDefinition
- java.jang.String
validateParameters
public void validateParameters()
throws ECException
- Description copied from interface:
ECCommand
- Performs server side parameter checking. This method replaces the checkParameters() method in a previous
version of the code.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-