atg.commerce.order
Class PaymentGroupContainerImpl

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

public class PaymentGroupContainerImpl
extends java.lang.Object
implements PaymentGroupContainer

A class which manages the containment of PaymentGroup objects.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected static java.lang.String PAYMENT_GROUPS
           
 
Constructor Summary
PaymentGroupContainerImpl(MutableRepositoryItem pRepositoryItem)
          Constructs a PaymentGroupContainerImpl object.
 
Method Summary
 void addPaymentGroup(PaymentGroup pPaymentGroup)
          Add the PaymentGroup to the container.
 void addPaymentGroup(PaymentGroup pPaymentGroup, int pIndex)
          Add the PaymentGroup to the container at the given index.
 PaymentGroup getPaymentGroup(java.lang.String pPaymentGroupId)
          Returns the PaymentGroup whose id is pPaymentGroupId.
 int getPaymentGroupCount()
          Returns the number of PaymentGroups in the container.
 java.util.List getPaymentGroups()
          Returns a List of PaymentGroups.
protected  java.util.List getRepositoryItemList()
           
 void removeAllPaymentGroups()
          Removes all the PaymentGroups
 PaymentGroup removePaymentGroup(java.lang.String pPaymentGroupId)
          Removes a PaymentGroup 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


PAYMENT_GROUPS

protected static java.lang.String PAYMENT_GROUPS
Constructor Detail

PaymentGroupContainerImpl

public PaymentGroupContainerImpl(MutableRepositoryItem pRepositoryItem)
Constructs a PaymentGroupContainerImpl object.

Method Detail

getRepositoryItemList

protected java.util.List getRepositoryItemList()

getPaymentGroups

public java.util.List getPaymentGroups()
Returns a List of PaymentGroups. 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:
getPaymentGroups in interface PaymentGroupContainer

addPaymentGroup

public void addPaymentGroup(PaymentGroup pPaymentGroup)
                     throws DuplicatePaymentGroupException,
                            InvalidParameterException
Add the PaymentGroup to the container. If the PaymentGroup was already in the container a DuplicatePaymentGroupException is thrown.

Specified by:
addPaymentGroup in interface PaymentGroupContainer
Throws:
DuplicatePaymentGroupException
InvalidParameterException

addPaymentGroup

public void addPaymentGroup(PaymentGroup pPaymentGroup,
                            int pIndex)
                     throws DuplicatePaymentGroupException,
                            InvalidParameterException
Add the PaymentGroup to the container at the given index. If the PaymentGroup was already in the container a DuplicatePaymentGroupException is thrown.

Specified by:
addPaymentGroup in interface PaymentGroupContainer
Throws:
DuplicatePaymentGroupException
InvalidParameterException

removePaymentGroup

public PaymentGroup removePaymentGroup(java.lang.String pPaymentGroupId)
                                throws PaymentGroupNotFoundException,
                                       InvalidParameterException
Removes a PaymentGroup whose id is passed in. If the PaymentGroup is not in the container then a PaymentGroupNotFoundException is thrown. Otherwise a reference to the removed PaymentGroup is returned.

Specified by:
removePaymentGroup in interface PaymentGroupContainer
Throws:
PaymentGroupNotFoundException
InvalidParameterException

removeAllPaymentGroups

public void removeAllPaymentGroups()
Removes all the PaymentGroups

Specified by:
removeAllPaymentGroups in interface PaymentGroupContainer

getPaymentGroup

public PaymentGroup getPaymentGroup(java.lang.String pPaymentGroupId)
                             throws PaymentGroupNotFoundException,
                                    InvalidParameterException
Returns the PaymentGroup whose id is pPaymentGroupId. If the PaymentGroup with the corresponding id is not in the container then a PaymentGroupNotFoundException is thrown.

Specified by:
getPaymentGroup in interface PaymentGroupContainer
Throws:
PaymentGroupNotFoundException
InvalidParameterException

getPaymentGroupCount

public int getPaymentGroupCount()
Returns the number of PaymentGroups in the container.

Specified by:
getPaymentGroupCount in interface PaymentGroupContainer