public class FloorPriceLookupCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements FloorPriceLookupCmd
FloorPriceLookupCmdImpl Task Command Implementation retrieves
the floor price for a given catalog entry. The process goes like following
Behaviour
1) Retrieve all the entitled Delegation Grid IDs from the contract entitlement utility based on TSR ID and store ID;
2) Resolve grid-memberGroup relationship:
1 *
TSR -------- MemberGroup
and
1 *
Grid -------- MemberGroup(as participant);
We proceed as follows:3) Retrieve the floor price via GetContractUnitPriceCmd for given contract IDs, which are the delegation grid IDs obtained previously.
4) Partition all retrieved contract prices on member group and pricelist
1 * 1 * 1 *
TSR -------- MemberGroup -------- PriceList -------- ContractPrice
The last relationship is one-to-one in the current requirements, but we offer the more
general classification.
5) Select a price based on the following rules:
6) Validate the final selected price: if there is no price,
7) Round/convert price.
This command calls the following TaskCommands:
This command uses the following AccessBeans:BusinessPolicyAccessBeanCatalogEntryAccessBeanCatalogEntryRelationAccessBeanCatalogEntryShippingAccessBeanContractAccessBeanMemberGroupMemberAccessBeanOrderItemComponentAccessBeanStoreAccessBean| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME| Constructor and Description |
|---|
FloorPriceLookupCmdImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Long |
getCatEntryId()
Returns the catEntryIds.
|
java.lang.String |
getConfigurationID()
Gets the configuration ID of a dynamic-kit
|
java.lang.String |
getCurrency()
Returns the currency.
|
java.lang.String |
getCustomPartnumber()
Returns the custom partnumber.
|
boolean |
getErrorMode()
Gets the flag to indicate if an exception will be thrown when the price cannot be found.
|
MonetaryAmount |
getFloorPrice()
Gets the floor price for the given catalog entry with the requested currency.
|
QuantityAmount |
getQuantity()
Gets a quantity object of the catalog entry.
|
java.lang.Integer |
getStoreId()
Get the store ID
|
java.lang.Long |
getTSRId()
Get the TSR ID
|
void |
performExecute()
Executes main business logic of the command.
|
void |
reset() |
void |
setCatEntryId(java.lang.Long aCatEntryID)
Sets the catEntryIds.
|
void |
setConfigurationID(java.lang.String aConfigID)
Sets the configuration ID, if this catalog entry is a DynamicKit.
|
void |
setCurrency(java.lang.String aCurrency)
Sets the currency.
|
void |
setCustomPartnumber(java.lang.String aCustomPartnumber)
Sets the custom partnumber whose floor price is to be retrieved.
|
void |
setErrorMode(boolean anErrorMode)
Sets the flag to indicate if exception will be thrown when the price cannot be found
for the input catentry (Optional).
|
void |
setQuantity(QuantityAmount aQuantityAmount)
Sets the quantity amount of the input catalog entry that is to be priced (Optional).
|
void |
setStoreId(java.lang.Integer aStoreId)
Set the store ID
|
void |
setTSRId(java.lang.Long aTsrId)
Set the TSR ID.
|
void |
validateParameters()
Check mandatory parameters.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiespublic static final java.lang.String COPYRIGHT
public java.lang.Long getCatEntryId()
public java.lang.String getConfigurationID()
public java.lang.String getCurrency()
getCurrency in interface FloorPriceLookupCmdcom.ibm.commerce.exception.ECSystemExceptionpublic java.lang.String getCustomPartnumber()
public boolean getErrorMode()
public MonetaryAmount getFloorPrice()
getFloorPrice in interface FloorPriceLookupCmdpublic QuantityAmount getQuantity()
public java.lang.Integer getStoreId()
getStoreId in interface com.ibm.commerce.command.ECCommandgetStoreId in class com.ibm.commerce.command.AbstractECTargetableCommandpublic java.lang.Long getTSRId()
public void performExecute()
throws com.ibm.commerce.exception.ECException
performExecute in interface com.ibm.commerce.command.ECCommandperformExecute in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECExceptionpublic void reset()
reset in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.websphere.command.Command#reset()public void setCatEntryId(java.lang.Long aCatEntryID)
setCatEntryId in interface FloorPriceLookupCmdaCatEntryID - The catEntryIds to setpublic void setConfigurationID(java.lang.String aConfigID)
setConfigurationID in interface FloorPriceLookupCmdaConfigID - A String of pre-configuration ID for a DynamicKitpublic void setCurrency(java.lang.String aCurrency)
setCurrency in interface FloorPriceLookupCmdaCurrency - The currency to setpublic void setCustomPartnumber(java.lang.String aCustomPartnumber)
setCustomPartnumber in interface FloorPriceLookupCmdaCustomPartnumber - The custom partnumber.public void setErrorMode(boolean anErrorMode)
setErrorMode in interface FloorPriceLookupCmdanErrorMode - true if throw exceptionspublic void setQuantity(QuantityAmount aQuantityAmount)
setQuantity in interface FloorPriceLookupCmdaQuantityAmount - The quantity amount of the catalog entry.public void setStoreId(java.lang.Integer aStoreId)
setStoreId in interface FloorPriceLookupCmdaStoreId - A store ID, if not provided, get from the CommandContext.public void setTSRId(java.lang.Long aTsrId)
setTSRId in interface FloorPriceLookupCmdaTsrId - Long A TSR IDpublic void validateParameters()
throws com.ibm.commerce.exception.ECException
validateParameters in interface com.ibm.commerce.command.ECCommandvalidateParameters in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECException