atg.projects.store.order.purchase
Class StoreCartProcessHelper

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.order.purchase.PurchaseProcessHelper
              extended by atg.projects.store.order.purchase.StorePurchaseProcessHelper
                  extended by atg.projects.store.order.purchase.StoreCartProcessHelper
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class StoreCartProcessHelper
extends StorePurchaseProcessHelper

Extends the StorePurchaseProcessHelper to implement cart processing helper methods.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  atg.userprofiling.ProfileTools mProfileTools
          Profile tools.
static java.lang.String MSG_ERROR_ADDING_TO_GIFTLIST
          Error adding to giftlist message resource key.
static java.lang.String MSG_ERROR_MODIFYING_ORDER
          Error modifying order message resource key.
static java.lang.String MSG_INVALID_ITEMS
          Invalid items message resource key.
static java.lang.String MSG_INVALID_RECIPIENT_EMAIL
          Invalid recipient e-mail address resource key.
static java.lang.String MSG_INVALID_SENDER_EMAIL
          Invalid sender e-mail address.
static java.lang.String MSG_NO_ITEMS_SELECT
          No items selected message resource key.
 
Fields inherited from class atg.projects.store.order.purchase.StorePurchaseProcessHelper
MSG_MISSING_REQUIRED_ADDRESS_PROPERTY, MSG_MULTIPLE_COUPONS_PER_ORDER, MSG_UNCLAIMABLE_COUPON, PRICING_ERROR, PRICING_ERROR_ADDRESS
 
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessHelper
ERROR_FETCHING_PROFILE, MSG_ERROR_ADDING_CREDIT_CARD, MSG_ERROR_ADDING_SHIPPINGGROUP, MSG_ERROR_ADDING_TO_ORDER, MSG_ERROR_CREATING_ORDER, MSG_ERROR_MOVING_ITEM_BETWEEN_SHIPPING_GROUPS, MSG_ERROR_PROCESS_ADD_ITEM_CHAIN, MSG_ERROR_REMOVING_ITEM, MSG_ERROR_REMOVING_ITEM_FROM_SHIPPING_GROUP, MSG_ERROR_REPRICING_ORDER_AFTER_ADD_ITEM, MSG_ERROR_SETTING_ORDER_AMOUNT, MSG_INVALID_PROFILE_ID
 
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
StoreCartProcessHelper()
           
 
Method Summary
 java.lang.String addItemsToGiftlist(java.lang.String pGiftlistId, atg.commerce.order.purchase.AddCommerceItemInfo[] pItems, atg.commerce.gifts.GiftlistManager pGiftlistManager)
          Adds the given item(s) to the selected giftlist.
 void addRemoveGiftServices(StoreOrderImpl pStoreOrder, boolean pAddGiftWrap, boolean pAddGiftMessage, java.lang.String pGiftWrapSkuId, java.lang.String pGiftWrapProductId)
          This method can be used by form handlers to add / remove gift message or gift wrap from the order.
 boolean areItemsInCatalog(atg.commerce.order.Order pOrder)
          Check if all items on the order are in the catalog.
 atg.userprofiling.PropertyManager getProfilePropertyManager()
           
 atg.userprofiling.ProfileTools getProfileTools()
           
 int getSecurityStatus(atg.repository.RepositoryItem pProfile)
          Get the current security status from the provided profile.
 boolean isAllGiftWrap(StoreOrderImpl pOrder)
          Check to see if the order contains only gift wrap items
 boolean isAuthorizedUser(atg.repository.RepositoryItem pProfile)
          Check the security status of the profile to see if the user is Authorized.
 boolean isGiftWrapAddedOrRemoved(StoreOrderImpl pOrder, boolean pGiftWrapSelected)
          Check to see if gift wrap has been added or removed from the order.
 boolean isLoginUser(atg.repository.RepositoryItem pProfile)
          Check the security status of the profile to see if the user is Logged in.
 void rollbackTransaction(javax.transaction.TransactionManager pTransactionManager)
          Rollback the provided transaction.
 void setProfilePropertyManager(atg.userprofiling.PropertyManager pProfilePropertyManager)
           
 void setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
           
 
Methods inherited from class atg.projects.store.order.purchase.StorePurchaseProcessHelper
addItemToShippingGroup, checkForRequiredAddressProperties, claimCoupon, claimCoupon, getAddressPropertyNameMap, getClaimableManager, getMandatoryStateCountryList, getPlaceUtils, getPricingTools, getRequiredAddressPropertyNames, getShippingGroupForItem, getStoreConfiguration, getStoreOrderTools, processGiftAddition, removeCoupon, removeCoupon, repriceOrder, setAddressPropertyNameMap, setClaimableManager, setPlaceUtils, setPricingTools, setRequiredAddressPropertyNames, setStoreConfiguration, setStoreOrderTools, tenderCoupon
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessHelper
addCreditCardToOrder, addItemsToOrder, addItemsToOrder, addShippingAddressToOrder, adjustItemRelationshipsForQuantityChange, adjustNonGiftHandlingInstructionsForQuantityDecrease, adjustNonGiftHandlingInstructionsForQuantityIncrease, applyValueDictionary, copyCreditCardInfo, createCommerceItem, createConfigurableSubitems, createOrder, decreaseRelationshipQuantity, deleteItems, deleteItems, getAddItemToOrderChainId, getAddItemToOrderPricingOp, getCommerceItemManager, getDefaultHardgoodShippingGroupType, getDeleteItemsFromOrderPricingOp, getGiftlistManager, getOrderManager, getPipelineManager, getRepriceOrderChainId, getShippingGroupForItem, getShippingGroupManager, getTransactionManager, increaseRelationshipQuantity, isAddItemToDefaultShippingGroup, isTransactionMarkedAsRollBack, moveItemBetweenShippingGroups, processPipelineErrors, removeEntireRelationshipQuantity, removeItemQuantityFromShippingGroup, runProcess, runProcess, runProcess, runProcessAddItemToOrder, runProcessRepriceOrder, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runRepricingProcess, setAddItemToDefaultShippingGroup, setAddItemToOrderChainId, setAddItemToOrderPricingOp, setCommerceItemManager, setCommerceItemProperties, setDefaultHardgoodShippingGroupType, setDeleteItemsFromOrderPricingOp, setGiftlistManager, setOrderAmountToPaymentGroup, setOrderManager, setPipelineManager, setRepriceOrderChainId, setShippingGroupManager, setTransactionManager
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


MSG_ERROR_MODIFYING_ORDER

public static final java.lang.String MSG_ERROR_MODIFYING_ORDER
Error modifying order message resource key.

See Also:
Constant Field Values

MSG_ERROR_ADDING_TO_GIFTLIST

public static final java.lang.String MSG_ERROR_ADDING_TO_GIFTLIST
Error adding to giftlist message resource key.

See Also:
Constant Field Values

MSG_NO_ITEMS_SELECT

public static final java.lang.String MSG_NO_ITEMS_SELECT
No items selected message resource key.

See Also:
Constant Field Values

MSG_INVALID_ITEMS

public static final java.lang.String MSG_INVALID_ITEMS
Invalid items message resource key.

See Also:
Constant Field Values

MSG_INVALID_RECIPIENT_EMAIL

public static final java.lang.String MSG_INVALID_RECIPIENT_EMAIL
Invalid recipient e-mail address resource key.

See Also:
Constant Field Values

MSG_INVALID_SENDER_EMAIL

public static final java.lang.String MSG_INVALID_SENDER_EMAIL
Invalid sender e-mail address.

See Also:
Constant Field Values

mProfileTools

protected atg.userprofiling.ProfileTools mProfileTools
Profile tools.

Constructor Detail

StoreCartProcessHelper

public StoreCartProcessHelper()
Method Detail

getProfileTools

public atg.userprofiling.ProfileTools getProfileTools()
Returns:
the profile tools.

setProfileTools

public void setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
Parameters:
pProfileTools - - the profile tools to set.

setProfilePropertyManager

public void setProfilePropertyManager(atg.userprofiling.PropertyManager pProfilePropertyManager)
Parameters:
pProfilePropertyManager - - the property manager for profiles, used to see if the user is logged in

getProfilePropertyManager

public atg.userprofiling.PropertyManager getProfilePropertyManager()
Returns:
profile property manager.

addItemsToGiftlist

public java.lang.String addItemsToGiftlist(java.lang.String pGiftlistId,
                                           atg.commerce.order.purchase.AddCommerceItemInfo[] pItems,
                                           atg.commerce.gifts.GiftlistManager pGiftlistManager)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException,
                                           atg.commerce.CommerceException
Adds the given item(s) to the selected giftlist.

This method uses the AddCommerceItemInfo items to determine which skus and quantities to add to the gift list.

Parameters:
pGiftlistId - - A String value.
pItems - - The items to add to the giftlist, a AddCommerceItemInfo[] value.
pGiftlistManager - - The giftlist manager, a GiftlistManager value.
Returns:
Throws:
javax.servlet.ServletException
java.io.IOException
atg.commerce.CommerceException

areItemsInCatalog

public boolean areItemsInCatalog(atg.commerce.order.Order pOrder)
Check if all items on the order are in the catalog.

Parameters:
pOrder - - An Order value.
pOrderManager -
Returns:

getSecurityStatus

public int getSecurityStatus(atg.repository.RepositoryItem pProfile)
Get the current security status from the provided profile.

Parameters:
pProfile - - A RepositoryItem value.
Returns:
Profile's security status as a int value.

isGiftWrapAddedOrRemoved

public boolean isGiftWrapAddedOrRemoved(StoreOrderImpl pOrder,
                                        boolean pGiftWrapSelected)
Check to see if gift wrap has been added or removed from the order.

Parameters:
pOrder - - An StoreOrderImpl value.
pGiftWrapSelected - - value for whether or not gift wrap is selected, a boolean value.
Returns:
true if giftwrap has been added or removed from the order, a boolean value.

isAllGiftWrap

public boolean isAllGiftWrap(StoreOrderImpl pOrder)
Check to see if the order contains only gift wrap items

Parameters:
pOrder - - An Order value.
Returns:
true if all items on the order are giftwrapped, a boolean value.

isAuthorizedUser

public boolean isAuthorizedUser(atg.repository.RepositoryItem pProfile)
Check the security status of the profile to see if the user is Authorized.

Parameters:
pProfile - - A RepositoryItem value.
Returns:
true if the profile is logged in, a boolean value.

isLoginUser

public boolean isLoginUser(atg.repository.RepositoryItem pProfile)
Check the security status of the profile to see if the user is Logged in.

Parameters:
pProfile - - A RepositoryItem value.
Returns:
true if the profile is logged in, a boolean value.

rollbackTransaction

public void rollbackTransaction(javax.transaction.TransactionManager pTransactionManager)
Rollback the provided transaction.

Parameters:
pTransactionManager - - Transaction Manager containing the transaction to rollback, A TransactionManager value.

addRemoveGiftServices

public void addRemoveGiftServices(StoreOrderImpl pStoreOrder,
                                  boolean pAddGiftWrap,
                                  boolean pAddGiftMessage,
                                  java.lang.String pGiftWrapSkuId,
                                  java.lang.String pGiftWrapProductId)
This method can be used by form handlers to add / remove gift message or gift wrap from the order.

Parameters:
pOrder - - The order
pAddGiftWrap - - boolean value indicating whether or not to add gift wrap
pAddGiftMessage - - boolean value indicating whether or not to add gift message
pGiftWrapSkuId - - String value indicating Sku Id of the gift wrapped
pGiftWrapProductId - - String value indicating Product Id of the gift wrapped