public class GetStandardOfferCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements GetStandardOfferCmd
GetStandardOfferCmd
Task Command Implementation
retrieves the standard offer prices for one or more catalog entries
from the standard price lists.
If the command is successful in retreiving offer prices, it will return a list of standard offer prices.
If unsuccessful, it wil return an empty list.
Behaviour
Obtain the standard offer price for each of the catalog entries.
This command calls the following TaskCommands:
This command uses the following AccessBeans:BusinessPolicyAccessBean
CatalogEntryAccessBean
OfferAccessBean
OfferPriceAccessBean
StoreAccessBean
OrderItemAccessBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
GetStandardOfferCmdImpl() |
Modifier and Type | Method and Description |
---|---|
MonetaryAmount[] |
getBasePrices()
Gets the prices for the given catlog entries with the currency specified in the database table.
|
java.lang.Long[] |
getCatEntryIds()
Returns the catEntryIds.
|
java.lang.String |
getCurrency()
Returns the currency.
|
java.lang.Long[] |
getOfferIds() |
com.ibm.commerce.order.objects.OfferAccessBean[] |
getOffers() |
MonetaryAmount[] |
getPrices()
Gets the prices for the given catlog entries with the requested currency.
|
QuantityAmount[] |
getQuantities()
Returns the quantities.
|
java.lang.Integer |
getStoreId() |
MonetaryAmount[] |
getUnitPrices()
This method returns all the single unit standard price, which is based on an offer.
|
void |
performExecute()
The tasks in this method include
1) Retrieve Trade-Position-Container IDs from the standard pricelist for the store
2) Retrieve offers using RetrievePricesCmd based on
a) Catalog entry IDs;
b) TPC IDs;
c) Quantities;
d) Currency;
e) Store ID
3) Filter the retrieved offers
a) Keep only the offers with the highest TPC precedence
b) If there are multiple offers, keep the offers with the highest OFFER precedence
Note: it is still possible for a catalog entry may have multiple valid offers
(i.e.
|
void |
reset() |
void |
setCatEntryIds(java.lang.Long[] arrCatEntryIDs)
Sets the catEntryIds.
|
void |
setCurrency(java.lang.String aCurrency)
Sets the currency.
|
void |
setOrderItemAccessBeans(com.ibm.commerce.order.objects.OrderItemAccessBean[] inOrderItemABs)
Sets the order item access beans.
|
void |
setPolicyPriceListType(java.lang.String aPolicyPriceListTypeToUse)
(Optional) Sets the price list type of the business policy to use in retrieving price lists.
|
void |
setQuantities(QuantityAmount[] arrQuantities)
Sets the quantities.
|
void |
setStoreId(java.lang.Integer aStoreId) |
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 MonetaryAmount[] getBasePrices()
GetStandardOfferCmd
getBasePrices
in interface GetStandardOfferCmd
GetStandardOfferCmd.getBasePrices()
public java.lang.Long[] getCatEntryIds()
public java.lang.String getCurrency() throws com.ibm.commerce.exception.ECSystemException
com.ibm.commerce.exception.ECSystemException
public java.lang.Long[] getOfferIds()
getOfferIds
in interface GetStandardOfferCmd
GetStandardOfferCmd.getOfferIds()
public com.ibm.commerce.order.objects.OfferAccessBean[] getOffers()
getOffers
in interface GetStandardOfferCmd
GetStandardOfferCmd.getOffers()
public MonetaryAmount[] getPrices()
GetStandardOfferCmd
getPrices
in interface GetStandardOfferCmd
GetStandardOfferCmd.getPrices()
public QuantityAmount[] getQuantities()
public java.lang.Integer getStoreId()
getStoreId
in interface com.ibm.commerce.command.ECCommand
getStoreId
in class com.ibm.commerce.command.AbstractECTargetableCommand
ECCommand.getStoreId()
public MonetaryAmount[] getUnitPrices()
getUnitPrices
in interface GetStandardOfferCmd
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 setCatEntryIds(java.lang.Long[] arrCatEntryIDs)
setCatEntryIds
in interface GetStandardOfferCmd
arrCatEntryIDs
- The catalog entries to set.public void setCurrency(java.lang.String aCurrency)
setCurrency
in interface GetStandardOfferCmd
aCurrency
- The currency to setpublic void setOrderItemAccessBeans(com.ibm.commerce.order.objects.OrderItemAccessBean[] inOrderItemABs)
setOrderItemAccessBeans
in interface GetStandardOfferCmd
inOrderItemABs
- an array of order item access beanpublic void setPolicyPriceListType(java.lang.String aPolicyPriceListTypeToUse)
setPolicyPriceListType
in interface GetStandardOfferCmd
aPolicyPriceListTypeToUse
- the policy price list type to use in retrieving price lists.public void setQuantities(QuantityAmount[] arrQuantities)
setQuantities
in interface GetStandardOfferCmd
arrQuantities
- The quantities to setpublic void setStoreId(java.lang.Integer aStoreId)
setStoreId
in interface GetStandardOfferCmd
GetStandardOfferCmd.setStoreId(Integer)
public 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