atg.userprofiling
Class ProfileForm

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
All Implemented Interfaces:
DropletFormHandler, NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
Direct Known Subclasses:
ForgotPasswordHandler, atg.userprofiling.ProfileAdminFormHandler, ProfileFormHandler

public class ProfileForm
extends GenericFormHandler

This class is a base class used to handle actions involving Profiles. This includes actions such as creating a new profile editing an exsisting profile and deleting a profile.


Nested Class Summary
 class ProfileForm.ProfileFormHashtableWrapper
           
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String CONFIRMPASSWORD_PARAM
          Name of the confirmation password form parameter
static java.lang.String DEFAULT_CREATE_PROFILE_TYPE
          This is the type of the profile that is created by the create operation.
static java.lang.String DEFAULT_LOGIN_PROFILE_TYPE
          This is the type of Profile, when performing a login operation.
static java.lang.String DEFAULT_LOGOUT_PROFILE_TYPE
          This is the type of Profile that we revert to when the logout operation completes.
static java.lang.String HANDLE_CREATE
          Constant for the handleCreate method.
static ParameterName HANDLE_CREATE_PARAM
          ParameterName for the String HANDLE_CREATE
static java.lang.Boolean HANDLE_FAILURE
          Constant to indicate that the handle method failed
static java.lang.String HANDLE_LOGIN
          Constant for the handleLogin method.
static ParameterName HANDLE_LOGIN_PARAM
          ParameterName for the String HANDLE_LOGIN
static java.lang.Boolean HANDLE_SUCCESS
          Constant to indicate that the handle method was successful
static java.lang.String ID_NAME
          Name of the ID form parameter
protected  long mBadPasswordDelay
          the number of milliseconds to delay after a bad password is submitted.
protected  java.lang.String mChangePasswordErrorURL
           
protected  java.lang.String mChangePasswordSuccessURL
           
protected  boolean mCheckForRequiredParameters
           
protected  boolean mCheckForRequiredProperties
           
protected  boolean mCheckForRequiredPropertiesAfterUpdate
           
protected  boolean mCompareValueInCopyPropertiesOnLogin
          Property indicating whether to compare property values in copyPropertiesOnLogin method
protected  boolean mConfirmOldPassword
           
protected  boolean mConfirmPassword
           
protected  java.lang.String mCreateErrorURL
           
protected  java.lang.String mCreateProfileType
           
protected  java.lang.String mCreateSuccessURL
           
protected  java.lang.String mDeleteErrorURL
           
protected  java.lang.String mDeleteSuccessURL
           
protected  boolean mExpireSessionOnLogout
           
protected  boolean mExtractDefaultValuesFromProfile
           
protected  java.lang.String mLoginErrorURL
           
protected  java.lang.String mLoginProfileType
           
protected  java.lang.String mLoginSuccessURL
           
protected  java.lang.String mLogoutErrorURL
           
protected  java.lang.String mLogoutProfileType
           
protected  java.lang.String mLogoutSuccessURL
           
protected  ProfileTools mProfileTools
           
protected  java.lang.String[] mPropertiesToAddOnLogin
          Array, Map, and Collection properties to add from anonymous profiles to persistent profiles on login
protected  java.lang.String[] mPropertiesToCopyOnLogin
          properties to copy from anonymous profiles to persistent profiles on login
protected  java.lang.String mRepositoryId
           
protected static java.lang.String MSG_ERR_CREATING_PROFILE
           
protected static java.lang.String MSG_ERR_DELETING_PROFILE
           
protected static java.lang.String MSG_ERR_UPDATING_PROFILE
           
protected static java.lang.String MSG_ILLEGAL_ARGUMENT
           
protected static java.lang.String MSG_INVALID_ADD_PROPERTY
           
protected static java.lang.String MSG_INVALID_LOGIN
           
protected static java.lang.String MSG_INVALID_PASSWORD
           
protected static java.lang.String MSG_MISSING_LOGIN
           
protected static java.lang.String MSG_MISSING_PASSWORD
           
protected static java.lang.String MSG_MISSING_PROFILE
           
protected static java.lang.String MSG_MISSING_PROFILE_TOOLS
           
protected static java.lang.String MSG_MISSING_REQUIRED_PROPERTY
           
protected static java.lang.String MSG_NO_SUCH_PROFILE_PROPERTY
           
protected static java.lang.String MSG_NO_TYPE_CONVERTER
           
protected static java.lang.String MSG_PASSWORD_SAME_AS_OLD_PASSWORD
           
protected static java.lang.String MSG_PASSWORDS_DO_NOT_MATCH
           
protected static java.lang.String MSG_PERMISSION_DEFINED_PASSWORD_CHANGE
           
protected static java.lang.String MSG_READ_ONLY_PROFILE_PROPERTY
           
protected static java.lang.String MSG_TYPE_CONVERSION_ERR
           
protected static java.lang.String MSG_USER_ALREADY_EXISTS
           
protected static java.lang.String MSG_WARNING_PROFILE_TOOLS
           
protected  java.util.List mSwapEventListeners
          A List of EventListeners that care about ProfileSwapEvents
protected  java.lang.String[] mTrimProperties
           
protected  java.lang.String mUpdateErrorURL
           
protected  java.lang.String mUpdateSuccessURL
           
protected  UserLoginManager mUserLoginManager
          This is the UserLoginManager used throughout the application to manage authentication.
protected  boolean mUsingLdapProfile
          Property indicating whether this form handler is acting on an LDAP profile.
protected  atg.userprofiling.ProfileFormHashtable mValue
           
static java.lang.Object NULL_SENTINEL
          Object to be used to reprosent null property values.
static java.lang.String OLDPASSWORD_PARAM
          Name of the old password form parameter
protected static java.lang.String REPOSITORY_ID_PROPERTY_NAME
          The property name of the repository id
protected static java.lang.String RESOURCE_BUNDLE_NAME
           
protected static java.util.ResourceBundle sResourceBundle
           
static int STATUS_ERROR_REDIRECT
          Constant to indicate that the state of the form errors, but that the form should perform a redirect.
static int STATUS_ERROR_STAY
          Constant to indicate that the state of the form errors, but that the form should not perform a redirect.
static int STATUS_SUCCESS
          Constant to indicate that the state of the form has no errors.
 
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.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
ProfileForm()
          Constructs a new ProfileForm.
 
Method Summary
protected  void addMulti(java.lang.String pPropertyName, java.lang.Object pPropertyValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Handles the updating of multi-value attributes pPropertyName with pPropertyValue
protected  void addPropertiesOnLogin(RepositoryItem pGuestUser, RepositoryItem pAuthenticatedUser)
          Add the Array, Map, and Collection properties from the current anonymous user to the authenticated user.
protected  void addProperty(java.lang.String pPropertyName, RepositoryItem pGuestUser, MutableRepositoryItem pAuthenticatedUser)
          Add the given named property, of type Array, Map, and Collection, from the current anonymous user to the authenticated user.
 void addSwapEventListener(atg.userprofiling.ProfileSwapEventListener pListener)
          Adds a ProfileSwapEventListener to the list of listeners that care about ProfileSwapEvents
protected  RepositoryItem addUser(MutableRepositoryItem pUser, MutableRepository pProfileRepository, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Returns the RepositoryItem which represents the newly added user in the Profile Repository.
protected  boolean changePassword(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Changes the users password.
protected  int checkFormError(java.lang.String pErrorURL, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Check to see if there were errors during the submit operation.
protected  boolean checkFormSuccess(java.lang.String pSuccessURL, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          If the form was successfully submitted, see if we should redirect after processing the form data.
protected  void checkForRequiredParameters(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is used to verify that certain request parameters have been submitted in the form.
protected  void checkForRequiredProperties(Repository pProfileRepository, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          NOTE: This method has been ressurected for use in 5.0.
protected  void checkForRequiredProperties(RepositoryItem pItem, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Iterates over all the properties in the profile template and if any of them are flagged as required then we check to make sure there is an associated non-null property value in the RepositoryItem.
protected  void commitTransaction(javax.transaction.Transaction pTransaction)
          Commits the current transaction
protected  void copyPropertiesOnLogin(RepositoryItem pGuestUser, RepositoryItem pAuthenticatedUser)
          Copy the properties from the current session to the specied repository item.
protected  MutableRepositoryItem createProfileItem(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is called from createUser to create the MutableRepositoryItem to use in the creation of a user.
protected  RepositoryItem createUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          By examing the values submitted in the form, a user is attempted to be created and then added persistently to the Profile Repository.
 void doStartService()
          Start the service - make sure we have ProfileTools
protected  javax.transaction.Transaction ensureTransaction()
          This method ensures that a transaction exists before returning.
protected  RepositoryItem findUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Checks the supplied login and password and attempts to find a profile which matches the supplied values.
protected  RepositoryItem findUser(java.lang.String pLogin, java.lang.String pPassword, Repository pProfileRepository, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Returns the user profile or null if the user could not be found with the given login and password.
protected  java.lang.String formatUserMessage(java.lang.String pKey, DynamoHttpServletRequest pRequest)
          Utility method to format a message with no arguments using the Locale of the user
protected  java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object[] pParams, DynamoHttpServletRequest pRequest)
          Utility method to format a message with two arguments using our resource bundle.
protected  java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object pParam, DynamoHttpServletRequest pRequest)
          Utility method to format a message with one argument using the Locale of the user
protected  java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object pParam1, java.lang.Object pParam2, DynamoHttpServletRequest pRequest)
          Utility method to format a message with two arguments using our resource bundle.
protected  java.lang.String generatePropertyPath(java.lang.String pPropertyName)
          Returns a Nucleus property path which can be used in a DropletFormException
protected  java.lang.String getAddMultiPropertyName(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Get the multi-value Property Name to use in a handleAddMulti call.
protected  java.lang.Object getAddMultiPropertyValue(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Get the multi-value Property Value to use in a handleAddMulti call.
 long getBadPasswordDelay()
          Get property BadPasswordDelay
 java.lang.String getChangePasswordErrorURL()
           
 java.lang.String getChangePasswordSuccessURL()
           
 boolean getCheckForRequiredParameters()
          Returns property CheckForRequiredParameters
 boolean getCheckForRequiredProperties()
           
 boolean getCheckForRequiredPropertiesAfterUpdate()
           
 java.lang.String getCreateErrorURL()
           
 java.lang.String getCreateProfileType()
           
 java.lang.String getCreateSuccessURL()
           
 java.lang.String getDeleteErrorURL()
           
 java.lang.String getDeleteSuccessURL()
           
protected  RepositoryItemDescriptor getDescriptor()
          Return the RepositoryItemDescriptor that describes the profiles that this formHandler edits.
 boolean getExpireSessionOnLogout()
           
 java.lang.String getLoginErrorURL()
           
 java.lang.String getLoginProfileType()
           
 java.lang.String getLoginSuccessURL()
           
 java.lang.String getLogoutErrorURL()
           
 java.lang.String getLogoutProfileType()
           
 java.lang.String getLogoutSuccessURL()
           
protected  java.lang.String[] getProcessPropertyNames(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Returns an array of PropertyNames that setValueDictionaryByParameters should process.
 Profile getProfile()
           
 RepositoryItem getProfileItem()
           
 ProfileTools getProfileTools()
           
 java.lang.String[] getPropertiesToAddOnLogin()
          Get property PropertiesToAddOnLogin
 java.lang.String[] getPropertiesToCopyOnLogin()
          Get property PropertiesToCopyOnLogin
 java.lang.String getRepositoryId()
           
protected  java.lang.String getStringValueProperty(java.lang.String pName)
          Return the value of a property from the values Dictionary as a String
protected  TransactionDemarcation getTransactionDemarcation()
          Gets a new TransactionDemarcation.
protected  javax.transaction.TransactionManager getTransactionManager()
          Returns the transaction manager for the repository that we are using
 java.lang.String[] getTrimProperties()
          Returns property TrimProperties
 java.lang.String getUpdateErrorURL()
           
 java.lang.String getUpdateSuccessURL()
           
protected  java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest)
          Returns the Locale for the user given the request
 UserLoginManager getUserLoginManager()
          Returns the value of the property UserLoginManager, used to manage authentication.
 java.util.Dictionary getValue()
           
protected  java.lang.Object getValueFromArrayString(java.lang.Class pClass, java.lang.Class pComponentClass, java.lang.String pStrValue)
          This method take a string pStrValue and converts it to an object of type pClass returning the converted object.
protected  java.lang.Object getValueFromObject(java.lang.Class pClass, java.lang.Class pComponentClass, java.lang.Object pOldValue)
          This method take an Object pOldValue and converts it to an object of type pClass returning the converted object.
protected  java.lang.Object getValueFromObjectArray(java.lang.Class pClass, java.lang.Class pComponentClass, java.lang.Object[] pOldValue)
          This method take an array of Objects pOldValue and converts it to an object of type pClass returning the converted object.
protected  java.lang.Object getValueFromString(java.lang.Class pClass, java.lang.Class pComponentClass, java.lang.String pStrValue)
          This method take a string pStrValue and converts it to an object of type pClass returning the converted object.
protected  java.lang.Object getValueFromStringArray(java.lang.Class pClass, java.lang.Class pComponentClass, java.lang.String[] pStrValues)
          This method take an array of strings pStrValue and converts it to an object of type pClass returning the converted object.
 java.util.Map getValueMap()
           
protected  java.lang.Object getValueProperty(java.lang.String pName)
          Return the value of a property from the values Dictionary
 boolean handleAddMulti(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Handles the updating of multi-value attributes
 boolean handleChangePassword(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          A special form handler user to update a user's password profile attribute.
 boolean handleCreate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Takes the current set of values set as members of the value property and, if there were no errors in submitting the form, creates a new profile, sets these values in the new profile and set the RepositoryId property.
 boolean handleDelete(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Handles the removal of a user from the Profile Repository based on the profile id as defined by the repositoryId property
 boolean handleLogin(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          By examing the values submitted in the form, looks for a user with the supplied login and password values.
 boolean handleLogout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Changes the type of the current profile to logoutProfileType.
 boolean handleUpdate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Takes the current set of values set as members of the value property and, if there were no errors in submitting the form, modifies the profile described by the RepositoryId property with these values.
 boolean handleValueDictionaryByParameters(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Calls setValueDitionaryByParameters to update the property value with the values set in pRequests parameters.
 boolean isCompareValueInCopyPropertiesOnLogin()
          Gets the CompareValueInCopyPropertiesOnLogin property
 boolean isConfirmOldPassword()
          Returns property ConfirmPassword
 boolean isConfirmPassword()
          Returns property ConfirmPassword
 boolean isExtractDefaultValuesFromProfile()
          Returns property ExtractDefaultValuesFromProfile.
protected  boolean isTrimProperty(java.lang.String pProperty)
          Tests whether pProperty should be trimmed or not
 boolean isUsingLdapProfile()
          Gets the UsingLdapProfile property
protected  void postAddMulti(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just after addMulti()
protected  void postChangePassword(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just after the user's password is changed
protected  void postCreateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just after the user creation process is finished
protected  void postDeleteUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just after the user is removed from the Profile Repository
protected  void postLoginUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just after the user is found to be logged in
protected  void postLogoutUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just after the user is logged out
protected  void postUpdateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just after the user's profile is updated
protected  void postValueDictionaryByParameters(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just after handleValueDictionaryParameters
protected  void preAddMulti(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just before addMulti
protected  void preChangePassword(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just before the user's password is changed
protected  void preCreateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just before the user creation process is started
protected  void preDeleteUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just before the user is removed from the Profile Repository
protected  void preLoginUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just before the user is found to be logged in
protected  void preLogoutUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just before the user is logged out
protected  void preUpdateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just before the user's profile is updated
protected  void preValueDictionaryByParameters(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Operation called just before handleValueDictionaryParameters
 void removeSwapEventListener(atg.userprofiling.ProfileSwapEventListener pListener)
          Removes a ProfileSwapEventListener to the list of listeners that care about ProfileSwapEvents
protected  boolean removeUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Removes the user with the given profile id as defined by the repositoryId property.
 void sendProfileSwapEvent(int pEventType, RepositoryItem pPreSwapItem, RepositoryItem pPostSwapItem)
          Sends a ProfileSwapEvent using the given arguments
 void setBadPasswordDelay(long pBadPasswordDelay)
          Set property BadPasswordDelay
 void setChangePasswordErrorURL(java.lang.String pChangePasswordErrorURL)
          Sets the property ChangePasswordErrorURL.
 void setChangePasswordSuccessURL(java.lang.String pChangePasswordSuccessURL)
          Sets the property ChangePasswordSuccessURL.
 void setCheckForRequiredParameters(boolean pCheckForRequiredParameters)
          Sets property CheckForRequiredParameters.
 void setCheckForRequiredProperties(boolean pCheckForRequiredProperties)
          Sets the property CheckForRequiredProperties.
 void setCheckForRequiredPropertiesAfterUpdate(boolean pCheckForRequiredPropertiesAfterUpdate)
          Sets the property CheckForRequiredPropertiesAfterUpdate.
 void setCompareValueInCopyPropertiesOnLogin(boolean pCompareValueInCopyPropertiesOnLogin)
          Sets the CompareValueInCopyPropertiesOnLogin property
 void setConfirmOldPassword(boolean pConfirmOldPassword)
          Sets property ConfirmPassword
 void setConfirmPassword(boolean pConfirmPassword)
          Sets property ConfirmPassword
 void setCreateErrorURL(java.lang.String pCreateErrorURL)
          Sets the property CreateErrorURL.
 void setCreateProfileType(java.lang.String pCreateProfileType)
          Sets the property CreateProfileType.
 void setCreateSuccessURL(java.lang.String pCreateSuccessURL)
          Sets the property CreateSuccessURL.
 void setDeleteErrorURL(java.lang.String url)
          Sets the property DeleteErrorURL
 void setDeleteSuccessURL(java.lang.String url)
          Sets the property DeleteSuccessURL
 void setExpireSessionOnLogout(boolean pExpireSessionOnLogout)
          Sets the property ExpireSessionOnLogout.
 void setExtractDefaultValuesFromProfile(boolean pExtractDefaultValuesFromProfile)
          Sets property ExtractDefaultValuesFromProfile
 void setLoginErrorURL(java.lang.String pLoginErrorURL)
          Sets the property LoginErrorURL.
 void setLoginProfileType(java.lang.String pLoginProfileType)
          Sets the property LoginProfileType.
 void setLoginSuccessURL(java.lang.String pLoginSuccessURL)
          Sets the property LoginSuccessURL.
 void setLogoutErrorURL(java.lang.String pLogoutErrorURL)
          Sets the property LogoutErrorURL.
 void setLogoutProfileType(java.lang.String pLogoutProfileType)
          Sets the property LogoutProfileType.
 void setLogoutSuccessURL(java.lang.String pLogoutSuccessURL)
          Sets the property LogoutSuccessURL.
 void setProfileTools(ProfileTools pProfileTools)
          Sets the property ProfileTools.
 void setPropertiesToAddOnLogin(java.lang.String[] pPropertiesToAddOnLogin)
          Set property PropertiesToAddOnLogin
 void setPropertiesToCopyOnLogin(java.lang.String[] pPropertiesToCopyOnLogin)
          Set property PropertiesToCopyOnLogin
 void setRepositoryId(java.lang.String id)
          Sets the property RepositoryId description: the RepositoryId of the Profile to manipulate
 void setTrimProperties(java.lang.String[] pTrimProperties)
          Sets property TrimProperties.
 void setUpdateErrorURL(java.lang.String pUpdateErrorURL)
          Sets the property UpdateErrorURL.
 void setUpdateSuccessURL(java.lang.String pUpdateSuccessURL)
          Sets the property UpdateSuccessURL.
 void setUserLoginManager(UserLoginManager pUserLoginManager)
          Sets the property UserLoginManager, used to manage authentication.
 void setUsingLdapProfile(boolean pUsingLdapProfile)
          Sets the UsingLdapProfile property
protected  void setValueDictionaryByParameters(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Goes through each pRequests Parameters looking for parameters named after profile attributes and sets the values of these parameters in the value dictionary.
protected  void setValueProperty(java.lang.String pName, java.lang.Object pValue)
          Set the value of a property into the values Dictionary.
 void updateLDAPProfileAttributes(MutableRepositoryItem pItem)
          Updates profile attributes pertaining to LDAP.
protected  java.lang.Object updatePasswordValue(java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Takes the value of the form inputed password attribute confirms it if nescessary and finally generates a new password as a function of the PropertyManager.generatePassword() method.
protected  void updateProfileAttributes(MutableRepositoryItem pMutableUser, java.util.Dictionary pValues, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Takes the current values of the 'value' property and sticks them into the repository item given.
protected  void updateProfileAttributes(MutableRepositoryItem pMutableUser, java.util.Dictionary pValues, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pPropertyPathPrefix)
          Takes the current values of the 'value' property and sticks them into the repository item given.
protected  void updateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Updates the user based on the current profile id.
protected  boolean userAlreadyExists(java.lang.String pPossibleLogin, Repository pProfileRepository, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Returns true if a user already exists with the given login name
protected  boolean valueIsEmpty(java.lang.Object pValue)
          Returns true if the supplied value is empty.
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, 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, 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, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


ID_NAME

public static final java.lang.String ID_NAME
Name of the ID form parameter

See Also:
Constant Field Values

CONFIRMPASSWORD_PARAM

public static final java.lang.String CONFIRMPASSWORD_PARAM
Name of the confirmation password form parameter

See Also:
Constant Field Values

OLDPASSWORD_PARAM

public static final java.lang.String OLDPASSWORD_PARAM
Name of the old password form parameter

See Also:
Constant Field Values

DEFAULT_CREATE_PROFILE_TYPE

public static final java.lang.String DEFAULT_CREATE_PROFILE_TYPE
This is the type of the profile that is created by the create operation.

See Also:
Constant Field Values

DEFAULT_LOGOUT_PROFILE_TYPE

public static final java.lang.String DEFAULT_LOGOUT_PROFILE_TYPE
This is the type of Profile that we revert to when the logout operation completes.

See Also:
Constant Field Values

DEFAULT_LOGIN_PROFILE_TYPE

public static final java.lang.String DEFAULT_LOGIN_PROFILE_TYPE
This is the type of Profile, when performing a login operation.

See Also:
Constant Field Values

REPOSITORY_ID_PROPERTY_NAME

protected static final java.lang.String REPOSITORY_ID_PROPERTY_NAME
The property name of the repository id

See Also:
Constant Field Values

STATUS_SUCCESS

public static final int STATUS_SUCCESS
Constant to indicate that the state of the form has no errors. Used in the decision process during the form handling. Returned by the checkFormError method.

See Also:
Constant Field Values

STATUS_ERROR_STAY

public static final int STATUS_ERROR_STAY
Constant to indicate that the state of the form errors, but that the form should not perform a redirect. Used in the decision process during the form handling. Returned by the checkFormError method.

See Also:
Constant Field Values

STATUS_ERROR_REDIRECT

public static final int STATUS_ERROR_REDIRECT
Constant to indicate that the state of the form errors, but that the form should perform a redirect. Used in the decision process during the form handling. Returned by the checkFormError method.

See Also:
Constant Field Values

HANDLE_SUCCESS

public static final java.lang.Boolean HANDLE_SUCCESS
Constant to indicate that the handle method was successful


HANDLE_FAILURE

public static final java.lang.Boolean HANDLE_FAILURE
Constant to indicate that the handle method failed


HANDLE_CREATE

public static final java.lang.String HANDLE_CREATE
Constant for the handleCreate method. This is a local parameter which is set if the user was created from the request successfully.

See Also:
Constant Field Values

HANDLE_CREATE_PARAM

public static final ParameterName HANDLE_CREATE_PARAM
ParameterName for the String HANDLE_CREATE


HANDLE_LOGIN

public static final java.lang.String HANDLE_LOGIN
Constant for the handleLogin method. This is a local parameter which is set if the user was obtained from the request successfully.

See Also:
Constant Field Values

HANDLE_LOGIN_PARAM

public static final ParameterName HANDLE_LOGIN_PARAM
ParameterName for the String HANDLE_LOGIN


NULL_SENTINEL

public static final java.lang.Object NULL_SENTINEL
Object to be used to reprosent null property values. We convert property values from java null to NULL_SENTINEL to allow http forms to be submitted with blank string values to set property values to null.


RESOURCE_BUNDLE_NAME

protected static final java.lang.String RESOURCE_BUNDLE_NAME
See Also:
Constant Field Values

MSG_INVALID_ADD_PROPERTY

protected static final java.lang.String MSG_INVALID_ADD_PROPERTY
See Also:
Constant Field Values

MSG_NO_TYPE_CONVERTER

protected static final java.lang.String MSG_NO_TYPE_CONVERTER
See Also:
Constant Field Values

MSG_WARNING_PROFILE_TOOLS

protected static final java.lang.String MSG_WARNING_PROFILE_TOOLS
See Also:
Constant Field Values

MSG_NO_SUCH_PROFILE_PROPERTY

protected static final java.lang.String MSG_NO_SUCH_PROFILE_PROPERTY
See Also:
Constant Field Values

MSG_INVALID_LOGIN

protected static final java.lang.String MSG_INVALID_LOGIN
See Also:
Constant Field Values

MSG_ERR_DELETING_PROFILE

protected static final java.lang.String MSG_ERR_DELETING_PROFILE
See Also:
Constant Field Values

MSG_MISSING_PROFILE_TOOLS

protected static final java.lang.String MSG_MISSING_PROFILE_TOOLS
See Also:
Constant Field Values

MSG_MISSING_PROFILE

protected static final java.lang.String MSG_MISSING_PROFILE
See Also:
Constant Field Values

MSG_ERR_CREATING_PROFILE

protected static final java.lang.String MSG_ERR_CREATING_PROFILE
See Also:
Constant Field Values

MSG_USER_ALREADY_EXISTS

protected static final java.lang.String MSG_USER_ALREADY_EXISTS
See Also:
Constant Field Values

MSG_ERR_UPDATING_PROFILE

protected static final java.lang.String MSG_ERR_UPDATING_PROFILE
See Also:
Constant Field Values

MSG_MISSING_REQUIRED_PROPERTY

protected static final java.lang.String MSG_MISSING_REQUIRED_PROPERTY
See Also:
Constant Field Values

MSG_READ_ONLY_PROFILE_PROPERTY

protected static final java.lang.String MSG_READ_ONLY_PROFILE_PROPERTY
See Also:
Constant Field Values

MSG_TYPE_CONVERSION_ERR

protected static final java.lang.String MSG_TYPE_CONVERSION_ERR
See Also:
Constant Field Values

MSG_ILLEGAL_ARGUMENT

protected static final java.lang.String MSG_ILLEGAL_ARGUMENT
See Also:
Constant Field Values

MSG_MISSING_LOGIN

protected static final java.lang.String MSG_MISSING_LOGIN
See Also:
Constant Field Values

MSG_INVALID_PASSWORD

protected static final java.lang.String MSG_INVALID_PASSWORD
See Also:
Constant Field Values

MSG_MISSING_PASSWORD

protected static final java.lang.String MSG_MISSING_PASSWORD
See Also:
Constant Field Values

MSG_PASSWORDS_DO_NOT_MATCH

protected static final java.lang.String MSG_PASSWORDS_DO_NOT_MATCH
See Also:
Constant Field Values

MSG_PASSWORD_SAME_AS_OLD_PASSWORD

protected static final java.lang.String MSG_PASSWORD_SAME_AS_OLD_PASSWORD
See Also:
Constant Field Values

MSG_PERMISSION_DEFINED_PASSWORD_CHANGE

protected static final java.lang.String MSG_PERMISSION_DEFINED_PASSWORD_CHANGE
See Also:
Constant Field Values

sResourceBundle

protected static java.util.ResourceBundle sResourceBundle

mExtractDefaultValuesFromProfile

protected boolean mExtractDefaultValuesFromProfile

mRepositoryId

protected java.lang.String mRepositoryId

mProfileTools

protected ProfileTools mProfileTools

mCreateProfileType

protected java.lang.String mCreateProfileType

mLogoutProfileType

protected java.lang.String mLogoutProfileType

mLoginProfileType

protected java.lang.String mLoginProfileType

mValue

protected atg.userprofiling.ProfileFormHashtable mValue

mExpireSessionOnLogout

protected boolean mExpireSessionOnLogout

mCheckForRequiredParameters

protected boolean mCheckForRequiredParameters

mCheckForRequiredProperties

protected boolean mCheckForRequiredProperties

mCheckForRequiredPropertiesAfterUpdate

protected boolean mCheckForRequiredPropertiesAfterUpdate

mUpdateSuccessURL

protected java.lang.String mUpdateSuccessURL

mUpdateErrorURL

protected java.lang.String mUpdateErrorURL

mCreateSuccessURL

protected java.lang.String mCreateSuccessURL

mCreateErrorURL

protected java.lang.String mCreateErrorURL

mChangePasswordSuccessURL

protected java.lang.String mChangePasswordSuccessURL

mChangePasswordErrorURL

protected java.lang.String mChangePasswordErrorURL

mLoginSuccessURL

protected java.lang.String mLoginSuccessURL

mLoginErrorURL

protected java.lang.String mLoginErrorURL

mLogoutSuccessURL

protected java.lang.String mLogoutSuccessURL

mLogoutErrorURL

protected java.lang.String mLogoutErrorURL

mDeleteSuccessURL

protected java.lang.String mDeleteSuccessURL

mDeleteErrorURL

protected java.lang.String mDeleteErrorURL

mConfirmPassword

protected boolean mConfirmPassword

mConfirmOldPassword

protected boolean mConfirmOldPassword

mUsingLdapProfile

protected boolean mUsingLdapProfile
Property indicating whether this form handler is acting on an LDAP profile.


mCompareValueInCopyPropertiesOnLogin

protected boolean mCompareValueInCopyPropertiesOnLogin
Property indicating whether to compare property values in copyPropertiesOnLogin method


mPropertiesToCopyOnLogin

protected java.lang.String[] mPropertiesToCopyOnLogin
properties to copy from anonymous profiles to persistent profiles on login


mPropertiesToAddOnLogin

protected java.lang.String[] mPropertiesToAddOnLogin
Array, Map, and Collection properties to add from anonymous profiles to persistent profiles on login


mTrimProperties

protected java.lang.String[] mTrimProperties

mBadPasswordDelay

protected long mBadPasswordDelay
the number of milliseconds to delay after a bad password is submitted. Default is one second.


mUserLoginManager

protected UserLoginManager mUserLoginManager
This is the UserLoginManager used throughout the application to manage authentication. In reality we don't use any of the "real" features of this manager, but instead use its IdentityManager interface implementation -- which is just a proxy for the central IdentityManager for the application.

This odd state of affairs is done because virtually everyone has overridden ProfileFormHandler to produce their own variant, and it's common practice to also create a new Nucleus object for the new form handler. Since this is done, we cannot change the property name or location without breaking almost every application in existance. So instead we have extended the UserLoginManager's capabilities in place.


mSwapEventListeners

protected java.util.List mSwapEventListeners
A List of EventListeners that care about ProfileSwapEvents

Constructor Detail

ProfileForm

public ProfileForm()
Constructs a new ProfileForm. This class is typically constructed as a Dynamo component using a .properties file. It can be a request scoped or session scoped component. Use session scope if you have a form that is split across several pages.

Method Detail

setExtractDefaultValuesFromProfile

public void setExtractDefaultValuesFromProfile(boolean pExtractDefaultValuesFromProfile)
Sets property ExtractDefaultValuesFromProfile


isExtractDefaultValuesFromProfile

public boolean isExtractDefaultValuesFromProfile()
Returns property ExtractDefaultValuesFromProfile. If this value is true and the form handler does not have a value for a "values property" then the value is extracted out of the user's profile.


setRepositoryId

public void setRepositoryId(java.lang.String id)
Sets the property RepositoryId description: the RepositoryId of the Profile to manipulate


getRepositoryId

public java.lang.String getRepositoryId()
Returns:
The value of the property RepositoryId.

getProfile

public Profile getProfile()

getProfileItem

public RepositoryItem getProfileItem()

setProfileTools

public void setProfileTools(ProfileTools pProfileTools)
Sets the property ProfileTools.


getProfileTools

public ProfileTools getProfileTools()
Returns:
The value of the property ProfileTools.

getTransactionDemarcation

protected TransactionDemarcation getTransactionDemarcation()
Gets a new TransactionDemarcation.

Returns:
The value of the property TransactionDemarcation.

setCreateProfileType

public void setCreateProfileType(java.lang.String pCreateProfileType)
Sets the property CreateProfileType. This is the type of the profile that is created by the create operation.


getCreateProfileType

public java.lang.String getCreateProfileType()
Returns:
The value of the property CreateProfileType.

setLogoutProfileType

public void setLogoutProfileType(java.lang.String pLogoutProfileType)
Sets the property LogoutProfileType. This is the type of Profile that we revert to when the logout operation completes.


getLogoutProfileType

public java.lang.String getLogoutProfileType()
Returns:
The value of the property LogoutProfileType.

setLoginProfileType

public void setLoginProfileType(java.lang.String pLoginProfileType)
Sets the property LoginProfileType. This is the type of Profile that the user should be when performing a login.


getLoginProfileType

public java.lang.String getLoginProfileType()
Returns:
The value of the property LoginProfileType

getValue

public java.util.Dictionary getValue()
Returns:
The value of the property Value. This is a dictionary that stores the pending values for an operation on the current Profile (e.g. login, update, create).

getValueMap

public java.util.Map getValueMap()

setExpireSessionOnLogout

public void setExpireSessionOnLogout(boolean pExpireSessionOnLogout)
Sets the property ExpireSessionOnLogout. If this is true, when the logout operation completes, the current session is expired. The default is true.


getExpireSessionOnLogout

public boolean getExpireSessionOnLogout()
Returns:
The value of the property ExpireSessionOnLogout.

setCheckForRequiredParameters

public void setCheckForRequiredParameters(boolean pCheckForRequiredParameters)
Sets property CheckForRequiredParameters. If this is true, then during the create or update operation form exceptions will be added for each form parameter which is required and has a null value.


getCheckForRequiredParameters

public boolean getCheckForRequiredParameters()
Returns property CheckForRequiredParameters


setCheckForRequiredProperties

public void setCheckForRequiredProperties(boolean pCheckForRequiredProperties)
Sets the property CheckForRequiredProperties. If this is true, then during the create operation form exceptions will be added for each property which is required and has a null value.


getCheckForRequiredProperties

public boolean getCheckForRequiredProperties()
Returns:
The value of the property CheckForRequiredProperties.

setCheckForRequiredPropertiesAfterUpdate

public void setCheckForRequiredPropertiesAfterUpdate(boolean pCheckForRequiredPropertiesAfterUpdate)
Sets the property CheckForRequiredPropertiesAfterUpdate. If this is true, then during the update operation form exceptions will be added for each property which is required and has a null value.


getCheckForRequiredPropertiesAfterUpdate

public boolean getCheckForRequiredPropertiesAfterUpdate()
Returns:
The value of the property CheckForRequiredPropertiesAfterUpdate.

setUpdateSuccessURL

public void setUpdateSuccessURL(java.lang.String pUpdateSuccessURL)
Sets the property UpdateSuccessURL.


getUpdateSuccessURL

public java.lang.String getUpdateSuccessURL()
Returns:
The value of the property UpdateSuccessURL.

setUpdateErrorURL

public void setUpdateErrorURL(java.lang.String pUpdateErrorURL)
Sets the property UpdateErrorURL.


getUpdateErrorURL

public java.lang.String getUpdateErrorURL()
Returns:
The value of the property UpdateErrorURL.

setCreateSuccessURL

public void setCreateSuccessURL(java.lang.String pCreateSuccessURL)
Sets the property CreateSuccessURL.


getCreateSuccessURL

public java.lang.String getCreateSuccessURL()
Returns:
The value of the property CreateSuccessURL.

setCreateErrorURL

public void setCreateErrorURL(java.lang.String pCreateErrorURL)
Sets the property CreateErrorURL.


getCreateErrorURL

public java.lang.String getCreateErrorURL()
Returns:
The value of the property CreateErrorURL.

setChangePasswordSuccessURL

public void setChangePasswordSuccessURL(java.lang.String pChangePasswordSuccessURL)
Sets the property ChangePasswordSuccessURL.


getChangePasswordSuccessURL

public java.lang.String getChangePasswordSuccessURL()
Returns:
The value of the property ChangePasswordSuccessURL.

setChangePasswordErrorURL

public void setChangePasswordErrorURL(java.lang.String pChangePasswordErrorURL)
Sets the property ChangePasswordErrorURL.


getChangePasswordErrorURL

public java.lang.String getChangePasswordErrorURL()
Returns:
The value of the property ChangePasswordErrorURL.

setLoginSuccessURL

public void setLoginSuccessURL(java.lang.String pLoginSuccessURL)
Sets the property LoginSuccessURL.


getLoginSuccessURL

public java.lang.String getLoginSuccessURL()
Returns:
The value of the property LoginSuccessURL.

setLoginErrorURL

public void setLoginErrorURL(java.lang.String pLoginErrorURL)
Sets the property LoginErrorURL.


getLoginErrorURL

public java.lang.String getLoginErrorURL()
Returns:
The value of the property LoginErrorURL.

setLogoutSuccessURL

public void setLogoutSuccessURL(java.lang.String pLogoutSuccessURL)
Sets the property LogoutSuccessURL.


getLogoutSuccessURL

public java.lang.String getLogoutSuccessURL()
Returns:
The value of the property LogoutSuccessURL.

setLogoutErrorURL

public void setLogoutErrorURL(java.lang.String pLogoutErrorURL)
Sets the property LogoutErrorURL.


getLogoutErrorURL

public java.lang.String getLogoutErrorURL()
Returns:
The value of the property LogoutErrorURL.

getDeleteSuccessURL

public java.lang.String getDeleteSuccessURL()
Returns:
The value of property DeleteSuccessURL

setDeleteSuccessURL

public void setDeleteSuccessURL(java.lang.String url)
Sets the property DeleteSuccessURL


getDeleteErrorURL

public java.lang.String getDeleteErrorURL()
Returns:
The value of property DeleteErrorURL

setDeleteErrorURL

public void setDeleteErrorURL(java.lang.String url)
Sets the property DeleteErrorURL


setConfirmPassword

public void setConfirmPassword(boolean pConfirmPassword)
Sets property ConfirmPassword


isConfirmPassword

public boolean isConfirmPassword()
Returns property ConfirmPassword


setConfirmOldPassword

public void setConfirmOldPassword(boolean pConfirmOldPassword)
Sets property ConfirmPassword


isConfirmOldPassword

public boolean isConfirmOldPassword()
Returns property ConfirmPassword


setUsingLdapProfile

public void setUsingLdapProfile(boolean pUsingLdapProfile)
Sets the UsingLdapProfile property

Parameters:
pUsingLdapProfile - if true, then we're acting upon an LDAP-based profile, or a composite profile that uses LDAP as part of its makeup

isUsingLdapProfile

public boolean isUsingLdapProfile()
Gets the UsingLdapProfile property

Returns:
true if we're acting upon an LDAP-based profile, or a composite profile that uses LDAP as part of its makeup, false otherwise. Default is false

setCompareValueInCopyPropertiesOnLogin

public void setCompareValueInCopyPropertiesOnLogin(boolean pCompareValueInCopyPropertiesOnLogin)
Sets the CompareValueInCopyPropertiesOnLogin property

Parameters:
pCompareValueInCopyPropertiesOnLogin - if true, copyPropertiesOnLogin method will compare property values between anonymous profiles and persistent profiles. If the value is not the same, it will copy the property to persistent profiles.

isCompareValueInCopyPropertiesOnLogin

public boolean isCompareValueInCopyPropertiesOnLogin()
Gets the CompareValueInCopyPropertiesOnLogin property

Returns:
true if copyPropertiesOnLogin method will compare property values between anonymous profiles and persistent profiles. If the value is not the same, it will copy the property to persistent profiles. The default value is true.

setPropertiesToCopyOnLogin

public void setPropertiesToCopyOnLogin(java.lang.String[] pPropertiesToCopyOnLogin)
Set property PropertiesToCopyOnLogin

Parameters:
pPropertiesToCopyOnLogin - new value to set

getPropertiesToCopyOnLogin

public java.lang.String[] getPropertiesToCopyOnLogin()
Get property PropertiesToCopyOnLogin

Returns:
PropertiesToCopyOnLogin

setPropertiesToAddOnLogin

public void setPropertiesToAddOnLogin(java.lang.String[] pPropertiesToAddOnLogin)
Set property PropertiesToAddOnLogin

Parameters:
pPropertiesToAddOnLogin - new value to set

getPropertiesToAddOnLogin

public java.lang.String[] getPropertiesToAddOnLogin()
Get property PropertiesToAddOnLogin

Returns:
PropertiesToAddOnLogin

setTrimProperties

public void setTrimProperties(java.lang.String[] pTrimProperties)
Sets property TrimProperties. This names the attributes that should be trimmed before updating in the user's profile.


getTrimProperties

public java.lang.String[] getTrimProperties()
Returns property TrimProperties


setBadPasswordDelay

public void setBadPasswordDelay(long pBadPasswordDelay)
Set property BadPasswordDelay

Parameters:
pBadPasswordDelay - new value to set

getBadPasswordDelay

public long getBadPasswordDelay()
Get property BadPasswordDelay

Returns:
BadPasswordDelay

setUserLoginManager

public void setUserLoginManager(UserLoginManager pUserLoginManager)
Sets the property UserLoginManager, used to manage authentication.


getUserLoginManager

public UserLoginManager getUserLoginManager()
Returns the value of the property UserLoginManager, used to manage authentication.


addSwapEventListener

public void addSwapEventListener(atg.userprofiling.ProfileSwapEventListener pListener)
Adds a ProfileSwapEventListener to the list of listeners that care about ProfileSwapEvents

Parameters:
pListener - the ProfileSwapEventListener to add

removeSwapEventListener

public void removeSwapEventListener(atg.userprofiling.ProfileSwapEventListener pListener)
Removes a ProfileSwapEventListener to the list of listeners that care about ProfileSwapEvents

Parameters:
pListener - the ProfileSwapEventListener to remove

isTrimProperty

protected boolean isTrimProperty(java.lang.String pProperty)
Tests whether pProperty should be trimmed or not

Parameters:
pProperty - the name of the property to check to be trimmed
Returns:
true if pProperty should be trimmed

getTransactionManager

protected javax.transaction.TransactionManager getTransactionManager()
Returns the transaction manager for the repository that we are using


ensureTransaction

protected javax.transaction.Transaction ensureTransaction()
This method ensures that a transaction exists before returning. If there is no transaction, a new one is started and returned. In this case, you must call commitTransaction when the transaction completes.


commitTransaction

protected void commitTransaction(javax.transaction.Transaction pTransaction)
Commits the current transaction


doStartService

public void doStartService()
                    throws ServiceException
Start the service - make sure we have ProfileTools

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up

handleCreate

public boolean handleCreate(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Takes the current set of values set as members of the value property and, if there were no errors in submitting the form, creates a new profile, sets these values in the new profile and set the RepositoryId property. The new type of profile created is defined by the createProfileType property.

If any errors occur in the process, form errors will be added. If there were no errors encountered while submitting the form, we optionally redirect to the value of the property createSuccessURL. Otherwise, we optionally redirect to createErrorURL.

Throws:
javax.servlet.ServletException
java.io.IOException

preCreateUser

protected void preCreateUser(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Operation called just before the user creation process is started

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postCreateUser

protected void postCreateUser(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Operation called just after the user creation process is finished

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

createProfileItem

protected MutableRepositoryItem createProfileItem(DynamoHttpServletRequest pRequest,
                                                  DynamoHttpServletResponse pResponse)
                                           throws javax.servlet.ServletException,
                                                  java.io.IOException
This method is called from createUser to create the MutableRepositoryItem to use in the creation of a user.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
a MutableRepositoryItem used when creating the profile
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

createUser

protected RepositoryItem createUser(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
By examing the values submitted in the form, a user is attempted to be created and then added persistently to the Profile Repository. If any errors occur in the process, form errors will be added.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
the new user profile or null if the user could not be created
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

checkForRequiredProperties

protected void checkForRequiredProperties(Repository pProfileRepository,
                                          DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
                                   throws RepositoryException,
                                          javax.servlet.ServletException,
                                          java.io.IOException
NOTE: This method has been ressurected for use in 5.0. One can use the checkForRequiredParameters or alternative checkForRequiredProperties method which takes in a RepositoryItem to validate.

Parameters:
pProfileRepository - the repository which should contain the desired profile template
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
RepositoryException - if there was an error while accessing the Profile Repository
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

checkForRequiredParameters

protected void checkForRequiredParameters(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
                                   throws RepositoryException,
                                          javax.servlet.ServletException,
                                          java.io.IOException
This method is used to verify that certain request parameters have been submitted in the form. Currently this method only checks to make sure that the confirmpassword form parameter is included in the request if the confirmPassword property is set to true. If any errors occur form exceptions are added.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
RepositoryException - if there was an error while accessing the Profile Repository
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

checkForRequiredProperties

protected void checkForRequiredProperties(RepositoryItem pItem,
                                          DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
                                   throws RepositoryException,
                                          javax.servlet.ServletException,
                                          java.io.IOException
Iterates over all the properties in the profile template and if any of them are flagged as required then we check to make sure there is an associated non-null property value in the RepositoryItem. If any errors occur form exceptions are added.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
RepositoryException - if there was an error while accessing the Profile Repository
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

valueIsEmpty

protected boolean valueIsEmpty(java.lang.Object pValue)
Returns true if the supplied value is empty.


userAlreadyExists

protected boolean userAlreadyExists(java.lang.String pPossibleLogin,
                                    Repository pProfileRepository,
                                    DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws RepositoryException,
                                    javax.servlet.ServletException,
                                    java.io.IOException
Returns true if a user already exists with the given login name

Parameters:
pPossibleLogin - the login which a user wants to use
pProfileRepository - the repository to search for the pre-existing user
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
RepositoryException - if there was an error while accessing the Profile Repository
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

addUser

protected RepositoryItem addUser(MutableRepositoryItem pUser,
                                 MutableRepository pProfileRepository,
                                 DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws RepositoryException,
                                 javax.servlet.ServletException,
                                 java.io.IOException
Returns the RepositoryItem which represents the newly added user in the Profile Repository.

Parameters:
pUser - the potential new user to add to the Profile Respository
pProfileRepository - the repository to add the user to
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
RepositoryException - if there was an error while accessing the Profile Repository
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleUpdate

public boolean handleUpdate(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Takes the current set of values set as members of the value property and, if there were no errors in submitting the form, modifies the profile described by the RepositoryId property with these values.

If any errors occur in the process, form errors will be added. If there were no errors encountered while submitting the form, we optionally redirect to the value of the property updateSuccessURL. Otherwise, we optionally redirect to updateErrorURL.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preUpdateUser

protected void preUpdateUser(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Operation called just before the user's profile is updated

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postUpdateUser

protected void postUpdateUser(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Operation called just after the user's profile is updated

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

updateUser

protected void updateUser(DynamoHttpServletRequest pRequest,
                          DynamoHttpServletResponse pResponse)
                   throws javax.servlet.ServletException,
                          java.io.IOException
Updates the user based on the current profile id. Values store in the value property container are saved into the user profile. If any errors occur in the process, form errors will be added.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleChangePassword

public boolean handleChangePassword(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
A special form handler user to update a user's password profile attribute. This specific handler is available because it allows the form to check that user changing the password knows what the original password value is. One can optionally also ask for a confirmation password value to verify that the user did not mistype the new password entry. The name of the password profile attribute is defined in the PropertyManager.

If any errors occur in the process, form errors will be added. If there were no errors encountered while submitting the form, we optionally redirect to the value of the property changePasswordSuccessURL. Otherwise, we optionally redirect to changePasswordErrorURL.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preChangePassword

protected void preChangePassword(DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Operation called just before the user's password is changed

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postChangePassword

protected void postChangePassword(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Operation called just after the user's password is changed

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

changePassword

protected boolean changePassword(DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Changes the users password. If any errors occur in the process, form errors will be added.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
true if the password is changed correcty
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleLogin

public boolean handleLogin(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
By examing the values submitted in the form, looks for a user with the supplied login and password values. The names of the login and password profile attributes are defined in the PropertyManager.

If any errors occur in the process, form errors will be added. If there were no errors encountered while submitting the form, we optionally redirect to the value of the property loginSuccessURL. Otherwise, we optionally redirect to loginErrorURL.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

copyPropertiesOnLogin

protected void copyPropertiesOnLogin(RepositoryItem pGuestUser,
                                     RepositoryItem pAuthenticatedUser)
                              throws RepositoryException
Copy the properties from the current session to the specied repository item. The properties copied are those specified by the property propertiesToCopyOnLogin. Subclasses can override this method to provide special handling.

Throws:
RepositoryException

addPropertiesOnLogin

protected void addPropertiesOnLogin(RepositoryItem pGuestUser,
                                    RepositoryItem pAuthenticatedUser)
                             throws RepositoryException
Add the Array, Map, and Collection properties from the current anonymous user to the authenticated user. The properties added are those specified by the property propertiesToAddOnLogin. Subclasses can override this method to provide special handling.

Throws:
RepositoryException

addProperty

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

Throws:
RepositoryException

preLoginUser

protected void preLoginUser(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Operation called just before the user is found to be logged in

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postLoginUser

protected void postLoginUser(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Operation called just after the user is found to be logged in

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

findUser

protected RepositoryItem findUser(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Checks the supplied login and password and attempts to find a profile which matches the supplied values. If any errors occur in the process, form errors will be added.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
the user profile or null if the user could not be found
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

findUser

protected RepositoryItem findUser(java.lang.String pLogin,
                                  java.lang.String pPassword,
                                  Repository pProfileRepository,
                                  DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws RepositoryException,
                                  javax.servlet.ServletException,
                                  java.io.IOException
Returns the user profile or null if the user could not be found with the given login and password.

Parameters:
pLogin - the login name for the person
pPassword - the password for the person, optionally null if no password checking should be performed.
pProfileRepository - the repository which should contain the desired profile template
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
RepositoryException - if there was an error while accessing the Profile Repository
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleLogout

public boolean handleLogout(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Changes the type of the current profile to logoutProfileType. If logoutProfileType is set to null, we leave the Profile as null. If expireSessionOnLogout is set to true, we expire the current session as well when we logout.

If there were no errors encountered while submitting the form, we optionally redirect to the value of the property logoutSuccessURL. Otherwise, we optionally redirect to logoutErrorURL.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preLogoutUser

protected void preLogoutUser(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Operation called just before the user is logged out

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postLogoutUser

protected void postLogoutUser(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Operation called just after the user is logged out

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleValueDictionaryByParameters

public boolean handleValueDictionaryByParameters(DynamoHttpServletRequest pRequest,
                                                 DynamoHttpServletResponse pResponse)
                                          throws javax.servlet.ServletException,
                                                 java.io.IOException
Calls setValueDitionaryByParameters to update the property value with the values set in pRequests parameters. preValueDictionaryByParameters is called before setting the values from pRequest. postValueDictionaryByParameters is called following the set of the values.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preValueDictionaryByParameters

protected void preValueDictionaryByParameters(DynamoHttpServletRequest pRequest,
                                              DynamoHttpServletResponse pResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException
Operation called just before handleValueDictionaryParameters

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postValueDictionaryByParameters

protected void postValueDictionaryByParameters(DynamoHttpServletRequest pRequest,
                                               DynamoHttpServletResponse pResponse)
                                        throws javax.servlet.ServletException,
                                               java.io.IOException
Operation called just after handleValueDictionaryParameters

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleDelete

public boolean handleDelete(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Handles the removal of a user from the Profile Repository based on the profile id as defined by the repositoryId property

If any errors occur in the process, form errors will be added. If there were no errors encountered while submitting the form, we optionally redirect to the value of the property deleteSuccessURL. Otherwise, we optionally redirect to deleteErrorURL.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preDeleteUser

protected void preDeleteUser(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Operation called just before the user is removed from the Profile Repository

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postDeleteUser

protected void postDeleteUser(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Operation called just after the user is removed from the Profile Repository

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

removeUser

protected boolean removeUser(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Removes the user with the given profile id as defined by the repositoryId property. If any errors occur in the process, form errors will be added.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
true if the delete was successful
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

getAddMultiPropertyName

protected java.lang.String getAddMultiPropertyName(DynamoHttpServletRequest pRequest,
                                                   DynamoHttpServletResponse pResponse)
                                            throws javax.servlet.ServletException,
                                                   java.io.IOException
Get the multi-value Property Name to use in a handleAddMulti call.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
the name of the multi-value property to addmulti
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

getAddMultiPropertyValue

protected java.lang.Object getAddMultiPropertyValue(DynamoHttpServletRequest pRequest,
                                                    DynamoHttpServletResponse pResponse)
                                             throws javax.servlet.ServletException,
                                                    java.io.IOException
Get the multi-value Property Value to use in a handleAddMulti call.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
the value of the multi-value property to addmulti
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleAddMulti

public boolean handleAddMulti(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Handles the updating of multi-value attributes

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preAddMulti

protected void preAddMulti(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Operation called just before addMulti

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postAddMulti

protected void postAddMulti(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Operation called just after addMulti()

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

addMulti

protected void addMulti(java.lang.String pPropertyName,
                        java.lang.Object pPropertyValue,
                        DynamoHttpServletRequest pRequest,
                        DynamoHttpServletResponse pResponse)
                 throws javax.servlet.ServletException,
                        java.io.IOException
Handles the updating of multi-value attributes pPropertyName with pPropertyValue

Parameters:
pPropertyName - The name of the property to append to
pPropertyValue - The value to append to the pPropery
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

getValueFromArrayString

protected java.lang.Object getValueFromArrayString(java.lang.Class pClass,
                                                   java.lang.Class pComponentClass,
                                                   java.lang.String pStrValue)
                                            throws java.lang.IllegalArgumentException
This method take a string pStrValue and converts it to an object of type pClass returning the converted object. Assumes the pClass is an array of objects

Parameters:
pClass - the type of the return value.
pComponentClass - the type of the component.
pStrValue - the string value to convert.
Returns:
pStrValue converted to array object of type pClass
Throws:
java.lang.IllegalArgumentException - if couldn't find a property editor for pClass

getValueFromString

protected java.lang.Object getValueFromString(java.lang.Class pClass,
                                              java.lang.Class pComponentClass,
                                              java.lang.String pStrValue)
                                       throws java.lang.IllegalArgumentException
This method take a string pStrValue and converts it to an object of type pClass returning the converted object.

Parameters:
pClass - the type of the return value.
pComponentClass - the type of the component
pStrValue - the string value to convert.
Returns:
pStrValue converted to object of type pClass
Throws:
java.lang.IllegalArgumentException - if couldn't find a property editor for pClass

getValueFromStringArray

protected java.lang.Object getValueFromStringArray(java.lang.Class pClass,
                                                   java.lang.Class pComponentClass,
                                                   java.lang.String[] pStrValues)
                                            throws java.lang.IllegalArgumentException
This method take an array of strings pStrValue and converts it to an object of type pClass returning the converted object. Assumes the pClass is an array of objects

Parameters:
pClass - the type of the return value.
pComponentClass - the type of the component.
pStrValues - the array of string values to convert.
Returns:
pStrValue converted to array object of type pClass
Throws:
java.lang.IllegalArgumentException - if couldn't find a property editor for pClass

getValueFromObjectArray

protected java.lang.Object getValueFromObjectArray(java.lang.Class pClass,
                                                   java.lang.Class pComponentClass,
                                                   java.lang.Object[] pOldValue)
                                            throws java.lang.IllegalArgumentException
This method take an array of Objects pOldValue and converts it to an object of type pClass returning the converted object. Assumes the pClass is an array of objects

Parameters:
pClass - the type of the return value.
pComponentClass - the type of the component.
pOldValue - the array of object values to convert.
Returns:
pOldValue converted to array object of type pClass
Throws:
java.lang.IllegalArgumentException - if couldn't find a property editor for pClass

getValueFromObject

protected java.lang.Object getValueFromObject(java.lang.Class pClass,
                                              java.lang.Class pComponentClass,
                                              java.lang.Object pOldValue)
                                       throws java.lang.IllegalArgumentException
This method take an Object pOldValue and converts it to an object of type pClass returning the converted object.

Parameters:
pClass - the type of the return value.
pComponentClass - the type of the component.
pOldValue - the object to convert.
Returns:
pOldValue converted to an object of type pClass
Throws:
java.lang.IllegalArgumentException - if couldn't find a property editor for pClass

updatePasswordValue

protected java.lang.Object updatePasswordValue(java.lang.Object pValue,
                                               DynamoHttpServletRequest pRequest,
                                               DynamoHttpServletResponse pResponse)
                                        throws javax.servlet.ServletException,
                                               java.io.IOException
Takes the value of the form inputed password attribute confirms it if nescessary and finally generates a new password as a function of the PropertyManager.generatePassword() method.

Parameters:
pValue - the value of the password passed from the form.
Returns:
the new value of the password attribute.
Throws:
javax.servlet.ServletException
java.io.IOException

updateProfileAttributes

protected void updateProfileAttributes(MutableRepositoryItem pMutableUser,
                                       java.util.Dictionary pValues,
                                       DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse)
                                throws RepositoryException,
                                       javax.servlet.ServletException,
                                       java.io.IOException
Takes the current values of the 'value' property and sticks them into the repository item given. Adds form errors if there were any problems.

Parameters:
pMutableUser - the user to update the profile attributes by the form values
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
RepositoryException - if there was an error while accessing the Profile Repository
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

updateProfileAttributes

protected void updateProfileAttributes(MutableRepositoryItem pMutableUser,
                                       java.util.Dictionary pValues,
                                       DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse,
                                       java.lang.String pPropertyPathPrefix)
                                throws RepositoryException,
                                       javax.servlet.ServletException,
                                       java.io.IOException
Takes the current values of the 'value' property and sticks them into the repository item given. Adds form errors if there were any problems.

Parameters:
pMutableUser - the user to update the profile attributes by the form values
pRequest - the servlet's request
pResponse - the servlet's response
pPropertyPathPrefix - when this method is called recursively for subproperties, this argument contains the property path up to that point; initially, it is null
Throws:
RepositoryException - if there was an error while accessing the Profile Repository
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

updateLDAPProfileAttributes

public void updateLDAPProfileAttributes(MutableRepositoryItem pItem)
                                 throws RepositoryException
Updates profile attributes pertaining to LDAP. Specifically, this sets the "fullName" property out of the first and last name of the given item. This is so that forms that create LDAP items don't have to have a fullName field in addition to firstName and lastName (fullName is a required property in LDAP). The other way to do this would be to ask for just the users full name and then split that up in this method to set the first name and last name property for the user as well

Parameters:
pItem - the item to change values on
Throws:
RepositoryException

generatePropertyPath

protected java.lang.String generatePropertyPath(java.lang.String pPropertyName)
Returns a Nucleus property path which can be used in a DropletFormException


getStringValueProperty

protected java.lang.String getStringValueProperty(java.lang.String pName)
Return the value of a property from the values Dictionary as a String


getValueProperty

protected java.lang.Object getValueProperty(java.lang.String pName)
Return the value of a property from the values Dictionary


setValueProperty

protected void setValueProperty(java.lang.String pName,
                                java.lang.Object pValue)
Set the value of a property into the values Dictionary. If pValue is null then the property defined by pName is removed from the values Dictionary.


getDescriptor

protected RepositoryItemDescriptor getDescriptor()
Return the RepositoryItemDescriptor that describes the profiles that this formHandler edits.


checkFormError

protected int checkFormError(java.lang.String pErrorURL,
                             DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Check to see if there were errors during the submit operation. If so, redirect to the supplied error url if possible.

Parameters:
pErrorURL - the URL to redirect to if there are any form errors
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
the status of the form
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
STATUS_SUCCESS, STATUS_ERROR_STAY, STATUS_ERROR_REDIRECT

checkFormSuccess

protected boolean checkFormSuccess(java.lang.String pSuccessURL,
                                   DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
If the form was successfully submitted, see if we should redirect after processing the form data.

Parameters:
pSuccessURL - the URL to redirect to if the form was successfully submitted
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
false is returned is we redirect
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

getProcessPropertyNames

protected java.lang.String[] getProcessPropertyNames(DynamoHttpServletRequest pRequest,
                                                     DynamoHttpServletResponse pResponse)
                                              throws javax.servlet.ServletException,
                                                     java.io.IOException
Returns an array of PropertyNames that setValueDictionaryByParameters should process.

Parameters:
pRequest - the servlets request
pResponse - the servlets response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

setValueDictionaryByParameters

protected void setValueDictionaryByParameters(DynamoHttpServletRequest pRequest,
                                              DynamoHttpServletResponse pResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException
Goes through each pRequests Parameters looking for parameters named after profile attributes and sets the values of these parameters in the value dictionary.

Parameters:
pRequest - the servlets request
pResponse - the servlets response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

getUserLocale

protected java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest)
Returns the Locale for the user given the request

Parameters:
pRequest - the request object which can be used to extract the user's locale

sendProfileSwapEvent

public void sendProfileSwapEvent(int pEventType,
                                 RepositoryItem pPreSwapItem,
                                 RepositoryItem pPostSwapItem)
Sends a ProfileSwapEvent using the given arguments

Parameters:
pEventType - the type of operation that was performed when the profiles were swapped
pPreSwapItem - the data source of the profile before the swap was performed
pPostSwapItem - the data source of the profile after the swap was performed

formatUserMessage

protected java.lang.String formatUserMessage(java.lang.String pKey,
                                             DynamoHttpServletRequest pRequest)
Utility method to format a message with no arguments using the Locale of the user

Parameters:
pKey - the identifier for the message to retrieve out of the ResourceBundle
pRequest - the request object which can be used to extract the user's locale
Returns:
the formatted message
See Also:
ProfileUserMessage

formatUserMessage

protected java.lang.String formatUserMessage(java.lang.String pKey,
                                             java.lang.Object pParam,
                                             DynamoHttpServletRequest pRequest)
Utility method to format a message with one argument using the Locale of the user

Parameters:
pKey - the identifier for the message to retrieve out of the ResourceBundle
pParam - the first (and only argument) in the message
Returns:
the formatted message
See Also:
ProfileUserMessage

formatUserMessage

protected java.lang.String formatUserMessage(java.lang.String pKey,
                                             java.lang.Object pParam1,
                                             java.lang.Object pParam2,
                                             DynamoHttpServletRequest pRequest)
Utility method to format a message with two arguments using our resource bundle.

Parameters:
pKey - the identifier for the message to retrieve out of the ResourceBundle
pParam1 - the first parameter in the message
pParam2 - the second parameter in the message
Returns:
the formatted message
See Also:
ProfileUserMessage

formatUserMessage

protected java.lang.String formatUserMessage(java.lang.String pKey,
                                             java.lang.Object[] pParams,
                                             DynamoHttpServletRequest pRequest)
Utility method to format a message with two arguments using our resource bundle.

Parameters:
pKey - the identifier for the message to retrieve out of the ResourceBundle
pParams - a set of parameters to use in the formatting.
Returns:
the formatted message
See Also:
ProfileUserMessage