com.objectplanet.survey.plugin.api
Class UserManager

java.lang.Object
  |
  +--com.objectplanet.survey.plugin.api.UserManager

public class UserManager
extends java.lang.Object

Manage survey system users. Currently it is only possible to get and update users.

Author:
Irina Brun

Constructor Summary
UserManager()
           
 
Method Summary
static User getUser(java.lang.String login)
          Gets the user by login name.
static User getUser(User user, long userId)
          Gets the user by id.
static void updateUser(User userToUpdate)
          Update user information.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManager

public UserManager()
Method Detail

getUser

public static User getUser(User user,
                           long userId)
                    throws SurveySystemException,
                           SurveySecurityException
Gets the user by id.

Parameters:
userId - User id
user - User object
Returns:
The user with id userId
Throws:
SurveySecurityException - Thrown if the user has no permission to fulfill the operation
SurveySystemException - If an error occurs in the application

getUser

public static User getUser(java.lang.String login)
                    throws SurveySystemException,
                           SurveySecurityException
Gets the user by login name. To be used only in login modul where a user gets his/hers User object, otherwise SurveySecurityException will be thrown.

Parameters:
login - Login name
Returns:
The user
Throws:
SurveySecurityException - Thrown if the login doesn't match with the user's login name.
SurveySystemException - If an error occurs in the application

updateUser

public static void updateUser(User userToUpdate)
                       throws SurveySystemException
Update user information.

Throws:
SurveySystemException - If an error occurs in the application

Copyright © ObjectPlanet Inc. All Rights Reserved.

Built on May 7 2003