com.ibm.commerce.catalog.commands
Class PackageResolveSkuCmdImpl
java.lang.Object
|
+--com.ibm.commerce.command.AbstractECCommand
|
+--com.ibm.commerce.command.TaskCommandImpl
|
+--com.ibm.commerce.catalog.commands.PackageResolveSkuCmdImpl
- All Implemented Interfaces:
- ECCommand, PackageResolveSkuCmd, TaskCommand
- public class PackageResolveSkuCmdImpl
- extends TaskCommandImpl
- implements PackageResolveSkuCmd
This command first ensures that the supplied input PackageIdis indeed a reference to
a Package. After doing so, it determines the distinct PackageAttributes that are needed to resolve the unresolved Package
into an orderable Package. For each of these PackageAttributes, the command ensures that an appropriate PackageAttributeValue has
been supplied in the AttributeNVPs hashtable. Once these PackageAttribute name-value pairs have been identified, the command
resolves this information
into a PackageItemId that represents the orderable Package. If PackageAttributes are missing or are incorrect, the
ErrorMissingAttributeErrorCmd or ErrorProductAttributeErrorCmd error tasks are launched respectively.
Field Summary |
static java.lang.String |
COPYRIGHT
The internal copyright field. |
Method Summary |
protected java.util.Hashtable |
getAttributeNVPs()
Returns the hashtable that represents the PackageAttribute names and values that will be used to perform the Package resolution. |
protected java.lang.Long |
getPackageId()
Returns the PackageId that represents the primary key of the Package that is to be resolved, |
java.lang.Long |
getPackageItemId()
Returns the PackageId that represents the primary key of the resolved Package |
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 PackageAttribute names and values that will be used to perform the Package resolution. |
void |
setPackageId(java.lang.Long anPackageNumber)
Sets the PackageId that represents the primary key of the Package that is to be resolved, |
protected void |
setPackageItemId(java.lang.Long anItemNumber)
Sets the PackageId that represents the primary key of the resolved Package |
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 |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- The internal copyright field.
PackageResolveSkuCmdImpl
public PackageResolveSkuCmdImpl()
- No value constructor.
getAttributeNVPs
protected java.util.Hashtable getAttributeNVPs()
- Returns the hashtable that represents the PackageAttribute names and values that will be used to perform the Package resolution.
- Returns:
- java.util.Hashtable
getPackageId
protected java.lang.Long getPackageId()
- Returns the PackageId that represents the primary key of the Package that is to be resolved,
- Returns:
- java.lang.Long
getPackageItemId
public java.lang.Long getPackageItemId()
- Returns the PackageId that represents the primary key of the resolved Package
- Specified by:
getPackageItemId
in interface PackageResolveSkuCmd
- Returns:
- java.lang.Long
isReadyToCallExecute
public boolean isReadyToCallExecute()
- Description copied from class:
AbstractECCommand
- 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.
The default implementation is to return true.
- Overrides:
isReadyToCallExecute
in class AbstractECCommand
- Following copied from class:
com.ibm.commerce.command.AbstractECCommand
- 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 AbstractECCommand
- 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:
AbstractECCommand
- This method is 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 AbstractECCommand
setAttributeNVPs
public void setAttributeNVPs(java.util.Hashtable ahshAttrNVPs)
- Sets the hashtable that represents the PackageAttribute names and values that will be used to perform the Package resolution.
- Specified by:
setAttributeNVPs
in interface PackageResolveSkuCmd
- Parameters:
ahshAttrNVPs
- java.util.Hashtable
setPackageId
public void setPackageId(java.lang.Long anPackageNumber)
- Sets the PackageId that represents the primary key of the Package that is to be resolved,
- Specified by:
setPackageId
in interface PackageResolveSkuCmd
- Parameters:
anPackageId
- java.lang.Long
setPackageItemId
protected void setPackageItemId(java.lang.Long anItemNumber)
- Sets the PackageId that represents the primary key of the resolved Package
- Parameters:
anItemNumber
- java.lang.Long
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 AbstractECCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-