org.dspace.app.webui.servlet
Class EditProfileServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.dspace.app.webui.servlet.DSpaceServlet
              extended by org.dspace.app.webui.servlet.EditProfileServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class EditProfileServlet
extends DSpaceServlet

Servlet for handling editing user profiles

Version:
$Revision: 5845 $
Author:
Robert Tansley
See Also:
Serialized Form

Constructor Summary
EditProfileServlet()
           
 
Method Summary
static boolean confirmAndSetPassword(EPerson eperson, javax.servlet.http.HttpServletRequest request)
          Set an eperson's password, if the passwords they typed match and are acceptible.
protected  void doDSGet(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process an incoming HTTP GET.
protected  void doDSPost(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process an incoming HTTP POST.
static boolean updateUserProfile(EPerson eperson, javax.servlet.http.HttpServletRequest request)
          Update a user's profile information with the information in the given request.
 
Methods inherited from class org.dspace.app.webui.servlet.DSpaceServlet
doGet, doPost
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditProfileServlet

public EditProfileServlet()
Method Detail

doDSGet

protected void doDSGet(Context context,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       java.io.IOException,
                       java.sql.SQLException,
                       AuthorizeException
Description copied from class: DSpaceServlet
Process an incoming HTTP GET. If an exception is thrown, or for some other reason the passed in context is not completed, it will be aborted and any changes made by this method discarded when this method returns.

Overrides:
doDSGet in class DSpaceServlet
Parameters:
context - a DSpace Context object
request - the HTTP request
response - the HTTP response
Throws:
java.sql.SQLException - if a database error occurs
AuthorizeException - if some authorization error occurs
javax.servlet.ServletException
java.io.IOException

doDSPost

protected void doDSPost(Context context,
                        javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws javax.servlet.ServletException,
                        java.io.IOException,
                        java.sql.SQLException,
                        AuthorizeException
Description copied from class: DSpaceServlet
Process an incoming HTTP POST. If an exception is thrown, or for some other reason the passed in context is not completed, it will be aborted and any changes made by this method discarded when this method returns.

Overrides:
doDSPost in class DSpaceServlet
Parameters:
context - a DSpace Context object
request - the HTTP request
response - the HTTP response
Throws:
java.sql.SQLException - if a database error occurs
AuthorizeException - if some authorization error occurs
javax.servlet.ServletException
java.io.IOException

updateUserProfile

public static boolean updateUserProfile(EPerson eperson,
                                        javax.servlet.http.HttpServletRequest request)
Update a user's profile information with the information in the given request. This assumes that authentication has occurred. This method doesn't write the changes to the database (i.e. doesn't call update.)

Parameters:
eperson - the e-person
request - the request to get values from
Returns:
true if the user supplied all the required information, false if they left something out.

confirmAndSetPassword

public static boolean confirmAndSetPassword(EPerson eperson,
                                            javax.servlet.http.HttpServletRequest request)
Set an eperson's password, if the passwords they typed match and are acceptible. If all goes well and the password is set, null is returned. Otherwise the problem is returned as a String.

Parameters:
eperson - the eperson to set the new password for
request - the request containing the new password
Returns:
true if everything went OK, or false


Copyright © 2010 DuraSpace. All Rights Reserved.