|
|||||||||
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.messaging.SourceSinkTemplate atg.commerce.messaging.MessageSender atg.b2bcommerce.order.scheduled.ScheduledOrderTools
public class ScheduledOrderTools
This class is a low level business layer class. It provides the raw functionality for manipulating a Scheduled Order. The methods in this class are not meant for direct use, but rather are used primarily by the ScheduledOrderService. This class does all the work like creating, updating and deleting the Scheduled Order in the ScheduledOrder repository. In addition to the raw functionality, it also implements the MessageSender interface. That means that it can be used to send the ScheduledOrder message to a destination. For example, it is used to send Order added, updated, deleted and processed messages. It also provides the functionality to reprice the Scheduled Order and place the Schedule Order via going through the corresponding chain in the PipelineManager.
MessageSender
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
Fields inherited from class atg.commerce.messaging.MessageSender |
---|
DEFAULT_MESSAGE_SOURCE_NAME |
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 | |
---|---|
ScheduledOrderTools()
Constructs an empty ScheduleOrderTools |
Method Summary | |
---|---|
void |
changeOriginToScheduledOrder(Order pOrder)
This method changes the originOfOrder property of an order to scheduledOrder. |
Order |
cloneOrder(Order pOrder,
RepositoryItem pProfile,
DynamoHttpServletRequest pRequest)
This method actually makes the current order as the cloned order and create an empty order as the current order. |
Order |
cloneOrder(java.lang.String pOrderId)
This method clones an existing order. |
protected java.util.Map |
createMap()
This method is a helper method which is used by the cloneOrder method. |
RepositoryItem |
createScheduledOrder()
Create a Scheduled Order in the ScheduledOrder Repository |
void |
deleteScheduledOrder(RepositoryItem pScheduledOrder,
RepositoryItem pProfile)
Delete the Scheduled Order from the scheduled order Repository |
CommerceProfileTools |
getCommerceProfileTools()
returns the property CommerceProfileTools |
java.util.Locale |
getDefaultLocale()
Retrieve the default Locale |
java.util.Properties |
getExcludedOrderProperties()
returns the property ExcludedOrderProperties |
java.util.Map |
getExcludedOrderPropertiesMap()
returns the property ExcludedOrderPropertiesMap |
PricingEngineService |
getItemPricingEngineService()
returns the property ItemPricingEngineService |
java.lang.String |
getOrderItemDescriptor()
Returns property OrderItemDescriptor |
B2BOrderManager |
getOrderManager()
Returns property OrderManager |
PricingEngineService |
getOrderPricingEngineService()
returns the property OrderPricingEngineService |
PaymentGroupManager |
getPaymentGroupManager()
Returns property PaymentGroupManager |
PipelineManager |
getPipelineManager()
Retrieve the PipelineManager |
PricingTools |
getPricingTools()
returns the property PricingTools |
java.lang.String |
getProcessOrderChainId()
returns the property ProcessOrderChainId |
RepositoryItem |
getProfile(RepositoryItem pScheduledOrder)
Get the Profile information from the Scheduled Order |
java.lang.String |
getProfileType()
Retrieve the Profile Type |
java.lang.String |
getRepriceOrderChainId()
returns the property RepriceOrderChainId |
java.lang.String |
getScheduledOrderItemDescriptor()
Returns property ScheduledOrderItemDescriptor |
MutableRepository |
getScheduledOrderRepository()
Returns property ScheduledOrderRepository |
java.lang.String |
getScheduleOrderPort()
returns the property ScheduleOrderPort |
PricingEngineService |
getShippingPricingEngineService()
returns the property ShippingPricingEngineService |
PricingEngineService |
getTaxPricingEngineService()
returns the property TaxPricingEngineService |
java.lang.String |
getTemplateOrder(RepositoryItem pScheduledOrder)
Get the template order from the Scheduled Order |
javax.transaction.TransactionManager |
getTransactionManager()
Returns property TransactionManager |
boolean |
isApplyGlobalPricingModels()
returns the property ApplyGlobalPricingModels |
boolean |
isApplyUserPricingModels()
returns the property ApplyUserPricingModels |
boolean |
isRepriceOnClone()
returns the property RepriceOnClone |
java.util.Collection |
parseString(java.lang.String pString)
Parse a String which is delimited by "|" into a collection of strings. |
PipelineResult |
processScheduledOrder(RepositoryItem pScheduledOrder,
Order pClonedOrder,
java.util.Locale pLocale)
This method processes the Scheduled Order via executing the processOrder pipeline chain. |
void |
repriceScheduledOrder(Order pScheduledOrder,
RepositoryItem pProfile,
java.util.Locale pLocale)
Reprice the scheduled order |
protected void |
scheduledOrderAdded(RepositoryItem pScheduledOrder,
RepositoryItem pProfile)
Send the messahe that the Scheduled Order is Added |
void |
scheduledOrderDeleted(RepositoryItem pScheduledOrder,
RepositoryItem pProfile)
Send the message that the Scheduled Order is Deleted |
void |
scheduledOrderProcessed(RepositoryItem pScheduledOrder,
RepositoryItem pProfile)
Send the message that the Scheduled Order is Processed |
protected void |
scheduledOrderUpdated(RepositoryItem pScheduledOrder,
RepositoryItem pProfile)
Send the message that the Scheduled Order is Updateded |
void |
sendScheduledOrderMessage(CommerceMessage pMessage)
Send the Scheduled Order Message |
void |
setApplyGlobalPricingModels(boolean pApplyGlobalPricingModels)
set the property ApplyGlobalPricingModels |
void |
setApplyUserPricingModels(boolean pApplyUserPricingModels)
set the property ApplyUserPricingModels |
void |
setCommerceProfileTools(CommerceProfileTools pCommerceProfileTools)
Set property CommerceProfileTools |
void |
setExcludedOrderProperties(java.util.Properties pExcludedOrderProperties)
set the property ExcludedOrderProperties |
void |
setItemPricingEngineService(PricingEngineService pItemPricingEngineService)
set the property ItemPricingEngineService |
void |
setOrderItemDescriptor(java.lang.String pOrderItemDescriptor)
Sets property OrderItemDescriptor |
void |
setOrderManager(B2BOrderManager pOrderManager)
Sets property OrderManager |
void |
setOrderPricingEngineService(PricingEngineService pOrderPricingEngineService)
set the property OrderPricingEngineService |
void |
setPaymentGroupManager(PaymentGroupManager pPaymentGroupManager)
Sets property PaymentGroupManager |
void |
setPricingTools(PricingTools pPricingTools)
set the property PricingTools |
void |
setProcessOrderChainId(java.lang.String pProcessOrderChainId)
set the property ProcessOrderChainId |
void |
setRepriceOnClone(boolean pRepriceOnClone)
set the property RepriceOnClone |
void |
setRepriceOrderChainId(java.lang.String pRepriceOrderChainId)
set the property RepriceOrderChainId |
void |
setScheduledOrderItemDescriptor(java.lang.String pScheduledOrderItemDescriptor)
Sets property ScheduledOrderItemDescriptor |
void |
setScheduledOrderRepository(MutableRepository pScheduledOrderRepository)
Sets property ScheduledOrderRepository |
void |
setScheduleOrderPort(java.lang.String pScheduleOrderPort)
set the property ScheduleOrderPort |
void |
setShippingPricingEngineService(PricingEngineService pShippingPricingEngineService)
set the property ShippingPricingEngineService |
void |
setTaxPricingEngineService(PricingEngineService pTaxPricingEngineService)
set the property TaxPricingEngineService |
void |
updateScheduledOrder(MutableRepositoryItem pScheduledOrder,
RepositoryItem pProfile)
Update the Scheduled Order in the schedule order Repository |
Methods inherited from class atg.commerce.messaging.MessageSender |
---|
getMessageIdGenerator, getMessageIdSpaceName, getMessageSourceContext, getMessageSourceName, getNextMessageId, getPortName, isAllowMessageSending, sendCommerceMessage, setAllowMessageSending, setMessageIdGenerator, setMessageIdSpaceName, setMessageSourceContext, setMessageSourceName, setPortName, startMessageSource, stopMessageSource |
Methods inherited from class atg.commerce.messaging.SourceSinkTemplate |
---|
getDelayOnSendRetry, receiveMessage, sendCommerceMessage, sendObjectMessage, setDelayOnSendRetry, setTransactionManager |
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 ScheduledOrderTools()
Method Detail |
---|
public void setPaymentGroupManager(PaymentGroupManager pPaymentGroupManager)
pPaymentGroupManager
- the value to set for property PaymentGroupManagerpublic PaymentGroupManager getPaymentGroupManager()
public void setOrderManager(B2BOrderManager pOrderManager)
pOrderManager
- the value to set for property OrderManagerpublic B2BOrderManager getOrderManager()
public MutableRepository getScheduledOrderRepository()
public void setScheduledOrderRepository(MutableRepository pScheduledOrderRepository)
pScheduledOrderRepository
- the value to set for property ScheduledOrderRepositorypublic java.lang.String getScheduledOrderItemDescriptor()
public void setScheduledOrderItemDescriptor(java.lang.String pScheduledOrderItemDescriptor)
pScheduledOrderItemDescriptor
- the value to set for property ScheduledOrderItemDescriptorpublic java.lang.String getOrderItemDescriptor()
public void setOrderItemDescriptor(java.lang.String pOrderItemDescriptor)
pOrderItemDescriptor
- the value to set for property OrderItemDescriptorpublic javax.transaction.TransactionManager getTransactionManager()
getTransactionManager
in class SourceSinkTemplate
public void setCommerceProfileTools(CommerceProfileTools pCommerceProfileTools)
pCommerceProfileTools
- the value to set for property CommerceProfileToolspublic CommerceProfileTools getCommerceProfileTools()
public void setApplyUserPricingModels(boolean pApplyUserPricingModels)
pApplyUserPricingModels
- the value to set for property ApplyUserPricingModelspublic boolean isApplyUserPricingModels()
public void setApplyGlobalPricingModels(boolean pApplyGlobalPricingModels)
pApplyGlobalPricingModels
- the value to set for property ApplyGlobalPricingModelspublic boolean isApplyGlobalPricingModels()
public void setRepriceOnClone(boolean pRepriceOnClone)
pRepriceOnClone
- the value to set for property RepriceOnClonepublic boolean isRepriceOnClone()
public void setRepriceOrderChainId(java.lang.String pRepriceOrderChainId)
pRepriceOrderChainId
- the value to set for proeprty RepriceOrderChainIdpublic java.lang.String getRepriceOrderChainId()
public void setProcessOrderChainId(java.lang.String pProcessOrderChainId)
pProcessOrderChainId
- the value to set for property ProcessOrderChainIdpublic java.lang.String getProcessOrderChainId()
public void setScheduleOrderPort(java.lang.String pScheduleOrderPort)
pScheduleOrderPort
- the value to set for property ScheduleOrderPortpublic java.lang.String getScheduleOrderPort()
public void setExcludedOrderProperties(java.util.Properties pExcludedOrderProperties)
pExcludedOrderProperties
- the value to set for property ExcludedOrderPropertiespublic java.util.Properties getExcludedOrderProperties()
public java.util.Map getExcludedOrderPropertiesMap()
public void setItemPricingEngineService(PricingEngineService pItemPricingEngineService)
pItemPricingEngineService
- the value to set for property ItemPricingEngineServicepublic PricingEngineService getItemPricingEngineService()
public void setShippingPricingEngineService(PricingEngineService pShippingPricingEngineService)
pShippingPricingEngineService
- the value to set for property ShippingPricingEngineServicepublic PricingEngineService getShippingPricingEngineService()
public void setOrderPricingEngineService(PricingEngineService pOrderPricingEngineService)
pOrderPricingEngineService
- the value to set for property OrderPricingEngineServicepublic PricingEngineService getOrderPricingEngineService()
public void setTaxPricingEngineService(PricingEngineService pTaxPricingEngineService)
pTaxPricingEngineService
- the value to set for property TaxPricingEngineServicepublic PricingEngineService getTaxPricingEngineService()
public void setPricingTools(PricingTools pPricingTools)
pPricingTools
- the value to set for property PricingToolspublic PricingTools getPricingTools()
public java.util.Collection parseString(java.lang.String pString)
public java.lang.String getProfileType()
public java.util.Locale getDefaultLocale()
public PipelineManager getPipelineManager()
public RepositoryItem createScheduledOrder() throws RepositoryException
RepositoryException
- if there was an error while dealing with the Repositorypublic RepositoryItem getProfile(RepositoryItem pScheduledOrder) throws RepositoryException, CommerceException
pScheduledOrder
- The Scheduled Order
RepositoryException
- if there was an error while dealing with the Repository
CommerceException
- if there was a general errorpublic java.lang.String getTemplateOrder(RepositoryItem pScheduledOrder) throws RepositoryException, CommerceException
pScheduledOrder
- The Scheduled Order
RepositoryException
- if there was an error while dealing with the Repository
CommerceException
- if there was a general errorpublic void updateScheduledOrder(MutableRepositoryItem pScheduledOrder, RepositoryItem pProfile) throws CommerceException
pScheduledOrder
- The Schedule OrderpProfile
- The Profile
CommerceException
- if there was a general errorpublic void deleteScheduledOrder(RepositoryItem pScheduledOrder, RepositoryItem pProfile) throws CommerceException
pScheduledOrder
- The Scheduled OrderpProfile
- The Profile
CommerceException
- if there was a general errorpublic void sendScheduledOrderMessage(CommerceMessage pMessage) throws CommerceException
pMessage
- Message related to the action about the scheduled order
CommerceException
- if there was a general errorprotected void scheduledOrderAdded(RepositoryItem pScheduledOrder, RepositoryItem pProfile) throws CommerceException
pScheduledOrder
- The Scheduled OrderpProfile
- The Profile
CommerceException
- if there was a general errorprotected void scheduledOrderUpdated(RepositoryItem pScheduledOrder, RepositoryItem pProfile) throws CommerceException
pScheduledOrder
- The Scheduled OrderpProfile
- The Profile
CommerceException
- if there was a general errorpublic void scheduledOrderProcessed(RepositoryItem pScheduledOrder, RepositoryItem pProfile) throws CommerceException
pScheduledOrder
- The Scheduled OrderpProfile
- The Profile
CommerceException
- if there was a general errorpublic void scheduledOrderDeleted(RepositoryItem pScheduledOrder, RepositoryItem pProfile) throws CommerceException
pScheduledOrder
- The Scheduled OrderpProfile
- The Profile
CommerceException
- if there was a general errorpublic PipelineResult processScheduledOrder(RepositoryItem pScheduledOrder, Order pClonedOrder, java.util.Locale pLocale) throws CommerceException
pScheudledOrder
- the scheduled orderpLocale
- the locale of the userpClonedOrder
- the cloned order
CommerceException
- thrown if an error occurs while checking out the Orderpublic void repriceScheduledOrder(Order pScheduledOrder, RepositoryItem pProfile, java.util.Locale pLocale) throws CommerceException
pScheduledOrder
- The Schedule OrderpProfile
- the user's profilepLocale
- the user's locale
CommerceException
- if an error occurspublic Order cloneOrder(java.lang.String pOrderId) throws CommerceException
pOrderId
- the id of the order whom will be cloned
CommerceException
- if an error occursRepositoryUtils
public Order cloneOrder(Order pOrder, RepositoryItem pProfile, DynamoHttpServletRequest pRequest) throws CommerceException
pOrder
- the current orderpProfile
- the user's profilepRequest
- the HttpDynamoRequest
CommerceException
- if an error occursprotected java.util.Map createMap()
RepositoryUtils
public void changeOriginToScheduledOrder(Order pOrder) throws RepositoryException
pOrder
- the order that will be changed for its originOfOrder property to scheduledOrder
RepositoryException
RepositoryUtils
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |