|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.userprofiling.ProfileTools atg.commerce.profile.CommerceProfileTools
public class CommerceProfileTools
This set of utilities provide additional profile functionality as required by Dynamo Commerce Server (DCS). The functions include creating and editing primary and secondary addresses as well as credit card information for a customer.
ProfileTools
,
CommercePropertyManager
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static java.lang.String[] |
CREDIT_CARD_PROPERTIES
|
protected static java.lang.String |
ID_PROPERTY_NAME
|
protected static java.lang.String |
LOCK_NAME_ATTRIBUTE_NAME
|
protected ComponentName |
mProfilePath
|
protected ComponentName |
mShoppingCartPath
|
protected ComponentName |
mUserPricingModelsPath
|
protected static java.lang.String |
NO_CREDIT_CARD
|
protected static int |
ONE
|
protected static int |
TWO
|
protected static int |
ZERO
|
Fields inherited from class atg.userprofiling.ProfileTools |
---|
DPS_VERSION, DPS_VERSION_NUM, mPasswordGenerator, mPasswordRuleChecker, mPreviousNPasswordManager |
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 | |
---|---|
CommerceProfileTools()
Constructs an CommerceProfileTools object. |
Method Summary | |
---|---|
protected void |
acquireTransactionLock()
Attempt to acquire a local lock before creating a transaction that may modify the order, but only if useLocksAroundTransactions is set to true. |
protected void |
addActivePromotions(RepositoryItem pGuestUser,
RepositoryItem pAuthenticatedUser)
Copy the active promotions from the guest user to the authenticated user |
void |
addAddressesFromMapProperties(RepositoryItem pProfile,
java.lang.String[] pPropertyNames,
java.util.List pDestination)
This method adds addresses from map properties to the all available address list. |
void |
addCreditCardToUsersMap(RepositoryItem pProfile,
RepositoryItem pCreditCard)
Deprecated. |
void |
addCreditCardToUsersMap(RepositoryItem pProfile,
RepositoryItem pCreditCard,
java.lang.String pNickName)
Adds the new credit card to the users profile. |
void |
addProfileGiftlistAddress(RepositoryItem pProfile,
java.lang.String pAddressName,
RepositoryItem pAddress)
This method adds a giftlift address to the customer's giftlist address property. |
void |
addProfileRepositoryAddress(RepositoryItem pProfile,
java.lang.String pAddressName,
RepositoryItem pAddress)
This method adds a profile repository address to the customer's secondary addresses or address book. |
void |
addUniqueAddressToAddressList(java.util.Collection pAddresses,
RepositoryItem pNewAddress)
This method iterates through list of addresses and if any same address found in the collection, this method ends the process and returns. |
boolean |
areAddressesEqual(java.lang.Object pAddress1,
java.lang.Object pAddress2,
java.lang.String[] pPropertyNamesToCompare)
Compares two addresses to determine if they are equal. |
boolean |
areAddressesEqual(RepositoryItem pAddress1,
RepositoryItem pAddress2,
java.lang.String[] pPropertyNamesToCompare)
Compares two contactInfo repository items to determine if they are equal. |
void |
changeCreditCardNickname(RepositoryItem pProfile,
java.lang.String pOldCreditCardNickname,
java.lang.String pNewCreditCardNickname)
Changes credit card nickname in the map of user's credit cards |
void |
changeSecondaryAddressName(RepositoryItem pProfile,
java.lang.String pOldAddressName,
java.lang.String pNewAddressName)
Changes secondary address nickname |
MutableRepositoryItem |
cloneContactInfoItem(RepositoryItem pContactInfoItem,
java.util.Map pExcludedProperties,
java.util.Map pPropExceptions,
boolean pDeepCopy,
java.lang.String pRepositoryId)
Clones a contact info repository item. |
void |
copyCreditCard(CreditCard pFromCreditCard,
RepositoryItem pToCreditCard)
Copying a credit card is a two step process. |
void |
copyCreditCard(RepositoryItem pFromCreditCard,
CreditCard pToCreditCard)
Copying a credit card is a two step process. |
void |
copyCreditCardToPaymentGroup(java.lang.String pNickname,
CreditCard paymentGroup,
RepositoryItem pProfile,
java.util.Locale pLocale)
Copy the credit card from the users profile to the payment group. |
void |
copyCreditCardToProfile(CreditCard pCreditCard,
RepositoryItem pProfile)
Deprecated. |
void |
copyCreditCardToProfile(CreditCard pCreditCard,
RepositoryItem pProfile,
java.lang.String pNickName)
Copy the credit card passed in the parameter pCreditCard to the profile passed in the parameter pProfile. |
void |
copyShallowCreditCardProperties(java.lang.Object pFromCreditCard,
java.lang.Object pToCreditCard)
The shallow properties of a credit card are copied. |
MutableRepositoryItem |
createCreditCardItem(RepositoryItem pProfile)
Creates a new credit card repository item for the given profile |
java.lang.String |
createProfileCreditCard(RepositoryItem pProfile,
java.util.Map pNewCreditCard,
java.lang.String pCreditCardNickname,
java.lang.Object pBillingAddress)
This method constructs a new credit card. |
java.lang.String |
createProfileRepositoryPrimaryAddress(RepositoryItem pProfile,
java.lang.String pAddressProperty,
Address pAddress)
Creates a new address in the user's Profile primary address book. |
java.lang.String |
createProfileRepositorySecondaryAddress(RepositoryItem pProfile,
java.lang.String pAddressName,
Address pAddress)
Creates a new address in the user's Profile (under the secondaryAddresses attribute. |
int |
findOrderToLoad(java.util.List pOrders)
Return the index of the order that should be used as the primary order for this user. |
java.lang.String |
generateUniqueNickname(java.lang.String pNickname)
This method generates the unique nickname. |
Address |
getAddressFromRepositoryItem(RepositoryItem pItem)
This method creates an address object and sets the property values to values in the repository item passed in. |
java.util.List |
getAllAvailableAddresses(RepositoryItem pProfile)
This method constructs a consolidated collection of addresses that are associated with the current customer profile. |
java.util.List |
getAllBillingAddresses(RepositoryItem pProfile)
This method constructs a consolidated collection of all billing addresses that are associated with the current customer profile. |
java.util.List |
getAllShippingAddresses(RepositoryItem pProfile)
This method constructs a consolidated collection of all shipping addresses that are associated with the current customer profile. |
java.lang.String[] |
getBillingAddressMapProperties()
|
java.lang.String[] |
getCompareAddressPropertyNames()
Returns the CompareAddressPropertyNames |
RepositoryItem |
getCreditCardById(java.lang.String pCreditCardRepositoryId)
Given an id for credit card to retrieve, grab it out of the users Profile object and return this as a RepositoryItem. |
RepositoryItem |
getCreditCardByNickname(java.lang.String pCreditCardNickname,
RepositoryItem pProfile)
Retrieves credit card by nickname and profile. |
java.lang.String |
getCreditCardNickname(RepositoryItem pProfile,
RepositoryItem pCreditCard)
Gets nickname for the given profile's secondary address |
java.lang.String[] |
getCreditCardProperties()
Return the creditCardProperties property. |
RepositoryItem |
getDefaultBillingAddress(RepositoryItem pProfile)
Get the default Billing address repository item by getting property name from the property manager. |
RepositoryItem |
getDefaultCreditCard(RepositoryItem pProfile)
Get the default credit card repository item by getting property name from the property manager. |
java.util.Locale |
getDefaultLocale()
Returns property DefaultLocale. |
RepositoryItem |
getDefaultShippingAddress(RepositoryItem pProfile)
Get the default shipping address repository item by getting property name from the property manager. |
java.lang.String[] |
getEmptyAddressPropertyNames()
Returns the emptyAddressPropertyNames |
atg.service.localeservice.LocaleService |
getLocaleService()
Returns property localeService |
java.lang.String |
getOrderItemDescriptorName()
Return the orderItemDescriptorName property. |
OrderManager |
getOrderManager()
Returns property orderManager |
java.util.Map |
getPricingParameters()
This returns the map that will be passed into pricingTools.performPricingOperation as the pExtraParameters. |
PricingTools |
getPricingTools()
Returns property pricingTools |
RepositoryItem |
getProfileAddress(RepositoryItem pProfile,
java.lang.String pProfileAddressName)
Given a nickname for an address to retrieve, grab it out of the users Profile object and return this as a RepositoryItem. |
RepositoryItem |
getProfileAddressById(java.lang.String pProfileAddressId)
Given an id for an address to retrieve, grab it out of the users Profile object and return this as a RepositoryItem. |
java.util.Map |
getProfileAddresses(RepositoryItem pProfile)
Returns a map of all addresses by id that the user has in their address book. |
java.lang.String |
getProfileAddressName(RepositoryItem pProfile,
RepositoryItem pAddress)
Gets nickname for the given profile's address. |
java.util.Collection |
getProfileAddressNames(RepositoryItem pProfile)
Returns a list of all the names that the user has in their address book. |
RepositoryItem |
getProfileForOrder(Order pOrder)
Return the user profile of the user who placed a given order. |
RepositoryItem |
getProfileForOrder(java.lang.String pOrderId)
Return the user profile of the user who placed the order with id pOrderId . |
java.lang.String |
getProfileIdPropertyName()
Return the ProfileIdPropertyName property. |
MutableRepositoryItem |
getProfileItem(java.lang.String pProfileId)
Get the profile repository item for the given user If the given id is null, returns the current user |
java.lang.String |
getProfilePath()
Returns property ProfilePath |
PromotionTools |
getPromotionTools()
The promotion management utility |
java.lang.String |
getRepriceOrderPricingOp()
Returns the pricing operation that should be performed when the order(s) is priced after login. |
java.lang.String[] |
getShippingAddressMapProperties()
|
java.lang.String |
getShoppingCartPath()
Returns property ShoppingCartPath |
atg.multisite.SiteGroupManager |
getSiteGroupManager()
Returns the SiteGroupManager |
java.lang.String |
getSortOrdersByProperty()
Returns property SortOrdersByProperty |
TransactionLockFactory |
getTransactionLockFactory()
The factory used to get the service that is used to get and release locks before modifying the order |
java.lang.String |
getUniqueAddressNickname(java.lang.Object pAddress,
java.util.Collection pNicknames,
java.lang.String pNewNickname)
This method returns a unique address nickname. |
java.lang.String |
getUniqueCreditCardNickname(java.lang.Object pCreditCard,
java.util.Collection pNicknames,
java.lang.String pNewNickname)
This method returns a unique credit card nickname. |
java.lang.String |
getUniqueCreditCardNickname(java.lang.Object pCreditCard,
RepositoryItem pProfile,
java.lang.String pNewNickname)
This method returns a unique credit card nickname. |
java.lang.String |
getUniqueNickname(java.util.Collection pNickNames,
java.lang.String pCurrentNickname)
This method returns a unique name from profile and a collection of names. |
java.lang.String |
getUniqueNicknameSeparator()
|
java.lang.String |
getUniqueShippingAddressNickname(java.lang.Object pAddress,
RepositoryItem pProfile,
java.lang.String pNewNickname)
This method returns a unique shipping address nickname. |
java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
java.lang.String |
getUserPricingModelsPath()
Returns property UserPricingModelsPath |
java.util.Map |
getUsersCreditCardMap(RepositoryItem pProfile)
Retrieves map of credit cards for a given profile. |
boolean |
isAddressEmpty(java.lang.Object pAddress)
Determines if the given address is empty. |
boolean |
isAddressEmpty(RepositoryItem pAddress)
Determines if the given repository address is empty. |
boolean |
isAscendingOrder()
Returns property AscendingOrder |
boolean |
isCreditCardEmpty(CreditCard pCreditCard)
Checks to see if a CreditCard object is empty. |
boolean |
isDuplicateAddressNickName(RepositoryItem pProfile,
java.lang.String pNewNickname)
Determines if the nickname is already in the profile's address map. |
boolean |
isDuplicateCreditCardNickname(RepositoryItem pProfile,
java.lang.String pNewNickname)
Determines if the nickname is already in the profile's credit card map. |
boolean |
isDuplicateNickname(java.util.Collection pNicknames,
java.lang.String pNewNickname)
Determines if the nickname is already in the collection. |
boolean |
isMergeOrders()
Return the mergeOrders property. |
boolean |
isRepriceOrderOnLogin()
Returns property RepriceOrderOnLogin |
boolean |
isSelectLastModifiedOrder()
|
boolean |
isUseRequestLocale()
Returns property UseRequestLocale |
void |
loadShoppingCarts(RepositoryItem pProfile,
OrderHolder pShoppingCart)
This method finds all the shopping carts for the user and places them into the session-scope OrderHolder component. |
void |
loadShoppingCartsWithLock(RepositoryItem pProfile,
OrderHolder pShoppingCart)
Deprecated. Please use loadShoppingCarts instead |
void |
loadUserShoppingCartForLogin(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
When an auto-login operation occurs, we attempt to find any old shopping carts from previous sessions. |
void |
loadUserShoppingCartForLogin(RepositoryItem pProfile,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
When an auto-login operation occurs, we attempt to find any old shopping carts from previous sessions. |
void |
loadUserShoppingCartForLogin(RepositoryItem pProfile,
OrderHolder pShoppingCart,
PricingModelHolder pUserPricingModels,
java.util.Locale pLocale)
When a login operation occurs, we attempt to find any old shopping carts from previous sessions. |
protected void |
persistOrderIfNeeded(Order pOrder)
If the order is transient and not empty then make it persistent through the Order Manager. |
void |
persistShoppingCarts(RepositoryItem pProfile,
OrderHolder pShoppingCart)
This method will persist the current and any "saved" shopping carts. |
void |
persistShoppingCartsWithLock(RepositoryItem pProfile,
OrderHolder pShoppingCart)
Deprecated. use persistShoppingCarts |
protected void |
postCreateUser(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
RepositoryItem pProfile,
OrderHolder pShoppingCart)
After registration, any transient orders are made persistent through the persistShoppingCarts method of the CommerceProfileTools component |
protected void |
postLoginUser(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
RepositoryItem pProfile,
OrderHolder pShoppingCart,
PricingModelHolder pPricingModelHolder)
After logging in the user's session cached promotions are reloaded into the PricingModelHolder. |
protected void |
releaseTransactionLock()
Attempt to release a local lock |
void |
removeProfileCreditCard(RepositoryItem pProfile,
java.lang.String pCreditCardName)
Removes credit card from profile's credit cards map. |
void |
removeProfileRepositoryAddress(RepositoryItem pProfile,
java.lang.String pAddressName)
Removes the named address entry from the users Profile. |
void |
removeProfileRepositoryAddress(RepositoryItem pProfile,
java.lang.String pAddressName,
boolean pCheckIfDefault)
Removes the named address entry from the users Profile. |
protected void |
repriceOrder(Order pOrder,
RepositoryItem pProfile,
PricingModelHolder pUserPricingModels,
java.util.Locale pLocale,
java.lang.String pPricingOperation)
Reprice a single given order, this calls into the PricingTools.performPricingOperation method. |
void |
repriceShoppingCarts(RepositoryItem pProfile,
OrderHolder pShoppingCart,
PricingModelHolder pUserPricingModels,
java.util.Locale pLocale)
Reprice all of the orders in the OrderHolder component |
void |
repriceShoppingCarts(RepositoryItem pProfile,
OrderHolder pShoppingCart,
PricingModelHolder pUserPricingModels,
java.util.Locale pLocale,
java.lang.String pPricingOperation)
Reprice all of the orders in the OrderHolder component |
void |
repriceShoppingCarts(RepositoryItem pProfile,
OrderHolder pShoppingCart,
java.lang.String pPricingOperation,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Reprice all of the orders in the OrderHolder component. |
void |
repriceShoppingCartsWithLock(RepositoryItem pProfile,
OrderHolder pShoppingCart,
PricingModelHolder pUserPricingModels,
java.util.Locale pLocale,
java.lang.String pPricingOperation)
Deprecated. use repriceShoppingCarts |
void |
setAscendingOrder(boolean pAscendingOrder)
Sets property AscendingOrder |
void |
setBillingAddressMapProperties(java.lang.String[] pBillingAddressMapProperties)
Sets an array of profile map properties that contain addresses. |
void |
setCompareAddressPropertyNames(java.lang.String[] pCompareAddressPropertyNames)
Sets the CompareAddressPropertyNames |
void |
setCreditCardProperties(java.lang.String[] pCreditCardProperties)
Set the creditCardProperties property. |
boolean |
setDefaultCreditCard(RepositoryItem pProfile,
java.lang.String pCreditCardNickname)
Make the credit card identified by pCreditCardName default in the given profile. |
boolean |
setDefaultCreditCardIfNull(RepositoryItem pProfile,
java.lang.String pCreditCardName)
Sets specified by nickname credit card as default credit card if profile's default credit card is not specified yet |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale |
boolean |
setDefaultShippingAddress(RepositoryItem pProfile,
java.lang.String pAddressName)
Sets specified by nickname secondary address as default shipping address. |
boolean |
setDefaultShippingAddressIfNull(RepositoryItem pProfile,
java.lang.String pAddressName)
Sets specified by nickname shipping address as default shipping address if profile's default shipping address is not specified |
void |
setEmptyAddressPropertyNames(java.lang.String[] pEmptyAddressPropertyNames)
Sets the emptyAddressPropertyNames |
MutableRepositoryItem |
setItemPropertyToAddress(RepositoryItem pItem,
RepositoryItem pAddress,
java.lang.String pPropertyName,
java.util.Map pExcludedProperties,
java.util.Map pPropExceptions)
Deprecated. |
MutableRepositoryItem |
setItemPropertyToAddress(RepositoryItem pItem,
RepositoryItem pAddress,
java.lang.String pPropertyName,
java.util.Map pExcludedProperties,
java.util.Map pPropExceptions,
boolean pPerformCloning)
If desired (based on the performCloning flag), Clones the address item and changes the item's property to reference the clone. |
void |
setLocaleService(atg.service.localeservice.LocaleService pLocaleService)
Sets property localeService |
void |
setMergeOrders(boolean pMergeOrders)
Set the mergeOrders property. |
void |
setOrderItemDescriptorName(java.lang.String pOrderItemDescriptorName)
Set the orderItemDescriptorName property. |
void |
setOrderManager(OrderManager pOrderManager)
Sets property orderManager |
void |
setPricingTools(PricingTools pPricingTools)
Sets property pricingTools |
void |
setProfileIdPropertyName(java.lang.String pProfileIdPropertyName)
Set the ProfileIdPropertyName property. |
void |
setProfilePath(java.lang.String pProfilePath)
Sets property ProfilePath |
void |
setPromotionTools(PromotionTools pPromotionTools)
|
void |
setRepriceOrderOnLogin(boolean pRepriceOrderOnLogin)
Sets property RepriceOrderOnLogin |
void |
setRepriceOrderPricingOp(java.lang.String pRepriceOrderPricingOp)
This property should be set to the type of pricing operation that should be executed when the order(s) is repriced after login. |
void |
setSelectLastModifiedOrder(boolean pSelectLastModifiedOrder)
If set to true will return the order that was last modified in the list of open orders for the user. |
void |
setShippingAddressMapProperties(java.lang.String[] pShippingAddressMapProperties)
Sets an array of profile map properties that contain addresses. |
void |
setShoppingCartPath(java.lang.String pShoppingCartPath)
Sets property ShoppingCartPath |
void |
setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
Sets the SiteGroupManager |
void |
setSortOrdersByProperty(java.lang.String pSortOrdersByProperty)
Sets property SortOrdersByProperty |
void |
setTransactionLockFactory(TransactionLockFactory pTransactionLockFactory)
|
void |
setUniqueNicknameSeparator(java.lang.String pUniqueNicknameSeparator)
|
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale |
void |
setUserPricingModelsPath(java.lang.String pUserPricingModelsPath)
Sets property UserPricingModelsPath |
boolean |
shouldLoadShoppingCarts(OrderHolder pShoppingCart)
Returns whether shopping carts should be loaded. |
protected void |
updateOrderProfileId(Order pOrder,
RepositoryItem pProfile)
This method makes sure the profile id of the order is the same as the current user. |
void |
updateProfileCreditCard(RepositoryItem pCartToUpdate,
RepositoryItem pProfile,
java.util.Map pUpdatedCreditCard,
java.lang.String pNewCreditCardNickname,
java.util.Map pBillingAddress,
java.lang.String pBillingAddressClassName)
Updates profile's credit card. |
void |
updateProfileRepositoryAddress(RepositoryItem pRepositoryAddress,
Address pAddress)
updates a repository address item with values in address object passed in. |
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, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected static final int ZERO
protected static final int ONE
protected static final int TWO
protected static final java.lang.String[] CREDIT_CARD_PROPERTIES
protected static final java.lang.String NO_CREDIT_CARD
protected static final java.lang.String LOCK_NAME_ATTRIBUTE_NAME
protected static final java.lang.String ID_PROPERTY_NAME
protected ComponentName mUserPricingModelsPath
protected ComponentName mShoppingCartPath
protected ComponentName mProfilePath
Constructor Detail |
---|
public CommerceProfileTools()
Method Detail |
---|
public OrderManager getOrderManager()
public void setOrderManager(OrderManager pOrderManager)
pOrderManager
- the value to set for property orderManagerpublic atg.service.localeservice.LocaleService getLocaleService()
public void setLocaleService(atg.service.localeservice.LocaleService pLocaleService)
pLocaleService
- the value to set for property localeServicepublic atg.multisite.SiteGroupManager getSiteGroupManager()
public void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
pSiteGroupManager
- the value to set for property siteGroupManagerpublic PricingTools getPricingTools()
public void setPricingTools(PricingTools pPricingTools)
pPricingTools
- the value to set for property pricingToolspublic void setUserPricingModelsPath(java.lang.String pUserPricingModelsPath)
public java.lang.String getUserPricingModelsPath()
public void setShoppingCartPath(java.lang.String pShoppingCartPath)
public java.lang.String getShoppingCartPath()
public void setProfilePath(java.lang.String pProfilePath)
public java.lang.String getProfilePath()
public void setMergeOrders(boolean pMergeOrders)
public boolean isMergeOrders()
public void setSelectLastModifiedOrder(boolean pSelectLastModifiedOrder)
public boolean isSelectLastModifiedOrder()
setSelectLastModifiedOrder
public void setSortOrdersByProperty(java.lang.String pSortOrdersByProperty)
public java.lang.String getSortOrdersByProperty()
public void setAscendingOrder(boolean pAscendingOrder)
public boolean isAscendingOrder()
public void setRepriceOrderOnLogin(boolean pRepriceOrderOnLogin)
public boolean isRepriceOrderOnLogin()
public void setDefaultLocale(java.util.Locale pDefaultLocale)
public java.util.Locale getDefaultLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
public boolean isUseRequestLocale()
public void setRepriceOrderPricingOp(java.lang.String pRepriceOrderPricingOp)
atg.commerce.pricing.PricingConstants
interface. They include:
ORDER_TOTAL
ORDER_SUBTOTAL
ORDER_SUBTOTAL_SHIPPING
ORDER_SUBTOTAL_TAX
ITEMS
SHIPPING
ORDER
TAX
NO_REPRICE
public java.lang.String getRepriceOrderPricingOp()
public void setCreditCardProperties(java.lang.String[] pCreditCardProperties)
public java.lang.String[] getCreditCardProperties()
public void setOrderItemDescriptorName(java.lang.String pOrderItemDescriptorName)
public java.lang.String getOrderItemDescriptorName()
public void setProfileIdPropertyName(java.lang.String pProfileIdPropertyName)
public java.lang.String getProfileIdPropertyName()
public java.lang.String[] getEmptyAddressPropertyNames()
public void setEmptyAddressPropertyNames(java.lang.String[] pEmptyAddressPropertyNames)
public java.lang.String[] getCompareAddressPropertyNames()
public void setCompareAddressPropertyNames(java.lang.String[] pCompareAddressPropertyNames)
These property names are used to compare two address to one another.
#areAddressesEqual(RepositoryItem, RepositoryItem)
public void setPromotionTools(PromotionTools pPromotionTools)
public PromotionTools getPromotionTools()
public void setTransactionLockFactory(TransactionLockFactory pTransactionLockFactory)
public TransactionLockFactory getTransactionLockFactory()
public java.lang.String getUniqueNicknameSeparator()
public void setUniqueNicknameSeparator(java.lang.String pUniqueNicknameSeparator)
pUniqueNicknameSeparator
- The uniqueNicknameSeparator to set.public java.lang.String[] getBillingAddressMapProperties()
public void setBillingAddressMapProperties(java.lang.String[] pBillingAddressMapProperties)
pBillingAddressMapProperties
- The billingAddressMapProperties to set.public java.lang.String[] getShippingAddressMapProperties()
public void setShippingAddressMapProperties(java.lang.String[] pShippingAddressMapProperties)
pShippingAddressMapProperties
- The shippingAddressMapProperties to set.this.getAllAvailableAddresses()
public boolean shouldLoadShoppingCarts(OrderHolder pShoppingCart)
public java.util.Collection getProfileAddressNames(RepositoryItem pProfile)
pProfile
- the customer profile.
public java.util.Map getProfileAddresses(RepositoryItem pProfile)
pProfile
- the customer profile.
public java.lang.String createProfileRepositorySecondaryAddress(RepositoryItem pProfile, java.lang.String pAddressName, Address pAddress) throws RepositoryException
pProfile
- the customer profile.pAddressName
- The name of the new address in the address book.pAddress
- The Address object.
RepositoryException
- if there was an error when creating the new repository item.public java.lang.String createProfileRepositoryPrimaryAddress(RepositoryItem pProfile, java.lang.String pAddressProperty, Address pAddress) throws RepositoryException
pProfile
- the customer profile.pAddressProperty
- The name of the Profile property that will hold the new address.pAddress
- The Address object.
RepositoryException
- if there was an error when creating the new repository item.public void updateProfileRepositoryAddress(RepositoryItem pRepositoryAddress, Address pAddress) throws RepositoryException
pRepositoryAddress
- the repository addresspAddress
- the address object
RepositoryException
- if there was an error when creating the new repository item.public RepositoryItem getProfileAddress(RepositoryItem pProfile, java.lang.String pProfileAddressName)
pProfile
- the customer profile.pProfileAddressName
- nickname for a users address object
public RepositoryItem getProfileAddressById(java.lang.String pProfileAddressId)
pProfileAddressId
- id for a users address object
public RepositoryItem getCreditCardById(java.lang.String pCreditCardRepositoryId)
pCreditCardId
- id for a users credit card object
public MutableRepositoryItem getProfileItem(java.lang.String pProfileId) throws RepositoryException
pProfileId
- The profile id to look for
RepositoryException
public RepositoryItem getCreditCardByNickname(java.lang.String pCreditCardNickname, RepositoryItem pProfile)
pCreditCardNickname
- the credit card nickname.pProfile
- the customer profile.
public java.util.Map getUsersCreditCardMap(RepositoryItem pProfile)
pProfile
- the customer profile.
public MutableRepositoryItem createCreditCardItem(RepositoryItem pProfile) throws RepositoryException
pProfile
- the customer profile.
RepositoryException
- if there was an error when creating the new repository item.public void addCreditCardToUsersMap(RepositoryItem pProfile, RepositoryItem pCreditCard)
pProfile
- the customer profile.pCreditCard
- the credit card.public void addCreditCardToUsersMap(RepositoryItem pProfile, RepositoryItem pCreditCard, java.lang.String pNickName)
pProfile
- the customer profile.pCreditCard
- the credit card.public Address getAddressFromRepositoryItem(RepositoryItem pItem) throws RepositoryException
pItem
- the repository item
RepositoryException
- if there was an error when creating the new repository item.public void addProfileRepositoryAddress(RepositoryItem pProfile, java.lang.String pAddressName, RepositoryItem pAddress) throws RepositoryException
pProfile
- the profile of the user.pAddressName
- The name of the new address entry in address book.pAddress
- The address to add to the address book.
RepositoryException
- if there was an error when creating the new repository item.public void removeProfileRepositoryAddress(RepositoryItem pProfile, java.lang.String pAddressName) throws RepositoryException
pProfile
- profile from which the named address will be removedpAddressName
- the nickname of the address that will be removed
RepositoryException
- if there was an error when creating the new repository item.public void removeProfileRepositoryAddress(RepositoryItem pProfile, java.lang.String pAddressName, boolean pCheckIfDefault) throws RepositoryException
pCheckIfDefault
is true then checks if it is also default
shipping address and if so sets default shipping address to null
pProfile
- profile from which the named address will be removedpAddressName
- the nickname of the address that will be removedpCheckIfDefault
- if true checks if secondary address that should
be removed is also is default shipping address
RepositoryException
- if there was an error when creating the new repository item.public void addProfileGiftlistAddress(RepositoryItem pProfile, java.lang.String pAddressName, RepositoryItem pAddress) throws RepositoryException
pProfile
- the profile of the user.pAddressName
- The name of the new address entry in address book.pAddress
- The address to add to the address book.
RepositoryException
- if there was an error when creating the new repository item.public boolean isAddressEmpty(RepositoryItem pAddress)
pAddress
- a value of type RepositoryItem
public boolean isAddressEmpty(java.lang.Object pAddress)
pAddress
- a value of type Object
public RepositoryItem getDefaultShippingAddress(RepositoryItem pProfile)
pProfile
- profile that shipping address will be extracted from
public RepositoryItem getDefaultBillingAddress(RepositoryItem pProfile)
pProfile
- profile that Billing address will be extracted from
public RepositoryItem getDefaultCreditCard(RepositoryItem pProfile)
pProfile
- profile that will be extracted from
public boolean areAddressesEqual(RepositoryItem pAddress1, RepositoryItem pAddress2, java.lang.String[] pPropertyNamesToCompare)
True is returned if the two items are the same repository item.
Also compares the values of each property defined in the compareAddressPropertyNames
array if an array of property names is not provided.
Case is ignored for string comparisons.
pAddress1
- address to compare to pAddress2pAddress2
- address to compare to pAddress1pPropertyNamesToCompare
- array of property names to use in the comparison. If null the
properties defined by compareAddressPropertyNames
are used.
public boolean areAddressesEqual(java.lang.Object pAddress1, java.lang.Object pAddress2, java.lang.String[] pPropertyNamesToCompare)
compareAddressPropertyNames
array if an array of property names is not provided.
Case is ignored for string comparisons.
pAddress1
- address to compare to pAddress2pAddress2
- address to compare to pAddress1pPropertyNamesToCompare
- array of property names to use in the comparison. If null the
properties defined by compareAddressPropertyNames
are used.
public void loadUserShoppingCartForLogin(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
mergeOrders
property is to set false (default true), then we persist
any existing transient shopping carts that may have built up while navigating as an
anonymous user. All the shopping carts are also repriced to make sure that their
prices are up to date. This can be toggeled through the repriceOrderOnLogin
property. This method will resolve the Profile out of the request, plus the
user's session-scoped pricing model holder, order holder, and their locale.
pRequest
- the request object that the login operation occurs withinpResponse
- the response object that the login operation occurs within
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic void loadUserShoppingCartForLogin(RepositoryItem pProfile, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
mergeOrders
property is to set false (default true), then we persist
any existing transient shopping carts that may have built up while navigating as an
anonymous user. All the shopping carts are also repriced to make sure that their
prices are up to date. This can be toggeled through the repriceOrderOnLogin
property. This method will use the supplied Profile, and resolve the user's session-scoped
pricing model holder, order holder, and their locale.
pProfile
- the user who under went auto-loginpRequest
- the request object that the login operation occurs withinpResponse
- the response object that the login operation occurs within
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic void loadUserShoppingCartForLogin(RepositoryItem pProfile, OrderHolder pShoppingCart, PricingModelHolder pUserPricingModels, java.util.Locale pLocale) throws CommerceException
mergeOrders
property is to set false (default true), then we persist
any existing transient shopping carts that may have built up while navigating as an
anonymous user. All the shopping carts are also repriced to make sure that their
prices are up to date. This can be toggeled through the repriceOrderOnLogin
property.
pProfile
- the user profilepShoppingCart
- the OrderHolder component for this userpUserPricingModels
- the pricing models for this userpLocale
- the locale of the user
CommerceException
- is any errors occur while loading, repricing or persisting
the shopping cartspublic void loadShoppingCarts(RepositoryItem pProfile, OrderHolder pShoppingCart) throws CommerceException
mergeOrders
property of this component.
NOTE: This method used to acquire a transaction lock, but we've found deadlock
issues and have decided to remove the locks. See bug 146012. This method now
performs its actions without a lock.
pProfile
- the user profilepShoppingCart
- the OrderHolder component for this user
CommerceException
- is any errors occur while loading the shopping cartspublic void loadShoppingCartsWithLock(RepositoryItem pProfile, OrderHolder pShoppingCart) throws CommerceException
pProfile
- the user profilepShoppingCart
- the OrderHolder component for this user
CommerceException
- is any errors occur while loading the shopping cartspublic void repriceShoppingCarts(RepositoryItem pProfile, OrderHolder pShoppingCart, java.lang.String pPricingOperation, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
pProfile
- the user profilepShoppingCart
- the OrderHolder component for this userpUserPricingModels
- the pricing models for this userpLocale
- the locale of the user
CommerceException
- is any errors occur while repricing the shopping carts
javax.servlet.ServletException
java.io.IOException
public void repriceShoppingCarts(RepositoryItem pProfile, OrderHolder pShoppingCart, PricingModelHolder pUserPricingModels, java.util.Locale pLocale) throws CommerceException
pProfile
- the user profilepShoppingCart
- the OrderHolder component for this userpUserPricingModels
- the pricing models for this userpLocale
- the locale of the user
CommerceException
- is any errors occur while repricing the shopping cartspublic void repriceShoppingCarts(RepositoryItem pProfile, OrderHolder pShoppingCart, PricingModelHolder pUserPricingModels, java.util.Locale pLocale, java.lang.String pPricingOperation) throws CommerceException
pProfile
- the user profilepShoppingCart
- the OrderHolder component for this userpUserPricingModels
- the pricing models for this userpLocale
- the locale of the userpPricingOperation
- The operations which are acceptable are defined in the
atg.commerce.pricing.PricingConstants
interface. They include:
ORDER_TOTAL
ORDER_SUBTOTAL
ORDER_SUBTOTAL_SHIPPING
ORDER_SUBTOTAL_TAX
ITEMS
SHIPPING
ORDER
TAX
NO_REPRICE
CommerceException
- is any errors occur while repricing the shopping cartspublic void repriceShoppingCartsWithLock(RepositoryItem pProfile, OrderHolder pShoppingCart, PricingModelHolder pUserPricingModels, java.util.Locale pLocale, java.lang.String pPricingOperation) throws CommerceException
CommerceException
- is any errors occur while repricing the shopping cartsprotected void repriceOrder(Order pOrder, RepositoryItem pProfile, PricingModelHolder pUserPricingModels, java.util.Locale pLocale, java.lang.String pPricingOperation) throws CommerceException
pOrder
- the order to repricepProfile
- the user profilepUserPricingModels
- the pricing models for this userpLocale
- the locale of the userpPricingOperation
- The operations which are acceptable are defined in the
atg.commerce.pricing.PricingConstants
interface. They include:
ORDER_TOTAL
ORDER_SUBTOTAL
ORDER_SUBTOTAL_SHIPPING
ORDER_SUBTOTAL_TAX
ITEMS
SHIPPING
ORDER
TAX
NO_REPRICE
CommerceException
- is any errors occur while repricing the shopping cartsatg.commerce.pricing.PricingTools.performPricingOperation
public java.util.Map getPricingParameters()
public void persistShoppingCarts(RepositoryItem pProfile, OrderHolder pShoppingCart) throws CommerceException
pProfile
- the user profilepShoppingCart
- the OrderHolder component for this user
CommerceException
- is any errors occur while persisting the shopping cartspublic void persistShoppingCartsWithLock(RepositoryItem pProfile, OrderHolder pShoppingCart) throws CommerceException
pProfile
- the user profilepShoppingCart
- the OrderHolder component for this user
CommerceException
- is any errors occur while persisting the shopping cartspublic java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
locale
. This value can be
either a java.util.Locale object or a String which represents the locale.
Next if the useRequestLocale
property is true, then the locale
of the request will be returned. Finally, if the locale cannot be determined,
the the defaultLocale
property is used.
javax.servlet.ServletException
java.io.IOException
protected void persistOrderIfNeeded(Order pOrder) throws CommerceException
CommerceException
protected void updateOrderProfileId(Order pOrder, RepositoryItem pProfile) throws CommerceException
CommerceException
public void copyCreditCardToProfile(CreditCard pCreditCard, RepositoryItem pProfile)
pCreditCard
- the credit card that is to be copied to a users profilepProfile
- the user profilepublic void copyCreditCardToProfile(CreditCard pCreditCard, RepositoryItem pProfile, java.lang.String pNickName)
pCreditCard
- the credit card that is to be copied to a users profilepProfile
- the user profilepublic void copyCreditCardToPaymentGroup(java.lang.String pNickname, CreditCard paymentGroup, RepositoryItem pProfile, java.util.Locale pLocale)
pNickname
- a value of type 'String'paymentGroup
- a value of type 'CreditCard'pProfile
- the user profilepLocale
- the user localpublic void copyCreditCard(RepositoryItem pFromCreditCard, CreditCard pToCreditCard)
The first is copying the shallow properties of the credit card. These are objects like String, Integer etc. that can be copied. This shallow copying is performed by the @see #copyShallowCreditCardProperties method.
Next, any post copying is done. The single object that must have a "deep" coyp performed on it is the billingAddress of the credit card. The billingAddress is obtained from both objects and then a call is made to the
pFromCreditCard
- a value of type 'RepositoryItem'pToCreditCard
- a value of type 'CreditCard'to perform the copy.
If there is additional deep copying that needs to be done, this method should be overriden.
public void copyCreditCard(CreditCard pFromCreditCard, RepositoryItem pToCreditCard)
The first is copying the shallow properties of the credit card. These are objects like String, Integer etc. that can be copied. This shallow copying is performed by the @see #copyShallowCreditCardProperties method.
Next, any post copying is done. The single object that must have a "deep" coyp performed on it is the billingAddress of the credit card. The billingAddress is obtained from both objects and then a call is made to the
pFromCreditCard
- a value of type 'RepositoryItem'pToCreditCard
- a value of type 'CreditCard'to perform the copy.
If there is additional deep copying that needs to be done, this method should be overriden.
public void copyShallowCreditCardProperties(java.lang.Object pFromCreditCard, java.lang.Object pToCreditCard) throws PropertyNotFoundException
shallowCreditCardPropertyNames
property. These properties
are then copied via DynamicBeans
pFromCreditCard
- the credit card that the address is copied frompToCreditCard
- the destination credit card for address
PropertyNotFoundException
- if a property listed by shallowCreditCardPropertyNames
is not foundpublic boolean isCreditCardEmpty(CreditCard pCreditCard)
This behavior can be overriden by making additions to the String array creditCardProperties, or if necessary extending this method.
pCreditCard
- a value of type 'CreditCard'
public RepositoryItem getProfileForOrder(Order pOrder) throws RepositoryException
pOrder
- The order whose owner is being retreived.
RepositoryException
- if any error occurs while looking up the user profile in the
profile repository.public RepositoryItem getProfileForOrder(java.lang.String pOrderId) throws RepositoryException, CommerceException
pOrderId
.
pOrderId
- The order id of the order whose owner is being retreived.
CommerceException
- if any error occurs while loading the order from the order
repository.
RepositoryException
- if any error occurs while looking up the user profile in the
profile repository.public int findOrderToLoad(java.util.List pOrders)
pOrders
- A List of the orders to select from
protected void addActivePromotions(RepositoryItem pGuestUser, RepositoryItem pAuthenticatedUser) throws RepositoryException
pGuestUser
- the user to copy values frompAuthenticatedUser
- the user to copy values to
RepositoryException
protected void postCreateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, RepositoryItem pProfile, OrderHolder pShoppingCart) throws javax.servlet.ServletException
persistShoppingCarts
method of the CommerceProfileTools component
pRequest
- the servlet's requestpResponse
- the servlet's responsepProfile
- The profile of the just created userpShoppingCart
- The shopping cart for the new user
javax.servlet.ServletException
- if there was an error while executing the codeprotected void postLoginUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, RepositoryItem pProfile, OrderHolder pShoppingCart, PricingModelHolder pPricingModelHolder) throws javax.servlet.ServletException
pRequest
- the servlet's requestpResponse
- the servlet's responsepProfile
- The profile of the user that just logged inpShoppingCart
- The shopping cart for the user that just logged inpPricingModelHolder
- The pricing models for the user that just logged in
javax.servlet.ServletException
- if there was an error while executing the codeprotected void acquireTransactionLock() throws DeadlockException
useLocksAroundTransactions
is set to true.
DeadlockException
protected void releaseTransactionLock()
public MutableRepositoryItem cloneContactInfoItem(RepositoryItem pContactInfoItem, java.util.Map pExcludedProperties, java.util.Map pPropExceptions, boolean pDeepCopy, java.lang.String pRepositoryId) throws RepositoryException
pAddressItem
- the item to clone
RepositoryException
RepositoryUtils.cloneItem(RepositoryItem, boolean, Map, Map, MutableRepository, String)
public MutableRepositoryItem setItemPropertyToAddress(RepositoryItem pItem, RepositoryItem pAddress, java.lang.String pPropertyName, java.util.Map pExcludedProperties, java.util.Map pPropExceptions) throws RepositoryException
pItem
- the repository item that will reference the addresspAddress
- the address to be clonedpPropertyName
- the name of the property on the item that will reference the clonepExcludedProperties
- Properties to exclude from clone. Keys are
item-type names and the values are collections of property names to
exclude. Optional.pPropExceptions
- Hierarchical map of property name exceptions to the
above mode. Keys are property names while values are null or another Map
if the property is an item. For example, if you clone a product using
pDeepCopy=true, you could add the key "parentCategory" with a null value
into pPropExceptions to cause a shallow copy of the product.parentCategory.
Alternatively, you could add the key "parentCategory" but set the value to
another map of exceptions that included the key/value pair "keywords"/null
to do a deep copy of product.parentCategory but a shallow copy of the
product.parentCategory.keywords. Optional.
RepositoryException
cloneContactInfoItem(RepositoryItem, Map, Map, boolean, String)
public MutableRepositoryItem setItemPropertyToAddress(RepositoryItem pItem, RepositoryItem pAddress, java.lang.String pPropertyName, java.util.Map pExcludedProperties, java.util.Map pPropExceptions, boolean pPerformCloning) throws RepositoryException
pItem
- the repository item that will reference the addresspAddress
- the address to be clonedpPropertyName
- the name of the property on the item that will reference the clonepExcludedProperties
- Properties to exclude from clone. Keys are
item-type names and the values are collections of property names to
exclude. Optional.pPropExceptions
- Hierarchical map of property name exceptions to the
above mode. Keys are property names while values are null or another Map
if the property is an item. For example, if you clone a product using
pDeepCopy=true, you could add the key "parentCategory" with a null value
into pPropExceptions to cause a shallow copy of the product.parentCategory.
Alternatively, you could add the key "parentCategory" but set the value to
another map of exceptions that included the key/value pair "keywords"/null
to do a deep copy of product.parentCategory but a shallow copy of the
product.parentCategory.keywords. Optional.
RepositoryException
cloneContactInfoItem(RepositoryItem, Map, Map, boolean, String)
public boolean isDuplicateAddressNickName(RepositoryItem pProfile, java.lang.String pNewNickname)
pProfile
- pNickname
-
public boolean isDuplicateCreditCardNickname(RepositoryItem pProfile, java.lang.String pNewNickname)
pProfile
- pNickname
-
public boolean isDuplicateNickname(java.util.Collection pNicknames, java.lang.String pNewNickname)
pNickname
- pNicknames
-
public java.lang.String getUniqueShippingAddressNickname(java.lang.Object pAddress, RepositoryItem pProfile, java.lang.String pNewNickname)
pAddress
- -- The address object is not used anymore.pProfile
- -- From the profile, the existing nick names are obtained.pNickname
- This is optional. In case if the user did not provide nickname and the system wants
generate the nickname dynamically, then pass in null for the nickname.
public java.lang.String getUniqueAddressNickname(java.lang.Object pAddress, java.util.Collection pNicknames, java.lang.String pNewNickname)
pAddress
- -- The address is not used anymorepNicknames
- -- List of nicknames to be checked againstpNickname
- This is optional. In case if the user did not provide nickname and the system wants
generate the nickname dynamically, then pass in null for the nickname.
public java.lang.String getUniqueCreditCardNickname(java.lang.Object pCreditCard, RepositoryItem pProfile, java.lang.String pNewNickname)
pCreditCard
- pProfile
- pNickname
- This is optional. In case if the user did not provide nickname and the system wants
generate the nickname dynamically, then pass in null for the nickname.
public java.lang.String getUniqueCreditCardNickname(java.lang.Object pCreditCard, java.util.Collection pNicknames, java.lang.String pNewNickname)
pNicknames
- pProfile
- pNickname
- This is optional. In case if the user did not provide nickname and the system wants
generate the nickname dynamically, then pass in null for the nickname.
public java.lang.String getUniqueNickname(java.util.Collection pNickNames, java.lang.String pCurrentNickname)
pAddress
- pProfile
-
public java.lang.String generateUniqueNickname(java.lang.String pNickname)
pNickName
-
public java.util.List getAllAvailableAddresses(RepositoryItem pProfile)
public java.util.List getAllShippingAddresses(RepositoryItem pProfile)
pProfile
-
public void addAddressesFromMapProperties(RepositoryItem pProfile, java.lang.String[] pPropertyNames, java.util.List pDestination)
pProfile
- pPropertyNames
- pDestination
- public java.util.List getAllBillingAddresses(RepositoryItem pProfile)
pProfile
-
public void addUniqueAddressToAddressList(java.util.Collection pAddresses, RepositoryItem pNewAddress)
pAddresses
- pNewAddress
- public boolean setDefaultCreditCard(RepositoryItem pProfile, java.lang.String pCreditCardNickname) throws RepositoryException
pProfile
- The Profile repository itempCreditCardNickname
- The Nickname of the credit card to be default
RepositoryException
public boolean setDefaultShippingAddressIfNull(RepositoryItem pProfile, java.lang.String pAddressName) throws RepositoryException
pProfile
- profile repository itempAddressName
- shipping address nickname to be set as default
RepositoryException
public boolean setDefaultShippingAddress(RepositoryItem pProfile, java.lang.String pAddressName) throws RepositoryException
pProfile
- profile repository itempAddressName
- nickname of the address to be set as default
RepositoryException
public boolean setDefaultCreditCardIfNull(RepositoryItem pProfile, java.lang.String pCreditCardName) throws RepositoryException
pProfile
- The Profile repository itempCreditCardName
- credit card nickname
RepositoryException
public java.lang.String getProfileAddressName(RepositoryItem pProfile, RepositoryItem pAddress)
pProfile
- The profile repository itempAddress
- Address repository item
public java.lang.String getCreditCardNickname(RepositoryItem pProfile, RepositoryItem pCreditCard)
pProfile
- user's profile objectpAddress
- secondary address repository item
public void changeSecondaryAddressName(RepositoryItem pProfile, java.lang.String pOldAddressName, java.lang.String pNewAddressName) throws RepositoryException
pProfile
- profile repository itempOldAddressName
- old secondary address nicknamepNewAddressName
- new secondary address nickname
RepositoryException
public void changeCreditCardNickname(RepositoryItem pProfile, java.lang.String pOldCreditCardNickname, java.lang.String pNewCreditCardNickname) throws RepositoryException
pProfile
- profile repository itempOldCreditCardNickname
- credit card's old nicknamepNewCreditCardNickname
- credit card's new nickname
RepositoryException
public java.lang.String createProfileCreditCard(RepositoryItem pProfile, java.util.Map pNewCreditCard, java.lang.String pCreditCardNickname, java.lang.Object pBillingAddress) throws RepositoryException, java.beans.IntrospectionException, PropertyNotFoundException
pProfile
- user's profile objectpNewCreditCard
- map of credit cards properties' valuespCreditCardNickname
- nickname for credit cardpBillingAddress
- Map or RepositoryItem that should be taken as billing address
RepositoryException
- if there was an error accessing the repository
java.beans.IntrospectionException
PropertyNotFoundException
public void updateProfileCreditCard(RepositoryItem pCartToUpdate, RepositoryItem pProfile, java.util.Map pUpdatedCreditCard, java.lang.String pNewCreditCardNickname, java.util.Map pBillingAddress, java.lang.String pBillingAddressClassName) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.beans.IntrospectionException, RepositoryException
pCartToUpdate
- credit card repository item to updatepProfile
- user's profile objectpUpdatedCreditCard
- map of credit card properties's valuespNewCreditCardNickname
- new credit card nicknamepBillingAddress
- map of credit card' billing address properties values
java.beans.IntrospectionException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
RepositoryException
public void removeProfileCreditCard(RepositoryItem pProfile, java.lang.String pCreditCardName) throws RepositoryException
pProfile
- user's profile objectpCreditCardName
- credit card nickname
RepositoryException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |