atg.commerce.order
Class ShippingGroupContainerImpl

java.lang.Object
  extended by atg.commerce.order.ShippingGroupContainerImpl
All Implemented Interfaces:
ShippingGroupContainer, java.io.Serializable

public class ShippingGroupContainerImpl
extends java.lang.Object
implements ShippingGroupContainer

A class which manages the containment of ShippingGroup objects.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected static java.lang.String SHIPPING_GROUPS
           
 
Constructor Summary
ShippingGroupContainerImpl(MutableRepositoryItem pRepositoryItem)
          Constructs a ShippingGroupContainerImpl object.
 
Method Summary
 void addShippingGroup(ShippingGroup pShippingGroup)
          Add the ShippingGroup to the container.
 void addShippingGroup(ShippingGroup pShippingGroup, int pIndex)
          Add the ShippingGroup to the container at the given index.
protected  java.util.List getRepositoryItemList()
           
 ShippingGroup getShippingGroup(java.lang.String pShippingGroupId)
          Returns the ShippingGroup whose id is pShippingGroupId.
 int getShippingGroupCount()
          Returns the number of ShippingGroups in the container.
 java.util.List getShippingGroups()
          Returns a List of ShippingGroups.
 void removeAllShippingGroups()
          Removes all the ShippingGroups
 ShippingGroup removeShippingGroup(java.lang.String pShippingGroupId)
          Removes a ShippingGroup whose id is passed in.
 
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


SHIPPING_GROUPS

protected static java.lang.String SHIPPING_GROUPS
Constructor Detail

ShippingGroupContainerImpl

public ShippingGroupContainerImpl(MutableRepositoryItem pRepositoryItem)
Constructs a ShippingGroupContainerImpl object.

Method Detail

getRepositoryItemList

protected java.util.List getRepositoryItemList()

getShippingGroups

public java.util.List getShippingGroups()
Returns a List of ShippingGroups. Note that the returned List should not be edited directly. Doing so will result in unexpected behavior. Any editing should be done through this class.

Specified by:
getShippingGroups in interface ShippingGroupContainer

addShippingGroup

public void addShippingGroup(ShippingGroup pShippingGroup)
                      throws DuplicateShippingGroupException,
                             InvalidParameterException
Add the ShippingGroup to the container. If the ShippingGroup was already in the container a DuplicateShippingGroupException is thrown.

Specified by:
addShippingGroup in interface ShippingGroupContainer
Throws:
DuplicateShippingGroupException
InvalidParameterException

addShippingGroup

public void addShippingGroup(ShippingGroup pShippingGroup,
                             int pIndex)
                      throws DuplicateShippingGroupException,
                             InvalidParameterException
Add the ShippingGroup to the container at the given index. If the ShippingGroup was already in the container a DuplicateShippingGroupException is thrown.

Specified by:
addShippingGroup in interface ShippingGroupContainer
Throws:
DuplicateShippingGroupException
InvalidParameterException

removeShippingGroup

public ShippingGroup removeShippingGroup(java.lang.String pShippingGroupId)
                                  throws ShippingGroupNotFoundException,
                                         InvalidParameterException
Removes a ShippingGroup whose id is passed in. If the ShippingGroup is not in the container then a ShippingGroupNotFoundException is thrown. Otherwise a reference to the removed ShippingGroup is returned.

Specified by:
removeShippingGroup in interface ShippingGroupContainer
Throws:
ShippingGroupNotFoundException
InvalidParameterException

removeAllShippingGroups

public void removeAllShippingGroups()
Removes all the ShippingGroups

Specified by:
removeAllShippingGroups in interface ShippingGroupContainer

getShippingGroup

public ShippingGroup getShippingGroup(java.lang.String pShippingGroupId)
                               throws ShippingGroupNotFoundException,
                                      InvalidParameterException
Returns the ShippingGroup whose id is pShippingGroupId. If the ShippingGroup with the \ corresponding id is not in the container then a ShippingGroupNotFoundException is thrown.

Specified by:
getShippingGroup in interface ShippingGroupContainer
Throws:
ShippingGroupNotFoundException
InvalidParameterException

getShippingGroupCount

public int getShippingGroupCount()
Returns the number of ShippingGroups in the container.

Specified by:
getShippingGroupCount in interface ShippingGroupContainer