| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.commerce.order.abandoned.AbandonedOrderTools
public class AbandonedOrderTools
This class contains methods used by several components of the Abandoned Shopping Carts feature. It also provides a central location for the definition of property, repository item, order state, and abandonment state names. There are methods that are used to send the various abandonment JMS messages, and perform the functions needed for the SetLastUpdated, ReanimateAbandonedOrder, and ConvertAbandonedOrder scenario actions and droplets.
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| protected  java.lang.String | mOrderPriceInfoPropertyName | 
| protected  java.lang.String | mPriceInfoAmountPropertyName | 
| protected  java.lang.String | mPriceInfoCurrencyCodePropertyName | 
| protected  javax.transaction.TransactionManager | mTransactionManager | 
| protected static java.util.ResourceBundle | sResourceBundleResource 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 | |
|---|---|
| AbandonedOrderTools() | |
| Method Summary | |
|---|---|
| protected  void | addAbandonedOrderToProfile(java.lang.String pProfileId,
                           java.lang.String pOrderId)This method subtracts one from the abandonedOrderCount of the given profile. | 
|  void | convertAbandonedOrder(java.lang.String pOrderId)This method sets the abandonment state of the given order to CONVERTED, sets the conversionDate property to the current system time, and sends an OrderConverted message if configured to do so. | 
| protected  MutableRepositoryItem | createAbandonmentInfo(RepositoryItem pOrder)This method generates a new abandonmentInfo object for the given order. | 
|  void | doStartService()doStartService() validates that the default reanimated state exists in the list of reanimated states and that the default lost state exists in the list of lost states | 
|  java.lang.String[] | getAbandonableOrderStates() | 
|  java.lang.String | getAbandonedOrderItemName() | 
|  java.lang.String | getAbandonedOrderOrderIdPropertyName() | 
|  java.lang.String | getAbandonedOrderProfileIdPropertyName() | 
|  java.lang.String | getAbandonmentCountPropertyName() | 
|  java.lang.String | getAbandonmentDatePropertyName() | 
| protected  RepositoryItem | getAbandonmentInfo(RepositoryItem pOrder,
                   boolean pCreate)This method gets the abandonmentInfo item associated with the given order. | 
|  java.lang.String | getAbandonmentInfoItemName() | 
|  java.lang.String | getAbandonmentInfoPropertyName() | 
|  java.lang.String | getAbandonmentStatePropertyName() | 
|  java.lang.String | getConversionDatePropertyName() | 
|  java.lang.String | getDefaultAbandonedState() | 
|  java.lang.String | getDefaultConvertedState() | 
|  java.lang.String | getDefaultLostState() | 
|  java.lang.String | getDefaultReanimatedState() | 
|  java.lang.String | getLastUpdatedPropertyName() | 
|  java.lang.String[] | getLostAbandonmentStates() | 
|  java.lang.String | getLostDatePropertyName() | 
|  AbandonedOrderMessageFactory | getMessageFactory() | 
|  MessageSender | getMessageSender() | 
|  java.lang.String | getOrderIdPropertyName() | 
|  java.lang.String | getOrderItemName() | 
|  OrderManager | getOrderManager() | 
|  java.lang.String | getOrderPriceInfoPropertyName() | 
|  java.lang.String | getOrderPropertyName() | 
|  MutableRepository | getOrderRepository() | 
|  java.lang.String | getPriceInfoAmountPropertyName() | 
|  java.lang.String | getPriceInfoCurrencyCodePropertyName() | 
|  java.lang.String | getProfileIdPropertyName() | 
|  java.lang.String | getProfileItemName() | 
|  MutableRepository | getProfileRepository() | 
|  java.lang.String[] | getReanimateableAbandonmentStates() | 
|  java.lang.String[] | getReanimatedAbandonmentStates() | 
|  java.lang.String | getReanimationDatePropertyName() | 
|  javax.transaction.TransactionManager | getTransactionManager()Transaction Manager | 
|  boolean | isDeleteLostOrders() | 
|  boolean | isLeaveAbandonmentInfoForDeletedOrders() | 
|  boolean | isSendOrderAbandonedMessage() | 
|  boolean | isSendOrderConvertedMessage() | 
|  boolean | isSendOrderLostMessage() | 
|  boolean | isSendOrderReanimatedMessage() | 
|  void | reanimateAbandonedOrder(java.lang.String pOrderId)This method checks first to see if the given order has an abandonmentInfo item associated it. | 
| protected  void | removeAbandonedOrderFromProfile(java.lang.String pOrderId)This method subtracts one from the abandonedOrderCount of the given profile. | 
|  void | setAbandonableOrderStates(java.lang.String[] pAbandonableOrderStates)The possible order states an order must be for the AbandonedOrderService to identify the order as abandoned or lost. | 
|  void | setAbandonedOrderItemName(java.lang.String pAbandonedOrderItemName)The name of the abandonedOrder item descriptor in the profile repository. | 
|  void | setAbandonedOrderOrderIdPropertyName(java.lang.String pAbandonedOrderOrderIdPropertyName)The name of the property in the abandonedOrder repository item that holds the ID of the order. | 
|  void | setAbandonedOrderProfileIdPropertyName(java.lang.String pAbandonedOrderProfileIdPropertyName)The name of the property in the abandonedOrder repository item that holds the ID of the profile that owns the order. | 
|  void | setAbandonmentCountPropertyName(java.lang.String pAbandonmentCountPropertyName)The name of the property in the abandonmentInfo repository item that indicates the number of times the order has been abandoned. | 
|  void | setAbandonmentDatePropertyName(java.lang.String pAbandonmentDatePropertyName)The name of the property in the abandonmentInfo repository item that holds the date/time when the order was most recently identified as abandoned. | 
|  void | setAbandonmentInfoItemName(java.lang.String pAbandonmentInfoItemName)The name of the abandonmentInfo item descriptor in the order repository. | 
|  void | setAbandonmentInfoPropertyName(java.lang.String pAbandonmentInfoPropertyName)The name of the order property that refers to its abandonmentInfo item | 
|  void | setAbandonmentStatePropertyName(java.lang.String pAbandonmentStatePropertyName)The name of the abandonmentInfo property that holds the abandonment state of the order. | 
|  void | setConversionDatePropertyName(java.lang.String pConversionDatePropertyName)The name of the property in the abandonmentInfo repository item that holds the date/time when the order was converted. | 
|  void | setDefaultAbandonedState(java.lang.String pDefaultAbandonedState)The abandonment state that will be assigned to orders identified as abandoned. | 
|  void | setDefaultConvertedState(java.lang.String pDefaultConvertedState)The abandonment state that should be assigned to orders identified as converted. | 
|  void | setDefaultLostState(java.lang.String pDefaultLostState)The abandonment state that will be assigned to orders identified as lost. | 
|  void | setDefaultReanimatedState(java.lang.String pDefaultReanimatedState)The abandonment state that should be assigned to orders identified as reanimated. | 
|  void | setDeleteLostOrders(boolean pDeleteLostOrders)Boolean indicating if orders identified as lost should be removed from the order repository. | 
|  void | setLastUpdated(java.lang.String pOrderId)This method sets the lastUpdated property of the abandonmentInfo repository item associated with the given order to the current system time. | 
|  void | setLastUpdatedPropertyName(java.lang.String pLastUpdatedPropertyName)The name of the property to be updated by the SetLastUpdated scenario action and droplet. | 
|  void | setLeaveAbandonmentInfoForDeletedOrders(boolean pLeaveAbandonmentInfoForDeletedOrders)Boolean indicating if we should leave an orphan abandonmentInfo item in the repository after we delete a lost order. | 
|  void | setLostAbandonmentStates(java.lang.String[] pLostAbandonmentStates)All the possible abandonment states that an order can have for it to be considered lost. | 
|  void | setLostDatePropertyName(java.lang.String pLostDatePropertyName)The name of the property in the abandonmentInfo repository item that holds the date/time when the order was most recently identified as lost. | 
|  void | setMessageFactory(AbandonedOrderMessageFactory pMessageFactory)The component that builds abandonment-related JMS messages: OrderAbandoned, OrderReanimated, OrderConverted, and OrderLost | 
|  void | setMessageSender(MessageSender pMessageSender)The component that sends abandonment-related JMS messages. | 
|  void | setOrderIdPropertyName(java.lang.String pOrderIdPropertyName)The name of the property in the abandonmentInfo repository item that holds the ID of the order associated with it. | 
|  void | setOrderItemName(java.lang.String pOrderItemName)The name of the order item descriptor in the order repository. | 
|  void | setOrderManager(OrderManager pOrderManager)OrderManager is used to delete lost orders if the service is configured to do so. | 
|  void | setOrderPriceInfoPropertyName(java.lang.String pOrderPriceInfoPropertyName)The name of the property in the order repository item that holds the order's price info. | 
|  void | setOrderPropertyName(java.lang.String pOrderPropertyName)The name of the property in the abandonmentInfo repository item that refers back to the order reposiory item associated with it. | 
|  void | setOrderRepository(MutableRepository pOrderRepository)The order repository in which to look for abandoned orders. | 
|  void | setPriceInfoAmountPropertyName(java.lang.String pPriceInfoAmountPropertyName)The name of the property in the orderPriceInfo repository item that holds the order's monetary value. | 
|  void | setPriceInfoCurrencyCodePropertyName(java.lang.String pPriceInfoCurrencyCodePropertyName)The name of the property in the orderPriceInfo repository item that holds the currency code for the order's monetary value. | 
|  void | setProfileIdPropertyName(java.lang.String pProfileIdPropertyName)The name of the property in the order repository item that holds the ID of the profile that owns the order. | 
|  void | setProfileItemName(java.lang.String pProfileItemName)The name of the user item descriptor in the profile repository. | 
|  void | setProfileRepository(MutableRepository pProfileRepository)The profile repository in which to edit the "abandonedOrderCount" property of profiles. | 
|  void | setReanimateableAbandonmentStates(java.lang.String[] pReanimateableAbandonmentStates)The possible abandonment states of abandoned and lost orders. | 
|  void | setReanimatedAbandonmentStates(java.lang.String[] pReanimatedAbandonmentStates)The possible abandonment states that an order can have for it no longer to be considered abandoned. | 
|  void | setReanimationDatePropertyName(java.lang.String pReanimationDatePropertyName)The name of the property in the abandonmentInfo repository item that holds the date/time when the order was most recently reanimated. | 
|  void | setSendOrderAbandonedMessage(boolean pSendOrderAbandonedMessage)Boolean indicating if OrderAbandoned messages should be sent when the service identifies an abandoned order. | 
|  void | setSendOrderConvertedMessage(boolean pSendOrderConvertedMessage)Boolean indicating if an OrderConverted message should be sent when an abandoned order is converted. | 
|  void | setSendOrderLostMessage(boolean pSendOrderLostMessage)Boolean indicating if OrderLost messages should be sent when the service identifies a lost order. | 
|  void | setSendOrderReanimatedMessage(boolean pSendOrderReanimatedMessage)Boolean indicating if an OrderReanimated message should be sent when an abandoned order is reanimated. | 
|  void | setTransactionManager(javax.transaction.TransactionManager pTransactionManager)Sets the Transaction Manager. | 
| 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
protected static java.util.ResourceBundle sResourceBundle
protected javax.transaction.TransactionManager mTransactionManager
protected java.lang.String mOrderPriceInfoPropertyName
protected java.lang.String mPriceInfoAmountPropertyName
protected java.lang.String mPriceInfoCurrencyCodePropertyName
| Constructor Detail | 
|---|
public AbandonedOrderTools()
| Method Detail | 
|---|
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public void setOrderRepository(MutableRepository pOrderRepository)
pOrderRepository - the order repository in which to look for abandoned orders.public MutableRepository getOrderRepository()
public void setOrderManager(OrderManager pOrderManager)
pOrderManager - the OrderManager component that will be used to
 delete lost orders.public OrderManager getOrderManager()
public void setProfileRepository(MutableRepository pProfileRepository)
pProfileRepository - the profile repository in which to edit the
        "abandonedOrderCount" property of profiles.public MutableRepository getProfileRepository()
public void setAbandonableOrderStates(java.lang.String[] pAbandonableOrderStates)
pAbandonableOrderStates - the possible order states an order
        must be in to be considered abandoned or lost.public java.lang.String[] getAbandonableOrderStates()
public void setReanimateableAbandonmentStates(java.lang.String[] pReanimateableAbandonmentStates)
pReanimateableAbandonmentStates - the possible abandonment states of abandoned
 and lost orders.  Orders with these abandonment states are to be considered 
 REANIMATED if they are modified by the owner of the order.public java.lang.String[] getReanimateableAbandonmentStates()
public void setReanimatedAbandonmentStates(java.lang.String[] pReanimatedAbandonmentStates)
pReanimatedAbandonmentStates - The possible abandonment states that an 
 order can have for it no longer to be considered abandoned.  This will be 
 checked to determine if an order with abandonment info should be re-identified 
 as abandoned.public java.lang.String[] getReanimatedAbandonmentStates()
public void setLostAbandonmentStates(java.lang.String[] pLostAbandonmentStates)
pLostAbandonmentStates - All the possible abandonment states that an 
 order can have for it to be considered lost.  The abandonment state of an 
 order identified as lost will be checked against this list to determine if it
 has already been identified as lost.public java.lang.String[] getLostAbandonmentStates()
public void setDefaultAbandonedState(java.lang.String pDefaultAbandonedState)
pAbandonedState - the abandonment state that will be assigned 
        to orders identified as abandoned.public java.lang.String getDefaultAbandonedState()
public void setDefaultReanimatedState(java.lang.String pDefaultReanimatedState)
pReanimatedState - the abandonment state that should be assigned
        to orders identified as reanimatedpublic java.lang.String getDefaultReanimatedState()
public void setDefaultConvertedState(java.lang.String pDefaultConvertedState)
pDefaultConvertedState - the abandonment state that should be assigned
        to orders identified as convertedpublic java.lang.String getDefaultConvertedState()
public void setDefaultLostState(java.lang.String pDefaultLostState)
pDefaultLostState - the abandonment state that will be assigned
        to orders identified as lostpublic java.lang.String getDefaultLostState()
public void setOrderItemName(java.lang.String pOrderItemName)
pOrderItemName - the name of the order item descriptor in the
        order repository.public java.lang.String getOrderItemName()
public void setProfileItemName(java.lang.String pProfileItemName)
pProfileItemName - the name of the user item descriptor in the
        profile repository.public java.lang.String getProfileItemName()
public void setAbandonmentInfoItemName(java.lang.String pAbandonmentInfoItemName)
pAbandonmentInfoItemName - the name of the abandonmentInfo item
        descriptor in the order repository.public java.lang.String getAbandonmentInfoItemName()
public void setAbandonedOrderItemName(java.lang.String pAbandonedOrderItemName)
pAbandonedOrderItemName - the name of the abandonedOrder item
        descriptor in the profile repository.public java.lang.String getAbandonedOrderItemName()
public void setAbandonmentInfoPropertyName(java.lang.String pAbandonmentInfoPropertyName)
pAbandonmentInfoPropertyName - the name of the order property that
        refers to its abandonmentInfo item.public java.lang.String getAbandonmentInfoPropertyName()
public void setAbandonmentStatePropertyName(java.lang.String pAbandonmentStatePropertyName)
pAbandonmentStatePropertyName - the name of the abandonmentInfo property
        that holds the abandonment state of the order.public java.lang.String getAbandonmentStatePropertyName()
public void setOrderPropertyName(java.lang.String pOrderPropertyName)
pOrderPropertyName - the name of the property in the abandonmentInfo
        repository item that refers back to the order repository item
        associated with it.public java.lang.String getOrderPropertyName()
public void setOrderIdPropertyName(java.lang.String pOrderIdPropertyName)
pOrderIdPropertyName - the name of the property in the abandonmentInfo
 repository item that holds the ID of the order associated with it.public java.lang.String getOrderIdPropertyName()
public void setProfileIdPropertyName(java.lang.String pProfileIdPropertyName)
pProfileIdPropertyName - the name of the property in the order
 repository item that holds the ID of the profile that owns the order.public java.lang.String getProfileIdPropertyName()
public void setAbandonedOrderOrderIdPropertyName(java.lang.String pAbandonedOrderOrderIdPropertyName)
pAbandonedOrderOrderIdPropertyName - the name of the property in the
 abandonedOrder repository item that holds the ID of the order.public java.lang.String getAbandonedOrderOrderIdPropertyName()
public void setAbandonedOrderProfileIdPropertyName(java.lang.String pAbandonedOrderProfileIdPropertyName)
pProfileIdPropertyName - the name of the property in the abandonedOrder
 repository item that holds the ID of the profile that owns the order.public java.lang.String getAbandonedOrderProfileIdPropertyName()
public void setAbandonmentCountPropertyName(java.lang.String pAbandonmentCountPropertyName)
pAbandonmentCountPropertyName - the name of the property in the
 abandonmentInfo repository item that indicates the number of times the order
 has been abandoned.public java.lang.String getAbandonmentCountPropertyName()
public void setAbandonmentDatePropertyName(java.lang.String pAbandonmentDatePropertyName)
pAbandonmentTimePropertyName - the name of the property in the
 abandonmentInfo repository item that holds the date/time when the order was
 most recently identified as abandoned.public java.lang.String getAbandonmentDatePropertyName()
public void setReanimationDatePropertyName(java.lang.String pReanimationDatePropertyName)
pAbandonmentDatePropertyName - the name of the property in the
 abandonmentInfo repository item that holds the date/time when the order was
 most recently reanimated.public java.lang.String getReanimationDatePropertyName()
public void setConversionDatePropertyName(java.lang.String pConversionDatePropertyName)
pAbandonmentDatePropertyName - the name of the property in the
 abandonmentInfo repository item that holds the date/time when the order was
 converted.public java.lang.String getConversionDatePropertyName()
public void setLostDatePropertyName(java.lang.String pLostDatePropertyName)
pLostDatePropertyName - the name of the property in the abandonmentInfo 
 repository item that holds the date/time when the order was most recently 
 identified as lost.public java.lang.String getLostDatePropertyName()
public void setOrderPriceInfoPropertyName(java.lang.String pOrderPriceInfoPropertyName)
pOrderPriceInfoPropertyName - the name of the order price info propertypublic java.lang.String getOrderPriceInfoPropertyName()
public void setPriceInfoAmountPropertyName(java.lang.String pPriceInfoAmountPropertyName)
pPriceInfoAmountPropertyName - the name of the order price info propertypublic java.lang.String getPriceInfoAmountPropertyName()
public void setPriceInfoCurrencyCodePropertyName(java.lang.String pPriceInfoCurrencyCodePropertyName)
pPriceInfoCurrencyCodePropertyName - the name of the order price info propertypublic java.lang.String getPriceInfoCurrencyCodePropertyName()
public void setMessageFactory(AbandonedOrderMessageFactory pMessageFactory)
pMessageFactory - the component that builds
        abandonment-related JMS messages: OrderAbandoned, OrderReanimated,
        OrderConverted, and OrderLostpublic AbandonedOrderMessageFactory getMessageFactory()
public void setMessageSender(MessageSender pMessageSender)
pMessageSender - the component that sends abandonment-related
        JMS messages.public MessageSender getMessageSender()
public void setSendOrderAbandonedMessage(boolean pSendOrderAbandonedMessage)
pSendOrderAbandonedMessage - boolean indicating if OrderAbandoned
 messages should be sent when the service identifies an abandoned order.public boolean isSendOrderAbandonedMessage()
public void setSendOrderReanimatedMessage(boolean pSendOrderReanimatedMessage)
pSendOrderReanimatedMessage - boolean indicating if an
 OrderReanimated message should be sent when an abandoned order
 is reanimated.public boolean isSendOrderReanimatedMessage()
public void setSendOrderConvertedMessage(boolean pSendOrderConvertedMessage)
pSendOrderConvertedMessage - boolean indicating if an
 OrderConverted message should be sent when an abandoned order
 is converted.public boolean isSendOrderConvertedMessage()
public void setSendOrderLostMessage(boolean pSendOrderLostMessage)
pSendOrderLostMessage - boolean indicating if an
 OrderLost message should be sent when the service identifies a
 lost order.public boolean isSendOrderLostMessage()
public void setDeleteLostOrders(boolean pDeleteLostOrders)
pDeleteLostOrders - boolean indicating if orders identified as
        lost should be removed from the order repositorypublic boolean isDeleteLostOrders()
public void setLeaveAbandonmentInfoForDeletedOrders(boolean pLeaveAbandonmentInfoForDeletedOrders)
pLeaveAbandonmentInfoForDeletedOrders - Boolean indicating if we 
        should leave an orphan abandonmentInfo item in the repository 
        after we delete a lost order.public boolean isLeaveAbandonmentInfoForDeletedOrders()
public void setLastUpdatedPropertyName(java.lang.String pLastUpdatedPropertyName)
pLastUpdatedPropertyName - the name of the property to be
        updated by the SetLastUpdated scenario action and droplet.public java.lang.String getLastUpdatedPropertyName()
public void doStartService()
                    throws ServiceException
doStartService in class GenericServiceServiceException - if the Service had a problem starting up
protected MutableRepositoryItem createAbandonmentInfo(RepositoryItem pOrder)
                                               throws RepositoryException
pOrder - the order repository item that needs an abandonmentInfo item created and
 associated with it
RepositoryException
protected RepositoryItem getAbandonmentInfo(RepositoryItem pOrder,
                                            boolean pCreate)
                                     throws RepositoryException
pOrder - the order repository item whose abandonmentInfo item we are trying to obtain.pCreate - boolean indicating if an abandonmentInfo item should be created if none
        currently exists.
RepositoryException
protected void addAbandonedOrderToProfile(java.lang.String pProfileId,
                                          java.lang.String pOrderId)
                                   throws RepositoryException
pProfileId - the ID of the profile to be edited.
RepositoryException
protected void removeAbandonedOrderFromProfile(java.lang.String pOrderId)
                                        throws RepositoryException
pProfileId - the ID of the profile to be edited.
RepositoryException
public void setLastUpdated(java.lang.String pOrderId)
                    throws RepositoryException,
                           CommerceException
pOrderId - the ID of the order whose abandonmentInfo is to be edited.
RepositoryException
CommerceException
public void reanimateAbandonedOrder(java.lang.String pOrderId)
                             throws RepositoryException,
                                    javax.jms.JMSException,
                                    CommerceException
pOrderId - the ID of the order to be marked as reanimated.
RepositoryException
javax.jms.JMSException
CommerceException
public void convertAbandonedOrder(java.lang.String pOrderId)
                           throws RepositoryException,
                                  javax.jms.JMSException,
                                  CommerceException
pOrderId - the ID of the order to be marked as converted.
RepositoryException
javax.jms.JMSException
CommerceException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||