public class FixedPriceShippingCalculator extends ShippingCalculatorImpl
If the property addAmount is true then instead of setting the price quote amount to the value
of the amount property, the calculator adds the amount to the current amount in the
price quote. This can be used to configure a "surcharge" calculator, which increases the shipping
price.
The shippingMethod property should be set to the name of a particular delivery process.
For example: UPS Ground, UPS 2-day or UPS Next Day.
If the ignoreShippingMethod property is true, then this calculator does not
expose a shipping method name (through getAvailableMethods). In addition this calculator will
always attempt to perform pricing. This option is available if the user is not given a choice
of different shipping methods.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
FixedPriceShippingCalculator()
Constructs an instanceof FixedPriceShippingCalculator
|
| Modifier and Type | Method and Description |
|---|---|
double |
getAmount()
The fixed price that every ShippingGroup processes by this calculator receives
|
protected double |
getAmount(Order pOrder,
ShippingPriceInfo pPriceQuote,
ShippingGroup pShippingGroup,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Returns the amount which should be used as the price for this shipping group
|
void |
setAmount(double pAmount)
The fixed price that every ShippingGroup processes by this calculator receives
|
doStartService, getAmount, getAvailableMethods, getPricingTools, getShippingMethod, haveItemsToShip, isAddAmount, isIgnoreShippingMethod, performPricing, priceShippingGroup, priceShippingPriceInfo, resetShippingPriceInfo, setAddAmount, setIgnoreShippingMethod, setPricingTools, setShippingMethodaddLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic FixedPriceShippingCalculator()
public void setAmount(double pAmount)
pAmount - new value to setpublic double getAmount()
protected double getAmount(Order pOrder, ShippingPriceInfo pPriceQuote, ShippingGroup pShippingGroup, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
getAmount in class ShippingCalculatorImplpOrder - the OrderpPriceQuote - the price of the input shipping grouppShippingGroup - the shipping group for which an amount is neededpPricingModel - a discount which could affect the shipping group's pricepLocale - the locale in which the price is calculatedpProfile - the profile of the person for whom the amount in being generated.pExtraParameters - any extra parameters that might affect the amount calculationPricingException - if there is a problem getting the amount (price) for the input shipping group