atg.commerce.order
Interface CommerceItemContainer

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
B2BOrder, Order
All Known Implementing Classes:
B2BOrderImpl, CommerceItemContainerImpl, ConfigurableCommerceItem, OrderImpl

public interface CommerceItemContainer
extends java.io.Serializable

Implemented by a class that contains and manages CommerceItem objects. This interface defines methods for getting, adding, and removing CommerceItem objects.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 void addCommerceItem(CommerceItem pCommerceItem)
          Add the CommerceItem to the container.
 void addCommerceItem(CommerceItem pCommerceItem, int pIndex)
          Add the CommerceItem to the container at the given index.
 CommerceItem getCommerceItem(java.lang.String pCommerceItemId)
          Returns the CommerceItem whose id is pCommerceItemId.
 int getCommerceItemCount()
          Returns the number of CommerceItems in the container.
 java.util.List getCommerceItems()
          Returns a List of CommerceItems
 java.util.List getCommerceItemsByCatalogRefId(java.lang.String pCatalogRefId)
          Returns a List of CommerceItems whose catalogRefId is pCatalogRefId.
 long getTotalCommerceItemCount()
          Returns the number of individual CommerceItems in the container.
 void removeAllCommerceItems()
          Removes all the CommerceItems in the container.
 CommerceItem removeCommerceItem(java.lang.String pCommerceItemId)
          Removes an CommerceItem whose id is passed in.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

getCommerceItems

java.util.List getCommerceItems()
Returns a List of CommerceItems


addCommerceItem

void addCommerceItem(CommerceItem pCommerceItem)
                     throws DuplicateCommerceItemException,
                            InvalidParameterException
Add the CommerceItem to the container. If the CommerceItem was already in the container a DuplicateCommerceItemException is thrown.

Throws:
DuplicateCommerceItemException
InvalidParameterException

addCommerceItem

void addCommerceItem(CommerceItem pCommerceItem,
                     int pIndex)
                     throws DuplicateCommerceItemException,
                            InvalidParameterException
Add the CommerceItem to the container at the given index. If the CommerceItem was already in the container a DuplicateCommerceItemException is thrown.

Throws:
DuplicateCommerceItemException
InvalidParameterException

removeCommerceItem

CommerceItem removeCommerceItem(java.lang.String pCommerceItemId)
                                throws CommerceItemNotFoundException,
                                       InvalidParameterException
Removes an CommerceItem whose id is passed in. If the CommerceItem is not in the container then an CommerceItemNotFoundException is thrown. Otherwise a reference to the removed CommerceItem is returned.

Throws:
CommerceItemNotFoundException
InvalidParameterException

removeAllCommerceItems

void removeAllCommerceItems()
Removes all the CommerceItems in the container.


getCommerceItem

CommerceItem getCommerceItem(java.lang.String pCommerceItemId)
                             throws CommerceItemNotFoundException,
                                    InvalidParameterException
Returns the CommerceItem whose id is pCommerceItemId. If the CommerceItem with the corresponding id is not in the container then a CommerceItemNotFoundException is thrown.

Throws:
CommerceItemNotFoundException
InvalidParameterException

getCommerceItemsByCatalogRefId

java.util.List getCommerceItemsByCatalogRefId(java.lang.String pCatalogRefId)
                                              throws CommerceItemNotFoundException,
                                                     InvalidParameterException
Returns a List of CommerceItems whose catalogRefId is pCatalogRefId. If a CommerceItem with the corresponding catalogRefId is not in the container then a CommerceItemNotFoundException is thrown.

Throws:
CommerceItemNotFoundException
InvalidParameterException

getCommerceItemCount

int getCommerceItemCount()
Returns the number of CommerceItems in the container.


getTotalCommerceItemCount

long getTotalCommerceItemCount()
Returns the number of individual CommerceItems in the container. This means the total of all the quantities in each CommerceItem.