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.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, 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 APPROVAL_ACCEPTED
          the name of the confirmation email template for approving an order
static java.lang.String APPROVAL_REJECTED
          the name of the confirmation email template for rejecting an order
static java.lang.String BYPASS_EXPIRED_PROMOTIONS_CHECK_PIPELINE_PARAM
          The extra parameter name used to bypass the expired promotions checks in the processOrder pipeline
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String CSC_BYPASS_PAYMENT_AUTHORIZATIONS_PIPELINE_PARAM
          The name used to pass the bypassPaymentAuthorizations flag through the extra parameter map to the pipeline executions
static java.lang.String CSC_CURRENTTICKET_PIPELINE_PARAM
          The name used to pass the current ticket through the extra parameter map to the pipeline executions.
static java.lang.String CSR_ORDER_RESOURCE_NAME
           
static java.lang.String DEFAULT_BASE_PROMOTION_STATES_PATH
           
static java.lang.String DEFAULT_WALLET_HOLDER_PATH
          Default location of promotions browser components if not overridden in configuration
static java.lang.String DEFAULT_WALLET_PROMOTION_STATES_PATH
           
protected  java.lang.String mBasePromotionStatesPath
           
protected  CSRCloneEditManager mCloneEditManager
           
protected  java.lang.String[] mCloneEditOrderStates
           
protected  java.lang.String[] mCommerceItemHighlightedStates
           
protected  atg.commerce.order.CommerceItemManager mCommerceItemManager
           
protected  atg.nucleus.ServiceMap mConfirmationEmailMap
           
protected  CSREnvironmentTools mCSREnvironmentTools
           
protected  atg.svc.agent.customer.CustomerProfileTools mCustomerProfileTools
           
protected  java.util.Map mDuplicateOrderExcludedOrderPropertiesMap
           
protected  java.util.Properties mDuplicateOrderExcludedProperties
           
protected  java.lang.String[] mFulfilledOrderStates
           
protected  atg.web.messaging.MessageTools mMessageTools
           
protected  boolean mMultiSiteEnabled
           
protected  java.lang.String[] mNonModifiableOrderStates
           
protected  java.lang.String[] mNonModifiablePaymentGroupStates
           
protected  java.lang.String[] mOrderHighlightedStates
           
protected  java.lang.String[] mPaymentGroupHighlightedStates
           
protected  boolean mPersistConfirmationEmails
           
protected  atg.commerce.pricing.PricingTools mPricingTools
           
protected  atg.userprofiling.PropertyManager mProfilePropertyManager
           
protected  ReturnTools mReturnTools
           
protected  java.lang.String mSalePriceListPropertyName
           
protected  boolean mSendEmailInSeparateThread
           
static java.lang.String MSG_CONFIRMATION_EMAIL_SENT
           
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  java.lang.String[] mShipItemRelationshipHighlightedStates
           
protected  java.lang.String[] mShippingGroupHighlightedStates
           
protected  java.lang.String[] mShippingGroupShippedStates
           
protected  atg.multisite.SiteContextManager mSiteContextManager
           
protected  atg.multisite.SiteManager mSiteManager
           
protected  java.lang.String[] mSubmittedOrderStates
           
protected  atg.userprofiling.email.TemplateEmailSender mTemplateEmailSender
           
protected  java.lang.String mWalletHolderPath
           
protected  java.lang.String mWalletPromotionStatesPath
           
static java.lang.String NEW_ORDER_TEMPLATE_NAME
          The confirmation template name used for new orders
static java.lang.String ORDER_EXCHANGE_TEMPLATE_NAME
          The confirmation template name used for order exchanges
static java.lang.String ORDER_RETURN_TEMPLATE_NAME
          The confirmation template name used for order returns
static java.lang.String ORDER_UPDATE_TEMPLATE_NAME
          The confirmation template name used for order updates
static java.lang.String SCHEDULE_ADD_TEMPLATE_NAME
          the name of the confirmation email template for adding a new scheduled order
static java.lang.String SCHEDULE_UPDATE_TEMPLATE_NAME
          the name of the confirmation email template for updating a scheduled order
static java.lang.String SCHEDULED_ORDER_UPDATE_TEMPLATE_NAME
          The confirmation template name used for scheduled order updates
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, sBundle
 
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
 java.util.Map addBypassExpiredPromotionsCheckParameter(java.util.Map pExtraParameters)
          Adds the parameter that will cause the processOrder pipeline to skip the check for expired promotions
 java.util.Map addBypassPaymentGroupAuthorizationParameter(java.util.Map pExtraParameters)
          Adds the parameter that will cause the processOrder pipeline to skip payment group authorization
 java.util.Map addBypassPromotionVetoersParameter(java.util.Map pExtraParameters)
          Adds the extra parameter that disables the promotion vetoers during pricing
 java.util.Map addCurrentOrderPricingParameters(java.util.Map pExtraParameters)
          Adds all the extra parameters used for pricing operations against the current Order.
 java.util.Map addCurrentTicketParameter(java.util.Map pExtraParameters)
          Adds the current ticket to the extra parameter map
 java.util.Map addItemPriceSourceParameter(java.util.Map pExtraParameters, java.util.List pPricingOverrides)
          Adds the pricing extra parameter for the given list of ItemPriceSource
 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.
 java.util.Map addListPriceListParameter(java.util.Map pExtraParameters, atg.repository.RepositoryItem pListPriceList)
          Adds the given pricelist as the list pricelist to the extra parameter map
 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 and sale price list to the extra parameter map that's used for pricing operations in CSR.
 java.util.Map addSalePriceListParameter(java.util.Map pExtraParameters, atg.repository.RepositoryItem pSalePriceList)
          Adds the given pricelist as the sale pricelist to the extra parameter map
 boolean areAllGroupsShipped(atg.commerce.order.Order pOrder, java.lang.String[] pShippingGroupShippedStates)
          Returns true if all ShippingGroups in the Order are in a "shipped".
 boolean areAnyItemsShipped(atg.commerce.order.Order pOrder)
          Returns true if any ShippingGroupCommerceItemRelationship in the Order has a state of "DELIVERED"
 boolean arePriceOverrides(atg.commerce.order.Order pOrder)
          Returns true if there are any agent applied price overrides on the order
 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 pPostClaimPricingOperation, java.util.Map pRepriceParameterMap)
          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
protected  java.util.Map createDuplicateOrderPropExceptionsMap()
          This method is a helper method which is used by the duplicateOrder method.
 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.
 java.util.Map createPromotionValueMap(atg.commerce.order.Order pOrder, boolean pIncludeOrderPromos, boolean pIncludeItemPromos, boolean pIncludeShippingPromos, boolean pIncludeTaxPromos)
          Creates a map of promotion id to adjustment value for each promotion applied to the given order.
 atg.commerce.order.Order duplicateOrder(java.lang.String pOrderId, java.util.Map pPropExceptions, java.util.Map pExcludedProperties)
          Duplicates an order into a new incomplete order.
 void ensureOrderAmountRemainingType(atg.commerce.order.purchase.CommerceIdentifierPaymentInfoContainer pCommerceIdentifierPaymentInfoContainer, atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer)
          Inspects the OrderPaymentInfos in the container and attempts to ensure one of them has an ORDER_AMOUNT_REMAINING relationship type.
 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.lang.String formatAmount(double pAmount, java.lang.String pCurrencyCode)
          Formats the given input amount value as a string using the given currency and the agent's display locale.
 java.util.Map generateConfirmationTemplateDefaultParams(ConfirmationInfo pConfirmationInfo)
          Creates a map with the confirmation info object added using the key defined by the constant CONFIRMATIONEMAIL_PARAM_NAME
 java.util.Map generateConfirmationTemplateDefaultParams(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile)
          Deprecated.  
 java.lang.String getActiveCustomerCurrencyCode()
          Get the ISO 4217 currency code for pricing (e.g.
 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 getActiveCustomerDisplayLocale()
          Returns the active customer's display locale
 java.util.Locale getActiveCustomerPricingLocale()
          Returns the current pricing locale
 java.lang.String getAgentDefaultSiteId()
          This method is used to get the agents' site.
 atg.commerce.pricing.PricingAdjustment getAgentOverrideDetail(atg.commerce.order.CommerceItem pItem)
          Deprecated. in favor of getAgentOverrideDetails which return all details when there is more than one.
 java.util.List getAgentOverrideDetails(atg.commerce.order.CommerceItem pItem)
          Returns the PricingAdjustments put on by CSC when an agent overrides the price.
 java.lang.String getBasePromotionStatesPath()
          Provides a handle to the base promotion states
 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()
           
 java.lang.String[] getCloneEditOrderStates()
           
 java.lang.String[] getCommerceItemHighlightedStates()
          Returns the commerce item states that should appear highlighted in the UI
 atg.commerce.order.CommerceItemManager getCommerceItemManager()
           
 atg.commerce.profile.CommercePropertyManager getCommercePropertyManager()
           
 atg.nucleus.ServiceMap getConfirmationEmailMap()
          Gets the ConfirmationEmailMap
 java.lang.String getConfirmationTemplateToUse()
          Deprecated.  
 CSRAgentMessagingTools getCSRAgentMessagingTools()
          Get the AgentMessagingTools cast to CSRAgentMessagingTools
 CSRConfigurator getCSRConfigurator()
           
 CSREnvironmentTools getCSREnvironmentTools()
           
 java.lang.String getCurrencyForPriceList(atg.repository.RepositoryItem pPricelist)
          returns the currency for the given price list
 java.lang.String getCurrentOrderCurrencySymbolInFormattingLocale()
          This method returns the current order's currency symbol in the formatting locale.
 ReturnRequest getCurrentReturnRequest()
          This method gets the return request from the current order.
 atg.svc.agent.customer.CustomerProfileTools getCustomerProfileTools()
           
 java.util.Map getDuplicateOrderExcludedOrderPropertiesMap()
          Generates an the excluded property map based on the duplicateOrderExcludedProperties property.
 java.util.Properties getDuplicateOrderExcludedProperties()
          Returns the excluded order properties when duplicating an order
 java.lang.String[] getDuplicateProfileProperties()
           
 java.lang.String[] getFulfilledOrderStates()
           
 java.lang.String[] getIncompleteOrderStates()
           
 atg.web.messaging.MessageTools getMessageTools()
          Returns the MessageTools component
 java.lang.String[] getNonModifiableOrderStates()
          Returns the order states in which an order cannot be modified
 java.lang.String[] getNonModifiablePaymentGroupStates()
          Returns the payment group states in which a payment group cannot be modified
 java.lang.String getOrderCommentItemDescriptorName()
           
 java.lang.String[] getOrderHighlightedStates()
          Returns the order states that should appear highlighted in the UI
 atg.commerce.order.OrderManager getOrderManager()
          The OrderManager component that will be used to create a new, empty order
 java.lang.String[] getPaymentGroupHighlightedStates()
          Returns the payment group states that should appear highlighted in the UI
 atg.commerce.pricing.priceLists.PriceListManager getPriceListManager()
           
 atg.commerce.pricing.PricingTools getPricingTools()
           
 java.lang.String getPricingToolsDefaultCurrencySymbolInFormattingLocale()
          This method gets the currency symbol based on PricingTools.getDefaultLocale() and then returns the currency symbol in the user's formatting locale.
 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
 double getRemainingAmount(atg.repository.RepositoryItem pClaimable)
          This method returns the remaining amount for the Store Credit and Gift Certificate.
This method supports only store credit and gift certificates.
 ReturnTools getReturnTools()
           
 java.lang.String getSalePriceListPropertyName()
          Returns the name of the profile property used for holding the sale price list
 atg.commerce.csr.scenario.MessageDispatcher getScenarioMessageDispatcher()
           
 java.lang.String[] getShipItemRelationshipHighlightedStates()
          Returns the order states that should appear highlighted in the UI
 java.lang.String[] getShippingGroupHighlightedStates()
           
 java.lang.String[] getShippingGroupShippedStates()
          Returns the shipping group states that indicate a shipping group has shipped
 atg.repository.RepositoryItem getSiteCatalog(atg.multisite.Site pSite, atg.repository.RepositoryItem pProfile)
          This method returns catalog for the site only if the multi site is enabled.
 java.util.Collection<atg.repository.RepositoryItem> getSiteCatalogs(java.util.Collection<atg.multisite.Site> pSites, atg.repository.RepositoryItem pProfile)
          This method returns catalogs only if the multi site is enabled.
 java.util.Collection<atg.repository.RepositoryItem> getSiteCatalogs(java.lang.String[] pSiteIds, atg.repository.RepositoryItem pProfile)
          This method returns site catalogs.
 atg.multisite.SiteContextManager getSiteContextManager()
          Returns the siteContextManager
 atg.multisite.SiteManager getSiteManager()
          Returns the siteManager
 java.lang.String[] getSubmittedOrderStates()
           
 atg.userprofiling.email.TemplateEmailSender getTemplateEmailSender()
          Gets the TemplateEmailSender
 java.lang.String getTicketOrdersPropertyName()
          Returns the ticketOrdersPropertyName.
 double getTotalAppeasementValue(atg.commerce.order.Order pOrder)
          Returns the total value of agent applied appeasements (credits) on the given Order.
 double getTotalManualAdjustmentValue(atg.commerce.order.Order pOrder)
          Returns the total value of the manual adjustments applied to the order.
 double getTotalManualAppeasementValue(atg.commerce.order.Order pOrder)
          Returns the total value of manual adjustments if they sum to a credit value.
 double getTotalPriceOverrideAppeasementValue(atg.commerce.order.Order pOrder)
          Returns the total appeasement(credit) value of item price overrides on the given Order.
 double getTotalPriceOverrideValue(atg.commerce.order.Order pOrder)
          Returns the total value of item price overrides on the given Order.
 java.lang.String getUserResource(java.lang.String pKey, java.lang.Object[] pMsgArgs, java.util.Locale pLocale)
          Returns a resource from the user resource bundle
 java.lang.String getValidatePaymentGroupsChainId()
          Return the ValidatePaymentGroupsChainId property.
 java.lang.String getWalletHolderPath()
          Provides a handle to the wallet for the current request
 java.lang.String getWalletPromotionStatesPath()
          Provides a handle to the wallet promotion states
 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 isAgentOverridePrice(atg.commerce.order.CommerceItem pItem)
          Determines if the item has been priced with an agent override price.
 boolean isAllowCloningContactInfo()
           
 boolean isCloneEditState()
          This method grabs the order from the current environment and returns true if the order should use the clone edit handlers for editing.
 boolean isCloneEditState(atg.commerce.order.Order pOrder)
          returns true if the order should use the clone edit handlers for editing.
protected  boolean isFulfilledOrderState(java.lang.String pState)
          Determines if the given state is one of the states defined in the fulfilledOrderStates property.
 boolean isHighlightedState(java.lang.Object pCommerceObject)
          Determines if the objects current state is one of the configured highlighted states.
 boolean isMultiSiteEnabled()
          This method decides whether the CSC application supports multi site or not based on the following rules.
 boolean isOrderAdjusted(atg.commerce.order.Order pOrder)
          Returns true if there are any agent applied price overrides or manual adjustments on the order
 boolean isOrderFulfilled(atg.commerce.order.Order pOrder)
          Determines if an order is fulfilled based on the states defined in the fulfilledOrderStates property.
 boolean isOrderFulfilled(atg.repository.RepositoryItem pOrderItem)
          Determines if an order is fulfilled based on the states defined in the fulfilledOrderStates property.
 boolean isOrderIncomplete(atg.commerce.order.Order pOrder)
          Determines if an order is incomplete based on the states defined in the incompleteOrderStates property.
 boolean isOrderIncomplete(atg.repository.RepositoryItem pOrderItem)
          Determines if an order is incomplete based on the states defined in the incompleteOrderStates property.
 boolean isOrderInModifiableState(atg.commerce.order.Order pOrder)
          Returns true if the order is in a modifiable state
 boolean isOrderModifiable(atg.commerce.order.Order pOrder)
          Determines if an order is modifiable
 boolean isOrderSubmitted(atg.commerce.order.Order pOrder)
          Determines if an order is submitted based on the states defined in the submittedOrderStates property.
 boolean isOrderSubmitted(atg.repository.RepositoryItem pOrderItem)
          Determines if an order is submitted based on the states defined in the submittedOrderStates property.
 boolean isOrderSupportedforUpdate(java.lang.Object pOrder)
          Checks if an order has supported payment group types and hence is supported for update.
 boolean isPaymentGroupInModifiableState(atg.commerce.order.PaymentGroup pPaymentGroup)
          Returns true if the payment group is in a modifiable state
 boolean isPersistConfirmationEmails()
          Gets the PersistConfirmationEmails
 boolean isPersistOrderForTransientUsers()
          Returns the persistOrderForTransientUsers.
 boolean isPriceListSameCurrencyAsOrder(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pPricelist)
          Returns true if the order and price list both specify the same currency
 boolean isSendEmailInSeparateThread()
          Returns boolean indicating whether the new account email is sent in a separate thread.
 boolean isTransactionMarkedAsRollBack()
          Returns true if the transaction associated with the current thread is marked for rollback.
 boolean isUseRequestLocale()
          Returns property UseRequestLocale
 java.lang.String maskCreditCardNumber(java.lang.String pCreditCardNumber)
          Masks a credit card number.
 void overrideItemPrice(atg.commerce.order.CommerceItem pItem, double pNewAmount, atg.commerce.order.Order pOrder, java.util.Locale pUserLocale, java.lang.String pTicketId)
          Overrides the price of the given commerce item to the new amount.
protected  void overridePriceInfoAmount(atg.commerce.pricing.AmountInfo pAmountInfo, double pNewAmount, double pTotalAdjustment, long pQuantity, java.lang.String pReasonDescription)
          Overrides the price of the given price info, marks it as final, clears the pricing adjustments and adds a new PricingAdjustment for the overriden price.
 void overrideShippingPrice(atg.commerce.order.ShippingGroup pShippingGroup, double pNewAmount, atg.commerce.order.Order pOrder, java.util.Locale pUserLocale, java.lang.String pTicketId)
          Overrides the price of the given shipping group to the new amount.
 java.lang.Double parseAmount(java.lang.String pAmount, java.lang.String pCurrencyCode)
          Parses the given input amount value using the given currency and the agent's display locale.
static java.util.Collection parseString(java.lang.String pString)
          Parse a String which is delimited by "|" into a collection of strings.
 boolean persistCurrentOrder()
          This method saves the current order to the repository for both transient and non-transient orders.
 void populateAnonymousCustomerProfileFromOrder(atg.repository.RepositoryItem pProfile, atg.commerce.order.Order pOrder)
          Populates properties of the profile from information contained on the order.
 void populateAnonymousCustomerProfileFromOrder(atg.repository.RepositoryItem pProfile, atg.repository.RepositoryItem pOrder)
          Populates properties of the profile from information contained on the order.
 void populateCustomerProfileFromAddress(atg.repository.RepositoryItem pProfile, atg.repository.RepositoryItem pAddress)
          Populates a profile from the information captured in the address.
 void recreateInitialDetailsForItemMarkedAsFinal(atg.commerce.order.CommerceItem pItem, double pAmount, java.util.Locale pUserLocale, atg.repository.RepositoryItem pProfile, java.lang.String pDescription)
          Recreates the detailed price infos for the item that have been marked as final.
 void recreateInitialDetailsForItemsMarkedAsFinal(atg.commerce.order.Order pOrder, java.util.Locale pUserLocale, atg.repository.RepositoryItem pProfile)
          Recreates the item detailed price infos for all items in the order that have been marked as final.
 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.
protected  void resetHandlingInstructionReferences(atg.repository.RepositoryItem pOriginalOrder, atg.repository.RepositoryItem pCloneOrder)
          Resets the commerceItemId and shippingGroupId properties of the clone handling instructions to point at commerce items and shipping groups in the clone order.
protected  void resetReturnInfoForCopy(atg.commerce.order.Order pOrder)
          Resets the refund info in the order's commerce items and their shipping relationships.
 boolean sendAutomaticConfirmation(ConfirmationInfo pConfirmationInfo)
          Send an automatic confirmation message.
 boolean sendAutomaticConfirmation(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile)
          Deprecated.  
 void sendConfirmationEmail(ConfirmationInfo pConfirmationInfo)
          Use the Template Email Sender to send a confirmation email.
 void sendConfirmationEmail(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String pToAddress)
          Deprecated.  
 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 setBasePromotionStatesPath(java.lang.String pBasePromotionStatesPath)
           
 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 setCloneEditOrderStates(java.lang.String[] pCloneEditOrderStates)
          Sets array of order states that indicate that an order should use clone editing when loaded for modifications.
 void setCommerceItemHighlightedStates(java.lang.String[] pCommerceItemHighlightedStates)
           
 void setCommerceItemManager(atg.commerce.order.CommerceItemManager pCommerceItemManager)
           
 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)
          Deprecated.  
 void setCSRConfigurator(CSRConfigurator pCSRConfigurator)
          Sets the CSRConfigurator
 void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)
           
 void setCustomerProfileTools(atg.svc.agent.customer.CustomerProfileTools pCustomerProfileTools)
           
 void setDuplicateOrderExcludedProperties(java.util.Properties pDuplicateOrderExcludedProperties)
          set the property DuplicateOrderExcludedProperties
 void setDuplicateProfileProperties(java.lang.String[] pDuplicateProfileProperties)
          Sets property duplicateNameCheckPropertyNames
 void setFulfilledOrderStates(java.lang.String[] pFulfilledOrderStates)
          Sets array of order states that indicate that an order is fulfilled
 void setIncompleteOrderStates(java.lang.String[] pIncompleteOrderStates)
          Sets array of order states that indicate that an order is incomplete
 void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
           
 void setNonModifiableOrderStates(java.lang.String[] pNonModifiableOrderStates)
           
 void setNonModifiablePaymentGroupStates(java.lang.String[] pNonModifiablePaymentGroupStates)
           
 void setOrderCommentItemDescriptorName(java.lang.String pOrderCommentItemDescriptorName)
          Sets the name of the "comment" item descriptor in the order repository
 void setOrderHighlightedStates(java.lang.String[] pOrderHighlightedStates)
           
 void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
          Sets the OrderManager component that will be used to create a new, empty order
 void setPaymentGroupHighlightedStates(java.lang.String[] pPaymentGroupHighlightedStates)
           
 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 setReturnTools(ReturnTools pReturnTools)
          Sets the return tools
 void setSalePriceListPropertyName(java.lang.String pSalePriceListPropertyName)
           
 void setScenarioMessageDispatcher(atg.commerce.csr.scenario.MessageDispatcher pScenarioMessageDispatcher)
          Component that will send the initializeProfile event
 void setShipItemRelationshipHighlightedStates(java.lang.String[] pShipItemRelationshipHighlightedStates)
           
 void setShippingGroupHighlightedStates(java.lang.String[] pShippingGroupHighlightedStates)
           
 void setShippingGroupShippedStates(java.lang.String[] pShippingGroupShippedStates)
           
 void setSiteContextManager(atg.multisite.SiteContextManager pSiteContextManager)
          Sets the siteContextManager
 void setSiteManager(atg.multisite.SiteManager pSiteManager)
          Sets the siteManager
 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.
 void setWalletHolderPath(java.lang.String pWalletHolderPath)
           
 void setWalletPromotionStatesPath(java.lang.String pWalletPromotionStatesPath)
           
 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, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, 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, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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

