atg.svc.agent.customer
Class CustomerProfileTools

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.userprofiling.ProfileTools
              extended by atg.svc.agent.customer.CustomerProfileTools
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class CustomerProfileTools
extends atg.userprofiling.ProfileTools

This class contains custom API for manipulating the active customer profile in agent applications. It extends ProfileTools in order that its methods could be extended for custom behavior without affecting the standard DPS ProfileTools, which customers may have already extended.

Since the Service framework cannot extend the DPS ProfileTools directly without possibly removing customer extensions, this class provides a place to put Service required extensions to ProfileTools behavior.

As a general practice, the DPS ProfileTools should always be used and this class component used only for custom api needed by the agent applications where we want to ensure that customer extensions in DPS ProfileTools are not included.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  EnvironmentTools mEnvironmentTools
           
 
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
CustomerProfileTools()
           
 
Method Summary
 EnvironmentTools getEnvironmentTools()
           
 void populateActiveCustomerProfileFromAddress(atg.core.util.Address pAddress)
          Populates a profile from the information captured in the address.
 boolean setActiveCustomerProfileName(java.lang.String pFirstName, java.lang.String pMiddleName, java.lang.String pLastName)
          Sets the first, middle and last name on the active customer profile.
 void setEnvironmentTools(EnvironmentTools pEnvironmentTools)
          Sets the EnvironmentTools
 
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 final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

mEnvironmentTools

protected EnvironmentTools mEnvironmentTools
Constructor Detail

CustomerProfileTools

public CustomerProfileTools()
Method Detail

setEnvironmentTools

public void setEnvironmentTools(EnvironmentTools pEnvironmentTools)
Sets the EnvironmentTools

Parameters:
pEnvironmentTools - the EnvironmentTools in Service

getEnvironmentTools

public EnvironmentTools getEnvironmentTools()
Returns:
the EnvironmentTools in Service

populateActiveCustomerProfileFromAddress

public void populateActiveCustomerProfileFromAddress(atg.core.util.Address pAddress)
Populates a profile from the information captured in the address.

This implementation copies the first name, middle name and last name from the address to the profile. This copy happens only if the profile is transient and the values have not already been set in the profile.

Parameters:
pProfile - the profile to populate
pAddress - the address from which to populate
Throws:
atg.repository.RepositoryException

setActiveCustomerProfileName

public boolean setActiveCustomerProfileName(java.lang.String pFirstName,
                                            java.lang.String pMiddleName,
                                            java.lang.String pLastName)
                                     throws atg.repository.RepositoryException
Sets the first, middle and last name on the active customer profile. If any of these values have already been set, this method does nothing.

Parameters:
pFirstName - the first name to set on the active customer profile
pMiddleName - the middle name to set on the active customer profile
pLastName - the last name to set on the active customer profile
Returns:
true if an update was made to the active customer profile
Throws:
atg.repository.RepositoryException