|
|||||||||
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
public class OrderTools
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 | |
---|---|
OrderTools()
Constructs an OrderTools object. |
Method Summary | |
---|---|
protected void |
addManualAdjustment(Order pOrder,
RepositoryItem pAdjustment)
This method adds the manual adjustment to the order. |
void |
addManualAdjustment(Order pOrder,
RepositoryItem pAdjustment,
int pIndex)
Adds an adjustment at a specific index in the List. |
static void |
copyAddress(Address pSrcAddress,
Address pDestAddress)
This method, given two atg.core.util.Address or atg.core.util.ContactInfo objects, will copy the address information from the source to the destination object. |
static void |
copyAddress(Address pAddress,
RepositoryItem pProfileAddress)
This method, given a Profile object and an atg.core.util.Address or atg.core.util.ContactInfo object, will copy the address information from the Address or ContactInfo object to the profile. |
static void |
copyAddress(RepositoryItem pProfileAddress,
Address pAddress)
This method, given a ContactInfo iten descriptor and an atg.core.util.Address or atg.core.util.ContactInfo object, will copy the address information from the profile to the Address or ContactInfo object. |
CommerceItem |
createCommerceItem(java.lang.String pType)
Returns a new instance of a CommerceItem whose class is mapped to the type supplied in pType. |
HandlingInstruction |
createHandlingInstruction(java.lang.String pType)
Returns a new instance of a HandlingInstruction whose class is mapped to the type supplied in pType. |
protected MutableRepositoryItem |
createManualAdjustmentItem(java.lang.String pItemType,
double pAmount,
java.lang.String pAdjustmentType,
java.lang.String pNotes,
java.lang.String pReasonCode)
Creates and returns a mutable, transient manual adjustment repository item of the specified type. |
Order |
createOrder(java.lang.String pType)
Returns a new instance of an Order whose class is mapped to the type supplied in pType. |
Order |
createOrder(java.lang.String pType,
ShippingPriceInfo pShippingPriceInfo)
Returns a new instance of an Order whose class is mapped to the type supplied in pType. |
Order |
createOrder(java.lang.String pType,
java.lang.String pOrderId)
Returns a new instance of an Order whose class is mapped to the type supplied in pType and whose id will be that which is supplied in pOrderId. |
Order |
createOrder(java.lang.String pType,
java.lang.String pOrderId,
ShippingPriceInfo pShippingPriceInfo)
Returns a new instance of an Order whose class is mapped to the type supplied in pType and whose id will be that which is supplied in pOrderId. |
RepositoryItem |
createOrderFixedAmountAdjustment(Order pOrder,
double pAmount,
java.lang.String pAdjustmentType,
java.lang.String pNotes,
java.lang.String pReasonCode)
Creates a new fixed amount manual adjustment and adds it to the order. |
PaymentGroup |
createPaymentGroup(java.lang.String pType)
Returns a new instance of a PaymentGroup whose class is mapped to the type supplied in pType. |
Relationship |
createRelationship(java.lang.String pType)
Returns a new instance of a Relationship whose class is mapped to the type supplied in pType. |
ShippingGroup |
createShippingGroup(java.lang.String pType)
Returns a new instance of a ShippingGroup whose class is mapped to the type supplied in pType. |
ShippingGroup |
createShippingGroup(java.lang.String pType,
ShippingPriceInfo pShippingPriceInfo)
Returns a new instance of a ShippingGroup whose class is mapped to the type supplied in pType. |
boolean |
deleteManualAdjustment(Order pOrder,
java.lang.String pAdjustmentItemId)
Deletes manual adjustments from the order's list of adjustments. |
void |
doStartService()
Start the OrderTools component. |
java.util.Collection |
findShippingGroupsWithAddress(Order pOrder,
Address pAddress,
java.lang.String[] pPropertyNamesToCompare)
Finds all hardgood shipping group in the order with a matching address |
java.util.Properties |
getBeanNameToItemDescriptorMap()
Returns the beanNameToItemDescriptorMap |
CatalogTools |
getCatalogTools()
Returns the catalogTools |
java.util.Properties |
getCommerceItemTypeClassMap()
returns a java.util.Properties object of the type to classname map for Item classes. |
boolean |
getCreateDefaultPaymentGroup()
Returns property createDefaultPaymentGroup |
boolean |
getCreateDefaultShippingGroup()
Returns property createDefaultShippingGroup |
java.lang.String |
getDefaultCommerceItemType()
Returns the defaultCommerceItemType |
java.lang.String |
getDefaultHandlingInstructionType()
Returns the defaultHandlingInstructionType |
java.lang.Class |
getDefaultItemPriceInfoClass()
Returns property defaultItemPriceInfoClass |
java.lang.Class |
getDefaultOrderPriceInfoClass()
Returns property defaultOrderPriceInfoClass |
java.lang.String |
getDefaultOrderType()
Returns the defaultOrderType |
java.lang.String |
getDefaultPaymentGroupAddressType()
Returns property defaultPaymentGroupAddressType |
java.lang.String |
getDefaultPaymentGroupType()
Returns the defaultPaymentGroupType |
java.lang.String |
getDefaultProfileType()
Returns the defaultProfileType |
java.lang.String |
getDefaultShippingGroupAddressType()
Returns property defaultShippingGroupAddressType |
java.lang.String |
getDefaultShippingGroupType()
Returns the defaultShippingGroupType |
java.lang.Class |
getDefaultShippingPriceInfoClass()
Returns property defaultShippingPriceInfoClass |
java.lang.Class |
getDefaultTaxPriceInfoClass()
Returns property defaultTaxPriceInfoClass |
GiftlistManager |
getGiftlistManager()
Returns the giftlistManager |
java.util.Properties |
getHandlingTypeClassMap()
returns a java.util.Properties object of the type to classname map for HandlingInstruction classes. |
InventoryManager |
getInventoryManager()
Returns the InventoryManager |
java.lang.String |
getItemDescriptorForCommerceItemType(java.lang.String pCommerceItemType)
Return the item descriptor used for a specified commerce item type. |
java.lang.String |
getItemDescriptorForOrderType(java.lang.String pOrderType)
Return the item descriptor used for a specified order type. |
java.lang.String |
getItemDescriptorForPaymentType(java.lang.String pPaymentType)
Return the item descriptor used for a specified payment group type. |
java.lang.String |
getItemDescriptorForShippingType(java.lang.String pShippingType)
Return the item descriptor used for a specified shipping group type. |
java.util.Properties |
getItemDescriptorToBeanNameMap()
Returns the itemDescriptorToBeanNameMap |
java.lang.String |
getMappedBeanName(java.lang.String pRepItemName)
Returns the bean name mapped to the repository item name. |
java.lang.String |
getMappedItemDescriptorName(java.lang.String pBeanName)
Returns the repository item name mapped to the bean name. |
java.lang.String |
getOrderFixedAmountAdjustmentType()
Returns the OrderFixedAmountAdjustmentType |
java.lang.String |
getOrderItemDescriptorName()
Returns the OrderItemDescriptorName |
atg.commerce.order.OrderLookupService |
getOrderLookupService()
The service that is actually used to find the desired orders |
Repository |
getOrderRepository()
Returns the orderRepository |
java.util.Properties |
getOrderTypeClassMap()
returns a java.util.Properties object of the type to classname map for Order classes. |
java.util.Properties |
getPaymentGroupBillingAddressClassNameMap()
Returns property paymentGroupBillingAddressClassNameMap |
java.util.Properties |
getPaymentTypeClassMap()
returns a java.util.Properties object of the type to classname map for PaymentGroup classes. |
PipelineManager |
getPipelineManager()
Returns the pipelineManager |
Repository |
getProfileRepository()
Returns the profileRepository |
CommerceProfileTools |
getProfileTools()
Returns the profileTools |
java.util.Properties |
getRelationshipTypeClassMap()
returns a java.util.Properties object of the type to classname map for Relationship classes. |
java.util.Properties |
getShippingGroupShippingAddressClassNameMap()
Returns property shippingGroupShippingAddressClassNameMap |
java.util.Properties |
getShippingTypeClassMap()
returns a java.util.Properties object of the type to classname map for ShippingGroup classes. |
javax.transaction.TransactionManager |
getTransactionManager()
The service used to manage all transactions |
void |
initializeRelationship(Order pOrder,
PaymentGroupCommerceItemRelationship pRelationship,
java.lang.String pPaymentGroupId,
java.lang.String pCommerceItemId)
This method initializes the Relationship to contain a PaymentGroup and a CommerceItem. |
void |
initializeRelationship(Order pOrder,
PaymentGroupOrderRelationship pRelationship,
java.lang.String pPaymentGroupId)
This method initializes the Relationship to contain a PaymentGroup and an Order. |
void |
initializeRelationship(Order pOrder,
PaymentGroupShippingGroupRelationship pRelationship,
java.lang.String pPaymentGroupId,
java.lang.String pShippingGroupId)
This method initializes the Relationship to contain a PaymentGroup and a ShippingGroup. |
void |
initializeRelationship(Order pOrder,
ShippingGroupCommerceItemRelationship pRelationship,
java.lang.String pShippingGroupId,
java.lang.String pCommerceItemId)
This method initializes the Relationship to contain a ShippingGroup and a CommerceItem. |
protected java.util.Properties |
invertBeanToItemMap(java.util.Properties pBeanToItemMap)
Invert the key/value pairs in pBeanToItemMap and return
a new Properties object containing the inverted map. |
boolean |
isAssignCatalogInCommerceItem()
If this is true, then newly created commerce items will have the 'catalogId' property automatically populated with the catalog for the current user The default is false. |
protected boolean |
isNullAddress(Address pAddress)
Query whether an Address object is null or empty. |
protected boolean |
isNullCreditCard(CreditCard pCreditCard)
Query whether a CreditCard object is null or empty. |
boolean |
isOrderState(Order pOrder,
java.lang.String[] pStates)
Determines if an order is in one of the provided states |
void |
registerSynchronization(Order pOrder)
Registers the given order as a synchronization on the current transaction. |
void |
setAssignCatalogInCommerceItem(boolean pAssignCatalogInCommerceItem)
|
void |
setBeanNameToItemDescriptorMap(java.util.Properties pBeanNameToItemDescriptorMap)
Sets the beanNameToItemDescriptorMap |
void |
setCatalogTools(CatalogTools pCatalogTools)
Sets the catalogTools |
void |
setCommerceItemTypeClassMap(java.util.Properties pProp)
sets a java.util.Properties object to contain the type to classname map for Items. |
void |
setCreateDefaultPaymentGroup(boolean pCreateDefaultPaymentGroup)
Sets property createDefaultPaymentGroup |
void |
setCreateDefaultShippingGroup(boolean pCreateDefaultShippingGroup)
Sets property createDefaultShippingGroup |
void |
setDefaultCommerceItemType(java.lang.String pDefaultCommerceItemType)
Sets the defaultCommerceItemType |
void |
setDefaultHandlingInstructionType(java.lang.String pDefaultHandlingInstructionType)
Sets the defaultHandlingInstructionType |
void |
setDefaultItemPriceInfoClass(java.lang.Class pDefaultItemPriceInfoClass)
Sets property defaultItemPriceInfoClass |
void |
setDefaultOrderPriceInfoClass(java.lang.Class pDefaultOrderPriceInfoClass)
Sets property defaultOrderPriceInfoClass |
void |
setDefaultOrderType(java.lang.String pDefaultOrderType)
Sets the defaultOrderType |
void |
setDefaultPaymentGroupAddressType(java.lang.String pDefaultPaymentGroupAddressType)
Sets property defaultPaymentGroupAddressType |
void |
setDefaultPaymentGroupType(java.lang.String pDefaultPaymentGroupType)
Sets the defaultPaymentGroupType |
void |
setDefaultProfileType(java.lang.String pDefaultProfileType)
Sets the defaultProfileType |
void |
setDefaultShippingGroupAddressType(java.lang.String pDefaultShippingGroupAddressType)
Sets property defaultShippingGroupAddressType |
void |
setDefaultShippingGroupType(java.lang.String pDefaultShippingGroupType)
Sets the defaultShippingGroupType |
void |
setDefaultShippingPriceInfoClass(java.lang.Class pDefaultShippingPriceInfoClass)
Sets property defaultShippingPriceInfoClass |
void |
setDefaultTaxPriceInfoClass(java.lang.Class pDefaultTaxPriceInfoClass)
Sets property defaultTaxPriceInfoClass |
void |
setGiftlistManager(GiftlistManager pGiftlistManager)
Sets the giftlistManager |
void |
setHandlingTypeClassMap(java.util.Properties pProp)
sets a java.util.Properties object to contain the type to classname map for HandlingInstructions. |
void |
setInventoryManager(InventoryManager pInventoryManager)
Sets the InventoryManager |
void |
setItemDescriptorToBeanNameMap(java.util.Properties pItemToBeanMap)
Set the map that maps item descriptor names to the corresponding bean implementation classes. |
void |
setOrderFixedAmountAdjustmentType(java.lang.String pOrderFixedAmountAdjustmentType)
Sets the OrderFixedAmountAdjustmentType |
void |
setOrderItemDescriptorName(java.lang.String pOrderItemDescriptorName)
Sets the OrderItemDescriptorName |
void |
setOrderLookupService(atg.commerce.order.OrderLookupService pOrderLookupService)
The service that is actually used to find the desired orders |
void |
setOrderRepository(Repository pOrderRepository)
Sets the orderRepository |
void |
setOrderTypeClassMap(java.util.Properties pProp)
sets a java.util.Properties object to contain the type to classname map for Orders. |
void |
setPaymentGroupBillingAddressClassNameMap(java.util.Properties pPaymentGroupBillingAddressClassNameMap)
Sets property paymentGroupBillingAddressClassNameMap |
void |
setPaymentTypeClassMap(java.util.Properties pProp)
sets a java.util.Properties object to contain the type to classname map for PaymentGroups. |
void |
setPipelineManager(PipelineManager pPipelineManager)
Sets the pipelineManager |
void |
setProfileRepository(Repository pProfileRepository)
Sets the profileRepository |
void |
setProfileTools(CommerceProfileTools pProfileTools)
Sets the profileTools |
void |
setRelationshipTypeClassMap(java.util.Properties pProp)
sets a java.util.Properties object to contain the type to classname map for Relationships. |
void |
setShippingGroupShippingAddressClassNameMap(java.util.Properties pShippingGroupShippingAddressClassNameMap)
Sets property shippingGroupShippingAddressClassNameMap |
void |
setShippingTypeClassMap(java.util.Properties pProp)
sets a java.util.Properties object to contain the type to classname map for ShippingGroups. |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
|
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 OrderTools()
Method Detail |
---|
public java.lang.String getOrderFixedAmountAdjustmentType()
public void setOrderFixedAmountAdjustmentType(java.lang.String pOrderFixedAmountAdjustmentType)
public void setOrderLookupService(atg.commerce.order.OrderLookupService pOrderLookupService)
pOrderLookupService
- the OrderLookupService component. Usually /atg/commerce/order/OrderLookupServicepublic atg.commerce.order.OrderLookupService getOrderLookupService()
public PipelineManager getPipelineManager()
public void setPipelineManager(PipelineManager pPipelineManager)
public GiftlistManager getGiftlistManager()
public void setGiftlistManager(GiftlistManager pGiftlistManager)
public InventoryManager getInventoryManager()
public void setInventoryManager(InventoryManager pInventoryManager)
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public CommerceProfileTools getProfileTools()
public void setProfileTools(CommerceProfileTools pProfileTools)
public CatalogTools getCatalogTools()
public void setCatalogTools(CatalogTools pCatalogTools)
public Repository getOrderRepository()
public void setOrderRepository(Repository pOrderRepository)
public Repository getProfileRepository()
public void setProfileRepository(Repository pProfileRepository)
public java.lang.String getOrderItemDescriptorName()
public void setOrderItemDescriptorName(java.lang.String pOrderItemDescriptorName)
public java.lang.String getDefaultProfileType()
public void setDefaultProfileType(java.lang.String pDefaultProfileType)
public java.lang.Class getDefaultOrderPriceInfoClass()
public void setDefaultOrderPriceInfoClass(java.lang.Class pDefaultOrderPriceInfoClass)
pDefaultOrderPriceInfoClass
- the value to set for property defaultOrderPriceInfoClasspublic java.lang.Class getDefaultItemPriceInfoClass()
public void setDefaultItemPriceInfoClass(java.lang.Class pDefaultItemPriceInfoClass)
pDefaultItemPriceInfoClass
- the value to set for property defaultItemPriceInfoClasspublic java.lang.Class getDefaultShippingPriceInfoClass()
public void setDefaultShippingPriceInfoClass(java.lang.Class pDefaultShippingPriceInfoClass)
pDefaultShippingPriceInfoClass
- the value to set for property defaultShippingPriceInfoClasspublic java.lang.Class getDefaultTaxPriceInfoClass()
public void setDefaultTaxPriceInfoClass(java.lang.Class pDefaultTaxPriceInfoClass)
pDefaultTaxPriceInfoClass
- the value to set for property defaultTaxPriceInfoClasspublic java.util.Properties getOrderTypeClassMap()
public void setOrderTypeClassMap(java.util.Properties pProp)
public java.util.Properties getCommerceItemTypeClassMap()
public void setCommerceItemTypeClassMap(java.util.Properties pProp)
public java.util.Properties getShippingTypeClassMap()
public void setShippingTypeClassMap(java.util.Properties pProp)
public java.util.Properties getPaymentTypeClassMap()
public void setPaymentTypeClassMap(java.util.Properties pProp)
public java.util.Properties getHandlingTypeClassMap()
public void setHandlingTypeClassMap(java.util.Properties pProp)
public java.util.Properties getRelationshipTypeClassMap()
public void setRelationshipTypeClassMap(java.util.Properties pProp)
public java.util.Properties getBeanNameToItemDescriptorMap()
public void setBeanNameToItemDescriptorMap(java.util.Properties pBeanNameToItemDescriptorMap)
public java.util.Properties getItemDescriptorToBeanNameMap()
public void setItemDescriptorToBeanNameMap(java.util.Properties pItemToBeanMap)
beanNameToItemDescriptorMap
. This method is provided
for applications that must explicitly override the default reverse
mapping for some reason.
public java.lang.String getMappedItemDescriptorName(java.lang.String pBeanName)
pBeanName
- the bean name
public java.lang.String getMappedBeanName(java.lang.String pRepItemName)
pRepItemName
- the repository item name
public java.lang.String getItemDescriptorForOrderType(java.lang.String pOrderType) throws CommerceException
orderTypeClassMap
, then returns the matching repository
item descriptor name from the beanNameToItemDescriptorMap
.
pOrderType
- An order type key, e.g. "default" or "b2bOrder".
CommerceException
public java.lang.String getItemDescriptorForCommerceItemType(java.lang.String pCommerceItemType) throws CommerceException
commerceItemTypeClassMap
, then returns the matching repository
item descriptor name from the beanNameToItemDescriptorMap
.
pCommerceItemType
- A commerce item type key, e.g. "default" or "configurableCommerceItem".
CommerceException
public java.lang.String getItemDescriptorForShippingType(java.lang.String pShippingType) throws CommerceException
shippingTypeClassMap
, then returns the matching repository
item descriptor name from the beanNameToItemDescriptorMap
.
pShippingType
- A shipping group type key, e.g. "hardgoodShippingGroup".
CommerceException
public java.lang.String getItemDescriptorForPaymentType(java.lang.String pPaymentType) throws CommerceException
paymentTypeClassMap
, then returns the matching repository
item descriptor name from the beanNameToItemDescriptorMap
.
pPaymentType
- A shipping group type key, e.g. "creditCard" or "storeCredit".
CommerceException
public java.lang.String getDefaultOrderType()
public void setDefaultOrderType(java.lang.String pDefaultOrderType)
public java.lang.String getDefaultCommerceItemType()
public void setDefaultCommerceItemType(java.lang.String pDefaultCommerceItemType)
public java.lang.String getDefaultShippingGroupType()
public void setDefaultShippingGroupType(java.lang.String pDefaultShippingGroupType)
public java.lang.String getDefaultPaymentGroupType()
public void setDefaultPaymentGroupType(java.lang.String pDefaultPaymentGroupType)
public java.lang.String getDefaultHandlingInstructionType()
public void setDefaultHandlingInstructionType(java.lang.String pDefaultHandlingInstructionType)
public boolean getCreateDefaultShippingGroup()
public void setCreateDefaultShippingGroup(boolean pCreateDefaultShippingGroup)
pCreateDefaultShippingGroup
- the value to set for property createDefaultShippingGrouppublic boolean getCreateDefaultPaymentGroup()
public void setCreateDefaultPaymentGroup(boolean pCreateDefaultPaymentGroup)
pCreateDefaultPaymentGroup
- the value to set for property createDefaultPaymentGrouppublic java.util.Properties getPaymentGroupBillingAddressClassNameMap()
public void setPaymentGroupBillingAddressClassNameMap(java.util.Properties pPaymentGroupBillingAddressClassNameMap)
pPaymentGroupBillingAddressClassNameMap
- the value to set for property paymentGroupBillingAddressClassNameMappublic java.util.Properties getShippingGroupShippingAddressClassNameMap()
public void setShippingGroupShippingAddressClassNameMap(java.util.Properties pShippingGroupShippingAddressClassNameMap)
pShippingGroupShippingAddressClassNameMap
- the value to set for property shippingGroupShippingAddressClassNameMappublic java.lang.String getDefaultPaymentGroupAddressType()
public void setDefaultPaymentGroupAddressType(java.lang.String pDefaultPaymentGroupAddressType)
pDefaultPaymentGroupAddressType
- the value to set for property defaultPaymentGroupAddressTypepublic java.lang.String getDefaultShippingGroupAddressType()
public void setDefaultShippingGroupAddressType(java.lang.String pDefaultShippingGroupAddressType)
pDefaultShippingGroupAddressType
- the value to set for property defaultShippingGroupAddressTypepublic void setAssignCatalogInCommerceItem(boolean pAssignCatalogInCommerceItem)
public boolean isAssignCatalogInCommerceItem()
public void doStartService()
itemDescriptorToBeanNameMap
was set explicitly in the
component's configuration file. If it was not, the map contents are
computed at startup by inverting the key/value pairs in
beanNameToItemDescriptorMap
.
doStartService
in class GenericService
protected java.util.Properties invertBeanToItemMap(java.util.Properties pBeanToItemMap)
pBeanToItemMap
and return
a new Properties object containing the inverted map.
public Order createOrder(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 Order createOrder(java.lang.String pType, java.lang.String pOrderId) 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 Order createOrder(java.lang.String pType, ShippingPriceInfo pShippingPriceInfo) throws CommerceException
pType
- the type which is mapped to the class to usepShippingPriceInfo
- the priceInfo to set into the ShippingGroup
ObjectCreationException
- if the instantiation of an object fails
InvalidTypeException
- if the supplied type is not mapped to any class
CommerceException
public Order createOrder(java.lang.String pType, java.lang.String pOrderId, ShippingPriceInfo pShippingPriceInfo) throws CommerceException
pType
- the type which is mapped to the class to usepOrderId
- the order id to assign to this new OrderpShippingPriceInfo
- the priceInfo to set into the ShippingGroup
ObjectCreationException
- if the instantiation of an object fails
InvalidTypeException
- if the supplied type is not mapped to any class
CommerceException
public CommerceItem createCommerceItem(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 ShippingGroup createShippingGroup(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 ShippingGroup createShippingGroup(java.lang.String pType, ShippingPriceInfo pShippingPriceInfo) throws CommerceException
pType
- the type which is mapped to the class to usepShippingPriceInfo
- the price info to set into the ShippingGroup
ObjectCreationException
- if the instantiation of an object fails
InvalidTypeException
- if the supplied type is not mapped to any class
CommerceException
public PaymentGroup createPaymentGroup(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 HandlingInstruction createHandlingInstruction(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 Relationship createRelationship(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(Order pOrder, ShippingGroupCommerceItemRelationship pRelationship, java.lang.String pShippingGroupId, java.lang.String pCommerceItemId) throws CommerceException
pOrder
- the Order object which contains the CommerceItem and ShippingGroup to add the Relationship topRelationship
- the relationship object to add to the Order.pShippingGroupId
- the id of the ShippingGroup 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 SHIPPINGQUANTITYREMAINING relationship type
in the CommerceItem
CommerceException
public void initializeRelationship(Order pOrder, PaymentGroupCommerceItemRelationship pRelationship, java.lang.String pPaymentGroupId, java.lang.String pCommerceItemId) throws CommerceException
pOrder
- the Order object which contains the CommerceItem and PaymentGroup to add the Relationship topRelationship
- the relationship object to add to the Order.pPaymentGroupId
- the id of the PaymentGroup 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 PAYMENTAMOUNTREMAINING
relationship type in the CommerceItem
CommerceException
public void initializeRelationship(Order pOrder, PaymentGroupShippingGroupRelationship pRelationship, java.lang.String pPaymentGroupId, java.lang.String pShippingGroupId) throws CommerceException
pOrder
- the Order object which contains the ShippingGroup and PaymentGroup to add the Relationship topRelationship
- the relationship object to add to the Order.pPaymentGroupId
- the id of the PaymentGroup 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 SHIPPINGPRICEREMAINING relationship type
in the ShippingGroup
CommerceException
public void initializeRelationship(Order pOrder, PaymentGroupOrderRelationship pRelationship, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order object which contains the PaymentGroup to add the Relationship topRelationship
- the relationship object to add to the Order.pPaymentGroupId
- the id of the PaymentGroup 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 TAXAMOUNTREMAINING relationship type in
the Order
CommerceException
public static void copyAddress(RepositoryItem pProfileAddress, Address pAddress) throws CommerceException
pProfile
- a profile object that contains user informationpAddress
- the Address or ContactInfo to copy the user data into
CommerceException
- if an error occurs while copyingpublic static void copyAddress(Address pAddress, RepositoryItem pProfileAddress) throws CommerceException
pAddress
- the Address or ContactInfo to copy the data frompProfileAddress
- a profile object to copy the data to
CommerceException
- if an error occurs while copyingpublic static void copyAddress(Address pSrcAddress, Address pDestAddress) throws CommerceException
pSrcAddress
- the object that the data will be copied frompDestAddress
- the object that the data will be copied into
CommerceException
- if an error occurs while copyingprotected boolean isNullAddress(Address pAddress)
protected boolean isNullCreditCard(CreditCard pCreditCard)
public boolean isOrderState(Order pOrder, java.lang.String[] pStates)
pOrder
- pStates
- array of states.
public RepositoryItem createOrderFixedAmountAdjustment(Order pOrder, double pAmount, java.lang.String pAdjustmentType, java.lang.String pNotes, java.lang.String pReasonCode) throws RepositoryException
Note that transaction boundaries are not demarcated and updateOrder is not called by this method. Both are expected to be handled by the caller.
Creates an item based on the type defined by the property orderFixedAmountAdjustmentType
pOrder
- pAmount
- pAdjustmentType
- pNotes
- pReasonCode
-
RepositoryException
protected void addManualAdjustment(Order pOrder, RepositoryItem pAdjustment)
pOrder
- pAdjustment
- public void addManualAdjustment(Order pOrder, RepositoryItem pAdjustment, int pIndex)
pOrder
- pAdjustment
- pIndex
- protected MutableRepositoryItem createManualAdjustmentItem(java.lang.String pItemType, double pAmount, java.lang.String pAdjustmentType, java.lang.String pNotes, java.lang.String pReasonCode) throws RepositoryException
pItemType
- pOrder
- pAmount
- pAdjustmentType
- pNotes
- pReasonCode
-
RepositoryException
public boolean deleteManualAdjustment(Order pOrder, java.lang.String pAdjustmentItemId) throws RepositoryException
Note that transaction boundaries are not demarcated and updateOrder is not called by this method. Both are expected to be handled by the caller.
pAdjustmentItem
- pOrder
-
RepositoryException
public void registerSynchronization(Order pOrder)
pOrder
- the order which is used for synchronizationpublic java.util.Collection findShippingGroupsWithAddress(Order pOrder, Address pAddress, java.lang.String[] pPropertyNamesToCompare)
pOrder
- the order containing the shipping groupspAddress
- the address to compare to shipping group addressespPropertyNamesToCompare
- the properties of the address that are used to determine equality
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |