net.sf.jportlet.service.user
Interface UserService

All Known Implementing Classes:
UserServiceJDBC

public interface UserService

The UserService manages Users

Author:
Herve Tchepannou

Field Summary
static java.lang.String EMAIL
           
static java.lang.String FIRSTNAME
           
static java.lang.String LASTNAME
           
static java.lang.String LOCALE
           
static java.lang.String NAME
           
static java.lang.String PASSWORD
           
static java.lang.String USER_ID
           
 
Method Summary
 void addUser(net.sf.jportlet.portlet.PortletRequest request)
          Create a new user account
 java.util.Collection getRoles(java.lang.String userId)
          Retrieve all the roles of a given user
 net.sf.jportlet.portlet.User getUser(java.lang.String userId)
          Retrieve a user by its id
 net.sf.jportlet.portlet.User getUserByEmail(java.lang.String email)
          Retrieve a user by its email
 void updateUser(net.sf.jportlet.portlet.PortletRequest request)
          Update a user account
 

Field Detail

NAME

public static final java.lang.String NAME

USER_ID

public static final java.lang.String USER_ID
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
See Also:
Constant Field Values

EMAIL

public static final java.lang.String EMAIL
See Also:
Constant Field Values

FIRSTNAME

public static final java.lang.String FIRSTNAME
See Also:
Constant Field Values

LASTNAME

public static final java.lang.String LASTNAME
See Also:
Constant Field Values

LOCALE

public static final java.lang.String LOCALE
See Also:
Constant Field Values
Method Detail

getUser

public net.sf.jportlet.portlet.User getUser(java.lang.String userId)
                                     throws UserException
Retrieve a user by its id

Parameters:
userId - Id of the user
Returns:
User throws UserNotFoundException if the user not found
Throws:
UserException - if any error occurs

getUserByEmail

public net.sf.jportlet.portlet.User getUserByEmail(java.lang.String email)
                                            throws UserException
Retrieve a user by its email

Parameters:
email -
Returns:
User throws UserNotFoundException if the user not found
Throws:
UserException - if any error occurs

addUser

public void addUser(net.sf.jportlet.portlet.PortletRequest request)
             throws UserException
Create a new user account

Parameters:
request - throws UserIdNotUniqueException throws UserEmailNotUniqueException throws UserException
UserException

updateUser

public void updateUser(net.sf.jportlet.portlet.PortletRequest request)
                throws UserException
Update a user account

Parameters:
request - throws UserIdNotUniqueException throws UserEmailNotUniqueException throws UserException
UserException

getRoles

public java.util.Collection getRoles(java.lang.String userId)
                              throws UserException
Retrieve all the roles of a given user

Parameters:
userId - id of the user
Returns:
Collection
Throws:
UserException


Copyright © 2002 Herve Tchepannou. All Rights Reserved.