atg.commerce.csr.util
Class CSRAgentTools

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.agent.AgentTools
              extended by atg.commerce.csr.util.CSRAgentTools
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 CSRAgentTools
extends atg.agent.AgentTools

This class contains various utility methods used in the CSR application.


Field Summary
protected static java.lang.String AGENTRESOURCES
           
static java.lang.String CLASS_VERSION
          Class version string
protected  CSRCloneEditManager mCloneEditManager
           
protected  atg.nucleus.ServiceMap mConfirmationEmailMap
           
protected  CSREnvironmentTools mCSREnvironmentTools
           
protected  boolean mPersistConfirmationEmails
           
protected  atg.commerce.pricing.PricingTools mPricingTools
           
protected  atg.userprofiling.PropertyManager mProfilePropertyManager
           
protected  boolean mSendEmailInSeparateThread
           
static java.lang.String MSG_COULD_NOT_SAVE_CLONED_ORDER
           
static java.lang.String MSG_COULD_NOT_SAVE_ORDER
           
static java.lang.String MSG_ERROR_WHILE_CLONING_ADDRESS
           
static java.lang.String MSG_ERROR_WHILE_COPY_ADDRESS
           
static java.lang.String MSG_NO_CREDIT_CARD
           
static java.lang.String MSG_NO_EXISTING_ADDRESS
           
static java.lang.String MSG_NO_NICKNAME
           
static java.lang.String MSG_NO_ORDER
           
static java.lang.String MSG_NO_PAYMENT_GROUP_CONTAINER
           
static java.lang.String MSG_NO_PROFILE
           
static java.lang.String MSG_ORDER_ALREADY_SAVED
           
static java.lang.String MSG_SEND_CONFIRMATION_NO_ADDR_ERROR
           
static java.lang.String MSG_SEND_CONFIRMATION_NO_EMAILINFO_ERROR
           
protected  atg.userprofiling.email.TemplateEmailSender mTemplateEmailSender
           
protected  java.util.ResourceBundle sBundle
           
static java.lang.String TEMPLATE_WINDOW_SCOPE_KEY
           
 
Fields inherited from class atg.agent.AgentTools
COMMENT_AGENT_PROPERTY_NAME, COMMENT_COMMENT_PROPERTY_NAME, COMMENT_CREATIONDATE_PROPERTY_NAME, COMMENT_OWNER_PROPERTY_NAME, NEW_PASSWORD_PARAM_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
CSRAgentTools()
           
 
Method Summary
 void addItemToCollection(atg.repository.RepositoryItem pItem, atg.repository.RepositoryItem pItemToAdd, java.lang.String pPropertyName)
          Adds an item from a collection property.
 void addItemToMap(atg.repository.RepositoryItem pItem, atg.repository.RepositoryItem pItemToAdd, java.lang.Object pKey, java.lang.String pPropertyName)
          Adds an item to a map property.
 void addItemToProperty(atg.repository.RepositoryItem pItem, atg.repository.RepositoryItem pItemToSet, java.lang.String pPropertyName)
          Puts an item in an item's single valued property.
 void addOrderPromotionsToHolder(atg.commerce.order.Order pOrder, atg.commerce.pricing.PricingModelHolder pPricingModelHolder)
          Adds the promotions that are associated with the order to the pricing model holder.
 java.util.Map addPriceListParameter(java.util.Map pExtraParameters)
          This method adds the environment's current price list to the extra parameter map that's used for pricing operations in CSR.
 boolean associateTicketAndOrder(java.lang.String pOrderId, atg.repository.MutableRepositoryItem pTicket)
          This method associates a given or current active ticket to the order that is passed in.
 void claimCoupon(java.lang.String pClaimCode, java.lang.String pSubmittedOrderPricingOperation, java.util.Map pRepricePrameterMap)
          If the order hasn't been submitted yet, the ClaimableManager is called to claim the coupon.
 void claimCouponForSubmittedOrder(CloneEditState pCloneEditState, java.lang.String pClaimCode, atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pCustomerProfile, atg.repository.RepositoryItem pAgentProfile, SubmittedOrderPricingModelHolder pSubmittedOrderPricingModelHolder, java.lang.String pRepricingOperation, java.util.Locale pUserLocale, java.util.Map pExtraParametersMap)
          Claims a coupon for use with an already submitted order
 java.util.List collectUniqueExistingAddresses(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer, atg.commerce.order.Order pOrder)
          This method gets the unique addresses from the ShippingGroupMapContainer and PaymentGroupMapContainer and Order.
 java.util.Locale convertLocale(java.lang.Object pLocale)
          Convert an object to a Locale.
 void copyContactInfoToCreditCard(atg.core.util.Address pExistingAddress, atg.commerce.order.CreditCard pCreditCard)
          This method copies the given address to the CreditCard object.
 void copyContactInfoToCreditCard(atg.repository.RepositoryItem pExistingAddress, atg.commerce.order.CreditCard pCreditCard)
          This method copies the given address to the CreditCard object.
 atg.payment.creditcard.CreditCardInfo createCreditCardInfo(atg.repository.RepositoryItem pCreditCard)
          Create a (Generic)CreditCardInfo instance from a credit card repository item
 atg.repository.MutableRepositoryItem createNewAgentOrderCommentItem()
          Creates a new transient comment item in the order repository
 atg.repository.RepositoryItem createOrderComment(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pCustomerProfile, atg.repository.RepositoryItem pAgentProfile, java.lang.String pComment, java.lang.String pTicketId)
          Creates a new comment item for the given order.
 atg.repository.RepositoryItem findDuplicateUser(java.util.Dictionary pValues)
          This methods will attempt to find a profile based on the properties specfied by the duplicatProfileProperties property.
 java.util.Collection findItemsNotInPriceList(java.util.Collection pCommerceItems, atg.repository.RepositoryItem pPriceList)
          Finds the commerce items in the collection that cannot be priced using the provided price list.
 int findMatchingAddress(java.lang.Object pAddress, java.util.List pAddressList)
          This method iterates through all available addresses and finds the matching address in the list of available addresses and returns the matching or equivalent address that is in the available address list.
 void findPropertyChanges(java.lang.Object pNewValues, java.lang.Object pOldValues, java.lang.String[] pPropertyNames, java.util.List pUpdates)
          This method finds all property information changes.
 java.util.Map generateConfirmationTemplateDefaultParams(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile)
          Wrap the Order and Profile paramaters in an OrderModified event.
 java.text.DecimalFormatSymbols getActiveCustomerDecimalFormatSymbols()
          Get the DecimalFormatSymbols from the active customer's pricing local, or if that's unavailable, from the PricingTools.defaultLocale property.
 java.util.Locale getActiveCustomerPricingLocale()
          Get the locale to be for pricing.
 atg.repository.RepositoryItem getClaimableItem(java.lang.String pId)
          Return the repository item from the claimable repository whose id is equal to pId.
 atg.commerce.claimable.ClaimableManager getClaimableManager()
          Returns the ClaimableManager is used in determining the user's GiftCertificates.
 java.util.Map getCloneContactInfoExcludedProperties()
           
 java.util.Map getCloneContactInfoPropExceptions()
           
protected  java.util.Map getCloneDefaultShippingInfoExcludedProperties()
          Returns the map of properties that should be excluded from the clone of the default shipping address
protected  java.util.Map getCloneDefaultShippingInfoPropExceptions()
          Returns the Hierarchical map of property name exceptions that are used when doing a deep clone of the default shipping address.
 CSRCloneEditManager getCloneEditManager()
           
 atg.commerce.profile.CommercePropertyManager getCommercePropertyManager()
           
 atg.nucleus.ServiceMap getConfirmationEmailMap()
          Gets the ConfirmationEmailMap
 java.lang.String getConfirmationTemplateToUse()
          Retrieves the current confirmation message template name from Window Scope.
 CSRAgentMessagingTools getCSRAgentMessagingTools()
          Get the AgentMessagingTools cast to CSRAgentMessagingTools
 CSRConfigurator getCSRConfigurator()
           
 CSREnvironmentTools getCSREnvironmentTools()
           
 ReturnRequest getCurrentReturnRequest()
          This method gets the return request from the current order.
 java.lang.String[] getDuplicateProfileProperties()
           
 java.lang.String[] getIncompleteOrderStates()
           
 java.lang.String getOrderCommentItemDescriptorName()
           
 atg.commerce.order.OrderManager getOrderManager()
          The OrderManager component that will be used to create a new, empty order
 atg.commerce.pricing.priceLists.PriceListManager getPriceListManager()
           
 atg.commerce.pricing.PricingTools getPricingTools()
           
 atg.userprofiling.PropertyManager getProfilePropertyManager()
          Gets the ProfilePropertyManager
 atg.progressbar.ProgressBarItem getProgressBar(java.lang.String pPath)
          Resolves the requested progress bar
 atg.commerce.promotion.PromotionTools getPromotionTools()
           
protected  java.lang.Object getPropertyValue(java.util.Dictionary pValues, java.lang.String pName)
          Gets the value corresponding to the given name in the given dictionary
 atg.commerce.order.purchase.PurchaseProcessHelper getPurchaseProcessHelper()
          Returns property purchaseProcessHelper
 MessageDispatcher getScenarioMessageDispatcher()
           
 java.lang.String[] getSubmittedOrderStates()
           
 atg.userprofiling.email.TemplateEmailSender getTemplateEmailSender()
          Gets the TemplateEmailSender
 java.lang.String getTicketOrdersPropertyName()
          Returns the ticketOrdersPropertyName.
 java.lang.String getValidatePaymentGroupsChainId()
          Return the ValidatePaymentGroupsChainId property.
 void initializeDefaultAddresses(atg.repository.RepositoryItem pProfile, java.lang.String pDefaultShippingAddressPropertyName, java.lang.String pDefaultBillingAddressPropertyName, boolean pCloneDefaultShippingForBilling)
          Initializes the default shipping and default billing addresses for the profile.
 boolean isAllowCloningContactInfo()
           
 boolean isCloneEditState(atg.commerce.order.Order pOrder)
          returns true if the order should use the clone edit handlers for editing.
 boolean isOrderIncomplete(atg.commerce.order.Order pOrder)
          Determines if an order is incomplete based on the states defined in the incompleteOrderStates property.
 boolean isOrderSubmitted(atg.commerce.order.Order pOrder)
          Determines if an order is submitted based on the states defined in the submittedOrderStates property.
 boolean isPersistConfirmationEmails()
          Gets the PersistConfirmationEmails
 boolean isPersistOrderForTransientUsers()
          Returns the persistOrderForTransientUsers.
 boolean isSendEmailInSeparateThread()
          Returns boolean indicating whether the new account email is sent in a separate thread.
 boolean isUseRequestLocale()
          Returns property UseRequestLocale
 java.lang.String maskCreditCardNumber(java.lang.String pCreditCardNumber)
          Masks a credit card number.
 boolean persistCurrentOrder()
          This method saves the current order to the repository if it is transient.
 void populateCustomerProfileFromAddress(atg.repository.RepositoryItem pProfile, atg.repository.RepositoryItem pAddress)
          Populates a profile from the information captured in the address.
 void removeDeletedPaymentGroups(atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer, java.util.List pRemovedEntries)
          Some payment groups are deleted from the repository.
 void removeDeletedShippingGroups(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, java.util.List pRemovedEntries)
          Some shipping groups are deleted from the repository.
 void removeItemFromCollection(atg.repository.RepositoryItem pItem, java.lang.String pPropertyName, atg.repository.RepositoryItem pRemoveItem)
          Removes an item from a collection property.
 void removeItemFromMap(atg.repository.RepositoryItem pItem, java.lang.String pPropertyName, java.lang.Object pKey)
          Removes an item from a map property.
 void removeItemFromProperty(atg.repository.RepositoryItem pItem, java.lang.String pPropertyName)
          Removes a reference to an item by setting the property to null.
 void repriceOrder(java.lang.String pRepricingOperation, atg.commerce.order.Order pOrder, atg.commerce.pricing.PricingModelHolder pUserPricingModels, java.util.Locale pLocale, atg.repository.RepositoryItem pCustomerProfile, atg.repository.RepositoryItem pAgentProfile, java.util.Map pExtraParameters, atg.commerce.util.PipelineErrorHandler pErrorHandler)
          Reprices an order.
 boolean sendAutomaticConfirmation(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile)
          Send an automatic confirmation message.
 void sendConfirmationEmail(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String pToAddress)
          Use the Template Email Sender to send a confirmation message for a given order.
 void setAddressFirstAndLastNameFromProfile(atg.repository.RepositoryItem pAddress, atg.repository.RepositoryItem pProfile)
          Sets the address first name and last name to the values in the profile.
 void setAllowCloningContactInfo(boolean pAllowCloningContactInfo)
           
 void setClaimableManager(atg.commerce.claimable.ClaimableManager pClaimableManager)
          Specifies the ClaimableManager to use in determining the user's GiftCertificates.
 void setCloneContactInfoExcludedProperties(java.util.Map pCloneContactInfoExcludedProperties)
           
 void setCloneContactInfoPropExceptions(java.util.Map pCloneContactInfoPropExceptions)
           
 void setCloneEditManager(CSRCloneEditManager pCloneEditManager)
           
 void setCommercePropertyManager(atg.commerce.profile.CommercePropertyManager pCommercePropertyManager)
          Sets the component that defines properties of the profile for Commerce
 void setConfirmationEmailMap(atg.nucleus.ServiceMap pConfirmationEmailMap)
          Sets the ConfirmationEmailMap
 void setConfirmationTemplateToUse(java.lang.String pTemplateToUse)
          Saves the template name in window scope so that it can be retrieved at a later time.
 void setCSRConfigurator(CSRConfigurator pCSRConfigurator)
          Sets the CSRConfigurator
 void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)
           
 void setDuplicateProfileProperties(java.lang.String[] pDuplicateProfileProperties)
          Sets property duplicateNameCheckPropertyNames
 void setIncompleteOrderStates(java.lang.String[] pIncompleteOrderStates)
          Sets array of order states that indicate that an order is incomplete
 void setOrderCommentItemDescriptorName(java.lang.String pOrderCommentItemDescriptorName)
          Sets the name of the "comment" item descriptor in the order repository
 void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
          Sets the OrderManager component that will be used to create a new, empty order
 void setPersistConfirmationEmails(boolean pPersistConfirmationEmails)
          Sets the PersistConfirmationEmails
 void setPersistOrderForTransientUsers(boolean pPersistOrderForTransientUsers)
          Sets the persistOrderForTransientUsers.
 void setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
          Sets the Price List Manager
 void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)
           
 void setProfilePropertyManager(atg.userprofiling.PropertyManager pProfilePropertyManager)
          Sets the ProfilePropertyManager
 void setPromotionTools(atg.commerce.promotion.PromotionTools pPromotionTools)
           
protected  void setPropertiesOfOrderComment(atg.repository.MutableRepositoryItem pComment, java.lang.String pCommentData, java.util.Date pCreationDate, java.lang.String pOwnerId, atg.repository.RepositoryItem pAgent)
          Sets the properties of an order comment item
 void setPurchaseProcessHelper(atg.commerce.order.purchase.PurchaseProcessHelper pPurchaseProcessHelper)
          Sets property purchaseProcessHelper
 void setScenarioMessageDispatcher(MessageDispatcher pScenarioMessageDispatcher)
          Component that will send the initializeProfile event
 void setSubmittedOrderStates(java.lang.String[] pSubmittedOrderStates)
          Sets array of order states that indicate that an order is Submitted
 void setTemplateEmailSender(atg.userprofiling.email.TemplateEmailSender pTemplateEmailSender)
          Sets the TemplateEmailSender
 void setTicketOrdersPropertyName(java.lang.String pTicketOrdersPropertyName)
          Sets the ticketOrdersPropertyName.
 void setUseRequestLocale(boolean pUseRequestLocale)
          Sets property UseRequestLocale
 void setValidatePaymentGroupsChainId(java.lang.String pValidatePaymentGroupsChainId)
          Set the ValidatePaymentGroupsChainId property.
 boolean validateCreditCardExpiration(java.lang.String pMonth, java.lang.String pYear)
          Validates a credit card expiration date
 boolean validateCreditCardNumber(java.lang.String pCreditCardNumber)
          Validates a credit card number
 
Methods inherited from class atg.agent.AgentTools
assignUserToCurrentOrganization, assignUserToOrganization, createNewAgentProfileCommentItem, createProfileComment, generateNewAccountPasswordAndNotification, generateNewAccountTemplateDefaultParams, getAgentMessagingTools, getAgentProfile, getCustomerProfile, getInternalProfileTools, getProfileCommentItemDescriptorName, getProfileTools, getUserDirectoryTools, getUserViewName, initializeRegistrationDate, setAgentMessagingTools, setInternalProfileTools, setProfileCommentItemDescriptorName, setProfileTools, setPropertiesOfComment, setUserDirectoryTools, setUserViewName
 
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, 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 final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

AGENTRESOURCES

protected static final java.lang.String AGENTRESOURCES
See Also:
Constant Field Values

sBundle

protected final java.util.ResourceBundle sBundle

MSG_NO_ORDER

public static final java.lang.String MSG_NO_ORDER
See Also:
Constant Field Values

MSG_NO_PROFILE

public static final java.lang.String MSG_NO_PROFILE
See Also:
Constant Field Values

MSG_ORDER_ALREADY_SAVED

public static final java.lang.String MSG_ORDER_ALREADY_SAVED
See Also:
Constant Field Values

MSG_COULD_NOT_SAVE_CLONED_ORDER

public static final java.lang.String MSG_COULD_NOT_SAVE_CLONED_ORDER
See Also:
Constant Field Values

MSG_COULD_NOT_SAVE_ORDER

public static final java.lang.String MSG_COULD_NOT_SAVE_ORDER
See Also:
Constant Field Values

MSG_NO_EXISTING_ADDRESS

public static final java.lang.String MSG_NO_EXISTING_ADDRESS
See Also:
Constant Field Values

MSG_NO_CREDIT_CARD

public static final java.lang.String MSG_NO_CREDIT_CARD
See Also:
Constant Field Values

MSG_NO_PAYMENT_GROUP_CONTAINER

public static final java.lang.String MSG_NO_PAYMENT_GROUP_CONTAINER
See Also:
Constant Field Values

MSG_NO_NICKNAME

public static final java.lang.String MSG_NO_NICKNAME
See Also:
Constant Field Values

MSG_ERROR_WHILE_CLONING_ADDRESS

public static final java.lang.String MSG_ERROR_WHILE_CLONING_ADDRESS
See Also:
Constant Field Values

MSG_ERROR_WHILE_COPY_ADDRESS

public static final java.lang.String MSG_ERROR_WHILE_COPY_ADDRESS
See Also:
Constant Field Values

MSG_SEND_CONFIRMATION_NO_EMAILINFO_ERROR

public static final java.lang.String MSG_SEND_CONFIRMATION_NO_EMAILINFO_ERROR
See Also:
Constant Field Values

MSG_SEND_CONFIRMATION_NO_ADDR_ERROR

public static final java.lang.String MSG_SEND_CONFIRMATION_NO_ADDR_ERROR
See Also:
Constant Field Values

TEMPLATE_WINDOW_SCOPE_KEY

public static final java.lang.String TEMPLATE_WINDOW_SCOPE_KEY
See Also:
Constant Field Values

mPricingTools

protected atg.commerce.pricing.PricingTools mPricingTools

mCSREnvironmentTools

protected CSREnvironmentTools mCSREnvironmentTools

mCloneEditManager

protected CSRCloneEditManager mCloneEditManager

mProfilePropertyManager

protected atg.userprofiling.PropertyManager mProfilePropertyManager

mPersistConfirmationEmails

protected boolean mPersistConfirmationEmails

mSendEmailInSeparateThread

protected boolean mSendEmailInSeparateThread

mConfirmationEmailMap

protected atg.nucleus.ServiceMap mConfirmationEmailMap

mTemplateEmailSender

protected atg.userprofiling.email.TemplateEmailSender mTemplateEmailSender
Constructor Detail

CSRAgentTools

public CSRAgentTools()
Method Detail

getPricingTools

public atg.commerce.pricing.PricingTools getPricingTools()

setPricingTools

public void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)

getTicketOrdersPropertyName

public java.lang.String getTicketOrdersPropertyName()
Returns the ticketOrdersPropertyName.

Returns:
ticketOrdersPropertyName

setTicketOrdersPropertyName

public void setTicketOrdersPropertyName(java.lang.String pTicketOrdersPropertyName)
Sets the ticketOrdersPropertyName.

Parameters:
pTicketOrdersPropertyName -

setValidatePaymentGroupsChainId

public void setValidatePaymentGroupsChainId(java.lang.String pValidatePaymentGroupsChainId)
Set the ValidatePaymentGroupsChainId property.

Parameters:
pValidatePaymentGroupsChainId - a String value

getValidatePaymentGroupsChainId

public java.lang.String getValidatePaymentGroupsChainId()
Return the ValidatePaymentGroupsChainId property.

Returns:
a String value

getCSREnvironmentTools

public CSREnvironmentTools getCSREnvironmentTools()

setCSREnvironmentTools

public void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)

getCloneEditManager

public CSRCloneEditManager getCloneEditManager()

setCloneEditManager

public void setCloneEditManager(CSRCloneEditManager pCloneEditManager)

getCSRAgentMessagingTools

public CSRAgentMessagingTools getCSRAgentMessagingTools()
Get the AgentMessagingTools cast to CSRAgentMessagingTools


setClaimableManager

public void setClaimableManager(atg.commerce.claimable.ClaimableManager pClaimableManager)
Specifies the ClaimableManager to use in determining the user's GiftCertificates.

Parameters:
pClaimableManager - a ClaimableManager value

getClaimableManager

public atg.commerce.claimable.ClaimableManager getClaimableManager()
Returns the ClaimableManager is used in determining the user's GiftCertificates.

Returns:
a ClaimableManager value

setIncompleteOrderStates

public void setIncompleteOrderStates(java.lang.String[] pIncompleteOrderStates)
Sets array of order states that indicate that an order is incomplete

Parameters:
pIncompleteOrderStates - an array of order states that indicate that an order is incomplete

getIncompleteOrderStates

public java.lang.String[] getIncompleteOrderStates()
Returns:
array of order states that indicate that an order is incomplete

setSubmittedOrderStates

public void setSubmittedOrderStates(java.lang.String[] pSubmittedOrderStates)
Sets array of order states that indicate that an order is Submitted

Parameters:
pSubmittedOrderStates - an array of order states that indicate that an order is submitted

getSubmittedOrderStates

public java.lang.String[] getSubmittedOrderStates()
Returns:
array of order states that indicate that an order is submitted

getPromotionTools

public atg.commerce.promotion.PromotionTools getPromotionTools()
Returns:
Returns the promotionTools.

setPromotionTools

public void setPromotionTools(atg.commerce.promotion.PromotionTools pPromotionTools)
Parameters:
pPromotionTools - The promotionTools to set.

setUseRequestLocale

public void setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale

Parameters:
pUseRequestLocale - a boolean value

isUseRequestLocale

public boolean isUseRequestLocale()
Returns property UseRequestLocale

Returns:
a boolean value

setCommercePropertyManager

public void setCommercePropertyManager(atg.commerce.profile.CommercePropertyManager pCommercePropertyManager)
Sets the component that defines properties of the profile for Commerce

Parameters:
pCommercePropertyManager - the component that defines properties of the profile for Commerce

getCommercePropertyManager

public atg.commerce.profile.CommercePropertyManager getCommercePropertyManager()
Returns:
the component that defines properties of the profile for Commerce

setCSRConfigurator

public void setCSRConfigurator(CSRConfigurator pCSRConfigurator)
Sets the CSRConfigurator

Parameters:
pCSRConfigurator - the CSRConfigurator

getCSRConfigurator

public CSRConfigurator getCSRConfigurator()
Returns:
the CSRConfigurator

setDuplicateProfileProperties

public void setDuplicateProfileProperties(java.lang.String[] pDuplicateProfileProperties)
Sets property duplicateNameCheckPropertyNames

Parameters:
pDuplicateProfileProperties - the names of the profile properties to check when looking for duplicated profiles.

getDuplicateProfileProperties

public java.lang.String[] getDuplicateProfileProperties()
Returns:
the names of the profile properties to check when looking for duplicated profiles.

setOrderCommentItemDescriptorName

public void setOrderCommentItemDescriptorName(java.lang.String pOrderCommentItemDescriptorName)
Sets the name of the "comment" item descriptor in the order repository

Parameters:
pOrderCommentItemDescriptorName - the name of the "comment" item descriptor in the order repository

getOrderCommentItemDescriptorName

public java.lang.String getOrderCommentItemDescriptorName()
Returns:
the name of the "comment" item descriptor in the order repository

setOrderManager

public void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
Sets the OrderManager component that will be used to create a new, empty order

Parameters:
pOrderManager - the OrderManager component that will be used to create a new, empty order

getOrderManager

public atg.commerce.order.OrderManager getOrderManager()
The OrderManager component that will be used to create a new, empty order

Returns:
the OrderManager component that will be used to create a new, empty order

setPriceListManager

public void setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
Sets the Price List Manager

Parameters:
pPriceListManager - the Price List Manager

getPriceListManager

public atg.commerce.pricing.priceLists.PriceListManager getPriceListManager()
Returns:
the Price List Manager

setPurchaseProcessHelper

public void setPurchaseProcessHelper(atg.commerce.order.purchase.PurchaseProcessHelper pPurchaseProcessHelper)
Sets property purchaseProcessHelper

Parameters:
pPurchaseProcessHelper - a PurchaseProcessHelper value

getPurchaseProcessHelper

public atg.commerce.order.purchase.PurchaseProcessHelper getPurchaseProcessHelper()
Returns property purchaseProcessHelper

Returns:
a PurchaseProcessHelper value

getProfilePropertyManager

public atg.userprofiling.PropertyManager getProfilePropertyManager()
Gets the ProfilePropertyManager

Returns:
the ProfilePropertyManager

setProfilePropertyManager

public void setProfilePropertyManager(atg.userprofiling.PropertyManager pProfilePropertyManager)
Sets the ProfilePropertyManager

Parameters:
pProfilePropertyManager - The ProfilePropertyManager to set

isPersistConfirmationEmails

public boolean isPersistConfirmationEmails()
Gets the PersistConfirmationEmails

Returns:
the PersistConfirmationEmails, indicating if new account notification emails are persisted before they are sent.

setPersistConfirmationEmails

public void setPersistConfirmationEmails(boolean pPersistConfirmationEmails)
Sets the PersistConfirmationEmails

Parameters:
pPersistConfirmationEmails - The PersistConfirmationEmails to set

isSendEmailInSeparateThread

public boolean isSendEmailInSeparateThread()
Returns boolean indicating whether the new account email is sent in a separate thread.


getConfirmationEmailMap

public atg.nucleus.ServiceMap getConfirmationEmailMap()
Gets the ConfirmationEmailMap

Returns:
the ConfirmationEmailMap

setConfirmationEmailMap

public void setConfirmationEmailMap(atg.nucleus.ServiceMap pConfirmationEmailMap)
Sets the ConfirmationEmailMap

Parameters:
pConfirmationEmailMap - The ConfirmationEmailMap to set

getTemplateEmailSender

public atg.userprofiling.email.TemplateEmailSender getTemplateEmailSender()
Gets the TemplateEmailSender

Returns:
the TemplateEmailSender

setTemplateEmailSender

public void setTemplateEmailSender(atg.userprofiling.email.TemplateEmailSender pTemplateEmailSender)
Sets the TemplateEmailSender

Parameters:
pTemplateEmailSender - The TemplateEmailSender to set

setScenarioMessageDispatcher

public void setScenarioMessageDispatcher(MessageDispatcher pScenarioMessageDispatcher)
Component that will send the initializeProfile event

Parameters:
pScenarioMessageDispatcher - component that will send the initializeProfile event

getScenarioMessageDispatcher

public MessageDispatcher getScenarioMessageDispatcher()
Returns:
Component that will send the initializeProfile event

getCloneContactInfoExcludedProperties

public java.util.Map getCloneContactInfoExcludedProperties()
Returns:
Returns the cloneContactInfoExcludedProperties.

setCloneContactInfoExcludedProperties

public void setCloneContactInfoExcludedProperties(java.util.Map pCloneContactInfoExcludedProperties)
Parameters:
pCloneContactInfoExcludedProperties - The cloneContactInfoExcludedProperties to set.

getCloneContactInfoPropExceptions

public java.util.Map getCloneContactInfoPropExceptions()
Returns:
Returns the cloneContactInfoPropExceptions.

setCloneContactInfoPropExceptions

public void setCloneContactInfoPropExceptions(java.util.Map pCloneContactInfoPropExceptions)
Parameters:
pCloneContactInfoPropExceptions - The cloneContactInfoPropExceptions to set.

isAllowCloningContactInfo

public boolean isAllowCloningContactInfo()
Returns:
Returns the allowCloningContactInfo.

setAllowCloningContactInfo

public void setAllowCloningContactInfo(boolean pAllowCloningContactInfo)
Parameters:
pAllowCloningContactInfo - The allowCloningContactInfo to set.

isPersistOrderForTransientUsers

public boolean isPersistOrderForTransientUsers()
Returns the persistOrderForTransientUsers. This flag is used with persisting transient orders. If the flag is true, then transient order will be saved for transient users. This flag is only user persistOrder method.

Returns:
persistOrderForTransientUsers
See Also:
persistOrder()

setPersistOrderForTransientUsers

public void setPersistOrderForTransientUsers(boolean pPersistOrderForTransientUsers)
Sets the persistOrderForTransientUsers. If the flag is true, then transient order will be saved for transient users. This flag is only user persistOrder method.

Parameters:
pPersistOrderForTransientUsers -
See Also:
persistOrder()

addPriceListParameter

public java.util.Map addPriceListParameter(java.util.Map pExtraParameters)
This method adds the environment's current price list to the extra parameter map that's used for pricing operations in CSR.

In Commerce, the price list passed in the with parameter map overrides the default behavior of using the order's owner's price list.

This is how we force the pricing operation to use the environment's current price list rather than the order's owner's price list.

The price list is added only if price lists are being used and there's not an entry already in the map for the price list.

Parameters:
pExtraParameters - the extra parameters map in which to add the price list parameter. if null, a new map is created.
Returns:
the map with the price list added

addItemToCollection

public void addItemToCollection(atg.repository.RepositoryItem pItem,
                                atg.repository.RepositoryItem pItemToAdd,
                                java.lang.String pPropertyName)
                         throws atg.repository.RepositoryException,
                                atg.beans.PropertyNotFoundException
Adds an item from a collection property.

This method will get the item for update, add the item to the collection property and call updateItem.

The caller is responsible for demarcating transaction boundries.

Parameters:
pItem - the item that contains the map
pItemToAdd - the item that will be added to the map
pPropertyName - the name of the property containing the map
Throws:
RepositoryException, - PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException

addItemToMap

public void addItemToMap(atg.repository.RepositoryItem pItem,
                         atg.repository.RepositoryItem pItemToAdd,
                         java.lang.Object pKey,
                         java.lang.String pPropertyName)
                  throws atg.repository.RepositoryException,
                         atg.beans.PropertyNotFoundException
Adds an item to a map property.

This method will get the item for update, add the map entry and call updateItem.

The caller is responsible for demarcating transaction boundries.

Parameters:
pItem - the item that contains the map
pItemToAdd - the item that will be added to the map
pKey - the key to the item in the map
pPropertyName - the name of the property containing the map
Throws:
RepositoryException, - PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException

addItemToProperty

public void addItemToProperty(atg.repository.RepositoryItem pItem,
                              atg.repository.RepositoryItem pItemToSet,
                              java.lang.String pPropertyName)
                       throws atg.repository.RepositoryException,
                              atg.beans.PropertyNotFoundException
Puts an item in an item's single valued property.

This method will get the item for update, set the property to the new item and call updateItem.

The caller is responsible for demarcating transaction boundries.

Parameters:
pItem - the item that contains a reference to the new item.
pItemToSet - the item that will be set on the property
pPropertyName - the name of the property that should be modified.
Throws:
RepositoryException, - PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException

removeItemFromProperty

public void removeItemFromProperty(atg.repository.RepositoryItem pItem,
                                   java.lang.String pPropertyName)
                            throws atg.repository.RepositoryException,
                                   atg.beans.PropertyNotFoundException
Removes a reference to an item by setting the property to null.

Parameters:
pItem -
pPropertyName -
Throws:
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException

createNewAgentOrderCommentItem

public atg.repository.MutableRepositoryItem createNewAgentOrderCommentItem()
                                                                    throws atg.repository.RepositoryException
Creates a new transient comment item in the order repository

Returns:
the new transient comment item
Throws:
atg.repository.RepositoryException

createOrderComment

public atg.repository.RepositoryItem createOrderComment(atg.commerce.order.Order pOrder,
                                                        atg.repository.RepositoryItem pCustomerProfile,
                                                        atg.repository.RepositoryItem pAgentProfile,
                                                        java.lang.String pComment,
                                                        java.lang.String pTicketId)
                                                 throws atg.repository.RepositoryException
Creates a new comment item for the given order.

Parameters:
pOrderId - the order that will own the comment
pComment - the comment data
pCustomerProfile - the customer profile associated with the order.
pAgentProfile - the agent that made the comment.
Returns:
the comment repository item.
Throws:
atg.repository.RepositoryException

findDuplicateUser

public atg.repository.RepositoryItem findDuplicateUser(java.util.Dictionary pValues)
                                                throws atg.repository.RepositoryException
This methods will attempt to find a profile based on the properties specfied by the duplicatProfileProperties property. The value for each property is extracted from the dictionary and used to query the profile repository.

Parameters:
pValues - the dictionary of profile property values
Returns:
a RepositoryItem, if one is found by the query.
Throws:
atg.repository.RepositoryException

findItemsNotInPriceList

public java.util.Collection findItemsNotInPriceList(java.util.Collection pCommerceItems,
                                                    atg.repository.RepositoryItem pPriceList)
Finds the commerce items in the collection that cannot be priced using the provided price list.

Parameters:
pCommerceItems -
pPriceList -
Returns:
Collection of commerce items that couldn't be priced using the price list.

getPropertyValue

protected java.lang.Object getPropertyValue(java.util.Dictionary pValues,
                                            java.lang.String pName)
Gets the value corresponding to the given name in the given dictionary

Parameters:
pValues - the value dictionary
pName - the key to get
Returns:
the value corresponding to the key

removeItemFromCollection

public void removeItemFromCollection(atg.repository.RepositoryItem pItem,
                                     java.lang.String pPropertyName,
                                     atg.repository.RepositoryItem pRemoveItem)
                              throws atg.repository.RepositoryException,
                                     atg.beans.PropertyNotFoundException
Removes an item from a collection property.

This method will get the item for update, remove the item from the collection and call updateItem.

The caller is responsible for demarcating transaction boundries.

Parameters:
pItem - the item that contains the map
pPropertyName - the name of the collection property
pItem - the item to remove from the collection
Throws:
RepositoryException, - PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException

removeItemFromMap

public void removeItemFromMap(atg.repository.RepositoryItem pItem,
                              java.lang.String pPropertyName,
                              java.lang.Object pKey)
                       throws atg.repository.RepositoryException,
                              atg.beans.PropertyNotFoundException
Removes an item from a map property.

This method will get the item for update, remove the map entry and call updateItem.

The caller is responsible for demarcating transaction boundries.

Parameters:
pItem - the item that contains the map
pPropertyName - the name of the property containing the map
pKey - the key to the item in the map
Throws:
RepositoryException, - PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException

repriceOrder

public void repriceOrder(java.lang.String pRepricingOperation,
                         atg.commerce.order.Order pOrder,
                         atg.commerce.pricing.PricingModelHolder pUserPricingModels,
                         java.util.Locale pLocale,
                         atg.repository.RepositoryItem pCustomerProfile,
                         atg.repository.RepositoryItem pAgentProfile,
                         java.util.Map pExtraParameters,
                         atg.commerce.util.PipelineErrorHandler pErrorHandler)
                  throws atg.commerce.CommerceException
Reprices an order.

If price lists are active, the agent's price list is used to reprice the order. However, this happens only if the price list is not already in the extra parameters map.

The caller is responsible for doing an update order and establishing transaction boundaries.

Parameters:
pRepricingOperation - the pricing operator to perform
pOrder - the order to reprice
pUserPricingModels - the pricing models to use in repricing
pLocale - the locale
pCustomerProfile - the customer profile object
pAgentProfile - the agent profile
pExtraParameters - extra parameters passed to the pricing operation
pErrorHandler - handler of pipeline errors.
Throws:
atg.commerce.CommerceException
See Also:
addPriceListParameter(Map)

setPropertiesOfOrderComment

protected void setPropertiesOfOrderComment(atg.repository.MutableRepositoryItem pComment,
                                           java.lang.String pCommentData,
                                           java.util.Date pCreationDate,
                                           java.lang.String pOwnerId,
                                           atg.repository.RepositoryItem pAgent)
Sets the properties of an order comment item

Parameters:
pComment - the mutable comment item
pCommentData - the comment data
pCreationDate - the creation date
pOwnerId - the owner of the comment item
pAgent - the agent that created the comment

validateCreditCardExpiration

public boolean validateCreditCardExpiration(java.lang.String pMonth,
                                            java.lang.String pYear)
Validates a credit card expiration date

Parameters:
pMonth - the month of expiration
pYear - the year of expiration
Returns:
true if the month and year validate

validateCreditCardNumber

public boolean validateCreditCardNumber(java.lang.String pCreditCardNumber)
Validates a credit card number

Parameters:
pCreditCardNumber -
Returns:
true if number validates

maskCreditCardNumber

public java.lang.String maskCreditCardNumber(java.lang.String pCreditCardNumber)
Masks a credit card number.

Parameters:
pCreditCardNumber - the credit card number to mask
Returns:
the masked credit card number
See Also:
NumberFormat.formatCreditCardNumber(String)

populateCustomerProfileFromAddress

public void populateCustomerProfileFromAddress(atg.repository.RepositoryItem pProfile,
                                               atg.repository.RepositoryItem pAddress)
                                        throws atg.repository.RepositoryException
Populates a profile from the information captured in the address.

This implementation copies the first name and last name from the address.

Parameters:
pProfile - the profile to populate
pAddress - the address from which to populate
Throws:
atg.repository.RepositoryException

setAddressFirstAndLastNameFromProfile

public void setAddressFirstAndLastNameFromProfile(atg.repository.RepositoryItem pAddress,
                                                  atg.repository.RepositoryItem pProfile)
                                           throws atg.repository.RepositoryException
Sets the address first name and last name to the values in the profile.

The update occurs only if the values have not yet been set.

Parameters:
pAddress - the address repository item
pProfile - the profile
Throws:
atg.repository.RepositoryException

initializeDefaultAddresses

public void initializeDefaultAddresses(atg.repository.RepositoryItem pProfile,
                                       java.lang.String pDefaultShippingAddressPropertyName,
                                       java.lang.String pDefaultBillingAddressPropertyName,
                                       boolean pCloneDefaultShippingForBilling)
                                throws atg.repository.RepositoryException
Initializes the default shipping and default billing addresses for the profile.

The defaulShipping is cloned for the defaultBilling if the param pCloneDefaultShipping is true.

If the default address isn't empty, and the first name and last name haven't been set, they are set to the profile's first and last name.

Parameters:
pProfile - the affected profile.
pDefaultShippingAddressPropertyName - the name of the profile property containing the default shipping address
pDefaultBillingAddressPropertyName - the name of the profile property containing the default billing address
pCloneDefaultShippingForBilling - determines if the default shipping address is cloned for the default billing address
Throws:
atg.repository.RepositoryException
See Also:
getCloneDefaultShippingInfoExcludedProperties(), getCloneDefaultShippingInfoPropExceptions()

getCloneDefaultShippingInfoPropExceptions

protected java.util.Map getCloneDefaultShippingInfoPropExceptions()
Returns the Hierarchical map of property name exceptions that are used when doing a deep clone of the default shipping address.

This method is used to determine the prop exceptions when cloning the defaultShippingAddress.

By default this method returns null. Extend this method to provide a map to the cloning process.

Returns:
the Hierarchical map of property name exceptions
See Also:
#initializeDefaultAddresses(RepositoryItem, boolean, Map, Map)

getCloneDefaultShippingInfoExcludedProperties

protected java.util.Map getCloneDefaultShippingInfoExcludedProperties()
Returns the map of properties that should be excluded from the clone of the default shipping address

This method is used to determine the excluded properties when cloning the defaultShippingAddress.

Returns:
the map of properties that should be excluded from the clone
See Also:
By default this method returns null. Extend this method to provide a map to the cloning process.

addOrderPromotionsToHolder

public void addOrderPromotionsToHolder(atg.commerce.order.Order pOrder,
                                       atg.commerce.pricing.PricingModelHolder pPricingModelHolder)
Adds the promotions that are associated with the order to the pricing model holder.

Parameters:
pOrder -
pPricingModelHolder -
See Also:
PromotionTools.getOrderPromotions(Order, Collection, Collection, Collection, Collection)

isOrderIncomplete

public boolean isOrderIncomplete(atg.commerce.order.Order pOrder)
Determines if an order is incomplete based on the states defined in the incompleteOrderStates property.

Parameters:
pOrder -
Returns:
true if the order is considered incomplete.

isOrderSubmitted

public boolean isOrderSubmitted(atg.commerce.order.Order pOrder)
Determines if an order is submitted based on the states defined in the submittedOrderStates property.

Parameters:
pOrder -
Returns:
true if the order is considered incomplete.

isCloneEditState

public boolean isCloneEditState(atg.commerce.order.Order pOrder)
returns true if the order should use the clone edit handlers for editing.

Parameters:
pOrder -
Returns:
true if the order is in a state that should be cloned for editing.

claimCouponForSubmittedOrder

public void claimCouponForSubmittedOrder(CloneEditState pCloneEditState,
                                         java.lang.String pClaimCode,
                                         atg.commerce.order.Order pOrder,
                                         atg.repository.RepositoryItem pCustomerProfile,
                                         atg.repository.RepositoryItem pAgentProfile,
                                         SubmittedOrderPricingModelHolder pSubmittedOrderPricingModelHolder,
                                         java.lang.String pRepricingOperation,
                                         java.util.Locale pUserLocale,
                                         java.util.Map pExtraParametersMap)
                                  throws atg.repository.RepositoryException,
                                         atg.commerce.claimable.ClaimableException,
                                         atg.commerce.promotion.PromotionException,
                                         atg.commerce.CommerceException
Claims a coupon for use with an already submitted order

The coupon is claimed, the promotion is granted, the submitted order pricing model holder is updated, the order is repriced and, if the promotions was applied to the order, it is immediately consumed.

Parameters:
pClaimCode - the claim code for the coupon
pOrder - the submitted order that the coupon is being claimed for
pCustomerProfile - the customer profile item
pAgentProfile - the agent profile item
pSubmittedOrderPricingModelHolder - the pricing model holder that is used for repricing the order
pRepricingOperation - the pricing operation used to reprice the order.
pUserLocal - the user locale
pExtraParametersMap - the extra parameters map passed to the repricing operation
Throws:
atg.repository.RepositoryException
atg.commerce.claimable.ClaimableException
atg.commerce.promotion.PromotionException
atg.commerce.CommerceException

persistCurrentOrder

public boolean persistCurrentOrder()
                            throws atg.commerce.CommerceException
This method saves the current order to the repository if it is transient.

If the active customer is transient, the order is saved depending on the configuration of the persistOrderForTransientUsers property.

Returns:
true if the order was added to the repository.
Throws:
atg.repository.RepositoryException
atg.commerce.CommerceException

convertLocale

public java.util.Locale convertLocale(java.lang.Object pLocale)
Convert an object to a Locale. This method handles conversion of locale Strings and passes through Locale objects.

Parameters:
pLocale -
Returns:
a Locale object or null

getActiveCustomerPricingLocale

public java.util.Locale getActiveCustomerPricingLocale()
Get the locale to be for pricing. This method first attempts to get the locale from the current price list. If that is not available, uses the locale from the active customer's profile, if this value is null, uses the current request locale (if 'useRequestLocale' is true). Finally, if locale is null, returns pricingTools.defaultLocale.

Returns:
a locale for pricing

getActiveCustomerDecimalFormatSymbols

public java.text.DecimalFormatSymbols getActiveCustomerDecimalFormatSymbols()
Get the DecimalFormatSymbols from the active customer's pricing local, or if that's unavailable, from the PricingTools.defaultLocale property.

See Also:
PricingTools.getDefaultLocale()

claimCoupon

public void claimCoupon(java.lang.String pClaimCode,
                        java.lang.String pSubmittedOrderPricingOperation,
                        java.util.Map pRepricePrameterMap)
                 throws atg.commerce.claimable.ClaimableException,
                        atg.commerce.CommerceException,
                        atg.repository.RepositoryException
If the order hasn't been submitted yet, the ClaimableManager is called to claim the coupon. Otherwise, the coupon is claimed for the submitted order with claimCouponForSubmittedOrder().

Parameters:
pCustomerProfile - the customer profile
pClaimCode - the coupon claim code
pSubmittedOrderPricingOperation -
pUserLocale -
pRepricePrameterMap -
Throws:
atg.commerce.claimable.ClaimableException
atg.commerce.CommerceException
atg.repository.RepositoryException
See Also:
ClaimableManager.claimCoupon(String, String), CSRAgentTools#claimCouponForSubmittedOrder(String, Order, RepositoryItem, RepositoryItem, SubmittedOrderPricingModelHolder, String, Locale, Map)

copyContactInfoToCreditCard

public void copyContactInfoToCreditCard(atg.core.util.Address pExistingAddress,
                                        atg.commerce.order.CreditCard pCreditCard)
                                 throws atg.commerce.CommerceException
This method copies the given address to the CreditCard object.

Throws:
atg.commerce.CommerceException

copyContactInfoToCreditCard

public void copyContactInfoToCreditCard(atg.repository.RepositoryItem pExistingAddress,
                                        atg.commerce.order.CreditCard pCreditCard)
                                 throws atg.commerce.CommerceException
This method copies the given address to the CreditCard object.

Throws:
atg.commerce.CommerceException

sendAutomaticConfirmation

public boolean sendAutomaticConfirmation(atg.commerce.order.Order pOrder,
                                         atg.repository.RepositoryItem pProfile)
                                  throws atg.userprofiling.email.TemplateEmailException
Send an automatic confirmation message. This uses the Email Address property from the customer profile as the recipient To Address on the message.

Parameters:
pOrder - - the completed order.
pProfile - - the Customer Profile
Returns:
- True if the automatic message was sent, false otherwise.
Throws:
atg.userprofiling.email.TemplateEmailException - - if an error occurs sending the message.

sendConfirmationEmail

public void sendConfirmationEmail(atg.commerce.order.Order pOrder,
                                  atg.repository.RepositoryItem pProfile,
                                  java.lang.String pToAddress)
                           throws atg.userprofiling.email.TemplateEmailException
Use the Template Email Sender to send a confirmation message for a given order. The email template used is retrieved from Window scope using the TEMPLATE_WINDOW_SCOPE_KEY attribute..

Parameters:
pOrder - - the completed order.
pProfile - - the Customer Profile
pToAddress - - the address the message is sent to.
Throws:
atg.userprofiling.email.TemplateEmailException - - if an error occurs sending the message.

generateConfirmationTemplateDefaultParams

public java.util.Map generateConfirmationTemplateDefaultParams(atg.commerce.order.Order pOrder,
                                                               atg.repository.RepositoryItem pProfile)
Wrap the Order and Profile paramaters in an OrderModified event. This is the same format used for all other Commerce emails, so keep things consistent.

Parameters:
pOrder - - an order
pProfile - - a customer profile
Returns:

getConfirmationTemplateToUse

public java.lang.String getConfirmationTemplateToUse()
Retrieves the current confirmation message template name from Window Scope.

Returns:
the Email Template name.

setConfirmationTemplateToUse

public void setConfirmationTemplateToUse(java.lang.String pTemplateToUse)
Saves the template name in window scope so that it can be retrieved at a later time. If the parameter is empty, the template name attribute is removed from Window Scope.

Parameters:
pTemplateToUse - - the Email Template name.

getCurrentReturnRequest

public ReturnRequest getCurrentReturnRequest()
This method gets the return request from the current order.

Returns:

getProgressBar

public atg.progressbar.ProgressBarItem getProgressBar(java.lang.String pPath)
Resolves the requested progress bar

Returns:
ProgressBarItem

getClaimableItem

public atg.repository.RepositoryItem getClaimableItem(java.lang.String pId)
                                               throws atg.repository.RepositoryException
Return the repository item from the claimable repository whose id is equal to pId. The repository and item descriptors specified by the ClaimableRepository and ClaimableItemDescriptorName properties are used to perform the search.

Throws:
atg.repository.RepositoryException

createCreditCardInfo

public atg.payment.creditcard.CreditCardInfo createCreditCardInfo(atg.repository.RepositoryItem pCreditCard)
                                                           throws atg.repository.RepositoryException,
                                                                  java.beans.IntrospectionException
Create a (Generic)CreditCardInfo instance from a credit card repository item

Throws:
atg.repository.RepositoryException
java.beans.IntrospectionException

collectUniqueExistingAddresses

public java.util.List collectUniqueExistingAddresses(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
                                                     atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer,
                                                     atg.commerce.order.Order pOrder)
This method gets the unique addresses from the ShippingGroupMapContainer and PaymentGroupMapContainer and Order. This method iterates through ShippingGroupMapContainer.shippingGroupMap, PaymentGroupMapContainer.paymentGroupMap and Order's shipping groups and payments and collects all unique addresses.

Parameters:
pOrder -
Returns:

removeDeletedShippingGroups

public void removeDeletedShippingGroups(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
                                        java.util.List pRemovedEntries)
Some shipping groups are deleted from the repository. If the items are removed from the repository, we should remove the entries from the ShippingGroupMapContainer.This method removes the entries from ShippingGroupMapContainer.

Parameters:
pShippingGroupMapContainer -
pRemovedEntries -

removeDeletedPaymentGroups

public void removeDeletedPaymentGroups(atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer,
                                       java.util.List pRemovedEntries)
Some payment groups are deleted from the repository. If the items are removed from the repository, we should remove the entries from the PaymentGroupMapContainer. This method removes the entries from PaymentGroupMapContainer.

Parameters:
pPaymentGroupMapContainer -
pRemovedEntries -

findMatchingAddress

public int findMatchingAddress(java.lang.Object pAddress,
                               java.util.List pAddressList)
This method iterates through all available addresses and finds the matching address in the list of available addresses and returns the matching or equivalent address that is in the available address list. In the Create and Update CreditCard UI page, we need to list all list of available addresses. While listing all available addresses, we need to omit duplicate addresses.

Parameters:
pAddress -
Returns:
Address Matching address.

findPropertyChanges

public void findPropertyChanges(java.lang.Object pNewValues,
                                java.lang.Object pOldValues,
                                java.lang.String[] pPropertyNames,
                                java.util.List pUpdates)
                         throws javax.servlet.ServletException
This method finds all property information changes.

Parameters:
pNewValues -
pOldValues -
pPropertyNames -
pUpdates -
Throws:
javax.servlet.ServletException

associateTicketAndOrder

public boolean associateTicketAndOrder(java.lang.String pOrderId,
                                       atg.repository.MutableRepositoryItem pTicket)
                                throws atg.ticketing.TicketingException
This method associates a given or current active ticket to the order that is passed in. This method basically updates the orders property of a ticket with the new order.

Parameters:
pOrderId - -- The order that need to be associated with a ticket.
pTicket - -- This is optional property. If this parameter is null, then current active ticket is taken from the EnvironmentTools
Throws:
atg.ticketing.TicketingException
See Also:
EnvironmentTools.getInstance().getActiveTicket()