|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.repository.servlet.RepositoryFormHandler
atg.userprofiling.MultiProfileForm
atg.userprofiling.MultiProfileUpdateFormHandler
public class MultiProfileUpdateFormHandler
This is a form handler for updating one or more user profiles with a single request.
This bean has a repositorIds
property which is a list of
strings representing the unique id given to each user profile item being updated.
The list must be set at the time the submit is issued to either update the common
property values stored in the value
property or delete the supplied list
of profiles.
The value
property is a dictionary of properties
of the current user profile. This set of properties is used when the
form handler is being used for update purposes. For update submit requests
these properties are applied to every user profile in the repositorIds
list.
For delete submit requests, the list of profiles referenced by the repositoryIds
list will be deleted from the profile repository.
For example, for updates and deletes, you would loop through a given set of user profiles
and do something like this for each one:
Each checkbox selected would then be placed into your repositoryIds
list
prior to the submit.
For Update requests, say you want to update the "userType" property of a user profile for each of the selected users - you would set the "FormHanlder.value.userType" bean property before the submit request.
This form handler supports the following submit methods:
repositoryId
property, using the property values
currently in the value
dictionary; the update is
committed in the repository
repositoryId
property from the repository
value
dictionary
and reinitializing the per-user users
array.
The following properties of the MultiProfileAddFormHandler will typically be set in a properties file for this component:
count
to.
Default is 0 which indicates that there is no maximum applied.
count
to.
The default is 1.
defaultPassword
property.
Default is false.
MultiProfileForm
,
RepositoryFormHandler
,
MultiProfileAddFormHandler
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
OLDPASSWORD_PARAM
Name of the old password form parameter |
Fields inherited from class atg.userprofiling.MultiProfileForm |
---|
CONFIRMPASSWORD_PARAM |
Fields inherited from class atg.repository.servlet.RepositoryFormHandler |
---|
STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS |
Fields inherited from class atg.droplet.GenericFormHandler |
---|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.repository.servlet.RepositoryFormConstants |
---|
NULL_SENTINEL, REPOSITORY_ID_PROPERTY_NAME, UPDATE_APPEND, UPDATE_PREPEND, UPDATE_REMOVE, UPDATE_REPLACE |
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 | |
---|---|
MultiProfileUpdateFormHandler()
|
Method Summary | |
---|---|
void |
addProfileUpdateListener(atg.userprofiling.ProfileUpdateListener pListener)
Adds a listener to the list of "profile update" listeners. |
boolean |
getClearValuesOnDelete()
|
boolean |
getClearValuesOnUpdate()
|
atg.userprofiling.ProfileUpdateEvent |
getProfileUpdateEvent()
Returns the value of the property ProfileUpdateEvent. |
atg.userprofiling.ProfileUpdateTrigger |
getProfileUpdateTrigger()
Returns the ProfileUpdateTrigger property |
java.lang.String[] |
getRepositoryIds()
Returns the list of repository id's being updated |
boolean |
handleCancel(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Clears out the form data found in value that hasn't been submitted yet. |
boolean |
handleClear(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Clears out the form data found in value that hasn't been submitted yet. |
boolean |
handleDelete(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Takes the current list of ids in the repositoryIds and
for each one, deletes the existing repository item |
boolean |
handleUpdate(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Takes the current list of ids in the repositoryIds and
for each one, updates the set of property values found in
the value property and,
if there were no errors in submitting the form,
updates the existing repository item, sets these
property values. |
boolean |
isGenerateProfileUpdateEvents()
Get property GenerateProfileUpdateEvents |
protected void |
postCancel(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just after the cancel process is finished. |
protected void |
postClear(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just after the clear process is finished. |
protected void |
postDelete(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just after the removal process is finished. |
protected void |
postDeleteUser(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just after a user is deleted. |
protected void |
postUpdate(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just after the update process is finished. |
protected void |
postUpdateUser(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just after the user's profile is updated |
protected void |
preCancel(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just before the cancel process is started. |
protected void |
preClear(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just before the clear process is started. |
protected void |
preDelete(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just before the removal process is started. |
protected void |
preDeleteUser(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just before a user is deleted. |
protected void |
preUpdate(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called just before the update process is started. |
protected void |
preUpdateUser(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just before the user's profile is updated which will do the following: Create a new ProfileUpdateEvent object stored in mProfileUpdateEvent property Collect the old values from the current repository before update occurs Collect the new values from the form submitted Go through each property and if value changed, save old/new values for use in ProfileUpdateEvent |
void |
removeProfileUpdateListener(atg.userprofiling.ProfileUpdateListener pListener)
Removes a listener from the list of "profile update" listeners. |
void |
sendProfileUpdateEvent(atg.userprofiling.ProfileUpdateEvent pEvent)
Sends a Profile Update event to each of the current listeners passing the pEvent. |
void |
setClearValuesOnDelete(boolean pClearValuesOnDelete)
Sets the property clearValuesOnDelete. |
void |
setClearValuesOnUpdate(boolean pClearValuesOnUpdate)
Sets the property clearValuesOnUpdate. |
void |
setGenerateProfileUpdateEvents(boolean pGenerateProfileUpdateEvents)
Set property GenerateProfileUpdateEvents |
void |
setProfileUpdateEvent(atg.userprofiling.ProfileUpdateEvent pProfileUpdateEvent)
Sets the property ProfileUpdateEvent. |
void |
setProfileUpdateTrigger(atg.userprofiling.ProfileUpdateTrigger pProfileUpdateTrigger)
Set the ProfileUpdateTrigger property |
void |
setRepositoryIds(java.lang.String[] pRepositoryIds)
Sets the list of repository id's being updated |
protected void |
updateUser(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Updates the current user. |
Methods inherited from class atg.userprofiling.MultiProfileForm |
---|
afterSet, beforeSet, confirmPasswordValue, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, getProfile, getProfileTools, getTransactionManager, getUserLocale, getValueProperty, isConfirmOldPassword, isConfirmPassword, setConfirmOldPassword, setConfirmPassword, setProfile, setProfileTools, setTransactionManager, updatePasswordValue |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
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 |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String OLDPASSWORD_PARAM
Constructor Detail |
---|
public MultiProfileUpdateFormHandler()
Method Detail |
---|
public java.lang.String[] getRepositoryIds()
public void setRepositoryIds(java.lang.String[] pRepositoryIds)
public void setProfileUpdateEvent(atg.userprofiling.ProfileUpdateEvent pProfileUpdateEvent)
public atg.userprofiling.ProfileUpdateEvent getProfileUpdateEvent()
public atg.userprofiling.ProfileUpdateTrigger getProfileUpdateTrigger()
public void setProfileUpdateTrigger(atg.userprofiling.ProfileUpdateTrigger pProfileUpdateTrigger)
public void setGenerateProfileUpdateEvents(boolean pGenerateProfileUpdateEvents)
pGenerateProfileUpdateEvents
- new value to setpublic boolean isGenerateProfileUpdateEvents()
public void setClearValuesOnUpdate(boolean pClearValuesOnUpdate)
public boolean getClearValuesOnUpdate()
public void setClearValuesOnDelete(boolean pClearValuesOnDelete)
public boolean getClearValuesOnDelete()
protected void preUpdateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected void updateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while
executing the code
java.io.IOException
- if there was an error with servlet ioprotected void postUpdateUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic void sendProfileUpdateEvent(atg.userprofiling.ProfileUpdateEvent pEvent)
pEvent
- the ProfileUpdateEvent object containing the list of profile updatesprotected void preUpdate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void postUpdate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void preDelete(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void postDelete(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void preDeleteUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void postDeleteUser(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void preCancel(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void postCancel(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void preClear(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet ioprotected void postClear(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet iopublic boolean handleUpdate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
repositoryIds
and
for each one, updates the set of property values found in
the value
property and,
if there were no errors in submitting the form,
updates the existing repository item, sets these
property values.
Prior to updating the list of users, preUpdate is called and following the update of the list of users, postUpdate is called.
Prior to updating an individual user, preUpdateUser is called and following the update of each user, postUpdateUser is called.
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.
handleUpdate
in class RepositoryFormHandler
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet iopublic boolean handleDelete(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
repositoryIds
and
for each one, deletes the existing repository item
Prior to deleting the list of users, preDelete is called and following the delete of the list of users, postDelete is called.
Prior to deleting an individual user, preDeleteUser is called and following the delete of each user, postDeleteUser is called.
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.
handleDelete
in class RepositoryFormHandler
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing
the code
java.io.IOException
- if there was an error with servlet iopublic boolean handleCancel(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
value
that hasn't been submitted yet.
If there is anything in the list of repositoryIds, that is also cleared.
Prior to canceling the form, preCancel is called and following the cancel, postCancel is called.
handleCancel
in class GenericFormHandler
javax.servlet.ServletException
java.io.IOException
public boolean handleClear(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
value
that hasn't been submitted yet.
If there is anything in the list of repositoryIds, that is also cleared. This is identical
to the Cancel submit method - to be used in beginning of form to clear out
the leftover data in session scoped form handler objects.
Prior to clearing the form, preClear is called and following the cancel, postClear is called.
handleClear
in class MultiProfileForm
javax.servlet.ServletException
java.io.IOException
public void addProfileUpdateListener(atg.userprofiling.ProfileUpdateListener pListener)
public void removeProfileUpdateListener(atg.userprofiling.ProfileUpdateListener pListener)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |