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 -------- MemberGroupand
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 -------- ContractPriceThe 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:BusinessPolicyAccessBean
CatalogEntryAccessBean
CatalogEntryRelationAccessBean
CatalogEntryShippingAccessBean
ContractAccessBean
MemberGroupMemberAccessBean
OrderItemComponentAccessBean
StoreAccessBean
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, wait
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
public java.lang.Long getCatEntryId()
public java.lang.String getConfigurationID()
public java.lang.String getCurrency()
getCurrency
in interface FloorPriceLookupCmd
com.ibm.commerce.exception.ECSystemException
public java.lang.String getCustomPartnumber()
public boolean getErrorMode()
public MonetaryAmount getFloorPrice()
getFloorPrice
in interface FloorPriceLookupCmd
public QuantityAmount getQuantity()
public java.lang.Integer getStoreId()
getStoreId
in interface com.ibm.commerce.command.ECCommand
getStoreId
in class com.ibm.commerce.command.AbstractECTargetableCommand
public java.lang.Long getTSRId()
public void performExecute() throws com.ibm.commerce.exception.ECException
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
public void reset()
reset
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.websphere.command.Command#reset()
public void setCatEntryId(java.lang.Long aCatEntryID)
setCatEntryId
in interface FloorPriceLookupCmd
aCatEntryID
- The catEntryIds to setpublic void setConfigurationID(java.lang.String aConfigID)
setConfigurationID
in interface FloorPriceLookupCmd
aConfigID
- A String of pre-configuration ID for a DynamicKitpublic void setCurrency(java.lang.String aCurrency)
setCurrency
in interface FloorPriceLookupCmd
aCurrency
- The currency to setpublic void setCustomPartnumber(java.lang.String aCustomPartnumber)
setCustomPartnumber
in interface FloorPriceLookupCmd
aCustomPartnumber
- The custom partnumber.public void setErrorMode(boolean anErrorMode)
setErrorMode
in interface FloorPriceLookupCmd
anErrorMode
- true if throw exceptionspublic void setQuantity(QuantityAmount aQuantityAmount)
setQuantity
in interface FloorPriceLookupCmd
aQuantityAmount
- The quantity amount of the catalog entry.public void setStoreId(java.lang.Integer aStoreId)
setStoreId
in interface FloorPriceLookupCmd
aStoreId
- A store ID, if not provided, get from the CommandContext.public void setTSRId(java.lang.Long aTsrId)
setTSRId
in interface FloorPriceLookupCmd
aTsrId
- Long A TSR IDpublic void validateParameters() throws com.ibm.commerce.exception.ECException
validateParameters
in interface com.ibm.commerce.command.ECCommand
validateParameters
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException