atg.b2bcommerce.order
Class B2BOrderImpl

java.lang.Object
  extended by atg.commerce.order.CommerceIdentifierImpl
      extended by atg.commerce.order.OrderImpl
          extended by atg.b2bcommerce.order.B2BOrderImpl
All Implemented Interfaces:
B2BOrder, CostCenterContainer, CostCenterRelationshipContainer, ChangedProperties, CommerceIdentifier, CommerceItemContainer, Order, PaymentGroupContainer, PaymentGroupRelationshipContainer, RelationshipContainer, ShippingGroupContainer, java.io.Serializable, java.util.Observer

public class B2BOrderImpl
extends OrderImpl
implements B2BOrder

Extends generic OrderImpl to include B2B-specific data and methods. Adds Cost Center Management functionality

See Also:
atg.commerce.order.B2BOrder, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  CostCenterContainerImpl mCostCenterContainer
           
protected  CostCenterRelationshipContainerImpl mCostCenterRelationshipContainer
           
protected static java.util.ResourceBundle sResourceBundle
          Resource Bundle
 
Fields inherited from class atg.commerce.order.OrderImpl
mCommerceItemContainer, mInitialized, mInvalidated, mPaymentGroupContainer, mPaymentGroupRelationshipContainer, mRelationshipContainer, mShippingGroupContainer
 
Constructor Summary
B2BOrderImpl()
           
 
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.
 void addCostCenter(CostCenter pCostCenter)
          Add the CostCenter to the container.
 void addCostCenter(CostCenter pCostCenter, int pIndex)
          Add the CostCenter to the container at the given index.
 void addCostCenterRelationship(CostCenterRelationship pCostCenterRelationship)
          Add the CostCenterRelationship to the container.
 void addCostCenterRelationship(CostCenterRelationship pCostCenterRelationship, int pIndex)
          Add the CostCenterRelationship to the container at the given index.
 void addShippingGroup(B2BShippingGroup pShippingGroup, int pIndex)
          Add the ShippingGroup to the container at the given index.
 void addShippingGroup(ShippingGroup pShippingGroup)
          Add the ShippingGroup to the container.
 java.util.List getApprovalSystemMessages()
          Returns property approvalSystemMessages
 java.util.List getApproverIds()
          Returns property approverIds
 java.util.List getApproverMessages()
          Returns property approverMessages
 java.util.List getAuthorizedApproverIds()
          Returns property authorizedApproverIds
 CostCenter getCostCenter(java.lang.String pCostCenterId)
          Returns the CostCenter whose id is pCostCenterId.
 int getCostCenterCount()
          Returns the number of CostCenters in the container.
 CostCenterRelationship getCostCenterRelationship(java.lang.String pCostCenterRelationshipId)
          Returns the CostCenterRelationship whose id is pCostCenterRelationshipId.
 int getCostCenterRelationshipCount()
          Returns the number of CostCenterRelationships in the container.
 java.util.List getCostCenterRelationships()
          Returns a List of CostCenterRelationships
 java.util.List getCostCenters()
          Returns a List of CostCenters
protected  void preEnsureContainers()
          Method which is called by ensureContainers to allow subclasses to do any initialization when the order is reconstructed.
 void removeAllCostCenterRelationships()
          Removes all the CostCenterRelationships
 void removeAllCostCenters()
          Removes all the CostCenters
 CostCenter removeCostCenter(java.lang.String pCostCenterId)
          Removes a CostCenter whose id is passed in.
 CostCenterRelationship removeCostCenterRelationship(java.lang.String pCostCenterRelationshipId)
          Removes a CostCenterRelationship whose id is passed in.
 void setApprovalSystemMessages(java.util.List pApprovalSystemMessages)
          Sets property approvalSystemMessages
 void setApproverIds(java.util.List pApproverIds)
          Sets property approverIds
 void setApproverMessages(java.util.List pApproverMessages)
          Sets property approverMessages
 void setAuthorizedApproverIds(java.util.List pAuthorizedApproverIds)
          Sets property authorizedApproverIds
 
