atg.commerce.order
Class HandlingInstructionContainerImpl

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

public class HandlingInstructionContainerImpl
extends java.lang.Object
implements HandlingInstructionContainer

A class which manages the containment of HandlingInstruction objects.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
HandlingInstructionContainerImpl()
          Constructs a HandlingInstructionContainerImpl object.
 
Method Summary
 void addHandlingInstruction(HandlingInstruction pHandlingInstruction)
          Add the HandlingInstruction to the container.
 void addHandlingInstruction(HandlingInstruction pHandlingInstruction, int pIndex)
          Add the HandlingInstruction to the container at the given index.
 HandlingInstruction getHandlingInstruction(java.lang.String pHandlingInstructionId)
          Returns the HandlingInstruction whose id is pHandlingInstructionId.
 int getHandlingInstructionCount()
          Returns the number of HandlingInstructions in the container.
 java.util.List getHandlingInstructions()
          Returns a List of HandlingInstructions.
 void removeAllHandlingInstructions()
          Removes all the HandlingInstructions
 HandlingInstruction removeHandlingInstruction(java.lang.String pHandlingInstructionId)
          Removes a HandlingInstruction whose id is passed as a parameter.
 
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

HandlingInstructionContainerImpl

public HandlingInstructionContainerImpl()
Constructs a HandlingInstructionContainerImpl object.

Method Detail

getHandlingInstructions

public java.util.List getHandlingInstructions()
Returns a List of HandlingInstructions. 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:
getHandlingInstructions in interface HandlingInstructionContainer

addHandlingInstruction

public void addHandlingInstruction(HandlingInstruction pHandlingInstruction)
                            throws DuplicateHandlingInstructionException,
                                   InvalidParameterException
Add the HandlingInstruction to the container. If the HandlingInstruction was already in the container a DuplicateHandlingInstructionException is thrown.

Specified by:
addHandlingInstruction in interface HandlingInstructionContainer
Throws:
DuplicateHandlingInstructionException
InvalidParameterException

addHandlingInstruction

public void addHandlingInstruction(HandlingInstruction pHandlingInstruction,
                                   int pIndex)
                            throws DuplicateHandlingInstructionException,
                                   InvalidParameterException
Add the HandlingInstruction to the container at the given index. If the HandlingInstruction was already in the container a DuplicateHandlingInstructionException is thrown.

Specified by:
addHandlingInstruction in interface HandlingInstructionContainer
Throws:
DuplicateHandlingInstructionException
InvalidParameterException

removeHandlingInstruction

public HandlingInstruction removeHandlingInstruction(java.lang.String pHandlingInstructionId)
                                              throws HandlingInstructionNotFoundException,
                                                     InvalidParameterException
Removes a HandlingInstruction whose id is passed as a parameter. If the HandlingInstruction is not in the container then a HandlingInstructionNotFoundException is thrown. Otherwise a reference to the removed HandlingInstruction is returned.

Specified by:
removeHandlingInstruction in interface HandlingInstructionContainer
Throws:
HandlingInstructionNotFoundException
InvalidParameterException

removeAllHandlingInstructions

public void removeAllHandlingInstructions()
Removes all the HandlingInstructions

Specified by:
removeAllHandlingInstructions in interface HandlingInstructionContainer

getHandlingInstruction

public HandlingInstruction getHandlingInstruction(java.lang.String pHandlingInstructionId)
                                           throws HandlingInstructionNotFoundException,
                                                  InvalidParameterException
Returns the HandlingInstruction whose id is pHandlingInstructionId. If the HandlingInstruction with the corresponding id is not in the container then an HandlingInstructionNotFoundException is thrown.

Specified by:
getHandlingInstruction in interface HandlingInstructionContainer
Throws:
HandlingInstructionNotFoundException
InvalidParameterException

getHandlingInstructionCount

public int getHandlingInstructionCount()
Returns the number of HandlingInstructions in the container.

Specified by:
getHandlingInstructionCount in interface HandlingInstructionContainer