com.ibm.commerce.price.commands
Interface GetContractUnitPriceCmd
- All Superinterfaces:
- TaskCommand
- All Known Implementing Classes:
- GetContractUnitPriceCmdImpl
- public interface GetContractUnitPriceCmd
- extends TaskCommand
Interface for the GetContractUnitPriceCmd Task Command to calculate the best contract price for a catalog entry given a list of trading agreements (and offers) and also for each of these trading agreements, obtain its best contract price.
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
static java.lang.String |
NAME
The name of this command. |
Method Summary |
java.lang.Long[] |
getApplicableTradingIds()
Returns the ids of the trading agreements that are used to determine the prices. |
MonetaryAmount[] |
getApplicableTradingUnitPrices()
Returns the unit prices of a catentry that were determined for each of the applied trading agreements. |
MonetaryAmount |
getBasePrice()
Returns the base price of the input catalog entry. |
CatEntryPrices[] |
getCatEntryPrices()
Returns the price related information of the input catalog entries. |
OfferAccessBean |
getOffer()
Returns the offer access bean that was used to determine the price. |
java.lang.Long |
getOfferId()
Returns the id of the output offer id that was used to determine the price. |
MonetaryAmount |
getPrice()
Returns the actual price of the catalog entry. |
java.lang.Long |
getTcId()
Returns the id of the output T&C id which was associated with the offer that supplied the price. |
java.lang.Long |
getTradingId()
Returns the id of the output trading agreement id which was associated with the offer that supplied the price. |
void |
setCatEntryId(java.lang.Long anCatEntryId)
Sets the id of the input catalog entry. |
void |
setCatEntryPrices(CatEntryPrices[] aCatEntryPrices)
Sets the information of one or more catalog entries (Future Support). |
void |
setCurrency(java.lang.String astrCurrency)
Sets the currency to be used for finding the price (Optional). |
void |
setErrorMode(boolean aErrorMode)
Sets the flag to indicate if exception will be thrown when the price cannot be found for the input catentry (Optional). |
void |
setMemberId(java.lang.Long anMemberId)
Sets the member id to be used for verifying and searching the trading agreements (Optional). |
void |
setOfferIds(java.lang.Long[] aOfferIds)
Sets the ids of the input offers to be used for price (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)
Sets the id of the input store to be used for calculating the price (Optional). |
void |
setTradingIds(java.lang.Long[] aTradingIds)
Sets the ids of the input trading agreements (Optional). |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
- Constant Field Values
NAME
public static final java.lang.String NAME
- The name of this command.
- See Also:
- Constant Field Values
getApplicableTradingIds
public java.lang.Long[] getApplicableTradingIds()
- Returns the ids of the trading agreements that are used to determine the prices.
-
- Returns:
- The reference numbers of all the trading agreements that are appplied to obtain the offers and provide the price adjustment to determine the prices.
getApplicableTradingUnitPrices
public MonetaryAmount[] getApplicableTradingUnitPrices()
- Returns the unit prices of a catentry that were determined for each of the applied trading agreements.
-
- Returns:
- The unit price amounts of a catentry in that each of them was determined individually for its corresponding trading agreement.
getBasePrice
public MonetaryAmount getBasePrice()
- Returns the base price of the input catalog entry.
-
- Returns:
- The base price monetary amount (and currency) found for the catalog entry before any conversion. This is only set when the requested currency is different from the base currency. The base price must be converted to the requested price.
getCatEntryPrices
public CatEntryPrices[] getCatEntryPrices()
- Returns the price related information of the input catalog entries.
-
- Returns:
- The price related information of the input catalog entries.
getOffer
public OfferAccessBean getOffer()
- Returns the offer access bean that was used to determine the price.
-
- Returns:
- The offer access bean associated with the offer that was used to determine the price.
getOfferId
public java.lang.Long getOfferId()
- Returns the id of the output offer id that was used to determine the price.
-
- Returns:
- The reference number of the offer that was used to determine the price.
getPrice
public MonetaryAmount getPrice()
- Returns the actual price of the catalog entry.
-
- Returns:
- The actual price of the catalog entry in the requested currency of the shopper.
getTcId
public java.lang.Long getTcId()
- Returns the id of the output T&C id which was associated with the offer that supplied the price.
-
- Returns:
- The reference number of the T&C that was used to determine the price.
getTradingId
public java.lang.Long getTradingId()
- Returns the id of the output trading agreement id which was associated with the offer that supplied the price.
-
- Returns:
- The reference number of the trading agreement that was used to determine the price.
setCatEntryId
public void setCatEntryId(java.lang.Long anCatEntryId)
- Sets the id of the input catalog entry.
-
- Parameters:
- anCatEntryId - The reference number of a catalog entry whose price is to be retrieved and calculated.
setCatEntryPrices
public void setCatEntryPrices(CatEntryPrices[] aCatEntryPrices)
- Sets the information of one or more catalog entries (Future Support).
-
- Parameters:
- aCatEntryPrices - The information of one or more catalog entries whose prices are To be retrieved.
setCurrency
public void setCurrency(java.lang.String astrCurrency)
- Sets the currency to be used for finding the price (Optional).
-
- Parameters:
- astrCurrency - The currency to look up the price. If the currency is not specified then the "negotiated" currency is used for the store Id and shopper's preferred currency. (The negotiated currency is the currency returned from the getCurrency() method of the currency manager).
setErrorMode
public void setErrorMode(boolean aErrorMode)
- Sets the flag to indicate if exception will be thrown when the price cannot be found for the input catentry (Optional).
-
- Parameters:
- aErrorMode - The indicator to decide if an exception will be thrown when the price cannot be found. A true value (default) means throw exception. A false value means do not throw exception and returns a null value price
setMemberId
public void setMemberId(java.lang.Long anMemberId)
- Sets the member id to be used for verifying and searching the trading agreements (Optional).
-
- Parameters:
- anMemberId - The member id to be used to verify the input list of trading agreements, if provided. The input list of trading agreements, will be validated against the eligible list which can be either obtained directly from the Command Context or looked up by means of the member id if such id is different from the one in the Command Context. If no trading agreement is input, the member id will then be used to look up the list of trading agreements.
setOfferIds
public void setOfferIds(java.lang.Long[] aOfferIds)
- Sets the ids of the input offers to be used for price (Optional).
-
- Parameters:
- aOfferIds - The reference number of one or more offers that are Sto be used for determining the price. If no offer ids are supplied, then the "best" of all qualifying offers will be used. Otherwise, the "best" of the specified offers will be returned.
setQuantity
public void setQuantity(QuantityAmount aQuantityAmount)
- Sets the quantity amount of the input catalog entry that is to be priced (Optional).
-
- Parameters:
- aQuantityAmount - The quantity amount of the catalog entry. The quantity amount helps determine which offers are valid. If the quantity amount is not specified then the nominal quantity (rounded up to the nearest multiple as specified in the quantityMultiple attribute) of the Catalog entry is assumed to be the requested quantity.
setStoreId
public void setStoreId(java.lang.Integer aStoreId)
- Sets the id of the input store to be used for calculating the price (Optional).
-
- Parameters:
- aStoreId - The reference number of a store to be used for calculating the price. If the store id is not specified then the store id of the command context will be used.
setTradingIds
public void setTradingIds(java.lang.Long[] aTradingIds)
- Sets the ids of the input trading agreements (Optional).
-
- Parameters:
- aTradingIds - The reference numbers of a list of trading agreements to be used to determine the offers that will supply the prices and the adjustments to be applied to the prices.
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.