Methods inherited from class atg.commerce.order.OrderImpl
addChangedProperty, addOrderIdToRelatedOrders, addPaymentGroup, addPaymentGroup, addPaymentGroupRelationship, addPaymentGroupRelationship, addRelationship, addRelationship, addShippingGroup, clearChangedProperties, ensureContainers, equals, getAgentId, getChangedProperties, getCommerceItem, getCommerceItemCount, getCommerceItems, getCommerceItemsByCatalogRefId, getCompletedDate, getCompletedTime, getCreatedByOrderId, getCreationDate, getCreationTime, getDescription, getLastModifiedDate, getLastModifiedTime, getManualAdjustments, getOrderClassType, getOriginOfOrder, getPaymentGroup, getPaymentGroupCount, getPaymentGroupRelationship, getPaymentGroupRelationshipCount, getPaymentGroupRelationships, getPaymentGroups, getPriceInfo, getPriceInfoRepositoryItem, getProfileId, getPropertyValue, getRelatedOrders, getRelationship, getRelationshipCount, getRelationships, getRepositoryItem, getSalesChannel, getSaveAllProperties, getShippingGroup, getShippingGroupCount, getShippingGroups, getSpecialInstructions, getState, getStateAsString, getStateAsUserResource, getStateDetail, getStateDetailAsUserResource, getSubmittedDate, getSubmittedTime, getTaxPriceInfo, getTaxPriceInfoRepositoryItem, getTotalCommerceItemCount, getVersion, hashCode, invalidateOrder, isChanged, isExplicitlySaved, isTransient, removeAllCommerceItems, removeAllPaymentGroupRelationships, removeAllPaymentGroups, removeAllRelationships, removeAllShippingGroups, removeCommerceItem, removePaymentGroup, removePaymentGroupRelationship, removeRelationship, removeShippingGroup, setAgentId, setChanged, setCompletedDate, setCompletedTime, setCreatedByOrderId, setCreationDate, setCreationTime, setDescription, setExplicitlySaved, setLastModifiedDate, setLastModifiedTime, setManualAdjustments, setOrderClassType, setOriginOfOrder, setPriceInfo, setPriceInfoRepositoryItem, setProfileId, setPropertyValue, setRepositoryItem, setSalesChannel, setSaveAllProperties, setSpecialInstructions, setState, setStateAsString, setStateDetail, setSubmittedDate, setSubmittedTime, setTaxPriceInfo, setTaxPriceInfoRepositoryItem, setTransient, setVersion, toString, update, updateVersion
 
Methods inherited from class atg.commerce.order.CommerceIdentifierImpl
getId, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface atg.commerce.order.Order
addOrderIdToRelatedOrders, equals, getAgentId, getCompletedDate, getCompletedTime, getCreatedByOrderId, getCreationDate, getCreationTime, getDescription, getLastModifiedDate, getLastModifiedTime, getManualAdjustments, getOrderClassType, getOriginOfOrder, getPriceInfo, getProfileId, getRelatedOrders, getSalesChannel, getSpecialInstructions, getState, getStateDetail, getSubmittedDate, getSubmittedTime, getTaxPriceInfo, isChanged, isExplicitlySaved, isTransient, setAgentId, setCompletedTime, setCreatedByOrderId, setCreationTime, setDescription, setExplicitlySaved, setLastModifiedTime, setManualAdjustments, setOrderClassType, setOriginOfOrder, setPriceInfo, setProfileId, setSalesChannel, setState, setStateDetail, setSubmittedTime, setTaxPriceInfo, setTransient
 
Methods inherited from interface atg.commerce.order.CommerceItemContainer
getCommerceItem, getCommerceItemCount, getCommerceItems, getCommerceItemsByCatalogRefId, getTotalCommerceItemCount, removeAllCommerceItems, removeCommerceItem
 
Methods inherited from interface atg.commerce.order.ShippingGroupContainer
addShippingGroup, getShippingGroup, getShippingGroupCount, getShippingGroups, removeAllShippingGroups, removeShippingGroup
 
Methods inherited from interface atg.commerce.order.PaymentGroupContainer
addPaymentGroup, addPaymentGroup, getPaymentGroup, getPaymentGroupCount, getPaymentGroups, removeAllPaymentGroups, removePaymentGroup
 
Methods inherited from interface atg.commerce.order.RelationshipContainer
addRelationship, addRelationship, getRelationship, getRelationshipCount, getRelationships, removeAllRelationships, removeRelationship
 
Methods inherited from interface atg.commerce.order.PaymentGroupRelationshipContainer
addPaymentGroupRelationship, addPaymentGroupRelationship, getPaymentGroupRelationship, getPaymentGroupRelationshipCount, getPaymentGroupRelationships, removeAllPaymentGroupRelationships, removePaymentGroupRelationship
 
Methods inherited from interface atg.commerce.order.CommerceIdentifier
getId
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


sResourceBundle

protected static java.util.ResourceBundle sResourceBundle
Resource Bundle


mCostCenterContainer

protected transient CostCenterContainerImpl mCostCenterContainer

mCostCenterRelationshipContainer

protected transient CostCenterRelationshipContainerImpl mCostCenterRelationshipContainer
Constructor Detail

B2BOrderImpl

public B2BOrderImpl()
Method Detail

getApproverIds

public java.util.List getApproverIds()
Returns property approverIds

Specified by:
getApproverIds in interface B2BOrder
Returns:
returns property approverIds

setApproverIds

public void setApproverIds(java.util.List pApproverIds)
Sets property approverIds

Specified by:
setApproverIds in interface B2BOrder
Parameters:
pApproverIds - the value to set for property approverIds

getAuthorizedApproverIds

public java.util.List getAuthorizedApproverIds()
Returns property authorizedApproverIds

Specified by:
getAuthorizedApproverIds in interface B2BOrder
Returns:
returns property authorizedApproverIds

setAuthorizedApproverIds

public void setAuthorizedApproverIds(java.util.List pAuthorizedApproverIds)
Sets property authorizedApproverIds

Specified by:
setAuthorizedApproverIds in interface B2BOrder
Parameters:
pAuthorizedApproverIds - the value to set for property authorizedApproverIds

getApprovalSystemMessages

public java.util.List getApprovalSystemMessages()
Returns property approvalSystemMessages

Specified by:
getApprovalSystemMessages in interface B2BOrder
Returns:
returns property approvalSystemMessages

setApprovalSystemMessages

public void setApprovalSystemMessages(java.util.List pApprovalSystemMessages)
Sets property approvalSystemMessages

Specified by:
setApprovalSystemMessages in interface B2BOrder
Parameters:
pApprovalSystemMessages - the value to set for property approvalSystemMessages

getApproverMessages

public java.util.List getApproverMessages()
Returns property approverMessages

Specified by:
getApproverMessages in interface B2BOrder
Returns:
returns property approverMessages

setApproverMessages

public void setApproverMessages(java.util.List pApproverMessages)
Sets property approverMessages

Specified by:
setApproverMessages in interface B2BOrder
Parameters:
pApproverMessages - the value to set for property approverMessages

getCostCenters

public java.util.List getCostCenters()
Returns a List of CostCenters

Specified by:
getCostCenters in interface CostCenterContainer
Returns:
returns a List of Strings for cost center

addCostCenter

public void addCostCenter(CostCenter pCostCenter)
                   throws DuplicateCostCenterException,
                          InvalidParameterException
Add the CostCenter to the container. If the CostCenter was already in the container a DuplicateCostCenterException is thrown.

Specified by:
addCostCenter in interface CostCenterContainer
Throws:
DuplicateCostCenterException
InvalidParameterException

addCostCenter

public void addCostCenter(CostCenter pCostCenter,
                          int pIndex)
                   throws DuplicateCostCenterException,
                          InvalidParameterException
Add the CostCenter to the container at the given index. If the CostCenter was already in the container a DuplicateCostCenterException is thrown.

Specified by:
addCostCenter in interface CostCenterContainer
Throws:
DuplicateCostCenterException
InvalidParameterException

removeCostCenter

public CostCenter removeCostCenter(java.lang.String pCostCenterId)
                            throws CostCenterNotFoundException,
                                   InvalidParameterException
Removes a CostCenter whose id is passed in. If the CostCenter is not in the container then a CostCenterNotFoundException is thrown. Otherwise a reference to the removed CostCenter is returned.

Specified by:
removeCostCenter in interface CostCenterContainer
Throws:
CostCenterNotFoundException
InvalidParameterException

removeAllCostCenters

public void removeAllCostCenters()
Removes all the CostCenters

Specified by:
removeAllCostCenters in interface CostCenterContainer

getCostCenter

public CostCenter getCostCenter(java.lang.String pCostCenterId)
                         throws CostCenterNotFoundException,
                                InvalidParameterException
Returns the CostCenter whose id is pCostCenterId. If the CostCenter with the corresponding id is not in the container then a CostCenterNotFoundException is thrown.

Specified by:
getCostCenter in interface CostCenterContainer
Throws:
CostCenterNotFoundException
InvalidParameterException

getCostCenterCount

public int getCostCenterCount()
Returns the number of CostCenters in the container.

Specified by:
getCostCenterCount in interface CostCenterContainer
Returns:
count of cost centers in the order

getCostCenterRelationships

public java.util.List getCostCenterRelationships()
Returns a List of CostCenterRelationships

Specified by:
getCostCenterRelationships in interface CostCenterRelationshipContainer
Returns:
CostCenter relationships in the order

addCostCenterRelationship

public void addCostCenterRelationship(CostCenterRelationship pCostCenterRelationship)
                               throws DuplicateRelationshipException,
                                      InvalidParameterException
Add the CostCenterRelationship to the container. If the CostCenterRelationship was already in the container a DuplicateRelationshipException is thrown.

Specified by:
addCostCenterRelationship in interface CostCenterRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

addCostCenterRelationship

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

Specified by:
addCostCenterRelationship in interface CostCenterRelationshipContainer
Throws:
DuplicateRelationshipException
InvalidParameterException

removeCostCenterRelationship

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

Specified by:
removeCostCenterRelationship in interface CostCenterRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

removeAllCostCenterRelationships

public void removeAllCostCenterRelationships()
Removes all the CostCenterRelationships

Specified by:
removeAllCostCenterRelationships in interface CostCenterRelationshipContainer

getCostCenterRelationship

public CostCenterRelationship getCostCenterRelationship(java.lang.String pCostCenterRelationshipId)
                                                 throws RelationshipNotFoundException,
                                                        InvalidParameterException
Returns the CostCenterRelationship whose id is pCostCenterRelationshipId. If the CostCenterRelationship with the corresponding id is not in the container then a RelationshipNotFoundException is thrown.

Specified by:
getCostCenterRelationship in interface CostCenterRelationshipContainer
Throws:
RelationshipNotFoundException
InvalidParameterException

getCostCenterRelationshipCount

public int getCostCenterRelationshipCount()
Returns the number of CostCenterRelationships in the container.

Specified by:
getCostCenterRelationshipCount in interface CostCenterRelationshipContainer
Returns:
count of CostCenter relationships in the order

preEnsureContainers

protected void preEnsureContainers()
Method which is called by ensureContainers to allow subclasses to do any initialization when the order is reconstructed.

Overrides:
preEnsureContainers in class OrderImpl

addCommerceItem

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

Specified by:
addCommerceItem in interface CommerceItemContainer
Overrides:
addCommerceItem in class OrderImpl
Throws:
DuplicateCommerceItemException
InvalidParameterException

addCommerceItem

public 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 DuplicateRelationshipException is thrown.

Specified by:
addCommerceItem in interface CommerceItemContainer
Overrides:
addCommerceItem in class OrderImpl
Throws:
DuplicateCommerceItemException
InvalidParameterException

addShippingGroup

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

Specified by:
addShippingGroup in interface ShippingGroupContainer
Overrides:
addShippingGroup in class OrderImpl
Throws:
DuplicateShippingGroupException
InvalidParameterException

addShippingGroup

public void addShippingGroup(B2BShippingGroup 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 DuplicateRelationshipException is thrown.

Throws:
DuplicateShippingGroupException
InvalidParameterException