CSR_ORDER_RESOURCE_NAME

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

BYPASS_EXPIRED_PROMOTIONS_CHECK_PIPELINE_PARAM

public static final java.lang.String BYPASS_EXPIRED_PROMOTIONS_CHECK_PIPELINE_PARAM
The extra parameter name used to bypass the expired promotions checks in the processOrder pipeline

See Also:
Constant Field Values

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

MSG_CONFIRMATION_EMAIL_SENT

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

NEW_ORDER_TEMPLATE_NAME

public static final java.lang.String NEW_ORDER_TEMPLATE_NAME
The confirmation template name used for new orders

See Also:
Constant Field Values

ORDER_UPDATE_TEMPLATE_NAME

public static final java.lang.String ORDER_UPDATE_TEMPLATE_NAME
The confirmation template name used for order updates

See Also:
Constant Field Values

ORDER_EXCHANGE_TEMPLATE_NAME

public static final java.lang.String ORDER_EXCHANGE_TEMPLATE_NAME
The confirmation template name used for order exchanges

See Also:
Constant Field Values

ORDER_RETURN_TEMPLATE_NAME

public static final java.lang.String ORDER_RETURN_TEMPLATE_NAME
The confirmation template name used for order returns

See Also:
Constant Field Values

SCHEDULED_ORDER_UPDATE_TEMPLATE_NAME

public static final java.lang.String SCHEDULED_ORDER_UPDATE_TEMPLATE_NAME
The confirmation template name used for scheduled order updates

See Also:
Constant Field Values

SCHEDULE_ADD_TEMPLATE_NAME

public static final java.lang.String SCHEDULE_ADD_TEMPLATE_NAME
the name of the confirmation email template for adding a new scheduled order

See Also:
Constant Field Values

SCHEDULE_UPDATE_TEMPLATE_NAME

public static final java.lang.String SCHEDULE_UPDATE_TEMPLATE_NAME
the name of the confirmation email template for updating a scheduled order

See Also:
Constant Field Values

APPROVAL_ACCEPTED

public static final java.lang.String APPROVAL_ACCEPTED
the name of the confirmation email template for approving an order

See Also:
Constant Field Values

APPROVAL_REJECTED

public static final java.lang.String APPROVAL_REJECTED
the name of the confirmation email template for rejecting an order

See Also:
Constant Field Values

CSC_CURRENTTICKET_PIPELINE_PARAM

public static final java.lang.String CSC_CURRENTTICKET_PIPELINE_PARAM
The name used to pass the current ticket through the extra parameter map to the pipeline executions.

See Also:
addCurrentTicketParameter(Map), Constant Field Values

CSC_BYPASS_PAYMENT_AUTHORIZATIONS_PIPELINE_PARAM

public static final java.lang.String CSC_BYPASS_PAYMENT_AUTHORIZATIONS_PIPELINE_PARAM
The name used to pass the bypassPaymentAuthorizations flag through the extra parameter map to the pipeline executions

See Also:
Constant Field Values

DEFAULT_WALLET_HOLDER_PATH

public static final java.lang.String DEFAULT_WALLET_HOLDER_PATH
Default location of promotions browser components if not overridden in configuration

See Also:
Constant Field Values

DEFAULT_BASE_PROMOTION_STATES_PATH

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

DEFAULT_WALLET_PROMOTION_STATES_PATH

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

mCustomerProfileTools

protected atg.svc.agent.customer.CustomerProfileTools mCustomerProfileTools

mSiteContextManager

protected atg.multisite.SiteContextManager mSiteContextManager

mReturnTools

protected ReturnTools mReturnTools

mPaymentGroupHighlightedStates

protected java.lang.String[] mPaymentGroupHighlightedStates

mCommerceItemHighlightedStates

protected java.lang.String[] mCommerceItemHighlightedStates

mOrderHighlightedStates

protected java.lang.String[] mOrderHighlightedStates

mShipItemRelationshipHighlightedStates

protected java.lang.String[] mShipItemRelationshipHighlightedStates

mShippingGroupHighlightedStates

protected java.lang.String[] mShippingGroupHighlightedStates

mDuplicateOrderExcludedProperties

protected java.util.Properties mDuplicateOrderExcludedProperties

mCommerceItemManager

protected atg.commerce.order.CommerceItemManager mCommerceItemManager

mShippingGroupShippedStates

protected java.lang.String[] mShippingGroupShippedStates

mNonModifiableOrderStates

protected java.lang.String[] mNonModifiableOrderStates

mNonModifiablePaymentGroupStates

protected java.lang.String[] mNonModifiablePaymentGroupStates

mSalePriceListPropertyName

protected java.lang.String mSalePriceListPropertyName

mPricingTools

protected atg.commerce.pricing.PricingTools mPricingTools

mCSREnvironmentTools

protected CSREnvironmentTools mCSREnvironmentTools

mCloneEditManager

protected CSRCloneEditManager mCloneEditManager

mFulfilledOrderStates

protected java.lang.String[] mFulfilledOrderStates

mSubmittedOrderStates

protected java.lang.String[] mSubmittedOrderStates

mCloneEditOrderStates

protected java.lang.String[] mCloneEditOrderStates

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

mSiteManager

protected atg.multisite.SiteManager mSiteManager

mMessageTools

protected atg.web.messaging.MessageTools mMessageTools

mWalletHolderPath

protected java.lang.String mWalletHolderPath

mBasePromotionStatesPath

protected java.lang.String mBasePromotionStatesPath

mWalletPromotionStatesPath

protected java.lang.String mWalletPromotionStatesPath

mDuplicateOrderExcludedOrderPropertiesMap

protected java.util.Map mDuplicateOrderExcludedOrderPropertiesMap

mMultiSiteEnabled

protected volatile boolean mMultiSiteEnabled
Constructor Detail

CSRAgentTools

public CSRAgentTools()
Method Detail

getCustomerProfileTools

public atg.svc.agent.customer.CustomerProfileTools getCustomerProfileTools()

setCustomerProfileTools

public void setCustomerProfileTools(atg.svc.agent.customer.CustomerProfileTools pCustomerProfileTools)

getSiteContextManager

public atg.multisite.SiteContextManager getSiteContextManager()
Returns the siteContextManager

Returns:
the siteContextManager

setSiteContextManager

public void setSiteContextManager(atg.multisite.SiteContextManager pSiteContextManager)
Sets the siteContextManager

Parameters:
pSiteContextManager - the siteContextManager to set

setReturnTools

public void setReturnTools(ReturnTools pReturnTools)
Sets the return tools

Parameters:
pReturnTools - the return tools

getReturnTools

public ReturnTools getReturnTools()
Returns:
the return tools

getPaymentGroupHighlightedStates

public java.lang.String[] getPaymentGroupHighlightedStates()
Returns the payment group states that should appear highlighted in the UI


setPaymentGroupHighlightedStates

public void setPaymentGroupHighlightedStates(java.lang.String[] pPaymentGroupHighlightedStates)

getCommerceItemHighlightedStates

public java.lang.String[] getCommerceItemHighlightedStates()
Returns the commerce item states that should appear highlighted in the UI


setCommerceItemHighlightedStates

public void setCommerceItemHighlightedStates(java.lang.String[] pCommerceItemHighlightedStates)

getOrderHighlightedStates

public java.lang.String[] getOrderHighlightedStates()
Returns the order states that should appear highlighted in the UI


setOrderHighlightedStates

public void setOrderHighlightedStates(java.lang.String[] pOrderHighlightedStates)

getShipItemRelationshipHighlightedStates

public java.lang.String[] getShipItemRelationshipHighlightedStates()
Returns the order states that should appear highlighted in the UI


setShipItemRelationshipHighlightedStates

public void setShipItemRelationshipHighlightedStates(java.lang.String[] pShipItemRelationshipHighlightedStates)

getShippingGroupHighlightedStates

public java.lang.String[] getShippingGroupHighlightedStates()

setShippingGroupHighlightedStates

public void setShippingGroupHighlightedStates(java.lang.String[] pShippingGroupHighlightedStates)

setDuplicateOrderExcludedProperties

public void setDuplicateOrderExcludedProperties(java.util.Properties pDuplicateOrderExcludedProperties)
set the property DuplicateOrderExcludedProperties

Parameters:
pDuplicateOrderExcludedProperties - the value to set for property DuplicateOrderExcludedProperties

getDuplicateOrderExcludedProperties

public java.util.Properties getDuplicateOrderExcludedProperties()
Returns the excluded order properties when duplicating an order


getCommerceItemManager

public atg.commerce.order.CommerceItemManager getCommerceItemManager()

setCommerceItemManager

public void setCommerceItemManager(atg.commerce.order.CommerceItemManager pCommerceItemManager)

getShippingGroupShippedStates

public java.lang.String[] getShippingGroupShippedStates()
Returns the shipping group states that indicate a shipping group has shipped


setShippingGroupShippedStates

public void setShippingGroupShippedStates(java.lang.String[] pShippingGroupShippedStates)

getNonModifiableOrderStates

public java.lang.String[] getNonModifiableOrderStates()
Returns the order states in which an order cannot be modified


setNonModifiableOrderStates

public void setNonModifiableOrderStates(java.lang.String[] pNonModifiableOrderStates)

getNonModifiablePaymentGroupStates

public java.lang.String[] getNonModifiablePaymentGroupStates()
Returns the payment group states in which a payment group cannot be modified


setNonModifiablePaymentGroupStates

public void setNonModifiablePaymentGroupStates(java.lang.String[] pNonModifiablePaymentGroupStates)

getSalePriceListPropertyName

public java.lang.String getSalePriceListPropertyName()
Returns the name of the profile property used for holding the sale price list

Returns:
String

setSalePriceListPropertyName

public void setSalePriceListPropertyName(java.lang.String pSalePriceListPropertyName)

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

setFulfilledOrderStates

public void setFulfilledOrderStates(java.lang.String[] pFulfilledOrderStates)
Sets array of order states that indicate that an order is fulfilled

Parameters:
pFulfilledOrderStates - an array of order states that indicate that an order is fulfilled

getFulfilledOrderStates

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

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

setCloneEditOrderStates

public void setCloneEditOrderStates(java.lang.String[] pCloneEditOrderStates)
Sets array of order states that indicate that an order should use clone editing when loaded for modifications.

Parameters:
pCloneEditOrderStates - array of order states that indicate that an order should use clone editing when loaded for modifications

getCloneEditOrderStates

public java.lang.String[] getCloneEditOrderStates()
Returns:
array of order states that indicate that an order should use clone editing when loaded for modifications

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(atg.commerce.csr.scenario.MessageDispatcher pScenarioMessageDispatcher)
Component that will send the initializeProfile event

Parameters:
pScenarioMessageDispatcher - component that will send the initializeProfile event

getScenarioMessageDispatcher

public atg.commerce.csr.scenario.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:
persistCurrentOrder()

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:
persistCurrentOrder()

getSiteManager

public atg.multisite.SiteManager getSiteManager()
Returns the siteManager

Returns:
the siteManager

setSiteManager

public void setSiteManager(atg.multisite.SiteManager pSiteManager)
Sets the siteManager

Parameters:
pSiteManager - the siteManager to set

getMessageTools

public atg.web.messaging.MessageTools getMessageTools()
Returns the MessageTools component

Returns:
MessageTools

setMessageTools

public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)

setWalletHolderPath

public void setWalletHolderPath(java.lang.String pWalletHolderPath)

getWalletHolderPath

public java.lang.String getWalletHolderPath()
Provides a handle to the wallet for the current request


setBasePromotionStatesPath

public void setBasePromotionStatesPath(java.lang.String pBasePromotionStatesPath)

getBasePromotionStatesPath

public java.lang.String getBasePromotionStatesPath()
Provides a handle to the base promotion states


setWalletPromotionStatesPath

public void setWalletPromotionStatesPath(java.lang.String pWalletPromotionStatesPath)

getWalletPromotionStatesPath

public java.lang.String getWalletPromotionStatesPath()
Provides a handle to the wallet promotion states


addPriceListParameter

public java.util.Map addPriceListParameter(java.util.Map pExtraParameters)
This method adds the environment's current price list and sale 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.

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

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

addListPriceListParameter

public java.util.Map addListPriceListParameter(java.util.Map pExtraParameters,
                                               atg.repository.RepositoryItem pListPriceList)
Adds the given pricelist as the list pricelist to the extra parameter map

Parameters:
pExtraParameters -
pListPriceList -
Returns:
extra params with list pricelist param added

addSalePriceListParameter

public java.util.Map addSalePriceListParameter(java.util.Map pExtraParameters,
                                               atg.repository.RepositoryItem pSalePriceList)
Adds the given pricelist as the sale pricelist to the extra parameter map

Parameters:
pExtraParameters -
pSalePriceList -
Returns:
extra params with sale pricelist param added

addCurrentOrderPricingParameters

public java.util.Map addCurrentOrderPricingParameters(java.util.Map pExtraParameters)
Adds all the extra parameters used for pricing operations against the current Order.

The implementation adds the price list parameters based on the active price lists. Also, if a return or exchange is in progress, the exchange order pricing parameters are added.

Parameters:
pExtraParameters -
Returns:
parameter map with CSC params added
See Also:
addPriceListParameter(Map), ReturnTools.addExchangeOrderPricingParameters(Map, ReturnRequest)

addBypassPromotionVetoersParameter

public java.util.Map addBypassPromotionVetoersParameter(java.util.Map pExtraParameters)
Adds the extra parameter that disables the promotion vetoers during pricing

Parameters:
pExtraParameters -
Returns:
the parameter map with the param added
See Also:
PricingConstants.DISABLE_VETOING_PARAM

addItemPriceSourceParameter

public java.util.Map addItemPriceSourceParameter(java.util.Map pExtraParameters,
                                                 java.util.List pPricingOverrides)
Adds the pricing extra parameter for the given list of ItemPriceSource

Parameters:
pExtraParameters -
pPricingOverrides -
Returns:
Map of extra parameters with the new parameter added.

addCurrentTicketParameter

public java.util.Map addCurrentTicketParameter(java.util.Map pExtraParameters)
Adds the current ticket to the extra parameter map

Parameters:
pExtraParameters -
Returns:
Map with the current ticket extra parameters
See Also:
CSC_CURRENTTICKET_PIPELINE_PARAM

addBypassPaymentGroupAuthorizationParameter

public java.util.Map addBypassPaymentGroupAuthorizationParameter(java.util.Map pExtraParameters)
Adds the parameter that will cause the processOrder pipeline to skip payment group authorization

Parameters:
pExtraParameters -
Returns:
map with parameter added.
See Also:
CSC_BYPASS_PAYMENT_AUTHORIZATIONS_PIPELINE_PARAM

addBypassExpiredPromotionsCheckParameter

public java.util.Map addBypassExpiredPromotionsCheckParameter(java.util.Map pExtraParameters)
Adds the parameter that will cause the processOrder pipeline to skip the check for expired promotions

Parameters:
pExtraParameters -
Returns:
map with parameter added.
See Also:
BYPASS_EXPIRED_PROMOTIONS_CHECK_PIPELINE_PARAM

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:
pOrder - 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.
See Also:
CSREnvironmentTools.findItemsNotInPriceList(Collection, RepositoryItem)

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
pRemoveItem - 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 agent display 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

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. By default this method returns null. Extend this method to provide a map to the cloning process.

Returns:
the map of properties that should be excluded from the clone

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.

isOrderIncomplete

public boolean isOrderIncomplete(atg.repository.RepositoryItem pOrderItem)
Determines if an order is incomplete based on the states defined in the incompleteOrderStates property.

Parameters:
pOrderItem -
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.

isOrderSubmitted

public boolean isOrderSubmitted(atg.repository.RepositoryItem pOrderItem)
Determines if an order is submitted based on the states defined in the submittedOrderStates property.

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

isOrderFulfilled

public boolean isOrderFulfilled(atg.repository.RepositoryItem pOrderItem)
Determines if an order is fulfilled based on the states defined in the fulfilledOrderStates property.

Parameters:
pOrderItem -
Returns:
true if the order is considered fulfilled.

isOrderFulfilled

public boolean isOrderFulfilled(atg.commerce.order.Order pOrder)
Determines if an order is fulfilled based on the states defined in the fulfilledOrderStates property.

Parameters:
pOrderItem -
Returns:
true if the order is considered fulfilled.

isFulfilledOrderState

protected boolean isFulfilledOrderState(java.lang.String pState)
Determines if the given state is one of the states defined in the fulfilledOrderStates property.

Parameters:
pState -
Returns:
true if the pState is considered a fulfilled Order state.

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.

isCloneEditState

public boolean isCloneEditState()
This method grabs the order from the current environment and returns true if the order should use the clone edit handlers for editing.

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

isOrderInModifiableState

public boolean isOrderInModifiableState(atg.commerce.order.Order pOrder)
Returns true if the order is in a modifiable state


isPaymentGroupInModifiableState

public boolean isPaymentGroupInModifiableState(atg.commerce.order.PaymentGroup pPaymentGroup)
Returns true if the payment group is in a modifiable state


isOrderModifiable

public boolean isOrderModifiable(atg.commerce.order.Order pOrder)
Determines if an order is modifiable

Returns false if any items are considered shipped as determined by the areAnyItemsShipped method.

Returns false if any payment groups are in a non-modifiable state as determined by the isPaymentGroupInModifiableState method

Returns false if the Order is not is a modifiable state as determined by the isOrderInModifiableState method.

Parameters:
pOrder -
Returns:
true if the order is considered modifiable
See Also:
areAnyItemsShipped(Order), isPaymentGroupInModifiableState(PaymentGroup), isOrderInModifiableState(Order), isOrderSupportedforUpdate(Object)

isOrderSupportedforUpdate

public boolean isOrderSupportedforUpdate(java.lang.Object pOrder)
Checks if an order has supported payment group types and hence is supported for update.

Parameters:
pOrder -
Returns:
false if order has unsupported paymentGroupTypes, true otherwise
See Also:
CSRConfigurator.supportedPayemntGroupTypes

areAnyItemsShipped

public boolean areAnyItemsShipped(atg.commerce.order.Order pOrder)
Returns true if any ShippingGroupCommerceItemRelationship in the Order has a state of "DELIVERED"

Parameters:
pOrder -
Returns:

areAllGroupsShipped

public boolean areAllGroupsShipped(atg.commerce.order.Order pOrder,
                                   java.lang.String[] pShippingGroupShippedStates)
Returns true if all ShippingGroups in the Order are in a "shipped".

Parameters:
pOrder -
pShippingGroupShippedStates - optional. the states used to compare the shipping group states. If null, the states configured by the shippingGroupShippedStates property are used.
Returns:
true if all shipping groups are considered shipped.

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 promotions are granted, and the promotion is added to the pricing model holder.

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.
pUserLocale - 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 for both transient and non-transient orders.

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()
Returns the current pricing locale

Returns:
the current pricing locale
See Also:
PricingTools.getPricingLocale(RepositoryItem, String, boolean, Map, Locale)

getActiveCustomerDisplayLocale

public java.util.Locale getActiveCustomerDisplayLocale()
Returns the active customer's display locale

Returns:
Locale
See Also:
EnvironmentTools.getActiveCustomerDisplayLocale()

getActiveCustomerCurrencyCode

public java.lang.String getActiveCustomerCurrencyCode()
Get the ISO 4217 currency code for pricing (e.g. for JavaScript-based formatting).

Returns:
a currency code 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 pPostClaimPricingOperation,
                        java.util.Map pRepriceParameterMap)
                 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:
pClaimCode - the coupon claim code
pPostClaimPricingOperation -
pRepriceParameterMap -
Throws:
atg.commerce.claimable.ClaimableException
atg.commerce.CommerceException
atg.repository.RepositoryException
See Also:
ClaimableManager.claimCoupon(String, String), claimCouponForSubmittedOrder(CloneEditState, 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(ConfirmationInfo pConfirmationInfo)
                                  throws atg.userprofiling.email.TemplateEmailException
Send an automatic confirmation message. If an toEmailAddress is not provided in the info object, this method will default to using the email Address property from the profile in the confirmation info.

If successful, this method will set the autoEmailSent and autoConfirmationEmailAddress properties of the confirmation info object.

Parameters:
pConfirmationInfo -
Returns:
true if the email was send
Throws:
atg.userprofiling.email.TemplateEmailException

sendAutomaticConfirmation

public boolean sendAutomaticConfirmation(atg.commerce.order.Order pOrder,
                                         atg.repository.RepositoryItem pProfile)
                                  throws atg.userprofiling.email.TemplateEmailException
Deprecated. 

Throws:
atg.userprofiling.email.TemplateEmailException
See Also:
sendAutomaticConfirmation(ConfirmationInfo)

sendConfirmationEmail

public void sendConfirmationEmail(atg.commerce.order.Order pOrder,
                                  atg.repository.RepositoryItem pProfile,
                                  java.lang.String pToAddress)
                           throws atg.userprofiling.email.TemplateEmailException
Deprecated. 

Throws:
atg.userprofiling.email.TemplateEmailException
See Also:
sendConfirmationEmail(ConfirmationInfo)

sendConfirmationEmail

public void sendConfirmationEmail(ConfirmationInfo pConfirmationInfo)
                           throws atg.userprofiling.email.TemplateEmailException
Use the Template Email Sender to send a confirmation email.

Parameters:
pConfirmationInfo - contains the required info for sending the confirmation. This object is also available from within the template.
Throws:
atg.userprofiling.email.TemplateEmailException

generateConfirmationTemplateDefaultParams

public java.util.Map generateConfirmationTemplateDefaultParams(atg.commerce.order.Order pOrder,
                                                               atg.repository.RepositoryItem pProfile)
Deprecated. 

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:
Map
See Also:
generateConfirmationTemplateDefaultParams(ConfirmationInfo)

generateConfirmationTemplateDefaultParams

public java.util.Map generateConfirmationTemplateDefaultParams(ConfirmationInfo pConfirmationInfo)
Creates a map with the confirmation info object added using the key defined by the constant CONFIRMATIONEMAIL_PARAM_NAME

Parameters:
pConfirmationInfo -
Returns:
Map
See Also:


getConfirmationTemplateToUse

public java.lang.String getConfirmationTemplateToUse()
Deprecated. 

Retrieves the current confirmation message template name from Window Scope.

Returns:
the Email Template name.

setConfirmationTemplateToUse

public void setConfirmationTemplateToUse(java.lang.String pTemplateToUse)
Deprecated. 

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:
ReturnRequest

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:
List

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.getActiveTicket()

overrideItemPrice

public void overrideItemPrice(atg.commerce.order.CommerceItem pItem,
                              double pNewAmount,
                              atg.commerce.order.Order pOrder,
                              java.util.Locale pUserLocale,
                              java.lang.String pTicketId)
                       throws atg.commerce.CommerceException
Overrides the price of the given commerce item to the new amount.

This method will clear the PricingAdjustments for the item and add a new one that details the overridden price

The item detail price infos are also cleared and a new one is created for the entire range of the item and the new price.

An audit event is also generated that details the change.

Parameters:
pItem - item to be overridden
pNewAmount - the new amount
pOrder - the affected order
pUserLocale -
pTicketId -
Throws:
atg.commerce.CommerceException

recreateInitialDetailsForItemsMarkedAsFinal

public void recreateInitialDetailsForItemsMarkedAsFinal(atg.commerce.order.Order pOrder,
                                                        java.util.Locale pUserLocale,
                                                        atg.repository.RepositoryItem pProfile)
                                                 throws atg.commerce.CommerceException
Recreates the item detailed price infos for all items in the order that have been marked as final.

Normally pricing will regenerate the details for every pricing operation. However, this process is skipped by the pricing engine for items marked as final. This method provides a way to force them to be regenerated base on the current price and the shipping group relationships.

Parameters:
pOrder -
pUserLocale -
pProfile -
Throws:
atg.commerce.CommerceException
See Also:
recreateInitialDetailsForItemMarkedAsFinal(CommerceItem, double, Locale, RepositoryItem, String)

recreateInitialDetailsForItemMarkedAsFinal

public void recreateInitialDetailsForItemMarkedAsFinal(atg.commerce.order.CommerceItem pItem,
                                                       double pAmount,
                                                       java.util.Locale pUserLocale,
                                                       atg.repository.RepositoryItem pProfile,
                                                       java.lang.String pDescription)
                                                throws atg.commerce.CommerceException
Recreates the detailed price infos for the item that have been marked as final.

Normally pricing will regenerate the details for every pricing operation. However, this process is skipped by the pricing engine for items marked as final. This method provides a way to force them to be regenerated base on the current price and the shipping group relationships.

Throws:
atg.commerce.CommerceException

overrideShippingPrice

public void overrideShippingPrice(atg.commerce.order.ShippingGroup pShippingGroup,
                                  double pNewAmount,
                                  atg.commerce.order.Order pOrder,
                                  java.util.Locale pUserLocale,
                                  java.lang.String pTicketId)
Overrides the price of the given shipping group to the new amount.

This method will clear the PricingAdjustments for the shipping group and add a new one that details the overridden price

An audit event is also generated that details the change.

Parameters:
pShippingGroup -
pNewAmount -
pOrder -
pUserLocale -
pTicketId -

overridePriceInfoAmount

protected void overridePriceInfoAmount(atg.commerce.pricing.AmountInfo pAmountInfo,
                                       double pNewAmount,
                                       double pTotalAdjustment,
                                       long pQuantity,
                                       java.lang.String pReasonDescription)
Overrides the price of the given price info, marks it as final, clears the pricing adjustments and adds a new PricingAdjustment for the overriden price. PricingAdjustment.

Parameters:
pAmountInfo -
pNewAmount -
pTotalAdjustment -
pQuantity -
pReasonDescription -

isAgentOverridePrice

public boolean isAgentOverridePrice(atg.commerce.order.CommerceItem pItem)
Determines if the item has been priced with an agent override price.

Parameters:
pItem -
Returns:
true if the item has been priced with an agent override

getAgentOverrideDetails

public java.util.List getAgentOverrideDetails(atg.commerce.order.CommerceItem pItem)
Returns the PricingAdjustments put on by CSC when an agent overrides the price.

Parameters:
pItem -
Returns:
List of agent override adjustments

getAgentOverrideDetail

public atg.commerce.pricing.PricingAdjustment getAgentOverrideDetail(atg.commerce.order.CommerceItem pItem)
Deprecated. in favor of getAgentOverrideDetails which return all details when there is more than one.

Returns the PricingAdjustment put on by CSC when an agent overrides the price.

Parameters:
pItem -
Returns:
PricingAdjustment of agent override adjustment

getTotalPriceOverrideAppeasementValue

public double getTotalPriceOverrideAppeasementValue(atg.commerce.order.Order pOrder)
Returns the total appeasement(credit) value of item price overrides on the given Order.

This method only returns the credit value. If the price overrides total to a debit, 0.0 will be returned.

Parameters:
pOrder -
Returns:
the total value of item price overrides

getTotalPriceOverrideValue

public double getTotalPriceOverrideValue(atg.commerce.order.Order pOrder)
Returns the total value of item price overrides on the given Order.

Parameters:
pOrder -
Returns:
the total value of item price overrides

arePriceOverrides

public boolean arePriceOverrides(atg.commerce.order.Order pOrder)
Returns true if there are any agent applied price overrides on the order

Parameters:
pOrder -
Returns:
true if there are price overrides

isOrderAdjusted

public boolean isOrderAdjusted(atg.commerce.order.Order pOrder)
Returns true if there are any agent applied price overrides or manual adjustments on the order

Parameters:
pOrder -
Returns:
true if there are adjustments

getTotalManualAppeasementValue

public double getTotalManualAppeasementValue(atg.commerce.order.Order pOrder)
Returns the total value of manual adjustments if they sum to a credit value. If the manual adjustment total to a debit value, the returned value will be 0.0

Parameters:
pOrder -
Returns:
the credit total of the manual adjustments

getTotalManualAdjustmentValue

public double getTotalManualAdjustmentValue(atg.commerce.order.Order pOrder)
Returns the total value of the manual adjustments applied to the order.

Parameters:
pOrder -
Returns:
the total value of the manual adjustments applied to the order

getTotalAppeasementValue

public double getTotalAppeasementValue(atg.commerce.order.Order pOrder)
Returns the total value of agent applied appeasements (credits) on the given Order. This includes the aggregate total of manual adjustments and price overrides. if the aggregate total results in a debit, the returned value will be 0.0.

Parameters:
pOrder -
Returns:
the total value of agent applied appeasements on the given Order

createDuplicateOrderPropExceptionsMap

protected java.util.Map createDuplicateOrderPropExceptionsMap()
This method is a helper method which is used by the duplicateOrder method. It creates a Map that will be used by the cloneItem method in RepositoryUtils class as a PropExceptions parameter. The user should override this method if the order item descriptor has changed or some properties which previously requires deep copy now requires shallow copy or vice versa.

This method returns null by default

Returns:
the Map

getDuplicateOrderExcludedOrderPropertiesMap

public java.util.Map getDuplicateOrderExcludedOrderPropertiesMap()
Generates an the excluded property map based on the duplicateOrderExcludedProperties property.

Returns:
returns property DuplicateOrderExcludedOrderPropertiesMap

parseString

public static java.util.Collection parseString(java.lang.String pString)
Parse a String which is delimited by "|" into a collection of strings.


duplicateOrder

public atg.commerce.order.Order duplicateOrder(java.lang.String pOrderId,
                                               java.util.Map pPropExceptions,
                                               java.util.Map pExcludedProperties)
                                        throws atg.commerce.CommerceException
Duplicates an order into a new incomplete order.

Parameters:
pOrderId - the order to duplicate
pPropExceptions - the property exceptions used when cloning the order repository item
pExcludedProperties - the exceluded property map used when cloning the order repository item
Returns:
new order
Throws:
atg.commerce.CommerceException
See Also:
RepositoryUtils.cloneItem(RepositoryItem, boolean, Map, Map, MutableRepository, String)

resetHandlingInstructionReferences

protected void resetHandlingInstructionReferences(atg.repository.RepositoryItem pOriginalOrder,
                                                  atg.repository.RepositoryItem pCloneOrder)
                                           throws atg.repository.RepositoryException
Resets the commerceItemId and shippingGroupId properties of the clone handling instructions to point at commerce items and shipping groups in the clone order.

This method is called after duplicating an order into a clone copy.

Parameters:
pOriginalOrder -
pCloneOrder -
Throws:
atg.repository.RepositoryException

resetReturnInfoForCopy

protected void resetReturnInfoForCopy(atg.commerce.order.Order pOrder)
Resets the refund info in the order's commerce items and their shipping relationships. All refundQuantity's are set to 0 and any refund quanity is absorbed back into the commerce item and relationship quantity.

Parameters:
pOrder -

isTransactionMarkedAsRollBack

public boolean isTransactionMarkedAsRollBack()
Returns true if the transaction associated with the current thread is marked for rollback. This is useful if you do not want to perform some action (e.g. updating the order) if some other subservice already needs the transaction rolledback.


ensureOrderAmountRemainingType

public void ensureOrderAmountRemainingType(atg.commerce.order.purchase.CommerceIdentifierPaymentInfoContainer pCommerceIdentifierPaymentInfoContainer,
                                           atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer)
Inspects the OrderPaymentInfos in the container and attempts to ensure one of them has an ORDER_AMOUNT_REMAINING relationship type. If there isn't one, it will change the first OrderPaymentInfo that is pointing to a payment group of type credit card with an amount and a relationship type of ORDER_AMOUNT. If none are found, it will look for the first OrderPaymentInfo that is pointing to any payment group with an amount and relationship type of ORDER_AMOUNT.

Parameters:
pCommerceIdentifierPaymentInfoContainer -
pPaymentGroupMapContainer -

isHighlightedState

public boolean isHighlightedState(java.lang.Object pCommerceObject)
Determines if the objects current state is one of the configured highlighted states.

Parameters:
pCommerceObject -
Returns:
true if a highlighted state

getRemainingAmount

public double getRemainingAmount(atg.repository.RepositoryItem pClaimable)
                          throws atg.repository.RepositoryException
This method returns the remaining amount for the Store Credit and Gift Certificate.
This method supports only store credit and gift certificates. If you want to compute the
remaining amount for any other type of claimable item, you need to extend this method.

The maximum amount is computed as follows:

Parameters:
pClaimable - the claimable item
Returns:
double the remaining amount for the store credit or gift certificate.
Throws:
atg.repository.RepositoryException

isMultiSiteEnabled

public boolean isMultiSiteEnabled()
This method decides whether the CSC application supports multi site or not based on the following rules.

The above logic is executed only once and the value is preserved to improve the performance.

Returns:
true if the multisite is supported. Otherwise false.
See Also:
CSRConfigurator.getCommerceSiteType(), SiteManager.getActiveSitesByType(String), SiteManager.isMultisiteEnabled()

getAgentDefaultSiteId

public java.lang.String getAgentDefaultSiteId()
This method is used to get the agents' site. Currently agents are not assigned to a specific site. If there is a future need, we could use this method.

This method just returns the CSRConfigurator#getDefaultSiteId() configured value.

Returns:
default site id
See Also:
CSRConfigurator.getDefaultSiteId()

getSiteCatalogs

public java.util.Collection<atg.repository.RepositoryItem> getSiteCatalogs(java.lang.String[] pSiteIds,
                                                                           atg.repository.RepositoryItem pProfile)
                                                                    throws atg.svc.agent.environment.EnvironmentException,
                                                                           atg.multisite.SiteContextException
This method returns site catalogs.

This method loops through pSiteIds and converts to a site object and calls getSiteCatalogs(Collection, RepositoryItem).

Parameters:
pSiteIds -
pProfile -
Returns:
Throws:
atg.svc.agent.environment.EnvironmentException
atg.multisite.SiteContextException
See Also:
getSiteCatalogs(Collection, RepositoryItem)

getSiteCatalogs

public java.util.Collection<atg.repository.RepositoryItem> getSiteCatalogs(java.util.Collection<atg.multisite.Site> pSites,
                                                                           atg.repository.RepositoryItem pProfile)
                                                                    throws atg.svc.agent.environment.EnvironmentException,
                                                                           atg.multisite.SiteContextException
This method returns catalogs only if the multi site is enabled.

This method loops through sites and performs the above steps and resultant catalog data is returned.

Parameters:
pSites -
pProfile -
Returns:
Throws:
atg.svc.agent.environment.EnvironmentException
atg.multisite.SiteContextException
See Also:
isMultiSiteEnabled(), getSiteCatalog(Site, RepositoryItem)

getSiteCatalog

public atg.repository.RepositoryItem getSiteCatalog(atg.multisite.Site pSite,
                                                    atg.repository.RepositoryItem pProfile)
                                             throws atg.svc.agent.environment.EnvironmentException,
                                                    atg.multisite.SiteContextException
This method returns catalog for the site only if the multi site is enabled.

First this method calls CSREnvironmentTools.getCatalogFromCallState(String) to find out if there is no explicit catalog for a site. If there is no explict catalog, then it calls CSREnvironmentTools.getUsersCatalog(RepositoryItem, Site) to get the catalog for the site.

Parameters:
pSite -
pProfile -
Returns:
Throws:
atg.svc.agent.environment.EnvironmentException
atg.multisite.SiteContextException
See Also:
isMultiSiteEnabled(), CSREnvironmentTools.getUsersCatalog(RepositoryItem, Site), CSREnvironmentTools.getCatalogFromCallState(String), CallState.isCallActive()

createPromotionValueMap

public java.util.Map createPromotionValueMap(atg.commerce.order.Order pOrder,
                                             boolean pIncludeOrderPromos,
                                             boolean pIncludeItemPromos,
                                             boolean pIncludeShippingPromos,
                                             boolean pIncludeTaxPromos)
Creates a map of promotion id to adjustment value for each promotion applied to the given order.

Parameters:
pOrder -
pIncludeOrderPromos - if true, the order promotions are included in the Map
pIncludeItemPromos - if true, the item promotions are included in the Map
pIncludeShippingPromos - if true, the shipping promotions are included in the Map
pIncludeTaxPromos - if true, the tax promotions are included in the Map
Returns:
Map of promotion id to total adjustment value

isPriceListSameCurrencyAsOrder

public boolean isPriceListSameCurrencyAsOrder(atg.commerce.order.Order pOrder,
                                              atg.repository.RepositoryItem pPricelist)
Returns true if the order and price list both specify the same currency

Parameters:
pOrder -
pPricelist -
Returns:

getCurrencyForPriceList

public java.lang.String getCurrencyForPriceList(atg.repository.RepositoryItem pPricelist)
returns the currency for the given price list

Parameters:
pPricelist -
Returns:

populateAnonymousCustomerProfileFromOrder

public void populateAnonymousCustomerProfileFromOrder(atg.repository.RepositoryItem pProfile,
                                                      atg.commerce.order.Order pOrder)
                                               throws atg.repository.RepositoryException
Populates properties of the profile from information contained on the order.

Parameters:
pProfile -
pOrder -
Throws:
atg.repository.RepositoryException
See Also:
populateAnonymousCustomerProfileFromOrder(RepositoryItem, RepositoryItem)

populateAnonymousCustomerProfileFromOrder

public void populateAnonymousCustomerProfileFromOrder(atg.repository.RepositoryItem pProfile,
                                                      atg.repository.RepositoryItem pOrder)
                                               throws atg.repository.RepositoryException
Populates properties of the profile from information contained on the order.

This implementation sets the first, middle and last name of the profile from the first credit card payment group on the order. It only doesn't this is the profile's properties are not already valued.

Parameters:
pProfile -
pOrder -
Throws:
atg.repository.RepositoryException

parseAmount

public java.lang.Double parseAmount(java.lang.String pAmount,
                                    java.lang.String pCurrencyCode)
                             throws java.text.ParseException
Parses the given input amount value using the given currency and the agent's display locale.

Parameters:
pAmount -
pCurrencyCode -
Returns:
the double amount
Throws:
java.text.ParseException

formatAmount

public java.lang.String formatAmount(double pAmount,
                                     java.lang.String pCurrencyCode)
Formats the given input amount value as a string using the given currency and the agent's display locale.

Parameters:
pAmount -
pCurrencyCode -
Returns:
the String formatted amount

getUserResource

public java.lang.String getUserResource(java.lang.String pKey,
                                        java.lang.Object[] pMsgArgs,
                                        java.util.Locale pLocale)
Returns a resource from the user resource bundle

Parameters:
pKey -
pMsgArgs - msg arguments
pLocale - the locale
Returns:
String

getCurrentOrderCurrencySymbolInFormattingLocale

public java.lang.String getCurrentOrderCurrencySymbolInFormattingLocale()
This method returns the current order's currency symbol in the formatting locale.

if the order's currency code is null, then the currency code is obtained from the getActiveCustomerCurrencyCode() and this currency code is used to obtain the currency symbol.

Returns:
See Also:
CSREnvironmentTools.getCurrentOrder(), LocaleTools.getUserFormattingLocaleHelper(), getActiveCustomerCurrencyCode()

getPricingToolsDefaultCurrencySymbolInFormattingLocale

public java.lang.String getPricingToolsDefaultCurrencySymbolInFormattingLocale()
This method gets the currency symbol based on PricingTools.getDefaultLocale() and then returns the currency symbol in the user's formatting locale.

Returns:
See Also:
PricingTools.getDefaultLocale(), LocaleTools.getUserFormattingLocaleHelper()