|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.agent.AgentTools
atg.commerce.csr.util.CSRAgentTools
public class CSRAgentTools
This class contains various utility methods used in the CSR application.
Field Summary | |
---|---|
protected static java.lang.String |
AGENTRESOURCES
|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
CSR_ORDER_RESOURCE_NAME
|
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 java.util.Map |
mDuplicateOrderExcludedOrderPropertiesMap
|
protected java.util.Properties |
mDuplicateOrderExcludedProperties
|
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 java.lang.String |
mSalePriceListPropertyName
|
protected boolean |
mSendEmailInSeparateThread
|
static java.lang.String |
MSG_COULD_NOT_SAVE_CLONED_ORDER
|
static java.lang.String |
MSG_COULD_NOT_SAVE_ORDER
|
static java.lang.String |
MSG_ERROR_WHILE_CLONING_ADDRESS
|
static java.lang.String |
MSG_ERROR_WHILE_COPY_ADDRESS
|
static java.lang.String |
MSG_NO_CREDIT_CARD
|
static java.lang.String |
MSG_NO_EXISTING_ADDRESS
|
static java.lang.String |
MSG_NO_NICKNAME
|
static java.lang.String |
MSG_NO_ORDER
|
static java.lang.String |
MSG_NO_PAYMENT_GROUP_CONTAINER
|
static java.lang.String |
MSG_NO_PROFILE
|
static java.lang.String |
MSG_ORDER_ALREADY_SAVED
|
static java.lang.String |
MSG_SEND_CONFIRMATION_NO_ADDR_ERROR
|
static java.lang.String |
MSG_SEND_CONFIRMATION_NO_EMAILINFO_ERROR
|
protected java.lang.String[] |
mShipItemRelationshipHighlightedStates
|
protected java.lang.String[] |
mShippingGroupHighlightedStates
|
protected java.lang.String[] |
mSubmittedOrderStates
|
protected atg.userprofiling.email.TemplateEmailSender |
mTemplateEmailSender
|
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 |
protected java.util.ResourceBundle |
sBundle
|
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 |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
CSRAgentTools()
|
Method Summary | |
---|---|
void |
addItemToCollection(atg.repository.RepositoryItem pItem,
atg.repository.RepositoryItem pItemToAdd,
java.lang.String pPropertyName)
Adds an item from a collection property. |
void |
addItemToMap(atg.repository.RepositoryItem pItem,
atg.repository.RepositoryItem pItemToAdd,
java.lang.Object pKey,
java.lang.String pPropertyName)
Adds an item to a map property. |
void |
addItemToProperty(atg.repository.RepositoryItem pItem,
atg.repository.RepositoryItem pItemToSet,
java.lang.String pPropertyName)
Puts an item in an item's single valued property. |
void |
addOrderPromotionsToHolder(atg.commerce.order.Order pOrder,
atg.commerce.pricing.PricingModelHolder pPricingModelHolder)
Adds the promotions that are associated with the order to the pricing model holder. |
java.util.Map |
addPriceListParameter(java.util.Map pExtraParameters)
This method adds the environment's current price list and sale price list to the extra parameter map that's used for pricing operations in CSR. |
boolean |
associateTicketAndOrder(java.lang.String pOrderId,
atg.repository.MutableRepositoryItem pTicket)
This method associates a given or current active ticket to the order that is passed in. |
void |
claimCoupon(java.lang.String pClaimCode,
java.lang.String pSubmittedOrderPricingOperation,
java.util.Map pRepricePrameterMap)
If the order hasn't been submitted yet, the ClaimableManager is called to claim the coupon. |
void |
claimCouponForSubmittedOrder(CloneEditState pCloneEditState,
java.lang.String pClaimCode,
atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pCustomerProfile,
atg.repository.RepositoryItem pAgentProfile,
SubmittedOrderPricingModelHolder pSubmittedOrderPricingModelHolder,
java.lang.String pRepricingOperation,
java.util.Locale pUserLocale,
java.util.Map pExtraParametersMap)
Claims a coupon for use with an already submitted order |
java.util.List |
collectUniqueExistingAddresses(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer,
atg.commerce.order.Order pOrder)
This method gets the unique addresses from the ShippingGroupMapContainer and PaymentGroupMapContainer and Order. |
java.util.Locale |
convertLocale(java.lang.Object pLocale)
Convert an object to a Locale. |
void |
copyContactInfoToCreditCard(atg.core.util.Address pExistingAddress,
atg.commerce.order.CreditCard pCreditCard)
This method copies the given address to the CreditCard object. |
void |
copyContactInfoToCreditCard(atg.repository.RepositoryItem pExistingAddress,
atg.commerce.order.CreditCard pCreditCard)
This method copies the given address to the CreditCard object. |
atg.payment.creditcard.CreditCardInfo |
createCreditCardInfo(atg.repository.RepositoryItem pCreditCard)
Create a (Generic)CreditCardInfo instance from a credit card repository item |
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. |
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.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()
Get the locale to be for pricing. |
atg.commerce.pricing.PricingAdjustment |
getAgentOverrideDetail(atg.commerce.order.CommerceItem pItem)
Returns the PricingAdjustment put on by CSC when an agent overrides the price. |
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()
|
ReturnRequest |
getCurrentReturnRequest()
This method gets the return request from the current order. |
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[] |
getIncompleteOrderStates()
|
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()
|
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. |
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[] |
getSubmittedOrderStates()
|
atg.userprofiling.email.TemplateEmailSender |
getTemplateEmailSender()
Gets the TemplateEmailSender |
java.lang.String |
getTicketOrdersPropertyName()
Returns the ticketOrdersPropertyName. |
java.lang.String |
getValidatePaymentGroupsChainId()
Return the ValidatePaymentGroupsChainId property. |
void |
initializeDefaultAddresses(atg.repository.RepositoryItem pProfile,
java.lang.String pDefaultShippingAddressPropertyName,
java.lang.String pDefaultBillingAddressPropertyName,
boolean pCloneDefaultShippingForBilling)
Initializes the default shipping and default billing addresses for the profile. |
boolean |
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. |
boolean |
isHighlightedState(java.lang.Object pCommerceObject)
Determines if the objects current state is one of the configured highlighted states. |
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 |
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 |
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. |
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 |
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 |
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 |
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 |
setDuplicateOrderExcludedProperties(java.util.Properties pDuplicateOrderExcludedProperties)
set the property DuplicateOrderExcludedProperties |
void |
setDuplicateProfileProperties(java.lang.String[] pDuplicateProfileProperties)
Sets property duplicateNameCheckPropertyNames |
void |
setIncompleteOrderStates(java.lang.String[] pIncompleteOrderStates)
Sets array of order states that indicate that an order is incomplete |
void |
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 |
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 |
setSubmittedOrderStates(java.lang.String[] pSubmittedOrderStates)
Sets array of order states that indicate that an order is Submitted |
void |
setTemplateEmailSender(atg.userprofiling.email.TemplateEmailSender pTemplateEmailSender)
Sets the TemplateEmailSender |
void |
setTicketOrdersPropertyName(java.lang.String pTicketOrdersPropertyName)
Sets the ticketOrdersPropertyName. |
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale |
void |
setValidatePaymentGroupsChainId(java.lang.String pValidatePaymentGroupsChainId)
Set the ValidatePaymentGroupsChainId property. |
boolean |
validateCreditCardExpiration(java.lang.String pMonth,
java.lang.String pYear)
Validates a credit card expiration date |
boolean |
validateCreditCardNumber(java.lang.String pCreditCardNumber)
Validates a credit card number |
Methods inherited from class atg.agent.AgentTools |
---|
assignUserToCurrentOrganization, assignUserToOrganization, createNewAgentProfileCommentItem, createProfileComment, generateNewAccountPasswordAndNotification, generateNewAccountTemplateDefaultParams, getAgentMessagingTools, getAgentProfile, getCustomerProfile, getInternalProfileTools, getProfileCommentItemDescriptorName, getProfileTools, getUserDirectoryTools, getUserViewName, initializeRegistrationDate, setAgentMessagingTools, setInternalProfileTools, setProfileCommentItemDescriptorName, setProfileTools, setPropertiesOfComment, setUserDirectoryTools, setUserViewName |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected static final java.lang.String AGENTRESOURCES
protected final java.util.ResourceBundle sBundle
public static final java.lang.String CSR_ORDER_RESOURCE_NAME
public static final java.lang.String MSG_NO_ORDER
public static final java.lang.String MSG_NO_PROFILE
public static final java.lang.String MSG_ORDER_ALREADY_SAVED
public static final java.lang.String MSG_COULD_NOT_SAVE_CLONED_ORDER
public static final java.lang.String MSG_COULD_NOT_SAVE_ORDER
public static final java.lang.String MSG_NO_EXISTING_ADDRESS
public static final java.lang.String MSG_NO_CREDIT_CARD
public static final java.lang.String MSG_NO_PAYMENT_GROUP_CONTAINER
public static final java.lang.String MSG_NO_NICKNAME
public static final java.lang.String MSG_ERROR_WHILE_CLONING_ADDRESS
public static final java.lang.String MSG_ERROR_WHILE_COPY_ADDRESS
public static final java.lang.String MSG_SEND_CONFIRMATION_NO_EMAILINFO_ERROR
public static final java.lang.String MSG_SEND_CONFIRMATION_NO_ADDR_ERROR
public static final java.lang.String TEMPLATE_WINDOW_SCOPE_KEY
public static final java.lang.String NEW_ORDER_TEMPLATE_NAME
public static final java.lang.String ORDER_UPDATE_TEMPLATE_NAME
public static final java.lang.String ORDER_EXCHANGE_TEMPLATE_NAME
public static final java.lang.String ORDER_RETURN_TEMPLATE_NAME
public static final java.lang.String SCHEDULED_ORDER_UPDATE_TEMPLATE_NAME
public static final java.lang.String SCHEDULE_ADD_TEMPLATE_NAME
public static final java.lang.String SCHEDULE_UPDATE_TEMPLATE_NAME
protected java.lang.String[] mPaymentGroupHighlightedStates
protected java.lang.String[] mCommerceItemHighlightedStates
protected java.lang.String[] mOrderHighlightedStates
protected java.lang.String[] mShipItemRelationshipHighlightedStates
protected java.lang.String[] mShippingGroupHighlightedStates
protected java.util.Properties mDuplicateOrderExcludedProperties
protected atg.commerce.order.CommerceItemManager mCommerceItemManager
protected java.lang.String[] mNonModifiableOrderStates
protected java.lang.String[] mNonModifiablePaymentGroupStates
protected java.lang.String mSalePriceListPropertyName
protected atg.commerce.pricing.PricingTools mPricingTools
protected CSREnvironmentTools mCSREnvironmentTools
protected CSRCloneEditManager mCloneEditManager
protected java.lang.String[] mSubmittedOrderStates
protected java.lang.String[] mCloneEditOrderStates
protected atg.userprofiling.PropertyManager mProfilePropertyManager
protected boolean mPersistConfirmationEmails
protected boolean mSendEmailInSeparateThread
protected atg.nucleus.ServiceMap mConfirmationEmailMap
protected atg.userprofiling.email.TemplateEmailSender mTemplateEmailSender
protected java.util.Map mDuplicateOrderExcludedOrderPropertiesMap
Constructor Detail |
---|
public CSRAgentTools()
Method Detail |
---|
public java.lang.String[] getPaymentGroupHighlightedStates()
public void setPaymentGroupHighlightedStates(java.lang.String[] pPaymentGroupHighlightedStates)
public java.lang.String[] getCommerceItemHighlightedStates()
public void setCommerceItemHighlightedStates(java.lang.String[] pCommerceItemHighlightedStates)
public java.lang.String[] getOrderHighlightedStates()
public void setOrderHighlightedStates(java.lang.String[] pOrderHighlightedStates)
public java.lang.String[] getShipItemRelationshipHighlightedStates()
public void setShipItemRelationshipHighlightedStates(java.lang.String[] pShipItemRelationshipHighlightedStates)
public java.lang.String[] getShippingGroupHighlightedStates()
public void setShippingGroupHighlightedStates(java.lang.String[] pShippingGroupHighlightedStates)
public void setDuplicateOrderExcludedProperties(java.util.Properties pDuplicateOrderExcludedProperties)
pDuplicateOrderExcludedProperties
- the value to set for property DuplicateOrderExcludedPropertiespublic java.util.Properties getDuplicateOrderExcludedProperties()
public atg.commerce.order.CommerceItemManager getCommerceItemManager()
public void setCommerceItemManager(atg.commerce.order.CommerceItemManager pCommerceItemManager)
public java.lang.String[] getNonModifiableOrderStates()
public void setNonModifiableOrderStates(java.lang.String[] pNonModifiableOrderStates)
public java.lang.String[] getNonModifiablePaymentGroupStates()
public void setNonModifiablePaymentGroupStates(java.lang.String[] pNonModifiablePaymentGroupStates)
public java.lang.String getSalePriceListPropertyName()
public void setSalePriceListPropertyName(java.lang.String pSalePriceListPropertyName)
public atg.commerce.pricing.PricingTools getPricingTools()
public void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)
public java.lang.String getTicketOrdersPropertyName()
public void setTicketOrdersPropertyName(java.lang.String pTicketOrdersPropertyName)
pTicketOrdersPropertyName
- public void setValidatePaymentGroupsChainId(java.lang.String pValidatePaymentGroupsChainId)
pValidatePaymentGroupsChainId
- a String
valuepublic java.lang.String getValidatePaymentGroupsChainId()
String
valuepublic CSREnvironmentTools getCSREnvironmentTools()
public void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)
public CSRCloneEditManager getCloneEditManager()
public void setCloneEditManager(CSRCloneEditManager pCloneEditManager)
public CSRAgentMessagingTools getCSRAgentMessagingTools()
public void setClaimableManager(atg.commerce.claimable.ClaimableManager pClaimableManager)
pClaimableManager
- a ClaimableManager
valuepublic atg.commerce.claimable.ClaimableManager getClaimableManager()
ClaimableManager
valuepublic void setIncompleteOrderStates(java.lang.String[] pIncompleteOrderStates)
pIncompleteOrderStates
- an array of order states that indicate that
an order is incompletepublic java.lang.String[] getIncompleteOrderStates()
public void setSubmittedOrderStates(java.lang.String[] pSubmittedOrderStates)
pSubmittedOrderStates
- an array of order states that indicate that
an order is submittedpublic java.lang.String[] getSubmittedOrderStates()
public void setCloneEditOrderStates(java.lang.String[] pCloneEditOrderStates)
pCloneEditOrderStates
- array of order states that indicate that an order should use
clone editing when loaded for modificationspublic java.lang.String[] getCloneEditOrderStates()
public atg.commerce.promotion.PromotionTools getPromotionTools()
public void setPromotionTools(atg.commerce.promotion.PromotionTools pPromotionTools)
pPromotionTools
- The promotionTools to set.public void setUseRequestLocale(boolean pUseRequestLocale)
pUseRequestLocale
- a boolean
valuepublic boolean isUseRequestLocale()
boolean
valuepublic void setCommercePropertyManager(atg.commerce.profile.CommercePropertyManager pCommercePropertyManager)
pCommercePropertyManager
- the component that defines properties of the profile for Commercepublic atg.commerce.profile.CommercePropertyManager getCommercePropertyManager()
public void setCSRConfigurator(CSRConfigurator pCSRConfigurator)
pCSRConfigurator
- the CSRConfiguratorpublic CSRConfigurator getCSRConfigurator()
public void setDuplicateProfileProperties(java.lang.String[] pDuplicateProfileProperties)
pDuplicateProfileProperties
- the names of the profile properties to check when looking for
duplicated profiles.public java.lang.String[] getDuplicateProfileProperties()
public void setOrderCommentItemDescriptorName(java.lang.String pOrderCommentItemDescriptorName)
pOrderCommentItemDescriptorName
- the name of the "comment" item descriptor in the order repositorypublic java.lang.String getOrderCommentItemDescriptorName()
public void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
pOrderManager
- the OrderManager component that will be used to create
a new, empty orderpublic atg.commerce.order.OrderManager getOrderManager()
public void setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
pPriceListManager
- the Price List Managerpublic atg.commerce.pricing.priceLists.PriceListManager getPriceListManager()
public void setPurchaseProcessHelper(atg.commerce.order.purchase.PurchaseProcessHelper pPurchaseProcessHelper)
pPurchaseProcessHelper
- a PurchaseProcessHelper
valuepublic atg.commerce.order.purchase.PurchaseProcessHelper getPurchaseProcessHelper()
PurchaseProcessHelper
valuepublic atg.userprofiling.PropertyManager getProfilePropertyManager()
public void setProfilePropertyManager(atg.userprofiling.PropertyManager pProfilePropertyManager)
pProfilePropertyManager
- The ProfilePropertyManager to setpublic boolean isPersistConfirmationEmails()
public void setPersistConfirmationEmails(boolean pPersistConfirmationEmails)
pPersistConfirmationEmails
- The PersistConfirmationEmails to setpublic boolean isSendEmailInSeparateThread()
public atg.nucleus.ServiceMap getConfirmationEmailMap()
public void setConfirmationEmailMap(atg.nucleus.ServiceMap pConfirmationEmailMap)
pConfirmationEmailMap
- The ConfirmationEmailMap to setpublic atg.userprofiling.email.TemplateEmailSender getTemplateEmailSender()
public void setTemplateEmailSender(atg.userprofiling.email.TemplateEmailSender pTemplateEmailSender)
pTemplateEmailSender
- The TemplateEmailSender to setpublic void setScenarioMessageDispatcher(atg.commerce.csr.scenario.MessageDispatcher pScenarioMessageDispatcher)
pScenarioMessageDispatcher
- component that will send the
initializeProfile eventpublic atg.commerce.csr.scenario.MessageDispatcher getScenarioMessageDispatcher()
public java.util.Map getCloneContactInfoExcludedProperties()
public void setCloneContactInfoExcludedProperties(java.util.Map pCloneContactInfoExcludedProperties)
pCloneContactInfoExcludedProperties
- The cloneContactInfoExcludedProperties to set.public java.util.Map getCloneContactInfoPropExceptions()
public void setCloneContactInfoPropExceptions(java.util.Map pCloneContactInfoPropExceptions)
pCloneContactInfoPropExceptions
- The cloneContactInfoPropExceptions to set.public boolean isAllowCloningContactInfo()
public void setAllowCloningContactInfo(boolean pAllowCloningContactInfo)
pAllowCloningContactInfo
- The allowCloningContactInfo to set.public boolean isPersistOrderForTransientUsers()
persistCurrentOrder()
public void setPersistOrderForTransientUsers(boolean pPersistOrderForTransientUsers)
pPersistOrderForTransientUsers
- persistCurrentOrder()
public java.util.Map addPriceListParameter(java.util.Map pExtraParameters)
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.
pExtraParameters
- the extra parameters map in which to add the price list parameters. if null,
a new map is created.
public void addItemToCollection(atg.repository.RepositoryItem pItem, atg.repository.RepositoryItem pItemToAdd, java.lang.String pPropertyName) throws atg.repository.RepositoryException, atg.beans.PropertyNotFoundException
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.
pItem
- the item that contains the mappItemToAdd
- the item that will be added to the mappPropertyName
- the name of the property containing the map
RepositoryException,
- PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException
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
This method will get the item for update, add the map entry and call updateItem.
The caller is responsible for demarcating transaction boundries.
pItem
- the item that contains the mappItemToAdd
- the item that will be added to the mappKey
- the key to the item in the mappPropertyName
- the name of the property containing the map
RepositoryException,
- PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException
public void addItemToProperty(atg.repository.RepositoryItem pItem, atg.repository.RepositoryItem pItemToSet, java.lang.String pPropertyName) throws atg.repository.RepositoryException, atg.beans.PropertyNotFoundException
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.
pItem
- the item that contains a reference to the new item.pItemToSet
- the item that will be set on the propertypPropertyName
- the name of the property that should be modified.
RepositoryException,
- PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException
public void removeItemFromProperty(atg.repository.RepositoryItem pItem, java.lang.String pPropertyName) throws atg.repository.RepositoryException, atg.beans.PropertyNotFoundException
pItem
- pPropertyName
-
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException
public atg.repository.MutableRepositoryItem createNewAgentOrderCommentItem() throws atg.repository.RepositoryException
atg.repository.RepositoryException
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
pOrder
- the order that will own the commentpComment
- the comment datapCustomerProfile
- the customer profile associated with the order.pAgentProfile
- the agent that made the comment.
atg.repository.RepositoryException
public atg.repository.RepositoryItem findDuplicateUser(java.util.Dictionary pValues) throws atg.repository.RepositoryException
duplicatProfileProperties
property. The value for each property
is extracted from the dictionary and used to query the profile repository.
pValues
- the dictionary of profile property values
atg.repository.RepositoryException
public java.util.Collection findItemsNotInPriceList(java.util.Collection pCommerceItems, atg.repository.RepositoryItem pPriceList)
pCommerceItems
- pPriceList
-
CSREnvironmentTools.findItemsNotInPriceList(Collection, RepositoryItem)
protected java.lang.Object getPropertyValue(java.util.Dictionary pValues, java.lang.String pName)
pValues
- the value dictionarypName
- the key to get
public void removeItemFromCollection(atg.repository.RepositoryItem pItem, java.lang.String pPropertyName, atg.repository.RepositoryItem pRemoveItem) throws atg.repository.RepositoryException, atg.beans.PropertyNotFoundException
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.
pItem
- the item that contains the mappPropertyName
- the name of the collection propertypRemoveItem
- the item to remove from the collection
RepositoryException,
- PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException
public void removeItemFromMap(atg.repository.RepositoryItem pItem, java.lang.String pPropertyName, java.lang.Object pKey) throws atg.repository.RepositoryException, atg.beans.PropertyNotFoundException
This method will get the item for update, remove the map entry and call updateItem.
The caller is responsible for demarcating transaction boundries.
pItem
- the item that contains the mappPropertyName
- the name of the property containing the mappKey
- the key to the item in the map
RepositoryException,
- PropertyNotFoundException
atg.repository.RepositoryException
atg.beans.PropertyNotFoundException
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
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.
pRepricingOperation
- the pricing operator to performpOrder
- the order to repricepUserPricingModels
- the pricing models to use in repricingpLocale
- the localepCustomerProfile
- the customer profile objectpAgentProfile
- the agent profilepExtraParameters
- extra parameters passed to the pricing operationpErrorHandler
- handler of pipeline errors.
atg.commerce.CommerceException
addPriceListParameter(Map)
protected void setPropertiesOfOrderComment(atg.repository.MutableRepositoryItem pComment, java.lang.String pCommentData, java.util.Date pCreationDate, java.lang.String pOwnerId, atg.repository.RepositoryItem pAgent)
pComment
- the mutable comment itempCommentData
- the comment datapCreationDate
- the creation datepOwnerId
- the owner of the comment itempAgent
- the agent that created the commentpublic boolean validateCreditCardExpiration(java.lang.String pMonth, java.lang.String pYear)
pMonth
- the month of expirationpYear
- the year of expiration
public boolean validateCreditCardNumber(java.lang.String pCreditCardNumber)
pCreditCardNumber
-
public java.lang.String maskCreditCardNumber(java.lang.String pCreditCardNumber)
pCreditCardNumber
- the credit card number to mask
NumberFormat.formatCreditCardNumber(String)
public void populateCustomerProfileFromAddress(atg.repository.RepositoryItem pProfile, atg.repository.RepositoryItem pAddress) throws atg.repository.RepositoryException
This implementation copies the first name and last name from the address.
pProfile
- the profile to populatepAddress
- the address from which to populate
atg.repository.RepositoryException
public void setAddressFirstAndLastNameFromProfile(atg.repository.RepositoryItem pAddress, atg.repository.RepositoryItem pProfile) throws atg.repository.RepositoryException
The update occurs only if the values have not yet been set.
pAddress
- the address repository itempProfile
- the profile
atg.repository.RepositoryException
public void initializeDefaultAddresses(atg.repository.RepositoryItem pProfile, java.lang.String pDefaultShippingAddressPropertyName, java.lang.String pDefaultBillingAddressPropertyName, boolean pCloneDefaultShippingForBilling) throws atg.repository.RepositoryException
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.
pProfile
- the affected profile.pDefaultShippingAddressPropertyName
- the name of the profile property containing the default shipping addresspDefaultBillingAddressPropertyName
- the name of the profile property containing the default billing addresspCloneDefaultShippingForBilling
- determines if the default shipping address is cloned for the default billing address
atg.repository.RepositoryException
getCloneDefaultShippingInfoExcludedProperties()
,
getCloneDefaultShippingInfoPropExceptions()
protected java.util.Map getCloneDefaultShippingInfoPropExceptions()
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.
protected java.util.Map getCloneDefaultShippingInfoExcludedProperties()
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.
public void addOrderPromotionsToHolder(atg.commerce.order.Order pOrder, atg.commerce.pricing.PricingModelHolder pPricingModelHolder)
pOrder
- pPricingModelHolder
- PromotionTools.getOrderPromotions(Order, Collection, Collection, Collection, Collection)
public boolean isOrderIncomplete(atg.commerce.order.Order pOrder)
incompleteOrderStates
property.
pOrder
-
public boolean isOrderIncomplete(atg.repository.RepositoryItem pOrderItem)
incompleteOrderStates
property.
pOrderItem
-
public boolean isOrderSubmitted(atg.commerce.order.Order pOrder)
submittedOrderStates
property.
pOrder
-
public boolean isOrderSubmitted(atg.repository.RepositoryItem pOrderItem)
submittedOrderStates
property.
pOrderItem
-
public boolean isCloneEditState(atg.commerce.order.Order pOrder)
pOrder
-
public boolean isCloneEditState()
public boolean isOrderInModifiableState(atg.commerce.order.Order pOrder)
public boolean isPaymentGroupInModifiableState(atg.commerce.order.PaymentGroup pPaymentGroup)
public boolean isOrderModifiable(atg.commerce.order.Order pOrder)
Checks the payment group states and order state. If any of them are in a non-modifiable state, false is retuned.
pOrder
-
isPaymentGroupInModifiableState(PaymentGroup)
,
isOrderInModifiableState(Order)
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
The coupon is claimed, the promotion is granted, the submitted order pricing model holder is updated, the order is repriced and, if the promotions was applied to the order, it is immediately consumed.
pClaimCode
- the claim code for the couponpOrder
- the submitted order that the coupon is being claimed forpCustomerProfile
- the customer profile itempAgentProfile
- the agent profile itempSubmittedOrderPricingModelHolder
- the pricing model holder that is used for repricing the orderpRepricingOperation
- the pricing operation used to reprice the order.pUserLocale
- the user localepExtraParametersMap
- the extra parameters map passed to the repricing operation
atg.repository.RepositoryException
atg.commerce.claimable.ClaimableException
atg.commerce.promotion.PromotionException
atg.commerce.CommerceException
public boolean persistCurrentOrder() throws atg.commerce.CommerceException
If the active customer is transient, the order is saved depending on the configuration
of the persistOrderForTransientUsers
property.
atg.repository.RepositoryException
atg.commerce.CommerceException
public java.util.Locale convertLocale(java.lang.Object pLocale)
pLocale
-
public java.util.Locale getActiveCustomerPricingLocale()
public java.util.Locale getActiveCustomerDisplayLocale()
This method will first look for an assigned locale on the active customer profile. Then it will return the active customer's pricing locale. If all fails it will return the server locale.
public java.lang.String getActiveCustomerCurrencyCode()
public java.text.DecimalFormatSymbols getActiveCustomerDecimalFormatSymbols()
PricingTools.getDefaultLocale()
public void claimCoupon(java.lang.String pClaimCode, java.lang.String pSubmittedOrderPricingOperation, java.util.Map pRepricePrameterMap) throws atg.commerce.claimable.ClaimableException, atg.commerce.CommerceException, atg.repository.RepositoryException
pClaimCode
- the coupon claim codepSubmittedOrderPricingOperation
- pRepricePrameterMap
-
atg.commerce.claimable.ClaimableException
atg.commerce.CommerceException
atg.repository.RepositoryException
ClaimableManager.claimCoupon(String, String)
,
claimCouponForSubmittedOrder(CloneEditState, String, Order, RepositoryItem, RepositoryItem, SubmittedOrderPricingModelHolder, String, Locale, Map)
public void copyContactInfoToCreditCard(atg.core.util.Address pExistingAddress, atg.commerce.order.CreditCard pCreditCard) throws atg.commerce.CommerceException
atg.commerce.CommerceException
public void copyContactInfoToCreditCard(atg.repository.RepositoryItem pExistingAddress, atg.commerce.order.CreditCard pCreditCard) throws atg.commerce.CommerceException
atg.commerce.CommerceException
public boolean sendAutomaticConfirmation(ConfirmationInfo pConfirmationInfo) throws atg.userprofiling.email.TemplateEmailException
If successful, this method will set the autoEmailSent
and autoConfirmationEmailAddress
properties of the confirmation info object.
pConfirmationInfo
-
atg.userprofiling.email.TemplateEmailException
public boolean sendAutomaticConfirmation(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile) throws atg.userprofiling.email.TemplateEmailException
atg.userprofiling.email.TemplateEmailException
sendAutomaticConfirmation(ConfirmationInfo)
public void sendConfirmationEmail(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String pToAddress) throws atg.userprofiling.email.TemplateEmailException
atg.userprofiling.email.TemplateEmailException
sendConfirmationEmail(ConfirmationInfo)
public void sendConfirmationEmail(ConfirmationInfo pConfirmationInfo) throws atg.userprofiling.email.TemplateEmailException
pConfirmationInfo
- contains the required info for sending the confirmation. This object
is also available from within the template.
atg.userprofiling.email.TemplateEmailException
public java.util.Map generateConfirmationTemplateDefaultParams(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile)
pOrder
- - an orderpProfile
- - a customer profile
generateConfirmationTemplateDefaultParams(ConfirmationInfo)
public java.util.Map generateConfirmationTemplateDefaultParams(ConfirmationInfo pConfirmationInfo)
CONFIRMATIONEMAIL_PARAM_NAME
pConfirmationInfo
-
public java.lang.String getConfirmationTemplateToUse()
public void setConfirmationTemplateToUse(java.lang.String pTemplateToUse)
pTemplateToUse
- - the Email Template name.public ReturnRequest getCurrentReturnRequest()
public atg.progressbar.ProgressBarItem getProgressBar(java.lang.String pPath)
public atg.repository.RepositoryItem getClaimableItem(java.lang.String pId) throws atg.repository.RepositoryException
atg.repository.RepositoryException
public atg.payment.creditcard.CreditCardInfo createCreditCardInfo(atg.repository.RepositoryItem pCreditCard) throws atg.repository.RepositoryException, java.beans.IntrospectionException
atg.repository.RepositoryException
java.beans.IntrospectionException
public java.util.List collectUniqueExistingAddresses(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer, atg.commerce.order.Order pOrder)
pOrder
-
public void removeDeletedShippingGroups(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, java.util.List pRemovedEntries)
pShippingGroupMapContainer
- pRemovedEntries
- public void removeDeletedPaymentGroups(atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer, java.util.List pRemovedEntries)
pPaymentGroupMapContainer
- pRemovedEntries
- public int findMatchingAddress(java.lang.Object pAddress, java.util.List pAddressList)
pAddress
-
public void findPropertyChanges(java.lang.Object pNewValues, java.lang.Object pOldValues, java.lang.String[] pPropertyNames, java.util.List pUpdates) throws javax.servlet.ServletException
pNewValues
- pOldValues
- pPropertyNames
- pUpdates
-
javax.servlet.ServletException
public boolean associateTicketAndOrder(java.lang.String pOrderId, atg.repository.MutableRepositoryItem pTicket) throws atg.ticketing.TicketingException
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
atg.ticketing.TicketingException
EnvironmentTools.getActiveTicket()
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
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.
pItem
- item to be overriddenpNewAmount
- the new amountpOrder
- the affected orderpUserLocale
- pTicketId
-
atg.commerce.CommerceException
public void recreateInitialDetailsForItemsMarkedAsFinal(atg.commerce.order.Order pOrder, java.util.Locale pUserLocale, atg.repository.RepositoryItem pProfile) throws atg.commerce.CommerceException
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.
pOrder
- pUserLocale
- pProfile
-
atg.commerce.CommerceException
recreateInitialDetailsForItemMarkedAsFinal(CommerceItem, double, Locale, RepositoryItem, String)
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
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.
atg.commerce.CommerceException
public void overrideShippingPrice(atg.commerce.order.ShippingGroup pShippingGroup, double pNewAmount, atg.commerce.order.Order pOrder, java.util.Locale pUserLocale, java.lang.String pTicketId)
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.
pShippingGroup
- pNewAmount
- pOrder
- pUserLocale
- pTicketId
- protected void overridePriceInfoAmount(atg.commerce.pricing.AmountInfo pAmountInfo, double pNewAmount, double pTotalAdjustment, long pQuantity, java.lang.String pReasonDescription)
pAmountInfo
- pNewAmount
- pTotalAdjustment
- pQuantity
- pReasonDescription
- public boolean isAgentOverridePrice(atg.commerce.order.CommerceItem pItem)
pItem
-
public atg.commerce.pricing.PricingAdjustment getAgentOverrideDetail(atg.commerce.order.CommerceItem pItem)
pItem
-
protected java.util.Map createDuplicateOrderPropExceptionsMap()
This method returns null by default
public java.util.Map getDuplicateOrderExcludedOrderPropertiesMap()
duplicateOrderExcludedProperties
property.
public static java.util.Collection parseString(java.lang.String pString)
public atg.commerce.order.Order duplicateOrder(java.lang.String pOrderId, java.util.Map pPropExceptions, java.util.Map pExcludedProperties) throws atg.commerce.CommerceException
pOrderId
- the order to duplicatepPropExceptions
- the property exceptions used when cloning the order repository itempExcludedProperties
- the exceluded property map used when cloning the order repository item
atg.commerce.CommerceException
RepositoryUtils.cloneItem(RepositoryItem, boolean, Map, Map, MutableRepository, String)
protected void resetReturnInfoForCopy(atg.commerce.order.Order pOrder)
pOrder
- public boolean isTransactionMarkedAsRollBack()
public void ensureOrderAmountRemainingType(atg.commerce.order.purchase.CommerceIdentifierPaymentInfoContainer pCommerceIdentifierPaymentInfoContainer, atg.commerce.order.purchase.PaymentGroupMapContainer pPaymentGroupMapContainer)
pCommerceIdentifierPaymentInfoContainer
- pPaymentGroupMapContainer
- public boolean isHighlightedState(java.lang.Object pCommerceObject)
pCommerceObject
-
public double getRemainingAmount(atg.repository.RepositoryItem pClaimable) throws atg.repository.RepositoryException
The maximum amount is computed as follows:
false
),
pClaimable
- the claimable item
atg.repository.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |