|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.logging.ApplicationLoggingImpl atg.commerce.pricing.DetailedItemPriceTools
public class DetailedItemPriceTools
This class provides various methods for manipulating DetailedItemPriceInfos. To use this class you should get it from PricingTools. To turn logging on for this component, turn logging on in PricingTools.
Created: Tue Jul 24 10:37:24 2001
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
DetailedItemPriceTools(PricingTools pPricingTools)
Constructs an instance of DetailedItemPriceTools |
Method Summary | |
---|---|
void |
adjustDetailedItemPriceInfos(java.util.List pDetailedItemPriceInfos,
double pUnitAdjustment,
ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters,
java.lang.String pAdjustmentDescription)
This method will modify the price of each given DetailedItemPriceInfo by the given unit adjustment. |
void |
assignSalePriceToDetails(java.util.List pDetailedItemPriceInfos,
double pUnitSalePrice,
ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters,
java.lang.String pAdjustmentDescription)
This method will assign the given sales price to each of the given details. |
java.util.List |
createInitialDetailedItemPriceInfos(double pTotalPrice,
ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters,
java.lang.String pAdjustmentDescription)
Create the initial DetailedItemPriceInfos with the given price This method will create one DetailedItemPriceInfo for each ShippingGroupCommerceItemRelationship in the order. |
java.util.List |
createInitialDetailedItemPriceInfos(double pTotalPrice,
ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters,
java.lang.String pAdjustmentDescription,
atg.core.util.Range pRange)
Create the initial DetailedItemPriceInfos with the given price for the given range This method will create one DetailedItemPriceInfo for each ShippingGroupCommerceItemRelationship in the order whose range falls within the given range. |
atg.core.util.Range |
createRange()
Instantiates a new Range object based on the configured
range type in PricingTools |
void |
distributeAmountAcrossDetails(java.util.List pShipItemRels,
double pAmountOfContainer,
double pAmountToDistribute,
java.lang.String pDetailProperty)
This method will distribute pAmountToDistribute across all teh detailedItemPriceInfos for each relationship in pShipItemRels. |
void |
distributeAmountAcrossDetails(java.util.List pShipItemRels,
double pAmountOfContainer,
double pAmountToDistribute,
java.lang.String pDetailProperty,
boolean pAccumulate)
This method will distribute pAmountToDistribute across all teh detailedItemPriceInfos for each relationship in pShipItemRels. |
protected java.util.List |
getDetailsToReceiveDiscountShare(ItemPriceInfo pItemPriceInfo,
atg.core.util.Range pRange)
This will return the price details in an item price info that will be marked as receiving a share of the order discount. |
PricingTools |
getPricingTools()
The PricingTools object |
boolean |
isLoggingDebug()
This method returns whether or not an debug log event should be broadcast. |
boolean |
isLoggingError()
This method returns whether or not an error log event should be broadcast. |
boolean |
isLoggingInfo()
This method returns whether or not an info log event should be broadcast. |
boolean |
isLoggingWarning()
This method returns whether or not an warning log event should be broadcast. |
void |
logDebug(java.lang.String pMessage)
Logs an debug event with the specified message |
void |
logDebug(java.lang.String pMessage,
java.lang.Throwable pThrowable)
Logs an debug event with the specified message and Throwable |
void |
logDebug(java.lang.Throwable pThrowable)
Logs an debug event with the specified Throwable |
void |
logError(java.lang.String pMessage)
Logs an error event with the specified message |
void |
logError(java.lang.String pMessage,
java.lang.Throwable pThrowable)
Logs an error event with the specified message and Throwable |
void |
logError(java.lang.Throwable pThrowable)
Logs an error event with the specified Throwable |
void |
logInfo(java.lang.String pMessage)
Logs an info event with the specified message |
void |
logInfo(java.lang.String pMessage,
java.lang.Throwable pThrowable)
Logs an info event with the specified message and Throwable |
void |
logInfo(java.lang.Throwable pThrowable)
Logs an info event with the specified Throwable |
void |
logWarning(java.lang.String pMessage)
Logs an warning event with the specified message |
void |
logWarning(java.lang.String pMessage,
java.lang.Throwable pThrowable)
Logs an warning event with the specified message and Throwable |
void |
logWarning(java.lang.Throwable pThrowable)
Logs an warning event with the specified Throwable |
void |
setPricingTools(PricingTools pPricingTools)
|
java.util.List |
splitDetailsAccordingToRanges(DetailedItemPriceInfo pDetail,
java.util.List pRanges)
Create a detail with the same information as the given detail, 1 for each range. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public DetailedItemPriceTools(PricingTools pPricingTools)
Method Detail |
---|
public void setPricingTools(PricingTools pPricingTools)
public PricingTools getPricingTools()
public java.util.List createInitialDetailedItemPriceInfos(double pTotalPrice, ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters, java.lang.String pAdjustmentDescription) throws PricingException
pTotalPrice
- The total price that the new DetailedItemPriceInfos must account forpPriceQuote
- The current working price of pItem
.pItem
- The item that is currently being priced.pPricingModel
- the discount that will be set in the PricingAdjustment (usually null)pProfile
- the person for whom the items are to be discounted (currently ignored)pLocale
- the locale in which the items are to be discounted (currently ignored)pExtraParameters
- any extra information that this method might need to set the
prices of a number of the qualifying item (currently ignored)pAdjustmentDescription
- This is the adjustment description used when creating all new PricingAdjustments
PricingException
public java.util.List createInitialDetailedItemPriceInfos(double pTotalPrice, ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters, java.lang.String pAdjustmentDescription, atg.core.util.Range pRange) throws PricingException
pTotalPrice
- The total price that the new DetailedItemPriceInfos must account forpPriceQuote
- The current working price of pItem
.pItem
- The item that is currently being priced.pPricingModel
- the discount that will be set in the PricingAdjustment (usually null)pProfile
- the person for whom the items are to be discounted (currently ignored)pLocale
- the locale in which the items are to be discounted (currently ignored)pExtraParameters
- any extra information that this method might need to set the
prices of a number of the qualifying item (currently ignored)pAdjustmentDescription
- This is the adjustment description used when creating all new PricingAdjustments
PricingException
public void assignSalePriceToDetails(java.util.List pDetailedItemPriceInfos, double pUnitSalePrice, ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters, java.lang.String pAdjustmentDescription) throws PricingException
amount
property of
each detail as well as add a new PricingAdjustment
for the entire
quantity of the detail, with the given adjustment description.
pDetailedItemPriceInfos
- The list of DetailedItemPriceInfo objects that should be adjustedpUnitSalePrice
- The sale price for 1 of the given item. The total adjustment for each
detail is this amount times the quantity of the detailpPriceQuote
- The current working price of pItem
. This is also ignored.pItem
- The item that contains the details. This is ignored in the default implementationpPricingModel
- the discount that will be set in the PricingAdjustment (usually null)pProfile
- the person for whom the items are to be discounted (currently ignored)pLocale
- the locale in which the items are to be discounted (currently ignored)pExtraParameters
- any extra information that this method might need to set the
prices of a number of the qualifying itempAdjustmentDescription
- This is the adjustment description used when creating all new PricingAdjustments
PricingException
public void adjustDetailedItemPriceInfos(java.util.List pDetailedItemPriceInfos, double pUnitAdjustment, ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters, java.lang.String pAdjustmentDescription) throws PricingException
pDetailedItemPriceInfos
- The list of details that will be adjustedpUnitAdjustment
- The adjustment made to the unit price (Total adjustment
will be this amount times the quantity of the detail)pPricingModel
- the discount that will be set in the PricingAdjustment (usually null)pProfile
- the person for whom the items are to be discounted (currently ignored)pLocale
- the locale in which the items are to be discounted (currently ignored)pExtraParameters
- any extra information that this method might need to set the
prices of a number of the qualifying itempAdjustmentDescription
- This is the adjustment description used when creating all new PricingAdjustments
PricingException
public java.util.List splitDetailsAccordingToRanges(DetailedItemPriceInfo pDetail, java.util.List pRanges)
pDetail
- The original DetailedItemPriceInfo to split apartpRanges
- The list of Ranges that should have a DetailedItemPriceInfo. The size of
these must equal the quantity of pDetail
public void distributeAmountAcrossDetails(java.util.List pShipItemRels, double pAmountOfContainer, double pAmountToDistribute, java.lang.String pDetailProperty) throws PricingException
pShipItemRels
- The list of relationships whose details will be updatedpAmountOfContainer
- If the relationships are in a specific shipping group, this is
the amount of the shipping group. If the relationships are all
the relationships in an order, then this would be the order amount.pAmountToDistribute
- The amount that will be distributed across the details.pDetailProperty
- The name of the property that will be updated. Old values will be ignored.
PricingException
public void distributeAmountAcrossDetails(java.util.List pShipItemRels, double pAmountOfContainer, double pAmountToDistribute, java.lang.String pDetailProperty, boolean pAccumulate) throws PricingException
pShipItemRels
- The list of relationships whose details will be updatedpAmountOfContainer
- If the relationships are in a specific shipping group, this is
the amount of the shipping group. If the relationships are all
the relationships in an order, then this would be the order amount.pAmountToDistribute
- The amount that will be distributed across the details.pDetailProperty
- The name of the property that will be updated.pAccumulate
- If true, then the new value will be added to any existing value.
PricingException
protected java.util.List getDetailsToReceiveDiscountShare(ItemPriceInfo pItemPriceInfo, atg.core.util.Range pRange)
pItemPriceInfo
- The item price infopRange
- Optional. Limits the results to the details for this range.
public boolean isLoggingInfo()
isLoggingInfo
in interface ApplicationLogging
isLoggingInfo
in class ApplicationLoggingImpl
public boolean isLoggingWarning()
isLoggingWarning
in interface ApplicationLogging
isLoggingWarning
in class ApplicationLoggingImpl
public boolean isLoggingError()
isLoggingError
in interface ApplicationLogging
isLoggingError
in class ApplicationLoggingImpl
public boolean isLoggingDebug()
isLoggingDebug
in interface ApplicationLogging
isLoggingDebug
in class ApplicationLoggingImpl
public void logInfo(java.lang.String pMessage)
logInfo
in interface ApplicationLogging
logInfo
in class ApplicationLoggingImpl
public void logInfo(java.lang.Throwable pThrowable)
logInfo
in interface ApplicationLogging
logInfo
in class ApplicationLoggingImpl
public void logInfo(java.lang.String pMessage, java.lang.Throwable pThrowable)
logInfo
in interface ApplicationLogging
logInfo
in class ApplicationLoggingImpl
public void logWarning(java.lang.String pMessage)
logWarning
in interface ApplicationLogging
logWarning
in class ApplicationLoggingImpl
public void logWarning(java.lang.Throwable pThrowable)
logWarning
in interface ApplicationLogging
logWarning
in class ApplicationLoggingImpl
public void logWarning(java.lang.String pMessage, java.lang.Throwable pThrowable)
logWarning
in interface ApplicationLogging
logWarning
in class ApplicationLoggingImpl
public void logError(java.lang.String pMessage)
logError
in interface ApplicationLogging
logError
in class ApplicationLoggingImpl
public void logError(java.lang.Throwable pThrowable)
logError
in interface ApplicationLogging
logError
in class ApplicationLoggingImpl
public void logError(java.lang.String pMessage, java.lang.Throwable pThrowable)
logError
in interface ApplicationLogging
logError
in class ApplicationLoggingImpl
public void logDebug(java.lang.String pMessage)
logDebug
in interface ApplicationLogging
logDebug
in class ApplicationLoggingImpl
public void logDebug(java.lang.Throwable pThrowable)
logDebug
in interface ApplicationLogging
logDebug
in class ApplicationLoggingImpl
public void logDebug(java.lang.String pMessage, java.lang.Throwable pThrowable)
logDebug
in interface ApplicationLogging
logDebug
in class ApplicationLoggingImpl
public atg.core.util.Range createRange()
Range
object based on the configured
range type in PricingTools
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |