|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.order.OrderTools atg.b2bcommerce.order.B2BOrderTools
public class B2BOrderTools
This class is a low level business layer class. It provides the raw functionality for manipulating an Order. The methods in this class are not meant for direct use, but rather are used primarily by the OrderManager. This class does all the work like instantiating and creating the objects in the repository. In addition to the raw functionality, it also contains properties which control key parts of the commerce platform. For example, it contains the mappings for names to class types for the major objects, Order, CommerceItem, ShippingGroup, PaymentGroup, Relationship, and HandlingInstruction. In addition to mapping names it also contains the default types for each class type. It also contains the mapping for item descriptor names to class types. Other objects it contains are key components used in the commerce system, such as PipelineManager, GiftlistManager, ProfileTools, CatalogTools, OrderRepository, and ProfileRepository. The main functionality which this class provides is object construction and initialization. This is done by methods like createOrder(), createCommerceItem(), etc. The initialization methods provided are only for Relationships.
OrderManager
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
B2BOrderTools()
Constructs an OrderTools object. |
Method Summary | |
---|---|
CostCenter |
createCostCenter(java.lang.String pType)
Returns a new instance of a CostCenter whose class is mapped to the type supplied in pType. |
java.util.Properties |
getCostCenterTypeClassMap()
returns a java.util.Properties object of the type to classname map for CostCenter classes. |
boolean |
getCreateDefaultCostCenter()
Returns property createDefaultCostCenter |
java.lang.String |
getDefaultCostCenterType()
Returns the defaultCostCenterType |
void |
initializeRelationship(B2BOrder pOrder,
CostCenterCommerceItemRelationship pRelationship,
java.lang.String pCostCenterId,
java.lang.String pCommerceItemId)
This method initializes the Relationship to contain a CostCenter and a CommerceItem. |
void |
initializeRelationship(B2BOrder pOrder,
CostCenterOrderRelationship pRelationship,
java.lang.String pCostCenterId)
This method initializes the Relationship to contain a CostCenter and an Order. |
void |
initializeRelationship(B2BOrder pOrder,
CostCenterShippingGroupRelationship pRelationship,
java.lang.String pCostCenterId,
java.lang.String pShippingGroupId)
This method initializes the Relationship to contain a CostCenter and a ShippingGroup. |
void |
setCostCenterTypeClassMap(java.util.Properties pProp)
sets a java.util.Properties object to contain the type to classname map for CostCenters. |
void |
setCreateDefaultCostCenter(boolean pCreateDefaultCostCenter)
Sets property createDefaultCostCenter |
void |
setDefaultCostCenterType(java.lang.String pDefaultCostCenterType)
Sets the defaultCostCenterType |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public B2BOrderTools()
Method Detail |
---|
public java.util.Properties getCostCenterTypeClassMap()
public void setCostCenterTypeClassMap(java.util.Properties pProp)
public java.lang.String getDefaultCostCenterType()
public void setDefaultCostCenterType(java.lang.String pDefaultCostCenterType)
public boolean getCreateDefaultCostCenter()
public void setCreateDefaultCostCenter(boolean pCreateDefaultCostCenter)
pCreateDefaultCostCenter
- the value to set for property createDefaultCostCenterpublic CostCenter createCostCenter(java.lang.String pType) throws CommerceException
pType
- the type which is mapped to the class to use
ObjectCreationException
- if the instantiation of an object fails
InvalidTypeException
- if the supplied type is not mapped to any class
CommerceException
public void initializeRelationship(B2BOrder pOrder, CostCenterCommerceItemRelationship pRelationship, java.lang.String pCostCenterId, java.lang.String pCommerceItemId) throws CommerceException
pOrder
- the Order object which contains the CommerceItem and CostCenter to add the Relationship topRelationship
- the relationship object to add to the Order.pCostCenterId
- the id of the CostCenter object which makes up a half of the relationshippCommerceItemId
- the id of the CommerceItem object which makes up a half of the relationship
InvalidParameterException
- if any of the given method parameters are invalid
InvalidTypeException
- if there is more than one QUANTITYREMAINING relationship type
in the CommerceItem
CommerceException
public void initializeRelationship(B2BOrder pOrder, CostCenterShippingGroupRelationship pRelationship, java.lang.String pCostCenterId, java.lang.String pShippingGroupId) throws CommerceException
pOrder
- the Order object which contains the ShippingGroup and CostCenter to add the Relationship topRelationship
- the relationship object to add to the Order.pCostCenterId
- the id of the CostCenter object which makes up a half of the relationshippShippingGroupId
- the id of the ShippingGroup object which makes up a half of the relationship
InvalidParameterException
- if any of the given method parameters are invalid
InvalidTypeException
- if there is more than one CCSHIPPINGAMOUNTREMAINING relationship type
in the ShippingGroup
CommerceException
public void initializeRelationship(B2BOrder pOrder, CostCenterOrderRelationship pRelationship, java.lang.String pCostCenterId) throws CommerceException
pOrder
- the Order object which contains the CostCenter to add the Relationship topRelationship
- the relationship object to add to the Order.pCostCenterId
- the id of the CostCenter object which makes up a half of the relationship
InvalidParameterException
- if any of the given method parameters are invalid
InvalidTypeException
- if there is more than one CCTAXAMOUNTREMAINING relationship type in
the Order
CommerceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |