atg.commerce.pricing
Class PricingCommerceItem

java.lang.Object
  extended by atg.commerce.pricing.PricingCommerceItem
All Implemented Interfaces:
CommerceIdentifier, CommerceItem, PaymentGroupRelationshipContainer, ShippingGroupRelationshipContainer, java.io.Serializable

public class PricingCommerceItem
extends java.lang.Object
implements CommerceItem

A simple CommerceItem that is used just as a placeholder while pricing items. This CommerceItem cannot be added to an order. The pricing engines only understand how to compute prices in the context of a CommerceItem. Many times when we wish to price an entity for the user we do not have a CommerceItem in hand. This is most evident when prices are shown for products in the catalog. Products and SKUs are usually represented by RepositoryItems, which the pricing engines do not deal with. Therefore we need an inexpensive CommerceItem class which we can create and plug in the product and SKU objects. The item pricing droplets uses the PricingCommerceItem as this wrapper to perform pricing. The item pricing droplets understand how to deal with input which are plain RepositoryItems and "convert" them into CommerceItems.

These CommerceItems cannot be used in the default Order management system. If you need to add a CommerceItem to an order one should use the OrderManager APIs.

See Also:
OrderManager, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
PricingCommerceItem()
          Constructs an instanceof PricingCommerceItem
 
Method Summary
 void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship)
          Add the PaymentGroupRelationship to the container.
 void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship, int pIndex)
          Add the PaymentGroupRelationship to the container at the given index.
 void addShippingGroupRelationship(ShippingGroupRelationship pShippingGroupRelationship)
          Add the ShippingGroupRelationship to the container.
 void addShippingGroupRelationship(ShippingGroupRelationship pShippingGroupRelationship, int pIndex)
          Add the ShippingGroupRelationship to the container at the given index.
 void clear()
          Clears the instance as if it was just constructed
 AuxiliaryData getAuxiliaryData()
          returns the AuxiliaryData.
 java.lang.String getCatalogId()
          Returns property CatalogId
 java.lang.String getCatalogKey()
          Returns property CatalogKey
 java.lang.String getCatalogRefId()
          Returns property CatalogRefId
 java.lang.String getCommerceItemClassType()
          Returns the commerceItemClassType
 java.lang.String getId()
          Returns property Id
 PaymentGroupRelationship getPaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId)
          Returns the PaymentGroupRelationship whose id is pPaymentGroupRelationshipId.
 int getPaymentGroupRelationshipCount()
          Returns the number of PaymentGroupRelationships in the container.
 java.util.List getPaymentGroupRelationships()
          Returns a List of PaymentGroupRelationships
 ItemPriceInfo getPriceInfo()
          Returns property PriceInfo
 long getQuantity()
          Returns property Quantity
 long getReturnedQuantity()
          Returns the returnedQuantity
 ShippingGroupRelationship getShippingGroupRelationship(java.lang.String pShippingGroupRelationshipId)
          Returns the ShippingGroupRelationship whose id is pShippingGroupRelationshipId.
 int getShippingGroupRelationshipCount()
          Returns the number of ShippingGroupRelationships in the container.
 java.util.List getShippingGroupRelationships()
          Returns a List of ShippingGroupRelationships
 int getState()
          Returns property State
 java.lang.String getStateDetail()
          Returns property StateDetail
 void removeAllPaymentGroupRelationships()
          Removes all the PaymentGroupRelationships
 void removeAllShippingGroupRelationships()
          Removes all the ShippingGroupRelationships
 PaymentGroupRelationship removePaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId)
          Removes a PaymentGroupRelationship whose id is passed in.
 ShippingGroupRelationship removeShippingGroupRelationship(java.lang.String pShippingGroupRelationshipId)
          Removes a ShippingGroupRelationship whose id is passed in.
 void setCatalogId(java.lang.String pCatalogId)
          Sets property CatalogId
 void setCatalogKey(java.lang.String pCatalogKey)
          Sets property CatalogKey
 void setCatalogRefId(java.lang.String pCatalogRefId)
          Sets property CatalogRefId
 void setCommerceItemClassType(java.lang.String pCommerceItemClassType)
          Sets the commerceItemClassType
 void setId(java.lang.String pId)
          Sets property Id
 void setPriceInfo(ItemPriceInfo pPriceInfo)
          Sets property PriceInfo
 void setQuantity(long pQuantity)
          Sets property Quantity
 void setReturnedQuantity(long pReturnedQuantity)
          Sets the returnedQuantity
 void setState(int pState)
          Sets property State
 void setStateDetail(java.lang.String pStateDetail)
          Sets property StateDetail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

PricingCommerceItem

public PricingCommerceItem()
Constructs an instanceof PricingCommerceItem

Method Detail

setId

public void setId(java.lang.String pId)
Sets property Id


getId

public java.lang.String getId()
Returns property Id

Specified by:
getId in interface CommerceIdentifier

setCommerceItemClassType

public void setCommerceItemClassType(java.lang.String pCommerceItemClassType)
Sets the commerceItemClassType

Specified by:
setCommerceItemClassType in interface CommerceItem

getCommerceItemClassType

public java.lang.String getCommerceItemClassType()
Returns the commerceItemClassType

Specified by:
getCommerceItemClassType in interface CommerceItem

setCatalogKey

public void setCatalogKey(java.lang.String pCatalogKey)
Sets property CatalogKey

Specified by:
setCatalogKey in interface CommerceItem

getCatalogKey

public java.lang.String getCatalogKey()
Returns property CatalogKey

Specified by:
getCatalogKey in interface CommerceItem

setCatalogId

public void setCatalogId(java.lang.String pCatalogId)
Sets property CatalogId

Specified by:
setCatalogId in interface CommerceItem

getCatalogId

public java.lang.String getCatalogId()
Returns property CatalogId

Specified by:
getCatalogId in interface CommerceItem

setCatalogRefId

public void setCatalogRefId(java.lang.String pCatalogRefId)
Sets property CatalogRefId

Specified by:
setCatalogRefId in interface CommerceItem

getCatalogRefId

public java.lang.String getCatalogRefId()
Returns property CatalogRefId

Specified by:
getCatalogRefId in interface CommerceItem

setQuantity

public void setQuantity(long pQuantity)
Sets property Quantity

Specified by:
setQuantity in interface CommerceItem
Parameters:
pQuantity - the new value for the quantity

getQuantity

public long getQuantity()
Returns property Quantity

Specified by:
getQuantity in interface CommerceItem

getReturnedQuantity

public long getReturnedQuantity()
Returns the returnedQuantity

Specified by:
getReturnedQuantity in interface CommerceItem

setReturnedQuantity

public void setReturnedQuantity(long pReturnedQuantity)
Sets the returnedQuantity


setState

public void setState(int pState)
Sets property State

Specified by:
setState in interface CommerceItem

getState

public int getState()
Returns property State

Specified by:
getState in interface CommerceItem

setStateDetail

public void setStateDetail(java.lang.String pStateDetail)
Sets property StateDetail

Specified by:
setStateDetail in interface CommerceItem

getStateDetail

public java.lang.String getStateDetail()
Returns property StateDetail

Specified by:
getStateDetail in interface CommerceItem

setPriceInfo

public void setPriceInfo(ItemPriceInfo pPriceInfo)
Sets property PriceInfo

Specified by:
setPriceInfo in interface CommerceItem
Parameters:
pPriceInfo - the PriceInfo object to set

getPriceInfo

public ItemPriceInfo getPriceInfo()
Returns property PriceInfo

Specified by:
getPriceInfo in interface CommerceItem

getAuxiliaryData

public AuxiliaryData getAuxiliaryData()
returns the AuxiliaryData.

Specified by:
getAuxiliaryData in interface CommerceItem

getShippingGroupRelationships

public java.util.List getShippingGroupRelationships()
Returns a List of ShippingGroupRelationships

Specified by:
getShippingGroupRelationships in interface ShippingGroupRelationshipContainer

addShippingGroupRelationship

public void addShippingGroupRelationship(ShippingGroupRelationship pShippingGroupRelationship)
                                  throws DuplicateRelationshipException,
                                         InvalidParameterException
