com.atlassian.bamboo.user
Interface BambooUserManager

All Superinterfaces:
com.atlassian.user.search.query.EntityQueryParser, bucket.user.UserAccessor, org.acegisecurity.userdetails.UserDetailsService
All Known Implementing Classes:
BambooUserManagerImpl

public interface BambooUserManager
extends bucket.user.UserAccessor, org.acegisecurity.userdetails.UserDetailsService

Service class to manage interactions with the user.


Field Summary
static java.lang.String JABBER_ADDRESS_KEY
           
static java.lang.String USER_NOTIFICATION_PREFERENCE
           
static java.lang.String USER_NOTIFICATION_TRANSPORT_PREFERENCE
           
 
Method Summary
 BambooUser addUser(java.lang.String username, java.lang.String password, java.lang.String email, java.lang.String fullName, java.lang.String jabberAddress, java.util.List groupNames)
          Method that extends the standard addUser methods to also add Bamboo specific params
 BambooUser addUser(java.lang.String username, java.lang.String password, java.lang.String email, java.lang.String fullName, java.lang.String jabberAddress, java.util.List groupNames, ExtendedAuthor author)
          Method that extends the standard addUser methods to also add Bamboo specific params
 BambooUser getBambooUser(java.lang.String username)
          Returns a BambooUser of the given username
 BambooUser getBambooUser(com.atlassian.user.User user)
          Returns a BambooUser given a User
 java.util.List<java.lang.String> getGroupNamesAsList(com.atlassian.user.User user)
          Returns groups for the User
 java.util.List getMemberNamesAsList(com.atlassian.user.Group group)
           
 BambooUser injectUser(java.lang.String username, java.lang.String encryptedPassword, java.lang.String email, java.lang.String fullName, java.lang.String jabberAddress, java.lang.String notificationPreference, java.lang.String notificationTransportPreference)
          A variation of addUser which inserts the encryptedPassword instead - used for importing
 boolean isDeletable(com.atlassian.user.User user)
          Is this user deletable? A user may not be deletable because: 1) They are read-only (i.e.
 boolean isReadOnly(com.atlassian.user.Group group)
          Is this group read only?
 boolean isReadOnly(com.atlassian.user.User user)
          Is this user read only?
 void saveNotificationPreferences(java.lang.String username, java.lang.String notificationPreference, java.lang.String notificationTransportPref)
          Save just the notification preferences for the given user
 void saveUser(java.lang.String username, java.lang.String password, java.lang.String email, java.lang.String fullName, java.lang.String jabberAddress, java.util.List groupNames)
          Saves the properties for the given user
 void saveUser(java.lang.String username, java.lang.String password, java.lang.String email, java.lang.String fullName, java.lang.String jabberAddress, java.util.List groupNames, ExtendedAuthor author)
          Saves the properties for the given user
 void saveUser(java.lang.String username, java.lang.String password, java.lang.String email, java.lang.String fullName, java.lang.String jabberAddress, java.lang.String notificationPreference, java.lang.String notificationTransportPreference, java.util.List selectedGroups, ExtendedAuthor author)
          Saves the properties for the given user
 void setMembership(com.atlassian.user.Group group, java.util.List members)
          Sets a group's members as the passed list
 
Methods inherited from interface bucket.user.UserAccessor
addGroup, addMembership, addMembership, addUser, addUser, alterPassword, authenticate, createGroup, createUser, deactivateUser, findUsers, getDefaultGroup, getDelegatingRepositories, getExternallMembers, getGroup, getGroupCreateIfNecessary, getGroups, getGroups, getLocalMembers, getMemberNames, getPropertySet, getRepository, getUser, getUserNames, getUserPreferences, getUsers, getUsersByEmail, getUsersWithConfluenceAccess, hasMembership, hasMembership, isDeactivated, isDeactivated, isLicensedToAddMoreUsers, isUserRemovable, reactivateUser, removeGroup, removeMembership, removeMembership, removeUser, saveUser, setAtlassianUserConfiguration
 
Methods inherited from interface com.atlassian.user.search.query.EntityQueryParser
findGroups, findGroups, findUsers
 
Methods inherited from interface org.acegisecurity.userdetails.UserDetailsService
loadUserByUsername
 

Field Detail

JABBER_ADDRESS_KEY

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

USER_NOTIFICATION_PREFERENCE

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

USER_NOTIFICATION_TRANSPORT_PREFERENCE

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

getBambooUser

BambooUser getBambooUser(java.lang.String username)
Returns a BambooUser of the given username

Parameters:
username -
Returns:
The matching user, null if does not exist

getBambooUser

BambooUser getBambooUser(com.atlassian.user.User user)
Returns a BambooUser given a User

Parameters:
user -
Returns:
The wrapped user.

addUser

BambooUser addUser(java.lang.String username,
                   java.lang.String password,
                   java.lang.String email,
                   java.lang.String fullName,
                   java.lang.String jabberAddress,
                   java.util.List groupNames)
Method that extends the standard addUser methods to also add Bamboo specific params

Parameters:
username -
password -
email -
fullName -
jabberAddress -
groupNames - - List of Strings as the group names. May be null.
Returns:
the created BambooUser object with the created properties

addUser

BambooUser addUser(java.lang.String username,
                   java.lang.String password,
                   java.lang.String email,
                   java.lang.String fullName,
                   java.lang.String jabberAddress,
                   java.util.List groupNames,
                   ExtendedAuthor author)
Method that extends the standard addUser methods to also add Bamboo specific params

Parameters:
username -
password -
email -
fullName -
jabberAddress -
groupNames - - List of Strings as the group names. May be null.
author -
Returns:
the created BambooUser object with the created properties

saveUser

void saveUser(java.lang.String username,
              java.lang.String password,
              java.lang.String email,
              java.lang.String fullName,
              java.lang.String jabberAddress,
              java.util.List groupNames)
              throws java.lang.IllegalArgumentException
Saves the properties for the given user

Parameters:
username -
email -
fullName -
jabberAddress -
groupNames - - List of Strings as the group names. May be null.
Throws:
java.lang.IllegalArgumentException - if username does not match a user, or if the password cannot be altered by the local user management facility.

saveUser

void saveUser(java.lang.String username,
              java.lang.String password,
              java.lang.String email,
              java.lang.String fullName,
              java.lang.String jabberAddress,
              java.util.List groupNames,
              ExtendedAuthor author)
              throws java.lang.IllegalArgumentException
Saves the properties for the given user

Parameters:
username -
email -
fullName -
jabberAddress -
groupNames - - List of Strings as the group names. May be null.
author -
Throws:
java.lang.IllegalArgumentException - if username does not match a user, or if the password cannot be altered by the local user management facility.

saveUser

void saveUser(java.lang.String username,
              java.lang.String password,
              java.lang.String email,
              java.lang.String fullName,
              java.lang.String jabberAddress,
              java.lang.String notificationPreference,
              java.lang.String notificationTransportPreference,
              java.util.List selectedGroups,
              ExtendedAuthor author)
              throws java.lang.IllegalArgumentException
Saves the properties for the given user

Parameters:
username -
email -
fullName -
jabberAddress -
notificationPreference -
selectedGroups -
author -
Throws:
java.lang.IllegalArgumentException - if username does not match a user, or if the password cannot be altered by the local user management facility.

getGroupNamesAsList

java.util.List<java.lang.String> getGroupNamesAsList(com.atlassian.user.User user)
Returns groups for the User

Parameters:
user - - Must not be null
Returns:
List of String representing group names. Collections.EMPTY_LIST if none exists

setMembership

void setMembership(com.atlassian.user.Group group,
                   java.util.List members)
Sets a group's members as the passed list

Parameters:
group - - The group to modify the user list. Cannot be null.
members - - List of username Strings. Can be null

getMemberNamesAsList

java.util.List getMemberNamesAsList(com.atlassian.user.Group group)

injectUser

BambooUser injectUser(java.lang.String username,
                      java.lang.String encryptedPassword,
                      java.lang.String email,
                      java.lang.String fullName,
                      java.lang.String jabberAddress,
                      java.lang.String notificationPreference,
                      java.lang.String notificationTransportPreference)
A variation of addUser which inserts the encryptedPassword instead - used for importing

Parameters:
username -
encryptedPassword -
email -
fullName -
jabberAddress -
Returns:
the created BambooUser object with the created properties

isDeletable

boolean isDeletable(com.atlassian.user.User user)
Is this user deletable? A user may not be deletable because: 1) They are read-only (i.e. the user is externally sourced) 2) They have comments/labels/favourites linked to them

Parameters:
user -
Returns:
booleanwhether user deletable

isReadOnly

boolean isReadOnly(com.atlassian.user.User user)
Is this user read only?

Parameters:
user -

isReadOnly

boolean isReadOnly(com.atlassian.user.Group group)
Is this group read only?

Parameters:
group -

saveNotificationPreferences

void saveNotificationPreferences(java.lang.String username,
                                 java.lang.String notificationPreference,
                                 java.lang.String notificationTransportPref)
Save just the notification preferences for the given user

Parameters:
username -
notificationPreference -


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.