|
||||||||||
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 atg.projects.store.profile.StoreProfileTools
public class StoreProfileTools
Extensions to CommerceProfileTools.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string. |
static java.lang.String |
ID_PROPERTY_NAME
|
static java.lang.String |
UNKNOWN_STATE_CODE
|
Fields inherited from class atg.commerce.profile.CommerceProfileTools |
---|
CREDIT_CARD_PROPERTIES, LOCK_NAME_ATTRIBUTE_NAME, mProfilePath, mShoppingCartPath, mUserPricingModelsPath, NO_CREDIT_CARD, ONE, TWO, 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 | |
---|---|
StoreProfileTools()
|
Method Summary | |
---|---|
void |
copyAddress(atg.repository.MutableRepositoryItem pAddress,
atg.repository.MutableRepositoryItem pNewAddress,
java.util.Iterator pAddressIterator)
Utility method to copy one address repoitory item to another repository item. |
void |
copyEmailToLogin(atg.userprofiling.Profile pProfile)
Utility method to copy over the profile email to the login field. |
atg.repository.MutableRepositoryItem |
createEmailRecipient(atg.repository.RepositoryItem pProfile,
java.lang.String pEmail,
java.lang.String pSourceCode)
Create new EmailRecipient in repository. |
atg.repository.MutableRepositoryItem |
createEmailRecipient(java.lang.String pEmail,
java.lang.String pSourceCode)
Create new EmailRecipient in repository. |
java.lang.String |
createProfileCreditCard(atg.userprofiling.Profile pProfile,
java.util.Map pNewCreditCard,
java.lang.String pCreditCardNickname,
java.util.Map pBillingAddress,
java.lang.String pAddressNickname,
boolean pIsNewAddress)
This method constructs a new credit card and the address object that is on the credit card. |
atg.core.util.Address |
getAddressFromRepositoryItem(atg.repository.RepositoryItem pItem)
This method creates an address object and sets the property values to values in the repository item passed in. |
java.lang.String |
getBillingAddressClassName()
|
java.lang.String |
getCreditCardNickname(atg.repository.RepositoryItem pProfile,
atg.commerce.order.CreditCard pCreditCard)
Finds profile's credit card that corresponds to the given credit card payment group and returns its nickname. |
java.util.Map |
getCreditCards(atg.repository.RepositoryItem pProfile)
Obtains all credit cards associated with user profile. |
atg.repository.RepositoryItem |
getDefaultCreditCard(atg.repository.RepositoryItem pProfile)
Gets the default credit card for a user. |
java.lang.String |
getDefaultCreditCardNickname(atg.repository.RepositoryItem pProfile)
Gets the default credit card nickname for a user. |
java.lang.String |
getDefaultShippingAddressNickname(atg.repository.RepositoryItem pProfile)
Gets the default shipping address nickname for a user. |
java.lang.String |
getDefaultShippingMethod(atg.repository.RepositoryItem pProfile)
Gets the default shipping method for a user. |
java.lang.String |
getEmailFormat()
|
java.lang.String |
getInvalidContextRoot()
|
int |
getMaxPasswordLength()
|
int |
getMinPasswordLength()
|
atg.commerce.util.PlaceUtils |
getPlaceUtils()
|
java.lang.String |
getProfileAddressName(atg.repository.RepositoryItem pProfile,
atg.core.util.Address pAddress)
Gets nickname for the given profile's address. |
java.lang.String |
getShippingAddressClassName()
|
StoreConfiguration |
getStoreConfiguration()
|
java.lang.String |
getUrlContextStoreCommerce()
|
boolean |
isDuplicateEmailAddress(java.lang.String pEmail)
Determines if a profile already exists with the email address. |
boolean |
isValidCountryStateCombination(java.lang.String pCountry,
java.lang.String pState)
Validates country-state combination for the given address properties map. |
boolean |
isValidPasswordLength(java.lang.String pPassword)
Utility method to check if user's password meets the min & max length. |
protected void |
postCreateUser(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse,
atg.repository.RepositoryItem pProfile,
atg.commerce.order.OrderHolder pShoppingCart)
|
protected void |
postLoginUser(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse,
atg.repository.RepositoryItem pProfile,
atg.commerce.order.OrderHolder pShoppingCart,
atg.commerce.pricing.PricingModelHolder pPricingModelHolder)
Override the OOTB method so that we can determine whether or not to merge a user's cart after they login. |
void |
removeEmailRecipient(java.lang.String pEmail)
Remove the EmailRecipient from repository. |
atg.repository.RepositoryItem |
retrieveEmailRecipient(java.lang.String pEmail)
Checks repository to see if user has already subscribed to receive emails. |
void |
setBillingAddressClassName(java.lang.String pBillingAddressClassName)
|
boolean |
setDefaultCreditCard(atg.repository.RepositoryItem pProfile,
java.lang.String pNickname)
This method gets the credit card with parameter (pNickname) and makes it the default credit card for this profile. |
boolean |
setDefaultShippingAddress(atg.repository.RepositoryItem pProfile,
java.lang.String pAddressName)
This implementation makes a reference to an existing address (should be located in a secondaryAddresses set)
with the shippingAddress property. |
void |
setEmailFormat(java.lang.String pEmailformat)
|
void |
setInvalidContextRoot(java.lang.String string)
|
void |
setMaxPasswordLength(int pMaxPasswordLength)
|
void |
setMinPasswordLength(int pMinPasswordLength)
|
void |
setPlaceUtils(atg.commerce.util.PlaceUtils pPlaceUtils)
Sets place utils |
void |
setShippingAddressClassName(java.lang.String pShippingAddressClassName)
|
void |
setStoreConfiguration(StoreConfiguration pStoreConfiguration)
|
void |
setUrlContextStoreCommerce(java.lang.String string)
|
void |
updateEmailRecipient(atg.repository.RepositoryItem pProfile,
java.lang.String pEmail,
java.lang.String pNewEmail,
java.lang.String pSourceCode)
Updates email recipient's email and userId properties if corresponding repository item is found. |
boolean |
validateEmailAddress(java.lang.String pEmail)
Validates an email address for correctness. |
Methods inherited from class atg.commerce.profile.CommerceProfileTools |
---|
acquireTransactionLock, addActivePromotions, addAddressesFromMapProperties, addCreditCardToUsersMap, addCreditCardToUsersMap, addProfileGiftlistAddress, addProfileRepositoryAddress, addUniqueAddressToAddressList, areAddressesEqual, areAddressesEqual, changeCreditCardNickname, changeSecondaryAddressName, cloneContactInfoItem, copyCreditCard, copyCreditCard, copyCreditCardToPaymentGroup, copyCreditCardToProfile, copyCreditCardToProfile, copyShallowCreditCardProperties, createCreditCardItem, createProfileCreditCard, createProfileRepositoryPrimaryAddress, createProfileRepositorySecondaryAddress, findOrderToLoad, generateUniqueNickname, getAllAvailableAddresses, getAllBillingAddresses, getAllShippingAddresses, getBillingAddressMapProperties, getCompareAddressPropertyNames, getCreditCardById, getCreditCardByNickname, getCreditCardNickname, getCreditCardProperties, getDefaultBillingAddress, getDefaultLocale, getDefaultShippingAddress, getEmptyAddressPropertyNames, getLocaleService, getOrderItemDescriptorName, getOrderManager, getPricingParameters, getPricingTools, getProfileAddress, getProfileAddressById, getProfileAddresses, getProfileAddressName, getProfileAddressNames, getProfileForOrder, getProfileForOrder, getProfileIdPropertyName, getProfileItem, getProfilePath, getPromotionTools, getRepriceOrderPricingOp, getShippingAddressMapProperties, getShoppingCartPath, getSiteGroupManager, getSortOrdersByProperty, getTransactionLockFactory, getUniqueAddressNickname, getUniqueCreditCardNickname, getUniqueCreditCardNickname, getUniqueNickname, getUniqueNicknameSeparator, getUniqueShippingAddressNickname, getUserLocale, getUserPricingModelsPath, getUsersCreditCardMap, isAddressEmpty, isAddressEmpty, isAscendingOrder, isCreditCardEmpty, isDuplicateAddressNickName, isDuplicateCreditCardNickname, isDuplicateNickname, isMergeOrders, isRepriceOrderOnLogin, isSelectLastModifiedOrder, isUseRequestLocale, loadShoppingCarts, loadShoppingCartsWithLock, loadUserShoppingCartForLogin, loadUserShoppingCartForLogin, loadUserShoppingCartForLogin, persistOrderIfNeeded, persistShoppingCarts, persistShoppingCartsWithLock, releaseTransactionLock, removeProfileCreditCard, removeProfileRepositoryAddress, removeProfileRepositoryAddress, repriceOrder, repriceShoppingCarts, repriceShoppingCarts, repriceShoppingCarts, repriceShoppingCartsWithLock, setAscendingOrder, setBillingAddressMapProperties, setCompareAddressPropertyNames, setCreditCardProperties, setDefaultCreditCardIfNull, setDefaultLocale, setDefaultShippingAddressIfNull, setEmptyAddressPropertyNames, setItemPropertyToAddress, setItemPropertyToAddress, setLocaleService, setMergeOrders, setOrderItemDescriptorName, setOrderManager, setPricingTools, setProfileIdPropertyName, setProfilePath, setPromotionTools, setRepriceOrderOnLogin, setRepriceOrderPricingOp, setSelectLastModifiedOrder, setShippingAddressMapProperties, setShoppingCartPath, setSiteGroupManager, setSortOrdersByProperty, setTransactionLockFactory, setUniqueNicknameSeparator, setUseRequestLocale, setUserPricingModelsPath, shouldLoadShoppingCarts, updateOrderProfileId, updateProfileCreditCard, updateProfileRepositoryAddress |
Methods inherited from class atg.userprofiling.ProfileTools |
---|
addMultiPropertyValues, assumeSecurityIdentity, assumeSecurityIdentity, buildPropertyUpdatesForDictionary, buildPropertyUpdatesForRepositoryFormList, buildPropertyUpdatesForRepositoryFormMap, buildUpdateMessage, buildUpdateMessage, changePassword, convertNewValueToString, convertOldValueToString, convertPropertyUpdateValueToString, createNewUser, createNewUser, createPropertyUpdate, doStartService, formatMultiValueUpdateString, generateEmailQuery, generateLoginQuery, generateNameQuery, generateNewPasswordForProfile, getAutoLogin, getCookieManager, getDefaultProfileType, getGroupContainer, getIllegalPasswordChecker, getItem, getItem, getItemFromEmail, getItemFromEmail, getItems, getItems, getItemsFromEmail, getItemsFromEmail, getLoggingIdentifier, getLogin, getLoginUserAuthority, getMutableItem, getPassword, getPasswordGenerationTriesLimit, getPasswordGenerator, getPasswordRuleChecker, getPreviousNPasswordManager, getProfileEventTrigger, getProfileItemFinder, getProfileRepository, getPropertyManager, getSecurityStatus, getUserLoginManager, isAutoLoginSecurityStatus, isEnableSecurityStatus, isValidCredentials, isValidCredentials, isValidCredentials, isValidCredentials, isValidCredentialsEncrypted, locateUserFromEmail, locateUserFromEmail, locateUserFromId, locateUserFromId, locateUserFromLogin, locateUserFromLogin, locateUserFromLogin, locateUserFromLogin, main, prefixPropertyNames, propagateLocale, revokeSecurityIdentity, revokeSecurityIdentity, sendEmailToUser, setAutoLoginSecurityStatus, setCookieManager, setDefaultProfileType, setEnableSecurityStatus, setGroupContainer, setIllegalPasswordChecker, setLoginSecurityStatus, setLoginUserAuthority, setPasswordGenerationTriesLimit, setPasswordGenerator, setPasswordRuleChecker, setPreviousNPasswordManager, setProfileEventTrigger, setProfileItemFinder, setProfileRepository, setPropertyManager, setSecurityStatus, setUserLoginManager, shouldSendProfileCookies, toString, updateProperties, updateProperty |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, 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, reResolveThis, 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, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static java.lang.String ID_PROPERTY_NAME
public static java.lang.String UNKNOWN_STATE_CODE
Constructor Detail |
---|
public StoreProfileTools()
Method Detail |
---|
public int getMaxPasswordLength()
public void setMaxPasswordLength(int pMaxPasswordLength)
pMaxPasswordLength
- - maximum password length.public int getMinPasswordLength()
public void setMinPasswordLength(int pMinPasswordLength)
pMinPasswordLength
- - minimum password length.public java.lang.String getEmailFormat()
public void setEmailFormat(java.lang.String pEmailformat)
pEmailformat
- The Email Format Regular Expression.public atg.commerce.util.PlaceUtils getPlaceUtils()
public void setPlaceUtils(atg.commerce.util.PlaceUtils pPlaceUtils)
pPlaceUtils
- public StoreConfiguration getStoreConfiguration()
public void setStoreConfiguration(StoreConfiguration pStoreConfiguration)
pStoreConfiguration
- - store configuration.public java.lang.String getShippingAddressClassName()
public void setShippingAddressClassName(java.lang.String pShippingAddressClassName)
ShippingAddressClassName
- the String to setpublic java.lang.String getBillingAddressClassName()
public void setBillingAddressClassName(java.lang.String pBillingAddressClassName)
BillingAddressClassName
- the String to setpublic atg.repository.RepositoryItem retrieveEmailRecipient(java.lang.String pEmail)
pEmail
- -
email address to be checked
public atg.repository.MutableRepositoryItem createEmailRecipient(java.lang.String pEmail, java.lang.String pSourceCode) throws atg.repository.RepositoryException
pEmail
- -
Email AddresspSourceCode
- -
Source Code
atg.repository.RepositoryException
public atg.repository.MutableRepositoryItem createEmailRecipient(atg.repository.RepositoryItem pProfile, java.lang.String pEmail, java.lang.String pSourceCode) throws atg.repository.RepositoryException
pProfile
- -
user's profilepEmail
- -
Email AddresspSourceCode
- -
Source Code
atg.repository.RepositoryException
public void updateEmailRecipient(atg.repository.RepositoryItem pProfile, java.lang.String pEmail, java.lang.String pNewEmail, java.lang.String pSourceCode) throws atg.repository.RepositoryException
pProfile
- profile repository itempEmail
- email of email recipient to updatepNewEmail
- new email
atg.repository.RepositoryException
public void removeEmailRecipient(java.lang.String pEmail) throws atg.repository.RepositoryException
pEmail
- -
Email Address
atg.repository.RepositoryException
- if exception occurs while attemptiong to
retirve email recipient itemprotected void postLoginUser(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse, atg.repository.RepositoryItem pProfile, atg.commerce.order.OrderHolder pShoppingCart, atg.commerce.pricing.PricingModelHolder pPricingModelHolder) throws javax.servlet.ServletException
postLoginUser
in class atg.commerce.profile.CommerceProfileTools
javax.servlet.ServletException
public void copyEmailToLogin(atg.userprofiling.Profile pProfile)
pProfile
- -
Profile Objectprotected void postCreateUser(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse, atg.repository.RepositoryItem pProfile, atg.commerce.order.OrderHolder pShoppingCart) throws javax.servlet.ServletException
postCreateUser
in class atg.commerce.profile.CommerceProfileTools
javax.servlet.ServletException
CommerceProfileTools.postCreateUser(atg.servlet.DynamoHttpServletRequest,
atg.servlet.DynamoHttpServletResponse,
atg.repository.RepositoryItem, atg.commerce.order.OrderHolder)
public java.util.Map getCreditCards(atg.repository.RepositoryItem pProfile)
pProfile
- the user profile
public boolean setDefaultCreditCard(atg.repository.RepositoryItem pProfile, java.lang.String pNickname)
setDefaultCreditCard
in class atg.commerce.profile.CommerceProfileTools
pProfile
- to get the credit card from, and set default to.pNickname
- credit card to copy from Map of credit cards
public atg.repository.RepositoryItem getDefaultCreditCard(atg.repository.RepositoryItem pProfile)
getDefaultCreditCard
in class atg.commerce.profile.CommerceProfileTools
pProfile
- the user profile
public java.lang.String getCreditCardNickname(atg.repository.RepositoryItem pProfile, atg.commerce.order.CreditCard pCreditCard)
pProfile
- profile objectpCreditCard
- credit card payment group
public java.lang.String getDefaultCreditCardNickname(atg.repository.RepositoryItem pProfile)
pProfile
- the user profile
public java.lang.String getDefaultShippingMethod(atg.repository.RepositoryItem pProfile)
pProfile
- the user profile
public java.lang.String getProfileAddressName(atg.repository.RepositoryItem pProfile, atg.core.util.Address pAddress)
pProfile
- The profile repository itempAddress
- Address object
public java.lang.String getDefaultShippingAddressNickname(atg.repository.RepositoryItem pProfile)
pProfile
- the user profile
public boolean isValidPasswordLength(java.lang.String pPassword)
pPassword
- is password string
public java.lang.String getUrlContextStoreCommerce()
public java.lang.String getInvalidContextRoot()
public void setUrlContextStoreCommerce(java.lang.String string)
string
- UrlContextShopCommerce property.public void setInvalidContextRoot(java.lang.String string)
string
- UrlContextShopWithConsultant property.public void copyAddress(atg.repository.MutableRepositoryItem pAddress, atg.repository.MutableRepositoryItem pNewAddress, java.util.Iterator pAddressIterator)
pAddress
- - source addresspNewAddress
- - target addresspAddressIterator
- - address iteratorpublic boolean isDuplicateEmailAddress(java.lang.String pEmail)
pEmail
- - e-mail address
public atg.core.util.Address getAddressFromRepositoryItem(atg.repository.RepositoryItem pItem) throws atg.repository.RepositoryException
getAddressFromRepositoryItem
in class atg.commerce.profile.CommerceProfileTools
pItem
- the repository item
atg.repository.RepositoryException
- if there was an error when creating the new repository item.public boolean validateEmailAddress(java.lang.String pEmail)
pEmail
- email address
public boolean isValidCountryStateCombination(java.lang.String pCountry, java.lang.String pState)
pCountry
- country codepState
- state code
public java.lang.String createProfileCreditCard(atg.userprofiling.Profile pProfile, java.util.Map pNewCreditCard, java.lang.String pCreditCardNickname, java.util.Map pBillingAddress, java.lang.String pAddressNickname, boolean pIsNewAddress) throws atg.repository.RepositoryException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.beans.IntrospectionException, atg.beans.PropertyNotFoundException
pProfile
- user's profile objectpNewCreditCard
- map of credit cards properties' valuespCreditCardNickname
- nickname for credit cardpBillingAddress
- map of shipping address properties' valuespAddressNickname
- shipping address nickname for shipping address to be
created or for existed onepIsNewAddress
- indicated if new address should be created or existed one
should be used
atg.repository.RepositoryException
- if there was an error accessing the repository
java.beans.IntrospectionException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
atg.beans.PropertyNotFoundException
public boolean setDefaultShippingAddress(atg.repository.RepositoryItem pProfile, java.lang.String pAddressName) throws atg.repository.RepositoryException
secondaryAddresses
set)
with the shippingAddress
property.
setDefaultShippingAddress
in class atg.commerce.profile.CommerceProfileTools
atg.repository.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |