public class StoreOrderTools
extends atg.commerce.order.OrderTools
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string.
|
static java.lang.String |
MSG_DUPLICATE_NICKNAME
Error key for duplicate nickname.
|
static java.lang.String |
MSG_ERROR_SHIPPING_ADDRESS
Error key for shipping address creation.
|
static java.lang.String |
RESOURCE_NAME
Resource bundle name.
|
Constructor and Description |
---|
StoreOrderTools() |
Modifier and Type | Method and Description |
---|---|
void |
assignOmsOrderId(StoreOrderImpl pOrder)
This method assigns an OMS order id, and sets it on the order.
|
protected void |
assignPostRegistrationProperties(java.util.Map pPropertiesToCopy,
atg.userprofiling.Profile pProfile)
This method copies the properties in the incoming Map to the profile item..
|
boolean |
copyAddressToAddressBook(atg.repository.RepositoryItem pProfile,
atg.core.util.Address pAddress,
java.lang.String pNickname)
Get the profile from the order, and update the address book with the shipping group address.
|
boolean |
copyCreditCardToProfile(atg.repository.RepositoryItem pProfile,
atg.commerce.order.Order pOrder,
java.lang.String pCardNickname)
This method gets the credit card from the order, and adds it to the list
of credit cards for this user.
|
boolean |
copyProfileAddressToCreditCard(atg.repository.RepositoryItem pProfile,
atg.commerce.order.Order pOrder,
java.lang.String pNickname)
This method will get an address from the profile's address book, and set
the credit card's billing address.
|
void |
copyShippingToBilling(atg.core.util.Address pAddress,
atg.commerce.order.Order pOrder)
Copies an address to the credit card billing address.
|
java.lang.String |
createCreditCardNickname(java.lang.Object pCreditCard)
This utility method creates an address nickname for the credit card
address.
|
atg.repository.MutableRepositoryItem |
createNewCreditCard(atg.repository.RepositoryItem pProfile)
Creates a new credit card repository item for the given profile, but does
not assign a billing address.
|
protected java.util.Map |
generatePropertiesToCopy(java.lang.String[] pProperties,
atg.userprofiling.Profile pProfile)
This method is used when registering a new user.
|
StoreCatalogProperties |
getCatalogProperties() |
atg.commerce.order.CommerceItemManager |
getCommerceItemManager() |
atg.commerce.order.CreditCard |
getCreditCard(atg.commerce.order.Order pOrder)
Returns the CreditCard payment group for the order.
|
StoreCreditCardTools |
getCreditCardTools()
Returns property creditCardTools
|
java.lang.String |
getCreditCardVerificationNumberFromCard(atg.commerce.order.Order pOrder)
Gets the verification number from the order's credit card payment group.
|
java.lang.String |
getGiftWrapCommerceItemType() |
double |
getGiftWrapPrice(StoreOrderImpl pOrder)
Gets the gift wrap price from the order.
|
atg.service.idgen.IdGenerator |
getIdGenerator() |
java.lang.String |
getOmsOrderIdSpace() |
java.lang.String[] |
getPropertiesToCopyOnRegistration() |
java.util.ResourceBundle |
getResourceBundle() |
java.util.ResourceBundle |
getResourceBundle(java.util.Locale pLocale) |
atg.commerce.order.HardgoodShippingGroup |
getShippingGroup(atg.commerce.order.Order pOrder)
Returns the ShippingGroup.
|
atg.commerce.order.ShippingGroupManager |
getShippingGroupManager() |
java.util.List |
getStoreCreditPaymentGroups(atg.commerce.order.Order pOrder)
Get the store credit payment groups from the order.
|
java.lang.String |
getTestSkuId() |
boolean |
isTestOrder(StoreOrderImpl pOrder)
Checks to see if order is a Test order.
|
boolean |
registerNewUserDuringCheckout(atg.userprofiling.Profile pProfile,
atg.commerce.order.Order pOrder,
java.util.Map pProfileValues)
This method will register a new user during the checkout process.
|
void |
saveAddressToAddressBook(atg.repository.RepositoryItem pProfile,
atg.core.util.Address pAddress,
java.lang.String pNickName)
Saves the address to address book and makes it the default shipping address if it hasn't already
been set.
|
boolean |
saveAddressToDefaultBilling(atg.core.util.Address pAddress,
atg.repository.RepositoryItem pProfile)
Saves the address in the pAddress parameter to the default billing address of the user in
the pProfile parameter.
|
void |
saveDefaultShippingMethod(atg.repository.RepositoryItem pProfile,
java.lang.String pShippingMethod)
Sets the default shipping method for a profile, but only if it hasn't been set already.
|
void |
setCatalogProperties(StoreCatalogProperties pProperties) |
void |
setCommerceItemManager(atg.commerce.order.CommerceItemManager pCommerceItemManager) |
void |
setCreditCardTools(StoreCreditCardTools pCreditCardTools)
Sets property creditCardTools
|
void |
setCreditCardVerificationNumber(atg.commerce.order.Order pOrder,
java.lang.String pVerificationNumber)
Sets the verification number on the order's credit card payment group.
|
void |
setGiftWrapCommerceItemType(java.lang.String pGiftWrapCommerceItemType) |
void |
setIdGenerator(atg.service.idgen.IdGenerator pIdGenerator) |
void |
setOmsOrderIdSpace(java.lang.String pOmsOrderIdSpace) |
void |
setPropertiesToCopyOnRegistration(java.lang.String[] pPropertiesToCopyOnRegistration) |
void |
setShippingGroupManager(atg.commerce.order.ShippingGroupManager pShippingGroupManager) |
void |
setTestSkuId(java.lang.String pTestSkuId) |
protected void |
updateProfileInRepository(atg.userprofiling.Profile pProfile)
Convenience method to update the profile item in the repository.
|
boolean |
validateCreditCardAuthorizationNumber(java.lang.String pAuthNumber)
Verifies that the authentication number is valued and a number.
|
addAllowPartialInStorePayment, addBypassExpiredPromotionsCheckParameter, addBypassPaymentGroupAuthorizationParameter, addManualAdjustment, addManualAdjustment, addQuoteInfo, convertStateStringsToInts, copyAddress, copyAddress, copyAddress, createCommerceItem, createCostCenter, createHandlingInstruction, createManualAdjustmentItem, createNewInstance, createOrder, createOrder, createOrder, createOrder, createOrderFixedAmountAdjustment, createPaymentGroup, createQuoteInfoItem, createRelationship, createShippingGroup, createShippingGroup, deleteManualAdjustment, doStartService, findShippingGroupsWithAddress, getBeanNameToItemDescriptorMap, getCatalogTools, getCommerceItemTypeClassMap, getCostCenterTypeClassMap, getCreateDefaultCostCenter, getCreateDefaultPaymentGroup, getCreateDefaultShippingGroup, getDefaultCommerceItemType, getDefaultCostCenterType, getDefaultHandlingInstructionType, getDefaultItemPriceInfoClass, getDefaultOrderPriceInfoClass, getDefaultOrderType, getDefaultPaymentGroupAddressType, getDefaultPaymentGroupType, getDefaultProfileType, getDefaultShippingGroupAddressType, getDefaultShippingGroupType, getDefaultShippingPriceInfoClass, getDefaultTaxPriceInfoClass, getGiftlistManager, getHandlingTypeClassMap, getInventoryManager, getItemDescriptorForCommerceItemType, getItemDescriptorForOrderType, getItemDescriptorForPaymentType, getItemDescriptorForShippingType, getItemDescriptorToBeanNameMap, getMappedBeanName, getMappedItemDescriptorName, getOrderFixedAmountAdjustmentType, getOrderItemDescriptorName, getOrderLookupService, getOrderRepository, getOrderTypeClassMap, getPaymentGroupBillingAddressClassNameMap, getPaymentTypeClassMap, getPipelineManager, getProfileRepository, getProfileTools, getQuoteInfoItemDescriptorName, getRelationshipTypeClassMap, getShippingGroupShippingAddressClassNameMap, getShippingTypeClassMap, getTransactionManager, initializeRelationship, initializeRelationship, initializeRelationship, initializeRelationship, initializeRelationship, initializeRelationship, initializeRelationship, invertBeanToItemMap, isAssignCatalogInCommerceItem, isNullAddress, isNullCreditCard, isOrderState, registerSynchronization, setAssignCatalogInCommerceItem, setBeanNameToItemDescriptorMap, setCatalogTools, setCommerceItemTypeClassMap, setCostCenterTypeClassMap, setCreateDefaultCostCenter, setCreateDefaultPaymentGroup, setCreateDefaultShippingGroup, setDefaultCommerceItemType, setDefaultCostCenterType, setDefaultHandlingInstructionType, setDefaultItemPriceInfoClass, setDefaultOrderPriceInfoClass, setDefaultOrderType, setDefaultPaymentGroupAddressType, setDefaultPaymentGroupType, setDefaultProfileType, setDefaultShippingGroupAddressType, setDefaultShippingGroupType, setDefaultShippingPriceInfoClass, setDefaultTaxPriceInfoClass, setGiftlistManager, setHandlingTypeClassMap, setInventoryManager, setItemDescriptorToBeanNameMap, setOrderFixedAmountAdjustmentType, setOrderItemDescriptorName, setOrderLookupService, setOrderRepository, setOrderTypeClassMap, setPaymentGroupBillingAddressClassNameMap, setPaymentTypeClassMap, setPipelineManager, setProfileRepository, setProfileTools, setQuoteInfoItemDescriptorName, setRelationshipTypeClassMap, setShippingGroupShippingAddressClassNameMap, setShippingTypeClassMap, setTransactionManager
addLogListener, createAdminServlet, 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, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final java.lang.String MSG_DUPLICATE_NICKNAME
public static final java.lang.String MSG_ERROR_SHIPPING_ADDRESS
public static final java.lang.String RESOURCE_NAME
public void setShippingGroupManager(atg.commerce.order.ShippingGroupManager pShippingGroupManager)
pShippingGroupManager
- - a shipping group manager
value.public atg.commerce.order.ShippingGroupManager getShippingGroupManager()
shipping group manager
value.public java.lang.String getGiftWrapCommerceItemType()
public void setGiftWrapCommerceItemType(java.lang.String pGiftWrapCommerceItemType)
pGiftWrapCommerceItemType
- - gift wrap commerce item type.public atg.commerce.order.CommerceItemManager getCommerceItemManager()
public void setCommerceItemManager(atg.commerce.order.CommerceItemManager pCommerceItemManager)
pCommerceItemManager
- - commerce item manager.public atg.service.idgen.IdGenerator getIdGenerator()
public void setIdGenerator(atg.service.idgen.IdGenerator pIdGenerator)
pIdGenerator
- - id generator.public void setPropertiesToCopyOnRegistration(java.lang.String[] pPropertiesToCopyOnRegistration)
pPropertiesToCopyOnRegistration
- - properties to copy on registration.public java.lang.String[] getPropertiesToCopyOnRegistration()
public java.lang.String getOmsOrderIdSpace()
public void setOmsOrderIdSpace(java.lang.String pOmsOrderIdSpace)
pOmsOrderIdSpace
- - the name of the id space for OMS order ids.public java.lang.String getTestSkuId()
public void setTestSkuId(java.lang.String pTestSkuId)
pTestSkuId
- - the id of the test SKU.public StoreCatalogProperties getCatalogProperties()
public void setCatalogProperties(StoreCatalogProperties pProperties)
pProperties
- - catalog properties.public StoreCreditCardTools getCreditCardTools()
public void setCreditCardTools(StoreCreditCardTools pCreditCardTools)
pCreditCardTools
- the value to set for property creditCardToolspublic java.util.ResourceBundle getResourceBundle()
public java.util.ResourceBundle getResourceBundle(java.util.Locale pLocale)
pLocale
- the local of resource bundle.public atg.commerce.order.CreditCard getCreditCard(atg.commerce.order.Order pOrder)
pOrder
- - order to get credit card from.public java.util.List getStoreCreditPaymentGroups(atg.commerce.order.Order pOrder)
pOrder
- - the order.public void copyShippingToBilling(atg.core.util.Address pAddress, atg.commerce.order.Order pOrder)
pAddress
- - the address that is copied the order's credit card payment group address.pOrder
- - order to copy address info.public boolean copyAddressToAddressBook(atg.repository.RepositoryItem pProfile, atg.core.util.Address pAddress, java.lang.String pNickname) throws atg.commerce.CommerceException
pProfile-
- profile to copy address to.pAddress
- -the address to copy.pNickname
- -key for address book map.atg.commerce.CommerceException
- if error with copy.public boolean copyProfileAddressToCreditCard(atg.repository.RepositoryItem pProfile, atg.commerce.order.Order pOrder, java.lang.String pNickname) throws atg.commerce.CommerceException
pProfile
- -to get address from.pOrder
- -the order to set the billing address on.pNickname
- -the nickname of the Address book address.atg.commerce.CommerceException
- if error storing address.public boolean copyCreditCardToProfile(atg.repository.RepositoryItem pProfile, atg.commerce.order.Order pOrder, java.lang.String pCardNickname)
pOrder
- - order to find shipping address.pCardNickname
- -key for address book map.pProfile
- - profile to copy address to.public atg.repository.MutableRepositoryItem createNewCreditCard(atg.repository.RepositoryItem pProfile) throws atg.repository.RepositoryException
pProfile
- - the customer profile.atg.repository.RepositoryException
- if there was an error when creating the new repository item.public boolean saveAddressToDefaultBilling(atg.core.util.Address pAddress, atg.repository.RepositoryItem pProfile)
pAddress
- - address.pProfile
- - profile.public java.lang.String createCreditCardNickname(java.lang.Object pCreditCard)
As an example, Visa 4111111111111111 will be converted to Visa - 1111 for a nickname.
pCreditCard
- - credit card to base nickname on.public atg.commerce.order.HardgoodShippingGroup getShippingGroup(atg.commerce.order.Order pOrder)
Returns the ShippingGroup. We only have one shipping group, and this method relies on this fact. It will throw a warning if an extra shipping group ever sneaks onto the order.
If multiple ship-to is supported, then this method should not be used.
pOrder
- - the order object.public boolean registerNewUserDuringCheckout(atg.userprofiling.Profile pProfile, atg.commerce.order.Order pOrder, java.util.Map pProfileValues) throws atg.commerce.CommerceException
This method copies the billing address first and last name to the profile. This is because we don't have any other information about the user at this point.
pProfile
- - profile to register.pOrder
- - order to pull registration info from.pProfileValues
- - profile values.atg.commerce.CommerceException
- if errors occurs.protected java.util.Map generatePropertiesToCopy(java.lang.String[] pProperties, atg.userprofiling.Profile pProfile)
pProperties
- - the properties to copy.pProfile
- - the profile to get the properties from.protected void assignPostRegistrationProperties(java.util.Map pPropertiesToCopy, atg.userprofiling.Profile pProfile)
pPropertiesToCopy
- - the map of properties to copy.pProfile
- - profile to copy properties to.protected void updateProfileInRepository(atg.userprofiling.Profile pProfile) throws atg.repository.RepositoryException
pProfile
- - the profile to update.atg.repository.RepositoryException
- if update fails.public void assignOmsOrderId(StoreOrderImpl pOrder)
pOrder
- - the order parameter.public double getGiftWrapPrice(StoreOrderImpl pOrder)
pOrder
- - order to get GW price from.public boolean isTestOrder(StoreOrderImpl pOrder)
pOrder
- - order.public void saveAddressToAddressBook(atg.repository.RepositoryItem pProfile, atg.core.util.Address pAddress, java.lang.String pNickName) throws atg.commerce.CommerceException
pProfile
- - profile.pAddress
- - address.pNickName
- - nickname.atg.commerce.CommerceException
- if commerce error occurs.public void saveDefaultShippingMethod(atg.repository.RepositoryItem pProfile, java.lang.String pShippingMethod)
pProfile
- - profile.pShippingMethod
- - shipping method.public boolean validateCreditCardAuthorizationNumber(java.lang.String pAuthNumber)
pAuthNumber
- - authentication number.public void setCreditCardVerificationNumber(atg.commerce.order.Order pOrder, java.lang.String pVerificationNumber)
pOrder
- - order.pVerificationNumber
- - verification number.public java.lang.String getCreditCardVerificationNumberFromCard(atg.commerce.order.Order pOrder)
pOrder
- - order.