|
||||||||||
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.commerce.order.OrderTools
atg.projects.store.order.StoreOrderTools
public class StoreOrderTools
This is the OrderTools class for the Store ecommerce site. Order manipulations happen in this class. This is also the holder for information about commerce item and order types.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string. |
static java.lang.String |
MSG_DUPLICATE_NICKNAME
Error keys |
static java.lang.String |
MSG_ERROR_SHIPPING_ADDRESS
|
static java.lang.String |
RESOURCE_NAME
Resource bundle 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 | |
---|---|
StoreOrderTools()
|
Method Summary | |
---|---|
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. |
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 |
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 auth number is valued and a number. |
Methods inherited from class atg.commerce.order.OrderTools |
---|
addManualAdjustment, addManualAdjustment, convertStateStringsToInts, copyAddress, copyAddress, copyAddress, createCommerceItem, createCostCenter, createHandlingInstruction, createManualAdjustmentItem, createOrder, createOrder, createOrder, createOrder, createOrderFixedAmountAdjustment, createPaymentGroup, 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, 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, setRelationshipTypeClassMap, setShippingGroupShippingAddressClassNameMap, setShippingTypeClassMap, setTransactionManager |
Methods inherited from class atg.nucleus.GenericService |
---|
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 |
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 |
---|
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
Constructor Detail |
---|
public StoreOrderTools()
Method Detail |
---|
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 genetator.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 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 addresspOrder
- - order to copy address infopublic boolean copyAddressToAddressBook(atg.repository.RepositoryItem pProfile, atg.core.util.Address pAddress, java.lang.String pNickname) throws atg.commerce.CommerceException
pProfile
- profile to copy address topAddress
- the address to copypNickname
- key for address book map
atg.commerce.CommerceException
- if error with copypublic boolean copyProfileAddressToCreditCard(atg.repository.RepositoryItem pProfile, atg.commerce.order.Order pOrder, java.lang.String pNickname) throws atg.commerce.CommerceException
pProfile
- to get address frompOrder
- the order to set the billing address on.pNickname
- the nickname of the Address book address
atg.commerce.CommerceException
- if error storing addresspublic boolean copyCreditCardToProfile(atg.repository.RepositoryItem pProfile, atg.commerce.order.Order pOrder, java.lang.String pCardNickname)
pOrder
- order to find shipping addresspCardNickname
- key for address book mappProfile
- 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
- - addresspProfile
- - 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)
If multiple ship-tos are 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 will register a new user during the checkout process. There are a number of steps to register the user: Copy profile properties before registration. Create the hashed password Register the user Copy the previously transient profiles to the new user
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 registerpOrder
- - order to pull registration info frompProfileValues
- - profile values
atg.commerce.CommerceException
- if errors occursprotected java.util.Map generatePropertiesToCopy(java.lang.String[] pProperties, atg.userprofiling.Profile pProfile)
pProperties
- - the properties to copypProfile
- - the profile to get the properties from
protected void assignPostRegistrationProperties(java.util.Map pPropertiesToCopy, atg.userprofiling.Profile pProfile)
pPropertiesToCopy
- - the map of properties to copypProfile
- - profile to copy properties toprotected void updateProfileInRepository(atg.userprofiling.Profile pProfile) throws atg.repository.RepositoryException
pProfile
- - the profile to update
atg.repository.RepositoryException
- if update failspublic void assignOmsOrderId(StoreOrderImpl pOrder)
By default, the omsOrderId is set same as the order's id.
pOrder
- - the order parameterpublic 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
- - profilepAddress
- - addresspNickName
- - nickname
atg.commerce.CommerceException
- if commerce error occurspublic void saveDefaultShippingMethod(atg.repository.RepositoryItem pProfile, java.lang.String pShippingMethod)
pProfile
- - profilepShippingMethod
- - shipping methodpublic boolean validateCreditCardAuthorizationNumber(java.lang.String pAuthNumber)
pAuthNumber
- - authentication number
public void setCreditCardVerificationNumber(atg.commerce.order.Order pOrder, java.lang.String pVerificationNumber)
pOrder
- - orderpVerificationNumber
- - verification numberpublic java.lang.String getCreditCardVerificationNumberFromCard(atg.commerce.order.Order pOrder)
pOrder
- - order
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |