|
|||||||||
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.OrderServices
public class OrderServices
OrderServices contains the methods that implement conversational order management web services.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
MSG_INVALID_PROFILE_ID
|
static java.lang.String |
MSG_NULL_ORDER_HOLDER
|
protected static java.util.ResourceBundle |
sResourceBundle
Resource Bundle |
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 | |
---|---|
OrderServices()
|
Method Summary | |
---|---|
java.lang.String |
addCreditCardToOrder(java.lang.String pOrderId,
atg.payment.creditcard.BasicCreditCardInfoImpl pCreditCardInfo)
Add the credit card to the order. |
java.lang.String |
addItemToOrder(java.lang.String pOrderId,
java.lang.String pProductId,
java.lang.String pSkuId,
long pQuantity)
Adds the given product/sku to the order. |
java.lang.String |
addItemToShippingGroup(java.lang.String pOrderId,
java.lang.String pProductId,
java.lang.String pSkuId,
long pQuantity,
java.lang.String pShippingGroupId)
The same as AddItemToOrder but the item is also added
to the given shipping group. |
java.lang.String |
addShippingAddressToOrder(java.lang.String pOrderId,
ContactInfo pAddress)
Add a shipping address to the order. |
java.lang.String |
createOrder(java.lang.String pOrderType)
Creates a new order of the given type for the current user. |
java.lang.String |
createOrderForUser(java.lang.String pOrderType,
java.lang.String pProfileId)
Creates a new order of the given type for the given user. |
java.lang.String |
createOrderFromXML(java.lang.String pOrderAsXML,
java.lang.String pProfileId)
Converts the given XML document into a new order |
AddService |
getAddService()
The AddService used by createOrderFromXML to convert xml strings to orders |
protected java.lang.String |
getCatalogKey()
Gets the catalog key from the Locale. |
java.lang.String |
getCreditCardType()
Gets the credit card payment group type. |
java.lang.String |
getCurrentOrderId()
Return the id of the current users current order from the shopping cart. |
java.util.Locale |
getDefaultLocale()
Gets the default locale for commerce opertations. |
java.lang.String |
getDefaultPaymentGroupId(java.lang.String pOrderId)
Retrieves the first payment group id from the order. |
java.lang.String |
getDefaultShippingGroupId(java.lang.String pOrderId)
Retrieves the first shipping group id from the order. |
GetService |
getGetService()
The tool used to convert orders to xml in getOrderAsXML |
atg.commerce.order.purchase.PurchaseProcessHelper |
getHelper()
Gets the purchase process helper. |
protected java.util.Locale |
getLocale()
Gets the Locale from the current request, the RequestLocale, or the VM. |
java.lang.String |
getOrderAsXML(java.lang.String pOrderId)
Returns the given order as an xml string using the GetService. |
java.lang.String |
getOrderAsXML(java.lang.String pOrderId,
java.lang.String pMappingFileName)
Returns the given order as an xml string using the GetService. |
Order |
getOrderFromId(java.lang.String pOrderId)
Gets the Order with the given id. |
protected OrderHolder |
getOrderHolder()
Gets the OrderHolder component for the current session. |
java.lang.String |
getOrderHolderPath()
Sets the Nucleus path of the OrderHolder (shipping cart) component. |
OrderManager |
getOrderManager()
The OrderManager class that is used to manipulate order objects |
atg.commerce.order.status.OrderStatus |
getOrderStatus(java.lang.String pOrderId)
Returns the status of the given order |
java.lang.String |
getOutboundOrderMappingFileName()
The name of the mapping file used when converting orders to xml |
java.lang.String |
getPricingModelHolderPath()
Gets the Nucleus path of the PricingModelHolder component. |
protected RepositoryItem |
getProfile()
Gets the Profile component for the current session. |
java.lang.String |
getProfilePath()
Gets the Nucleus path of the Profile component. |
protected PricingModelHolder |
getUserPricingModels()
Gets the PricingModelHolder component for the current session. |
boolean |
isUseRequestLocale()
When set, allows the RequestLocale to be used by getLocale(). |
boolean |
isValidateOrderXMLOnCreate()
If this is true, the xml passed to createOrderFromXML will be validated against the schema
The default value is false |
void |
moveItemBetweenShippingGroups(java.lang.String pOrderId,
java.lang.String pCommerceItemId,
long pQuantity,
java.lang.String pSourceShippingGroupId,
java.lang.String pTargetShippingGroupId)
Move the given quantity of the commerce item from one shipping group into another. |
protected boolean |
processPipelineErrors(PipelineResult pResult,
atg.commerce.util.PipelineErrorHandler pHandler)
Examine the pipeline result looking for any error messages, creates DropletFormExceptions and adds them as form exceptions |
void |
removeCreditCardFromOrder(java.lang.String pOrderId,
java.lang.String pCreditCardNumber)
Remove the credit card with the given number from the order. |
void |
removeItemFromOrder(java.lang.String pOrderId,
java.lang.String pCommerceItemId)
Removes the given item from the order. |
void |
removeItemQuantityFromShippingGroup(java.lang.String pOrderId,
java.lang.String pCommerceItemId,
long pQuantity,
java.lang.String pShippingGroupId)
Remove the quantity of the given item from the shipping group. |
void |
removePaymentGroupFromOrder(java.lang.String pOrderId,
java.lang.String pPaymentGroupId)
Remove the given payment group from the order. |
void |
removeShippingGroupFromOrder(java.lang.String pOrderId,
java.lang.String pShippingGroupId)
Remove the given shipping group from the order. |
void |
setAddService(AddService pAddService)
|
void |
setCreditCardType(java.lang.String pCreditCardType)
Sets the credit card payment group type. |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets the default locale for commerce operations. |
void |
setGetService(GetService pGetService)
|
void |
setHelper(atg.commerce.order.purchase.PurchaseProcessHelper pHelper)
Sets the purchase process helper. |
void |
setItemQuantity(java.lang.String pOrderId,
java.lang.String pCommerceItemId,
long pQuantity)
Sets the item quantity for the given commerce item in the given shipping group. |
void |
setOrderAmountToPaymentGroup(java.lang.String pOrderId,
java.lang.String pPaymentGroupId,
double pAmount)
Assigns the given amount to the given payment group. |
void |
setOrderHolderPath(java.lang.String pOrderHolderPath)
Sets the Nucleus path of the OrderHolder (shopping cart) component. |
void |
setOrderManager(OrderManager pOrderManager)
|
void |
setOutboundOrderMappingFileName(java.lang.String pOutboundOrderMappingFileName)
|
void |
setPricingModelHolderPath(java.lang.String pPricingModelHolderPath)
Sets the Nucleus path of the PricingModelHolder component. |
void |
setProfilePath(java.lang.String pProfilePath)
Sets the Nucleus path of the Profile component. |
void |
setUseRequestLocale(boolean pUseRequestLocale)
When set, allows the RequestLocale to be used by getLocale(). |
void |
setValidateOrderXMLOnCreate(boolean pValidateOrderXMLOnCreate)
|
void |
submitOrder(java.lang.String pOrderId)
Calls processOrder but converts the result from
a PipelineResult to a SubmitOrderResult |
void |
submitOrderWithReprice(java.lang.String pOrderId,
java.lang.String pLocale)
Calls processOrderWithReprice but converts the result from
a PipelineResult to a SubmitOrderResult |
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 final java.lang.String CLASS_VERSION
public static final java.lang.String MSG_INVALID_PROFILE_ID
public static final java.lang.String MSG_NULL_ORDER_HOLDER
protected static java.util.ResourceBundle sResourceBundle
Constructor Detail |
---|
public OrderServices()
Method Detail |
---|
public void setHelper(atg.commerce.order.purchase.PurchaseProcessHelper pHelper)
public atg.commerce.order.purchase.PurchaseProcessHelper getHelper()
public void setUseRequestLocale(boolean pUseRequestLocale)
public boolean isUseRequestLocale()
public void setDefaultLocale(java.util.Locale pDefaultLocale)
public java.util.Locale getDefaultLocale()
public void setOrderHolderPath(java.lang.String pOrderHolderPath)
public java.lang.String getOrderHolderPath()
public void setProfilePath(java.lang.String pProfilePath)
public java.lang.String getProfilePath()
public void setPricingModelHolderPath(java.lang.String pPricingModelHolderPath)
public java.lang.String getPricingModelHolderPath()
public void setCreditCardType(java.lang.String pCreditCardType)
OrderTools.getPaymentTypeClassMap()
public java.lang.String getCreditCardType()
public void setOrderManager(OrderManager pOrderManager)
public OrderManager getOrderManager()
public void setAddService(AddService pAddService)
public AddService getAddService()
public void setValidateOrderXMLOnCreate(boolean pValidateOrderXMLOnCreate)
public boolean isValidateOrderXMLOnCreate()
createOrderFromXML
will be validated against the schema
The default value is false
public void setGetService(GetService pGetService)
public GetService getGetService()
getOrderAsXML
public void setOutboundOrderMappingFileName(java.lang.String pOutboundOrderMappingFileName)
public java.lang.String getOutboundOrderMappingFileName()
public Order getOrderFromId(java.lang.String pOrderId) throws CommerceException
pOrderId
- The id of the order to retrieve
CommerceException
- if an error occurs while loading the Order.protected OrderHolder getOrderHolder()
protected RepositoryItem getProfile()
protected PricingModelHolder getUserPricingModels()
protected java.util.Locale getLocale()
protected java.lang.String getCatalogKey()
public java.lang.String getCurrentOrderId() throws CommerceException
CommerceException
- If there is a problem getting the current orderpublic java.lang.String createOrderFromXML(java.lang.String pOrderAsXML, java.lang.String pProfileId) throws CommerceException
pOrderAsXML
- THe XML document representating the entire order
AddException
CommerceException
public java.lang.String createOrder(java.lang.String pOrderType) throws CommerceException
pOrderType
- the type of order to create. null indicates the default order type.
CommerceException
- if there is an error creating the order.public java.lang.String createOrderForUser(java.lang.String pOrderType, java.lang.String pProfileId) throws CommerceException
pProfileId
- the user who will own the orderpOrderType
- the type of order to create. null indicates the default order type.
CommerceException
- if there is an error creating the order.public void submitOrder(java.lang.String pOrderId) throws CommerceException
processOrder
but converts the result from
a PipelineResult to a SubmitOrderResult
pOrderId
- The id of the order to be submitted
CommerceException
public void submitOrderWithReprice(java.lang.String pOrderId, java.lang.String pLocale) throws CommerceException
processOrderWithReprice
but converts the result from
a PipelineResult to a SubmitOrderResult
pOrderId
- The id of the order to be submittedpLocale
- The locale to use. This may be null
CommerceException
public atg.commerce.order.status.OrderStatus getOrderStatus(java.lang.String pOrderId) throws CommerceException
pOrderId
- The id of the order whose status is returned
CommerceException
public java.lang.String getOrderAsXML(java.lang.String pOrderId) throws CommerceException, GetException
outboundOrderMappingFileName
pOrderId
-
outboundOrderMappingFileName
CommerceException
GetException
public java.lang.String getOrderAsXML(java.lang.String pOrderId, java.lang.String pMappingFileName) throws CommerceException, GetException
pOrderId
-
outboundOrderMappingFileName
CommerceException
GetException
public java.lang.String addItemToOrder(java.lang.String pOrderId, java.lang.String pProductId, java.lang.String pSkuId, long pQuantity) throws CommerceException
pOrderId
- the id of the order to which the item will be added.pProductId
- the product id of the item.pSkuId
- the SKU id of the item.pQuantity
- the quantity of item to add.
CommerceException
- if there is an error adding the item to the order.public void removeItemFromOrder(java.lang.String pOrderId, java.lang.String pCommerceItemId) throws CommerceException
pOrderId
- the id of the order from which the item will be removed.pCommerceItemId
- the id of the item to remove.
CommerceException
- if an error occurs while removing an item.public void setItemQuantity(java.lang.String pOrderId, java.lang.String pCommerceItemId, long pQuantity) throws CommerceException
pOrderId
- the id of the order containing the item.pCommerceItemId
- the id of the item whose quntity will be modified.pQuantity
- the new quantity of the item.
CommerceException
- if there is an error setting the quantity.public java.lang.String addCreditCardToOrder(java.lang.String pOrderId, atg.payment.creditcard.BasicCreditCardInfoImpl pCreditCardInfo) throws CommerceException
pOrderId
- the id of the order to which the credit card will be added.pCreditCardInfo
- the credit card data.
CommerceException
- if there is an error creating or adding the credit card.PurchaseProcessHelper.copyCreditCardInfo(atg.payment.creditcard.BasicCreditCardInfo, atg.commerce.order.CreditCard)
,
atg.commerce.order.purchase.PurchaseProcessHelper#addCreditCardToORder
public java.lang.String addShippingAddressToOrder(java.lang.String pOrderId, ContactInfo pAddress) throws CommerceException
pOrderId
- the id of the order to which the address will be added.pAddress
- the address to add to the order.
CommerceException
- if there is an error creating or adding the address.PurchaseProcessHelper.addShippingAddressToOrder(atg.commerce.order.Order, atg.core.util.Address)
public void removePaymentGroupFromOrder(java.lang.String pOrderId, java.lang.String pPaymentGroupId) throws CommerceException
pOrderId
- the id of the order from which the payment group
will be removed.pPaymentGroupId
- the id of the payment group to remove.
CommerceException
- if an error occurs while removing the payment group.public void removeCreditCardFromOrder(java.lang.String pOrderId, java.lang.String pCreditCardNumber) throws CommerceException
pOrderId
- the id of the order from which the credit card
will be removed.pCreditCardNumber
- the number of the credit card to remove.
CommerceException
- if an error occurs.
java.lang.IllegalArgumentException
- if the credit card is not found.public void removeShippingGroupFromOrder(java.lang.String pOrderId, java.lang.String pShippingGroupId) throws CommerceException
pOrderId
- the id of the order from which the shipping group
will be removed.pShippingGroupId
- the id of the shipping group to remove.
CommerceException
- if an error occurs while removing
the shipping grouppublic java.lang.String addItemToShippingGroup(java.lang.String pOrderId, java.lang.String pProductId, java.lang.String pSkuId, long pQuantity, java.lang.String pShippingGroupId) throws CommerceException
AddItemToOrder
but the item is also added
to the given shipping group.
pOrderId
- the id of the order to which the item will be added.pProductId
- the product id of the item.pSkuId
- the SKU id of the item.pQuantity
- the quantity of item to add.pShippingGroupId
- the id of the shipping group to which the item
will be added.
CommerceException
- if there is an error adding the
item to the order.public void moveItemBetweenShippingGroups(java.lang.String pOrderId, java.lang.String pCommerceItemId, long pQuantity, java.lang.String pSourceShippingGroupId, java.lang.String pTargetShippingGroupId) throws CommerceException
pOrderId
- the id of the order containing the item to move.pCommerceItemId
- the id of the item to move.pQuantity
- the quantity of item to move.pSourceShippingGroupId
- the id of the source shipping group.pTargetShippingGroupId
- the id of the target shipping group.
CommerceException
- if there is an error moving the item.public void removeItemQuantityFromShippingGroup(java.lang.String pOrderId, java.lang.String pCommerceItemId, long pQuantity, java.lang.String pShippingGroupId) throws CommerceException
pOrderId
- the id of the order containing the shipping group.pCommerceItemId
- the id of the item to be removed.pQuantity
- the quantity of item to remove.pShippingGroupId
- the id of the shipping group from which the
item will be removed.
CommerceException
- if an error occurs.public void setOrderAmountToPaymentGroup(java.lang.String pOrderId, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrderId
- the id of the order whose order amount will be assigned.pPaymentGroupId
- the payment group to modify.pAmount
- the new amount to assign.
CommerceException
- if an error occurs.public java.lang.String getDefaultShippingGroupId(java.lang.String pOrderId) throws CommerceException
pOrderId
- the id of the order from which the default
shipping group id will be retrieved.
CommerceException
- if an error occurs while retrieving the
shipping group.public java.lang.String getDefaultPaymentGroupId(java.lang.String pOrderId) throws CommerceException
pOrderId
- the id of the order from which the default
payment group id will be retrieved.
CommerceException
- if an error occurs while retrieving the
payment group.protected boolean processPipelineErrors(PipelineResult pResult, atg.commerce.util.PipelineErrorHandler pHandler)
pResult
- a PipelineResult
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |