com.atlassian.crucible.spi.services
Interface UserService


public interface UserService

Provides an API for working with Users.


Method Summary
 java.util.List<UserData> getAllUsers()
          Returns the Crucible users.
 UserData getMappedUser(java.lang.String repository, java.lang.String committer)
          Get a the UserData of the user that is mapped to a committer in a repository.
 UserData getUser(java.lang.String userName)
          Get a UserData object for a named user.
 UserProfileData getUserProfile(java.lang.String userName)
          Get a UserProfileData object for a named user.
 

Method Detail

getAllUsers

java.util.List<UserData> getAllUsers()
                                     throws ServerException
Returns the Crucible users.

Returns:
a list of crucible users or an empty list if there are none
Throws:
NotPermittedException - if the effective prinicpal is anonymous and anonymous access is not allowed
ServerException

getUser

UserData getUser(java.lang.String userName)
                 throws ServerException
Get a UserData object for a named user.

Throws:
NotPermittedException - if the effective principal is anonymous and anonymous access is not allowed
NotFoundException - if there is no user with username userName
ServerException

getUserProfile

UserProfileData getUserProfile(java.lang.String userName)
                               throws ServerException
Get a UserProfileData object for a named user.

Throws:
NotPermittedException - if you are not logged in as the requested user and you are not an administrator
NotFoundException - if there is no user with username userName
ServerException

getMappedUser

UserData getMappedUser(java.lang.String repository,
                       java.lang.String committer)
                       throws ServerException
Get a the UserData of the user that is mapped to a committer in a repository.

Parameters:
repository - name of the repository for the committer
committer - name of the committer
Returns:
the user data for the mapped committer
Throws:
NotPermittedException - if the effective principle does not have permission to access the repository or if the effective principal is anonymous and anonymous access is not allowed
NotFoundException - if the committer cannot be found or the mapping cannot be found.
ServerException