atg.scenario.userprofiling
Class ScenarioProfileFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.userprofiling.ProfileForm
                      extended by atg.userprofiling.ProfileFormHandler
                          extended by atg.scenario.userprofiling.ScenarioProfileFormHandler
All Implemented Interfaces:
DropletFormHandler, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, atg.process.ProcessConstants, atg.scenario.ScenarioConstants, atg.scenario.targeting.SlotConstants, java.util.EventListener
Direct Known Subclasses:
CommerceProfileFormHandler

public class ScenarioProfileFormHandler
extends ProfileFormHandler
implements atg.scenario.ScenarioConstants, atg.scenario.targeting.SlotConstants

This form handler subclasses the DPS ProfileFormHandler and performs operations that are specific to the DSS layer.

Specifically, when a user logs in, if the session's transient user has any associated scenario instances, they are copied over to the persistent user's profile, provided that:

This functionality allows scenarios to be continued across the login boundary.

In addition, when a user logs in and the session's transient user has persistent slot instances, they are copied over to the persistent user's profile, provided that:

This functionality also allows persistent slots to be continued across the login boundary.


Nested Class Summary
 
Nested classes/interfaces inherited from class atg.userprofiling.ProfileForm
ProfileForm.ProfileFormHashtableWrapper
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.userprofiling.ProfileFormHandler
mClearValuesOnCreate, mClearValuesOnLogin, mClearValuesOnUpdate
 
Fields inherited from class atg.userprofiling.ProfileForm
CONFIRMPASSWORD_PARAM, DEFAULT_CREATE_PROFILE_TYPE, DEFAULT_LOGIN_PROFILE_TYPE, DEFAULT_LOGOUT_PROFILE_TYPE, HANDLE_CREATE, HANDLE_CREATE_PARAM, HANDLE_FAILURE, HANDLE_LOGIN, HANDLE_LOGIN_PARAM, HANDLE_SUCCESS, ID_NAME, mBadPasswordDelay, mChangePasswordErrorURL, mChangePasswordSuccessURL, mCheckForRequiredParameters, mCheckForRequiredProperties, mCheckForRequiredPropertiesAfterUpdate, mCompareValueInCopyPropertiesOnLogin, mConfirmOldPassword, mConfirmPassword, mCreateErrorURL, mCreateProfileType, mCreateSuccessURL, mDeleteErrorURL, mDeleteSuccessURL, mExpireSessionOnLogout, mExtractDefaultValuesFromProfile, mLoginErrorURL, mLoginProfileType, mLoginSuccessURL, mLogoutErrorURL, mLogoutProfileType, mLogoutSuccessURL, mProfileTools, mPropertiesToAddOnLogin, mPropertiesToCopyOnLogin, mRepositoryId, MSG_ERR_CREATING_PROFILE, MSG_ERR_DELETING_PROFILE, MSG_ERR_UPDATING_PROFILE, MSG_ILLEGAL_ARGUMENT, MSG_INVALID_ADD_PROPERTY, MSG_INVALID_LOGIN, MSG_INVALID_PASSWORD, MSG_MISSING_LOGIN, MSG_MISSING_OLD_PASSWORD, MSG_MISSING_PASSWORD, MSG_MISSING_PROFILE, MSG_MISSING_PROFILE_TOOLS, MSG_MISSING_REQUIRED_PROPERTY, MSG_NO_SUCH_PROFILE_PROPERTY, MSG_NO_TYPE_CONVERTER, MSG_PASSWORD_SAME_AS_OLD_PASSWORD, MSG_PASSWORDS_DO_NOT_MATCH, MSG_PERMISSION_DEFINED_PASSWORD_CHANGE, MSG_READ_ONLY_PROFILE_PROPERTY, MSG_TYPE_CONVERSION_ERR, MSG_USER_ALREADY_EXISTS, MSG_WARNING_PROFILE_TOOLS, mSwapEventListeners, mTrimProperties, mUpdateErrorURL, mUpdateSuccessURL, mUserLoginManager, mUsingLdapProfile, mValue, NULL_SENTINEL, OLDPASSWORD_PARAM, REPOSITORY_ID_PROPERTY_NAME, RESOURCE_BUNDLE_NAME, STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.scenario.ScenarioConstants
ATTR_SCENARIO_REDIRECT, PROPERTY_REFERENCE_TARGET, PROPERTY_REFERENCE_TYPE, PROPERTY_SCENARIO_INSTANCES, PROPERTY_SLOT_INSTANCES
 
Fields inherited from interface atg.process.ProcessConstants
COLLECTIVE_CLONE_PROPERTIES, DEFAULT_INITIAL_TIME_DELAY, DEFAULT_MAX_BATCH_SIZE, DEFAULT_PROCESS_FILE_EXTENSION, DEFAULT_TEMPLATE_FILE_EXTENSION, INDIVIDUAL_CLONE_PROPERTIES, INPUT_PORT_BATCH_TIMER, INPUT_PORT_COLLECTIVE_TIMER, INPUT_PORT_DISABLE_PROCESS, INPUT_PORT_GLOBAL_EVENT, INPUT_PORT_INDIVIDUAL_EVENT, INPUT_PORT_INDIVIDUAL_TIMER, INPUT_PORT_MIGRATION_UPDATE, INPUT_PORT_PROCESS_UPDATE, INPUT_PORT_SEGMENT_START_TIMER, JMS_TYPE_BATCH_TIMER, JMS_TYPE_COLLECTIVE_TIMER, JMS_TYPE_DISABLE_PROCESS, JMS_TYPE_INDIVIDUAL_TIMER, JMS_TYPE_MIGRATION_DELETE, JMS_TYPE_MIGRATION_UPDATE, JMS_TYPE_PROCESS_UPDATE, MIGRATION_STATUS_DONE, MIGRATION_STATUS_IN_PROGRESS, OUTPUT_PORT_BATCH_TIMER, OUTPUT_PORT_COLLECTIVE_TIMER, OUTPUT_PORT_INDIVIDUAL_TIMER, OUTPUT_PORT_MIGRATION_UPDATE, OUTPUT_PORT_PROCESS_UPDATE, OUTPUT_PORT_SEGMENT_START_TIMER, PROPERTY_AUTHOR, PROPERTY_COLLECTIVE_INSTANCE, PROPERTY_CONTEXT_BOOLEANS, PROPERTY_CONTEXT_DATES, PROPERTY_CONTEXT_DOUBLES, PROPERTY_CONTEXT_LONGS, PROPERTY_CONTEXT_STRINGS, PROPERTY_COUNT, PROPERTY_CREATED_BY_RECURRING_EVENT, PROPERTY_CREATION_TIME, PROPERTY_CREATOR_ID, PROPERTY_EVENT_TYPE, PROPERTY_ID, PROPERTY_LAST_MODIFIED_BY, PROPERTY_LAST_QUERY_ID, PROPERTY_MESSAGE_BEAN, PROPERTY_MIGRATION_INFO, PROPERTY_MIGRATION_INFOS, PROPERTY_MIGRATION_STATUS, PROPERTY_MODIFICATION_TIME, PROPERTY_NEW_MODIFICATION_TIME, PROPERTY_NUM_TRANSITION_RETRIES, PROPERTY_OLD_MODIFICATION_TIME, PROPERTY_PDL, PROPERTY_PROCESS_INFO, PROPERTY_PROCESS_NAME, PROPERTY_PROCESS_STATUS, PROPERTY_SEGMENT_NAME, PROPERTY_SEGMENT_NAMES, PROPERTY_SERVER_ID, PROPERTY_SERVER_TYPE, PROPERTY_STATE, PROPERTY_STATE_MACHINE_VERSION, PROPERTY_STEP, PROPERTY_SUBJECT, PROPERTY_TEMPLATE_NAME, STEP_ACTIONS_1, STEP_ACTIONS_2, STEP_NEXT_STATE_1, STEP_NEXT_STATE_2, UNDEFINED_TIMESTAMP_VALUE, WILDCARD_MATCH_ALL
 
Fields inherited from interface atg.scenario.targeting.SlotConstants
PROFILE_SLOT_TYPE, PROPERTY_ID, PROPERTY_SLOT_ITEMS, PROPERTY_SLOT_NAME, PROPERTY_SLOT_OFFSET, PROPERTY_SLOT_PRIORITIES, PROPERTY_SLOT_PROFILE, TRANS_MGR
 
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
ScenarioProfileFormHandler()
           
 
Method Summary
protected  void addProperty(java.lang.String pPropertyName, RepositoryItem pGuestUser, MutableRepositoryItem pAuthenticatedUser)
          Add the given named property from the current anonymous user to the authenticated user.
protected  void addScenarioInstances(atg.scenario.ScenarioManagerService pScenarioManager, RepositoryItem pGuestUser, MutableRepositoryItem pAuthenticatedUser)
          Add the scenarioInstances property from the anonymous user to those of the authenticated user.
protected  void addSlotInstances(RepositoryItem pGuestUser, MutableRepositoryItem pAuthUser, java.lang.String pSlotInstancesProperty)
          Add the "slotInstances" property from the anonymous user to those of the authenticated user.
 atg.scenario.ScenarioManagerService getScenarioManager()
          Returns the ScenarioManagerService.
 boolean handleCreate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This overrides the ProfileFormHandler.handleCreate method in order to redirect if a scenario RedirectRequest action has been executed
 boolean handleDelete(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This overrides the ProfileFormHandler.handleDelete method in order to redirect if a scenario RedirectRequest action has been executed
 boolean handleLogin(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This overrides the ProfileFormHandler.handleLogin method in order to redirect if a scenario RedirectRequest action has been executed
 boolean handleLogout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This overrides the ProfileFormHandler.handleLogout method in order to redirect if a scenario RedirectRequest action has been executed
 boolean handleUpdate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This overrides the ProfileFormHandler.handleUpdate method in order to redirect if a scenario RedirectRequest action has been executed
 boolean isOverrideFormHandlerRedirect()
          Gets the OverrideFormHandlerRedirect property
 void setOverrideFormHandlerRedirect(boolean pOverrideFormHandlerRedirect)
          Sets the OverrideFormHandlerRedirect property
 void setScenarioManager(atg.scenario.ScenarioManagerService pScenarioManager)
          Sets the ScenarioManagerService.
 
Methods inherited from class atg.userprofiling.ProfileFormHandler
addProfileUpdateListener, checkFormError, createProfileItem, getClearValuesOnCreate, getClearValuesOnLogin, getClearValuesOnUpdate, getExpiredPasswordService, getProfile, getProfileUpdateEvent, getProfileUpdateTrigger, getRepositoryId, getRequestLocale, getTestPassword, getUpdateRepositoryId, getVerifyPasswordSuccessURL, handleCancel, handleClear, handleVerifyPassword, isCreateNewUser, isGenerateProfileUpdateEvents, isSendCookie, postCreateUser, postLoginUser, postLogoutUser, postUpdateUser, preLoginUser, preLogoutUser, preUpdateUser, propagateLocale, removeProfileUpdateListener, sendProfileUpdateEvent, setClearValuesOnCreate, setClearValuesOnLogin, setClearValuesOnUpdate, setCreateNewUser, setExpiredPasswordService, setGenerateProfileUpdateEvents, setProfile, setProfileUpdateEvent, setProfileUpdateTrigger, setRepositoryId, setRequestLocale, setTestPassword, setUpdateRepositoryId, setVerifyPasswordSuccessURL, shouldCreateNewUser
 
Methods inherited from class atg.userprofiling.ProfileForm
addMulti, addPropertiesOnLogin, addSwapEventListener, addUser, changePassword, checkFormSuccess, checkForRequiredParameters, checkForRequiredProperties, checkForRequiredProperties, commitTransaction, copyPropertiesOnLogin, copyProperty, copyPropertyValue, createUser, doStartService, ensureTransaction, findUser, findUser, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getAddMultiPropertyName, getAddMultiPropertyValue, getBadPasswordDelay, getChangePasswordErrorURL, getChangePasswordSuccessURL, getCheckForRequiredParameters, getCheckForRequiredProperties, getCheckForRequiredPropertiesAfterUpdate, getCreateErrorURL, getCreateProfileType, getCreateSuccessURL, getDeleteErrorURL, getDeleteSuccessURL, getDescriptor, getExpireSessionOnLogout, getLoginErrorURL, getLoginProfileType, getLoginSuccessURL, getLogoutErrorURL, getLogoutProfileType, getLogoutSuccessURL, getProcessPropertyNames, getProfileItem, getProfileTools, getPropertiesToAddOnLogin, getPropertiesToCopyOnLogin, getStringValueProperty, getTransactionDemarcation, getTransactionManager, getTrimProperties, getUpdateErrorURL, getUpdateSuccessURL, getUserLocale, getUserLoginManager, getValue, getValueFromArrayString, getValueFromObject, getValueFromObjectArray, getValueFromString, getValueFromStringArray, getValueMap, getValueProperty, handleAddMulti, handleChangePassword, handleValueDictionaryByParameters, isCompareValueInCopyPropertiesOnLogin, isConfirmOldPassword, isConfirmPassword, isExtractDefaultValuesFromProfile, isInvalidateAllChildSessions, isTrimProperty, isUsingLdapProfile, postAddMulti, postChangePassword, postDeleteUser, postValueDictionaryByParameters, preAddMulti, preChangePassword, preCreateUser, preDeleteUser, preValueDictionaryByParameters, removeSwapEventListener, removeUser, sendProfileSwapEvent, setBadPasswordDelay, setChangePasswordErrorURL, setChangePasswordSuccessURL, setCheckForRequiredParameters, setCheckForRequiredProperties, setCheckForRequiredPropertiesAfterUpdate, setCompareValueInCopyPropertiesOnLogin, setConfirmOldPassword, setConfirmPassword, setCreateErrorURL, setCreateProfileType, setCreateSuccessURL, setDeleteErrorURL, setDeleteSuccessURL, setExpireSessionOnLogout, setExtractDefaultValuesFromProfile, setInvalidateAllChildSessions, setLoginErrorURL, setLoginProfileType, setLoginSuccessURL, setLogoutErrorURL, setLogoutProfileType, setLogoutSuccessURL, setProfileTools, setPropertiesToAddOnLogin, setPropertiesToCopyOnLogin, setTrimProperties, setUpdateErrorURL, setUpdateSuccessURL, setUserLoginManager, setUsingLdapProfile, setValueDictionaryByParameters, setValueProperty, updateLDAPProfileAttributes, updatePasswordValue, updateProfileAttributes, updateProfileAttributes, updateUser, updateUser, userAlreadyExists, valueIsEmpty
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

ScenarioProfileFormHandler

public ScenarioProfileFormHandler()
Method Detail

getScenarioManager

public atg.scenario.ScenarioManagerService getScenarioManager()
Returns the ScenarioManagerService.


setScenarioManager

public void setScenarioManager(atg.scenario.ScenarioManagerService pScenarioManager)
Sets the ScenarioManagerService.


setOverrideFormHandlerRedirect

public void setOverrideFormHandlerRedirect(boolean pOverrideFormHandlerRedirect)
Sets the OverrideFormHandlerRedirect property

Parameters:
pOverrideFormHandlerRedirect - true if any scenarios with redirects should override the form handler's redirects e.g. loginSuccessURL, logoutSuccessURL. The only exception to this is when form errors occur, no scenario redirect will take place

isOverrideFormHandlerRedirect

public boolean isOverrideFormHandlerRedirect()
Gets the OverrideFormHandlerRedirect property

Parameters:
pOverrideFormHandlerRedirect - true if any scenarios with redirects should override the form handler's redirects e.g. loginSuccessURL, logoutSuccessURL. The only exception to this is when form errors occur, no scenario redirect will take place

addProperty

protected void addProperty(java.lang.String pPropertyName,
                           RepositoryItem pGuestUser,
                           MutableRepositoryItem pAuthenticatedUser)
                    throws RepositoryException
Add the given named property from the current anonymous user to the authenticated user.

Overrides:
addProperty in class ProfileForm
Throws:
RepositoryException

addScenarioInstances

protected void addScenarioInstances(atg.scenario.ScenarioManagerService pScenarioManager,
                                    RepositoryItem pGuestUser,
                                    MutableRepositoryItem pAuthenticatedUser)
                             throws RepositoryException
Add the scenarioInstances property from the anonymous user to those of the authenticated user.

Throws:
RepositoryException

addSlotInstances

protected void addSlotInstances(RepositoryItem pGuestUser,
                                MutableRepositoryItem pAuthUser,
                                java.lang.String pSlotInstancesProperty)
                         throws RepositoryException
Add the "slotInstances" property from the anonymous user to those of the authenticated user. The slotInstances property is a Set of persistent slots.

Throws:
RepositoryException

handleLogin

public boolean handleLogin(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
This overrides the ProfileFormHandler.handleLogin method in order to redirect if a scenario RedirectRequest action has been executed

Overrides:
handleLogin in class ProfileForm
Parameters:
pRequest - the request of the form handler
pResponse - the response of the form handler
Returns:
true if there is no redirect, false if there is
Throws:
javax.servlet.ServletException - if a servlet error occurs
java.io.IOException - if the redirect fails

handleUpdate

public boolean handleUpdate(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
This overrides the ProfileFormHandler.handleUpdate method in order to redirect if a scenario RedirectRequest action has been executed

Overrides:
handleUpdate in class ProfileFormHandler
Parameters:
pRequest - the request of the form handler
pResponse - the response of the form handler
Returns:
true if there is no redirect, false if there is
Throws:
javax.servlet.ServletException - if a servlet error occurs
java.io.IOException - if the redirect fails

handleCreate

public boolean handleCreate(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
This overrides the ProfileFormHandler.handleCreate method in order to redirect if a scenario RedirectRequest action has been executed

Overrides:
handleCreate in class ProfileFormHandler
Parameters:
pRequest - the request of the form handler
pResponse - the response of the form handler
Returns:
true if there is no redirect, false if there is
Throws:
javax.servlet.ServletException - if a servlet error occurs
java.io.IOException - if the redirect fails

handleLogout

public boolean handleLogout(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
This overrides the ProfileFormHandler.handleLogout method in order to redirect if a scenario RedirectRequest action has been executed

Overrides:
handleLogout in class ProfileForm
Parameters:
pRequest - the request of the form handler
pResponse - the response of the form handler
Returns:
true if there is no redirect, false if there is
Throws:
javax.servlet.ServletException - if a servlet error occurs
java.io.IOException - if the redirect fails

handleDelete

public boolean handleDelete(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
This overrides the ProfileFormHandler.handleDelete method in order to redirect if a scenario RedirectRequest action has been executed

Overrides:
handleDelete in class ProfileForm
Parameters:
pRequest - the request of the form handler
pResponse - the response of the form handler
Returns:
true if there is no redirect, false if there is
Throws:
javax.servlet.ServletException - if a servlet error occurs
java.io.IOException - if the redirect fails