org.figure8.join.businessfacades.security
Interface UserManager

All Known Implementing Classes:
DefaultUserManager

public interface UserManager

Provides methods that the Join application users management service must implements. These methods define how a user must be registered, logged on Join application and so on ...

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Method Summary
 User getUser(java.lang.String login)
          Retrieves a specific User using its login identifier
 java.util.List getUsers()
          The getUsers method must be used when you want to list all users.
 java.util.List getUsers(java.lang.String lastname)
          The getUsers method must be used when you want to list users using lastname criterion.
 UserView login(java.lang.String userId, java.lang.String userCredential)
          The login method is called when a user wishes to login to the Join application.
 void saveUser(User user)
          Save or update a given user into datastore.
 void setPasswordEncoder(PasswordEncoder encoder)
          The setPasswordEncoder() method must be called during the implementation initialization phase.
 void setPermissionManager(PermissionManager manager)
          The setPermissionManager() method must be called during the implementation initilization phase.
 

Method Detail

setPasswordEncoder

void setPasswordEncoder(PasswordEncoder encoder)
The setPasswordEncoder() method must be called during the implementation initialization phase. It must allowed the registration of a PasswordEncoder for the deployed Join application.

Parameters:
encoder - Implementation of PaswordEncoder to check and encode users password

setPermissionManager

void setPermissionManager(PermissionManager manager)
The setPermissionManager() method must be called during the implementation initilization phase. It must allowed the registration of a PermissionManager useful for retrieving security permissions acquired by a user.

Parameters:
manager - Implementation of PermissionManager to retrieve security rights

login

UserView login(java.lang.String userId,
               java.lang.String userCredential)
               throws InvalidLoginException
The login method is called when a user wishes to login to the Join application. This method should use the PasswordEncoder validatePassword() method for user's credential validation.

Parameters:
userId - The user identifier.
userCredential - The user credential.
Returns:
A ValueHolder object representing the user's view (data + permissions).
Throws:
InvalidLoginException - if the credentials are invalid.

saveUser

void saveUser(User user)
              throws DuplicateEntityException
Save or update a given user into datastore.
Warning: this method should be used when first creating a user or when updating a user. In this 2 use-cases, password validation is required so password should be in clear text within the User object.

Parameters:
user - User object to save within datastore
Throws:
DuplicateEntityException - if a user with this login already exists.

getUser

User getUser(java.lang.String login)
Retrieves a specific User using its login identifier

Parameters:
login - The user to retrieve unique login
Returns:
The user having this specified login

getUsers

java.util.List getUsers()
The getUsers method must be used when you want to list all users.

Returns:
List of org.figure8.join.businessobjects.security.User.

getUsers

java.util.List getUsers(java.lang.String lastname)
The getUsers method must be used when you want to list users using lastname criterion. Users have their lastname "LIKE" given arguments.

Parameters:
lastname - The lastname to use as search criteria
Returns:
List of org.figure8.join.businessobjects.security.User.


Copyright © 2005-2008 Join. All Rights Reserved.