org.outerj.daisy.repository.user
Interface UserManager


public interface UserManager

Manager for all things user related.


Method Summary
 Role createRole(java.lang.String roleName)
          Creates a new Role.
 User createUser(java.lang.String login)
          Creates a new User.
 void deleteRole(long roleId)
          Deletes the Role with data store id roleId
 void deleteUser(long userId)
          Deletes the User with data store id userId
 AuthenticationSchemeInfos getAuthenticationSchemes()
           
 org.outerx.daisy.x10.PublicUserInfoDocument getPublicUserInfo(long userId)
          Returns the publicly available information for a user.
 org.outerx.daisy.x10.PublicUserInfosDocument getPublicUserInfos()
          Returns the public information of all users.
 Role getRole(long roleId, boolean updateable)
          Return the Role object which is identified by data store id roleId
 Role getRole(java.lang.String roleName, boolean updateable)
          Return the Role object which is identified by the specified roleName
 java.lang.String getRoleDisplayName(long roleId)
          Retrieves the name of a role, using the user cache for quick access.
 Roles getRoles()
          Returns all available roles.
 User getUser(long userId, boolean updateable)
          Return the User object which is identified by data store id userId.
 User getUser(java.lang.String userLogin, boolean updateable)
          Return the User object which is identified by the specified userLogin
 java.lang.String getUserDisplayName(long userId)
          Retrieves the display name of a user, using the user cache for quick access.
 long getUserId(java.lang.String login)
          Retrieves the id of a user based on its login.
 long[] getUserIds()
           
 java.lang.String getUserLogin(long userId)
          Retrieves the login of a user.
 Users getUsers()
          Returns all available users.
 Users getUsersByEmail(java.lang.String email)
           
 

Method Detail

getUsers

public Users getUsers()
               throws RepositoryException
Returns all available users. Only Administrators can do this.

Throws:
RepositoryException

getUserIds

public long[] getUserIds()
                  throws RepositoryException
Throws:
RepositoryException

getPublicUserInfo

public org.outerx.daisy.x10.PublicUserInfoDocument getPublicUserInfo(long userId)
                                                              throws RepositoryException
Returns the publicly available information for a user.

Throws:
RepositoryException

getPublicUserInfos

public org.outerx.daisy.x10.PublicUserInfosDocument getPublicUserInfos()
                                                                throws RepositoryException
Returns the public information of all users. Contrary to getUsers(), this method can be called by any user.

Throws:
RepositoryException

getRoles

public Roles getRoles()
               throws RepositoryException
Returns all available roles.

Throws:
RepositoryException

createUser

public User createUser(java.lang.String login)
Creates a new User.

The persistency of this object towards the data store is the responsibility of the client using the User object itself by calling the User.save() method.

Parameters:
login - the user login used when authenticating
Returns:
a User object which isn't persistent yet.

deleteUser

public void deleteUser(long userId)
                throws RepositoryException
Deletes the User with data store id userId

Parameters:
userId - data store id of the User to delete
Throws:
RepositoryException

getUser

public User getUser(long userId,
                    boolean updateable)
             throws RepositoryException
Return the User object which is identified by data store id userId.

Only administrators can retrieve the User object for users that are not themselve.

Parameters:
userId - the data store id of the desired User object
Returns:
the User object corresponding to data store id userId
Throws:
RepositoryException

getRole

public Role getRole(long roleId,
                    boolean updateable)
             throws RepositoryException
Return the Role object which is identified by data store id roleId

Parameters:
roleId - the data store id of the desired Role object
Returns:
the Role object corresponding to data store id roleId
Throws:
RepositoryException

getUser

public User getUser(java.lang.String userLogin,
                    boolean updateable)
             throws RepositoryException
Return the User object which is identified by the specified userLogin

Parameters:
userLogin - the login by which the desired User object is identified
Returns:
the User object for the user with login userLogin
Throws:
RepositoryException

getRole

public Role getRole(java.lang.String roleName,
                    boolean updateable)
             throws RepositoryException
Return the Role object which is identified by the specified roleName

Parameters:
roleName - the name by which the desired Role object is identified
Returns:
the Role object for the role with name roleName
Throws:
RepositoryException

createRole

public Role createRole(java.lang.String roleName)
Creates a new Role.

Parameters:
roleName -
Returns:
a Role object

deleteRole

public void deleteRole(long roleId)
                throws RepositoryException
Deletes the Role with data store id roleId

Parameters:
roleId - data store id of the Role to delete
Throws:
RepositoryException

getUserDisplayName

public java.lang.String getUserDisplayName(long userId)
                                    throws RepositoryException
Retrieves the display name of a user, using the user cache for quick access. Only administrators are allowed to access the full user object, so this method enables 'normal' users to resolve user ids to names.

This is the same as otherwise retrieved from User.getDisplayName().

Throws:
UserNotFoundException - if the user doesn't exist
RepositoryException

getUserLogin

public java.lang.String getUserLogin(long userId)
                              throws RepositoryException
Retrieves the login of a user. Only administrators are allowed to access the full user object, so this method enables 'normal' users to resolve user ids to logins.

This is the same as otherwise retrieved from User.getLogin().

Throws:
UserNotFoundException - if the user doesn't exist
RepositoryException

getUserId

public long getUserId(java.lang.String login)
               throws RepositoryException
Retrieves the id of a user based on its login. This method can be used instead of getUser(login).getId() for non-administrator users.

Throws:
UserNotFoundException - if the user doesn't exist
RepositoryException

getRoleDisplayName

public java.lang.String getRoleDisplayName(long roleId)
                                    throws RepositoryException
Retrieves the name of a role, using the user cache for quick access.

This is the same as otherwise retrieved from Role.getName().

Throws:
RoleNotFoundException - if the role doesn't exist
RepositoryException

getUsersByEmail

public Users getUsersByEmail(java.lang.String email)
                      throws RepositoryException
Throws:
RepositoryException

getAuthenticationSchemes

public AuthenticationSchemeInfos getAuthenticationSchemes()
                                                   throws RepositoryException
Throws:
RepositoryException


Copyright © -2005 . All Rights Reserved.