Add the ShippingGroupRelationship to the container. If the ShippingGroupRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addShippingGroupRelationship in interface ShippingGroupRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

addShippingGroupRelationship

public void addShippingGroupRelationship(ShippingGroupRelationship pShippingGroupRelationship,
                                         int pIndex)
                                  throws DuplicateRelationshipException,
                                         InvalidParameterException
Add the ShippingGroupRelationship to the container at the given index. If the ShippingGroupRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addShippingGroupRelationship in interface ShippingGroupRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

removeShippingGroupRelationship

public ShippingGroupRelationship removeShippingGroupRelationship(java.lang.String pShippingGroupRelationshipId)
                                                          throws RelationshipNotFoundException,
                                                                 InvalidParameterException
Removes a ShippingGroupRelationship whose id is passed in. If the ShippingGroupRelationship is not in the container then a RelationshipNotFoundException is thrown. Otherwise a reference to the removed ShippingGroupRelationship is returned.

Specified by:
removeShippingGroupRelationship in interface ShippingGroupRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllShippingGroupRelationships

public void removeAllShippingGroupRelationships()
Removes all the ShippingGroupRelationships

Specified by:
removeAllShippingGroupRelationships in interface ShippingGroupRelationshipContainer

getShippingGroupRelationship

public ShippingGroupRelationship getShippingGroupRelationship(java.lang.String pShippingGroupRelationshipId)
                                                       throws RelationshipNotFoundException,
                                                              InvalidParameterException
Returns the ShippingGroupRelationship whose id is pShippingGroupRelationshipId. If theShippingGroupRelationship with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Specified by:
getShippingGroupRelationship in interface ShippingGroupRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

getShippingGroupRelationshipCount

public int getShippingGroupRelationshipCount()
Returns the number of ShippingGroupRelationships in the container.

Specified by:
getShippingGroupRelationshipCount in interface ShippingGroupRelationshipContainer

getPaymentGroupRelationships

public java.util.List getPaymentGroupRelationships()
Returns a List of PaymentGroupRelationships

Specified by:
getPaymentGroupRelationships in interface PaymentGroupRelationshipContainer

addPaymentGroupRelationship

public void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship)
                                 throws DuplicateRelationshipException,
                                        InvalidParameterException
Add the PaymentGroupRelationship to the container. If the PaymentGroupRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addPaymentGroupRelationship in interface PaymentGroupRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

addPaymentGroupRelationship

public void addPaymentGroupRelationship(PaymentGroupRelationship pPaymentGroupRelationship,
                                        int pIndex)
                                 throws DuplicateRelationshipException,
                                        InvalidParameterException
Add the PaymentGroupRelationship to the container at the given index. If the PaymentGroupRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addPaymentGroupRelationship in interface PaymentGroupRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

removePaymentGroupRelationship

public PaymentGroupRelationship removePaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId)
                                                        throws RelationshipNotFoundException,
                                                               InvalidParameterException
Removes a PaymentGroupRelationship whose id is passed in. If the PaymentGroupRelationship is not in the container then a RelationshipNotFoundException is thrown. Otherwise a reference to the removed PaymentGroupRelationship is returned.

Specified by:
removePaymentGroupRelationship in interface PaymentGroupRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllPaymentGroupRelationships

public void removeAllPaymentGroupRelationships()
Removes all the PaymentGroupRelationships

Specified by:
removeAllPaymentGroupRelationships in interface PaymentGroupRelationshipContainer

getPaymentGroupRelationship

public PaymentGroupRelationship getPaymentGroupRelationship(java.lang.String pPaymentGroupRelationshipId)
                                                     throws RelationshipNotFoundException,
                                                            InvalidParameterException
Returns the PaymentGroupRelationship whose id is pPaymentGroupRelationshipId. If thePaymentGroupRelationship with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Specified by:
getPaymentGroupRelationship in interface PaymentGroupRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

getPaymentGroupRelationshipCount

public int getPaymentGroupRelationshipCount()
Returns the number of PaymentGroupRelationships in the container.

Specified by:
getPaymentGroupRelationshipCount in interface PaymentGroupRelationshipContainer

clear

public void clear()
Clears the instance as if it was just constructed