atg.b2bcommerce.profile
Class B2BCommerceProfileTools

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.userprofiling.ProfileTools
              extended by atg.commerce.profile.CommerceProfileTools
                  extended by atg.b2bcommerce.profile.B2BCommerceProfileTools
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class B2BCommerceProfileTools
extends 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.

See Also:
ProfileTools, CommercePropertyManager

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.commerce.profile.CommerceProfileTools
CREDIT_CARD_PROPERTIES, ID_PROPERTY_NAME, 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
B2BCommerceProfileTools()
          Constructs an B2BCommerceProfileTools object.
 
Method Summary
 void addCostCenterToUsersList(RepositoryItem pProfile, RepositoryItem pCostCenter)
          Adds the new cost center to the users profile.
 java.lang.String createCostCenter(RepositoryItem pProfile, java.lang.String pCostCenterIdentifier, java.lang.String pDescription, boolean isDefault)
          Creates a new cost center in the user's Profile under the costCenter attribute.
 java.lang.String editCostCenter(RepositoryItem pProfile, java.lang.String pCostCenterIdentifier, java.lang.String pNewDescription, boolean isDefault)
          Changes the properties of a cost center in the user's Profile under the costCenter attribute.
 RepositoryItem getCostCenterByIdentifier(java.lang.String pCostCenterIdentifier, RepositoryItem pProfile)
          Retrieves cost center by identifier and profile.
 java.util.List getUsersCostCenterList(RepositoryItem pProfile)
          Retrieves list of cost centers for a given profile.
 void removeAllCostCenters(RepositoryItem pProfile)
          Removes all cost center entries from the users Profile.
 void removeCostCenter(RepositoryItem pProfile, RepositoryItem pCostCenter)
          Removes the cost center entry from the users Profile.
 
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, getAddressFromRepositoryItem, getAllAvailableAddresses, getAllBillingAddresses, getAllShippingAddresses, getBillingAddressMapProperties, getCompareAddressPropertyNames, getCreditCardById, getCreditCardByNickname, getCreditCardNickname, getCreditCardProperties, getDefaultBillingAddress, getDefaultCreditCard, getDefaultLocale, getDefaultShippingAddress, getEmptyAddressPropertyNames, getLocaleService, getOrderItemDescriptorName, getOrderManager, getPricingParameters, getPricingTools, getProfileAddress, getProfileAddressById, getProfileAddresses, getProfileAddressName, getProfileAddressNames, getProfileForOrder, getProfileForOrder, getProfileIdPropertyName, getProfileItem, getProfilePath, getPromotionTools, getRepriceOrderPricingOp, getShippingAddressMapProperties, getShoppingCartPath, 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, postCreateUser, postLoginUser, releaseTransactionLock, removeProfileCreditCard, removeProfileRepositoryAddress, removeProfileRepositoryAddress, repriceOrder, repriceShoppingCarts, repriceShoppingCarts, repriceShoppingCarts, repriceShoppingCartsWithLock, setAscendingOrder, setBillingAddressMapProperties, setCompareAddressPropertyNames, setCreditCardProperties, setDefaultCreditCard, setDefaultCreditCardIfNull, setDefaultLocale, setDefaultShippingAddress, setDefaultShippingAddressIfNull, setEmptyAddressPropertyNames, setItemPropertyToAddress, setItemPropertyToAddress, setLocaleService, setMergeOrders, setOrderItemDescriptorName, setOrderManager, setPricingTools, setProfileIdPropertyName, setProfilePath, setPromotionTools, setRepriceOrderOnLogin, setRepriceOrderPricingOp, setSelectLastModifiedOrder, setShippingAddressMapProperties, setShoppingCartPath, 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, createNewUser, createNewUser, createPropertyUpdate, doStartService, formatMultiValueUpdateString, generateEmailQuery, generateLoginQuery, generateNameQuery, generateNewPasswordForProfile, getAutoLogin, getCookieManager, getDefaultProfileType, getGroupContainer, getItem, getItem, getItemFromEmail, getItemFromEmail, getItems, getItems, getItemsFromEmail, getItemsFromEmail, getLoggingIdentifier, getLogin, getLoginUserAuthority, getMutableItem, getPassword, 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, setLoginSecurityStatus, setLoginUserAuthority, 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, 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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

B2BCommerceProfileTools

public B2BCommerceProfileTools()
Constructs an B2BCommerceProfileTools object.

Method Detail

getUsersCostCenterList

public java.util.List getUsersCostCenterList(RepositoryItem pProfile)
Retrieves list of cost centers for a given profile.

Parameters:
pProfile - the customer profile.
Returns:
the list of cost centers

createCostCenter

public java.lang.String createCostCenter(RepositoryItem pProfile,
                                         java.lang.String pCostCenterIdentifier,
                                         java.lang.String pDescription,
                                         boolean isDefault)
                                  throws RepositoryException
Creates a new cost center in the user's Profile under the costCenter attribute.

Parameters:
pProfile - the customer profile.
pCostCenterIdentifier - The name of the new cost center.
pDescription - A description of the cost center.
Returns:
the repository address id
Throws:
RepositoryException - if there was an error when creating the new repository item.

addCostCenterToUsersList

public void addCostCenterToUsersList(RepositoryItem pProfile,
                                     RepositoryItem pCostCenter)
Adds the new cost center to the users profile.

Parameters:
pProfile - the customer profile.
pCostCenter - the cost center.

editCostCenter

public java.lang.String editCostCenter(RepositoryItem pProfile,
                                       java.lang.String pCostCenterIdentifier,
                                       java.lang.String pNewDescription,
                                       boolean isDefault)
                                throws RepositoryException
Changes the properties of a cost center in the user's Profile under the costCenter attribute.

Parameters:
pProfile - the customer profile.
pCostCenterOldIdentifier - The old name of the cost center.
pCostCenterNewIdentifier - The new name of the cost center.
pNewDescription - A new description of the cost center.
Returns:
the repository address id
Throws:
RepositoryException - if there was an error when creating the new repository item.

removeCostCenter

public void removeCostCenter(RepositoryItem pProfile,
                             RepositoryItem pCostCenter)
                      throws RepositoryException
Removes the cost center entry from the users Profile.

Parameters:
pProfile - profile from which the cost center will be removed
pCostCenter - the cost center that will be removed
Throws:
RepositoryException - if there was an error when removing the repository item.

removeAllCostCenters

public void removeAllCostCenters(RepositoryItem pProfile)
                          throws RepositoryException
Removes all cost center entries from the users Profile.

Parameters:
pProfile - profile from which the cost center will be removed
Throws:
RepositoryException - if there was an error when removing the repository item.

getCostCenterByIdentifier

public RepositoryItem getCostCenterByIdentifier(java.lang.String pCostCenterIdentifier,
                                                RepositoryItem pProfile)
Retrieves cost center by identifier and profile.

Parameters:
pCostCenterIdentifier - the cost center identifier.
pProfile - the customer profile.
Returns:
the cost center repository item.