atg.commerce.pricing
Class PricingContext

java.lang.Object
  extended by atg.commerce.pricing.PricingContext

public class PricingContext
extends java.lang.Object

Service class for common parameters passed within methods for a pricing operation. For some method calls some properties may be null. To maintain a level of abstraction (DIP) an instance of this class should only be created through the use of the PricingContextFactory. Combining the parameters into a single holder class and using factory abstraction provides a number of advantages such as: -extensibility: easier to extend related APIs -readability: method signatures are shorter and parameters specific to a method stand out. -diagnostics: methods can be added to this class to provide diagnostics


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
protected PricingContext()
          Default Constructor
 
Method Summary
 java.lang.String dump()
          Verbose description of all member variables
 java.util.List getItems()
          Getter for items
 java.util.Locale getLocale()
          Getter for locale
 Order getOrder()
          Getter for order
 OrderPriceInfo getOrderPriceQuote()
          Getter for orderPriceQuote of running pricing operation
 RepositoryItem getPricingModel()
          Getter for pricingModel
 RepositoryItem getProfile()
          Getter for profile
 ShippingGroup getShippingGroup()
          Getter for shippingGroup
 ShippingPriceInfo getShippingPriceQuote()
          Getter for shippingPriceQuote of running pricing operation
 RepositoryItem getSite()
          Getter for site
 TaxPriceInfo getTaxPriceQuote()
          Getter for taxPriceQuote of running pricing operation
 void setItems(java.util.List pItems)
          Setter for items
 void setLocale(java.util.Locale pLocale)
          Setter for locale
 void setOrder(Order pOrder)
          Setter for order
 void setOrderPriceQuote(OrderPriceInfo pOrderPriceQuote)
          Setter for orderPriceQuote of running pricing operation
 void setPricingModel(RepositoryItem pPricingModel)
          Setter for pricingModel
 void setProfile(RepositoryItem pProfile)
          Setter for profile
 void setShippingGroup(ShippingGroup pShippingGroup)
          Setter for shippingGroup
 void setShippingPriceQuote(ShippingPriceInfo pShippingPriceQuote)
          Setter for shippingPriceQuote of running pricing operation
 void setSite(RepositoryItem pSite)
          Setter for site
 void setTaxPriceQuote(TaxPriceInfo pTaxPriceQuote)
          Setter for taxPriceQuote of running pricing operation
 java.lang.String toString()
          Short desciption of all member variables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

PricingContext

protected PricingContext()
Default Constructor

Method Detail

dump

public java.lang.String dump()
Verbose description of all member variables

Returns:
String combining toString() calls to all member variables.

toString

public java.lang.String toString()
Short desciption of all member variables.

Overrides:
toString in class java.lang.Object
Returns:
String short description of all member variables

getItems

public java.util.List getItems()
Getter for items

Returns:
List of CommerceItem or FilteredCommerceItem

setItems

public void setItems(java.util.List pItems)
Setter for items

Parameters:
pItems - List of CommerceItem or FilteredCommerceItem

getPricingModel

public RepositoryItem getPricingModel()
Getter for pricingModel

Returns:
pricingModel RepositoryItem

setPricingModel

public void setPricingModel(RepositoryItem pPricingModel)
Setter for pricingModel

Parameters:
pPricingModel - pricingModel RepositoryItem

getProfile

public RepositoryItem getProfile()
Getter for profile

Returns:
profile RepositoryItem

setProfile

public void setProfile(RepositoryItem pProfile)
Setter for profile

Parameters:
pProfile - profile RepositoryItem

getLocale

public java.util.Locale getLocale()
Getter for locale

Returns:
Locale

setLocale

public void setLocale(java.util.Locale pLocale)
Setter for locale

Parameters:
pLocale - Locale

getOrder

public Order getOrder()
Getter for order

Returns:
Order

setOrder

public void setOrder(Order pOrder)
Setter for order

Parameters:
pOrder - Order

getSite

public RepositoryItem getSite()
Getter for site

Returns:
RepositoryItem site

setSite

public void setSite(RepositoryItem pSite)
Setter for site

Parameters:
pSite - RepositoryItem site

getOrderPriceQuote

public OrderPriceInfo getOrderPriceQuote()
Getter for orderPriceQuote of running pricing operation

Returns:
OrderPriceInfo

setOrderPriceQuote

public void setOrderPriceQuote(OrderPriceInfo pOrderPriceQuote)
Setter for orderPriceQuote of running pricing operation

Parameters:
pOrderPriceQuote - OrderPriceInfo

getShippingGroup

public ShippingGroup getShippingGroup()
Getter for shippingGroup

Returns:
ShippingGroup

setShippingGroup

public void setShippingGroup(ShippingGroup pShippingGroup)
Setter for shippingGroup

Parameters:
pShippingGroup - ShippingGroup

getShippingPriceQuote

public ShippingPriceInfo getShippingPriceQuote()
Getter for shippingPriceQuote of running pricing operation

Returns:
ShippingPriceInfo

setShippingPriceQuote

public void setShippingPriceQuote(ShippingPriceInfo pShippingPriceQuote)
Setter for shippingPriceQuote of running pricing operation

Parameters:
pShippingPriceQuote - ShippingPriceInfo

getTaxPriceQuote

public TaxPriceInfo getTaxPriceQuote()
Getter for taxPriceQuote of running pricing operation

Returns:
TaxPriceInfo

setTaxPriceQuote

public void setTaxPriceQuote(TaxPriceInfo pTaxPriceQuote)
Setter for taxPriceQuote of running pricing operation

Parameters:
pTaxPriceQuote - TaxPriceInfo