|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.catalog.commands.ResolveSkuCmdImpl
This command first determines the type of CatalogEntry that is provided as input to the command. If it is a Package, then the PackageResolveSku command is called. If it is a Product, then first the command determines the distinct Attributes that are needed to resolve the Product into an orderable Item. For each of these Attributes, the command ensures that an appropriate AttributeValue has been supplied as input. Once these Attribute name-value pairs have been identified, the command resolves this information into an ItemId that represents the orderable Item. Also, the command sets the ItemSpecId to be the ItemSpecification for the resolved CatalogEntry. If Attributes are missing or are incorrect, the ErrorMissingAttributeErrorCmd or ErrorProductAttributeErrorCmd error tasks are launched respectively. If the type of CatalogEntry that is provided as input to the command is neither a Package nor a Product, then the command returns and sets the ItemId to be equal to the ProductId.
Field Summary | |
static java.lang.String |
COPYRIGHT
The internal copyright field. |
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.catalog.commands.ResolveSkuCmd |
defaultCommandClassName, NAME |
Constructor Summary | |
ResolveSkuCmdImpl()
No value constructor. |
Method Summary | |
protected java.util.Hashtable |
getAttributeNVPs()
Returns the hashtable that represents the Attribute names and values that will be used to perform the Item resolution. |
java.lang.Long |
getItemId()
Returns the ItemId that represents the primary key of the resolved Item |
java.lang.Long |
getItemSpecId()
Returns the ItemSpecId that represents the ItemSpecification identifier for the resolved Item. |
protected java.lang.Long |
getProductId()
Returns the ProductId that represents the primary key of the CatalogEntry that is to be resolved, |
boolean |
isReadyToCallExecute()
isReadyToCallExecute method is called by the Targetable Command frame work This is where client side parameter checking is performed 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 is called after a command has been executed to reset its states variables. |
void |
setAttributeNVPs(java.util.Hashtable ahshAttrNVPs)
Sets the hashtable that represents the Attribute names and values that will be used to perform the Item resolution. |
protected void |
setItemId(java.lang.Long anItemNumber)
Sets the ItemId that represents the primary key of the resolved Item |
protected void |
setItemSpecId(java.lang.Long anItemSpecId)
Sets the ItemSpecId that represents the ItemSpecification identifier for the resolved Item. |
void |
setProductId(java.lang.Long anProductNumber)
Sets the ProductId that represents the primary key of the CatalogEntry that is to be resolved, |
void |
validateParameters()
Performs server side parameter checking. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, 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.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Field Detail |
public static final java.lang.String COPYRIGHT
Constructor Detail |
public ResolveSkuCmdImpl()
Method Detail |
protected java.util.Hashtable getAttributeNVPs()
public java.lang.Long getItemId()
getItemId
in interface ResolveSkuCmd
public java.lang.Long getItemSpecId()
getItemSpecId
in interface ResolveSkuCmd
protected java.lang.Long getProductId()
public boolean isReadyToCallExecute()
AbstractECCommand
isReadyToCallExecute
in class AbstractECCommand
com.ibm.commerce.command.AbstractECCommand
public void performExecute() throws ECException
ECCommand
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.public void reset()
AbstractECCommand
reset
in class AbstractECCommand
public void setAttributeNVPs(java.util.Hashtable ahshAttrNVPs)
setAttributeNVPs
in interface ResolveSkuCmd
ahshAttrNVPs
- java.util.Hashtableprotected void setItemId(java.lang.Long anItemNumber)
anItemNumber
- java.lang.Longprotected void setItemSpecId(java.lang.Long anItemSpecId)
anItemSpecId
- java.lang.Longpublic void setProductId(java.lang.Long anProductNumber)
setProductId
in interface ResolveSkuCmd
anProductId
- java.lang.Longpublic void validateParameters() throws ECException
ECCommand
validateParameters
in interface ECCommand
validateParameters
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |