|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bucket.user.DefaultUserAccessor com.atlassian.bamboo.user.BambooUserManagerImpl
public class BambooUserManagerImpl
Field Summary |
---|
Fields inherited from class bucket.user.DefaultUserAccessor |
---|
DEFAULT_GROUP_NAME, defaultGroup |
Fields inherited from interface com.atlassian.bamboo.user.BambooUserManager |
---|
JABBER_ADDRESS_KEY, USER_IDE_PORT, USER_NOTIFICATION_PREFERENCE, USER_NOTIFICATION_TRANSPORT_PREFERENCE |
Constructor Summary | |
---|---|
BambooUserManagerImpl()
|
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<java.lang.String> groups)
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<java.lang.String> groups,
ExtendedAuthor author)
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<java.lang.String> groups,
java.util.List<java.lang.Long> authors)
|
|
void |
alterPassword(com.atlassian.user.User user,
java.lang.String plainTextPassword)
|
|
PasswordResetToken |
createPasswordResetToken(java.lang.String username)
Request new one-time token for a user. |
|
void |
deletePasswordResetToken(java.lang.String username)
Deletes existing user token. |
|
BambooUser |
findUserWithJabberAddress(java.lang.String jabberAddress)
Searches for user using specified jabberAddress. |
|
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<java.lang.String> |
getMemberNamesAsList(com.atlassian.user.Group group)
|
|
PasswordResetToken |
getPasswordResetToken(java.lang.String username)
Retrieves existing user token. |
|
com.atlassian.user.User |
getUser(java.lang.String name)
|
|
BambooUser |
injectUser(BambooUser user)
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. |
|
protected boolean |
isExternalReadOnly()
|
|
boolean |
isReadOnly(com.atlassian.user.Group group)
Is this group read only? |
|
boolean |
isReadOnly(com.atlassian.user.User user)
Is this user read only? |
|
org.acegisecurity.userdetails.UserDetails |
loadUserByUsername(java.lang.String username)
|
|
void |
removeGroup(com.atlassian.user.Group group)
|
|
void |
removeUser(com.atlassian.user.User user)
|
|
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<java.lang.String> selectedGroups)
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<java.lang.String> 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.util.List<java.lang.String> selectedGroups,
ExtendedAuthor author,
java.lang.String idePort)
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<java.lang.String> selectedGroups,
ExtendedAuthor author,
java.lang.String idePort)
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<java.lang.String> selectedGroups,
java.util.List<java.lang.Long> authors,
java.lang.String idePort)
|
|
void |
setAclAuthorizationStrategy(org.acegisecurity.acls.domain.AclAuthorizationStrategy aclAuthorizationStrategy)
|
|
void |
setAclService(HibernateMutableAclService aclService)
|
|
void |
setAuthorDao(AuthorDao authorDao)
|
|
void |
setCommentDao(CommentDao commentDao)
|
|
void |
setLabelDao(LabelDao labelDao)
|
|
void |
setLoginInformationManager(LoginInformationManager loginInformationManager)
|
|
void |
setMembership(com.atlassian.user.Group group,
java.util.List<java.lang.String> members)
Sets a group's members as the passed list |
|
void |
setPropertySetDao(BambooPropertySetDao propertySetDao)
|
|
void |
setRememberMeTokenDao(com.atlassian.seraph.spi.rememberme.RememberMeTokenDao rememberMeTokenDao)
|
|
void |
setTokenDao(PasswordResetTokenDao tokenDao)
|
|
void |
setupInitialAdminUser(java.lang.String username,
java.lang.String password,
java.lang.String email,
java.lang.String fullName)
Setup the initial admin user for the Bamboo instance. |
|
static java.lang.String[] |
stringListToArray(java.util.Collection<java.lang.String> strings)
Converts a Collection of Strings to an array of Strings |
|
static
|
subtractNewList(java.util.Collection<T> oldList,
java.util.Collection<T> newList)
Works like CollectionUtils.removeAll(Collection,Collection) only that it's null safe |
Methods inherited from class bucket.user.DefaultUserAccessor |
---|
addGroup, addMembership, addMembership, addUser, addUser, authenticate, checkConfiguration, createGroup, createUser, deactivateUser, findGroups, findGroups, findUsers, findUsers, getAuthenticator, getDefaultGroup, getDelegatingRepositories, getEntityQueryParser, getExternallMembers, getGroup, getGroupCreateIfNecessary, getGroupManager, getGroups, getGroups, getLocalMembers, getMemberNames, getPropertySet, getPropertySetFactory, getRepository, getUserManager, getUserNames, getUserPreferences, getUsers, getUsersByEmail, getUsersWithConfluenceAccess, hasMembership, hasMembership, init, isDeactivated, isDeactivated, isLicensedToAddMoreUsers, isUserRemovable, reactivateUser, removeMembership, removeMembership, removeUserFromAllGroups, saveUser, setAtlassianUserConfiguration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bucket.user.UserAccessor |
---|
addGroup, addMembership, addMembership, addUser, addUser, authenticate, createGroup, createUser, deactivateUser, findUsers, getDefaultGroup, getDelegatingRepositories, getExternallMembers, getGroup, getGroupCreateIfNecessary, getGroups, getGroups, getLocalMembers, getMemberNames, getPropertySet, getRepository, getUserNames, getUserPreferences, getUsers, getUsersByEmail, getUsersWithConfluenceAccess, hasMembership, hasMembership, isDeactivated, isDeactivated, isLicensedToAddMoreUsers, isUserRemovable, reactivateUser, removeMembership, removeMembership, saveUser, setAtlassianUserConfiguration |
Methods inherited from interface com.atlassian.user.search.query.EntityQueryParser |
---|
findGroups, findGroups, findUsers |
Constructor Detail |
---|
public BambooUserManagerImpl()
Method Detail |
---|
@Nullable public BambooUser getBambooUser(java.lang.String username)
BambooUserManager
BambooUser
of the given username
getBambooUser
in interface BambooUserManager
@Nullable public BambooUser getBambooUser(com.atlassian.user.User user)
BambooUserManager
BambooUser
given a User
getBambooUser
in interface BambooUserManager
@Nullable public com.atlassian.user.User getUser(java.lang.String name)
getUser
in interface bucket.user.UserAccessor
getUser
in class bucket.user.DefaultUserAccessor
public 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<java.lang.String> groups)
BambooUserManager
addUser
in interface BambooUserManager
groups
- - List
of Strings as the group names. May be null.
BambooUser
object with the created propertiespublic 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<java.lang.String> groups, ExtendedAuthor author)
BambooUserManager
addUser
in interface BambooUserManager
groups
- - List
of Strings as the group names. May be null.
BambooUser
object with the created propertiespublic 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<java.lang.String> groups, @NotNull java.util.List<java.lang.Long> authors)
addUser
in interface BambooUserManager
public 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<java.lang.String> selectedGroups) throws java.lang.IllegalArgumentException
BambooUserManager
saveUser
in interface BambooUserManager
selectedGroups
- - List
of Strings as the group names. May be null.
java.lang.IllegalArgumentException
- if username
does not match a user, or if the password cannot be
altered by the local user management facility.public 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<java.lang.String> groupNames, ExtendedAuthor author) throws java.lang.IllegalArgumentException
BambooUserManager
saveUser
in interface BambooUserManager
groupNames
- - List
of Strings as the group names. May be null.
java.lang.IllegalArgumentException
- if username
does not match a user, or if the password cannot be
altered by the local user management facility.public 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<java.lang.String> selectedGroups, ExtendedAuthor author, java.lang.String idePort) throws java.lang.IllegalArgumentException
BambooUserManager
saveUser
in interface BambooUserManager
java.lang.IllegalArgumentException
- if username
does not match a user, or if the password cannot be
altered by the local user management facility.public 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<java.lang.String> selectedGroups, ExtendedAuthor author, java.lang.String idePort) throws java.lang.IllegalArgumentException
BambooUserManager
saveUser
in interface BambooUserManager
java.lang.IllegalArgumentException
- if username
does not match a user, or if the password cannot be
altered by the local user management facility.public void saveUser(java.lang.String username, @Nullable 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<java.lang.String> selectedGroups, @NotNull java.util.List<java.lang.Long> authors, java.lang.String idePort) throws java.lang.IllegalArgumentException
saveUser
in interface BambooUserManager
java.lang.IllegalArgumentException
public void alterPassword(com.atlassian.user.User user, java.lang.String plainTextPassword) throws com.atlassian.user.EntityException
alterPassword
in interface bucket.user.UserAccessor
alterPassword
in class bucket.user.DefaultUserAccessor
com.atlassian.user.EntityException
public void saveNotificationPreferences(java.lang.String username, java.lang.String notificationPreference, java.lang.String notificationTransportPref)
BambooUserManager
saveNotificationPreferences
in interface BambooUserManager
public void removeUser(com.atlassian.user.User user)
removeUser
in interface bucket.user.UserAccessor
removeUser
in class bucket.user.DefaultUserAccessor
public void removeGroup(com.atlassian.user.Group group)
removeGroup
in interface bucket.user.UserAccessor
removeGroup
in class bucket.user.DefaultUserAccessor
public java.util.List<java.lang.String> getGroupNamesAsList(com.atlassian.user.User user)
BambooUserManager
User
getGroupNamesAsList
in interface BambooUserManager
user
- - Must not be null
List
of String
representing group names. Collections.emptyList()
if none existspublic void setMembership(com.atlassian.user.Group group, java.util.List<java.lang.String> members)
BambooUserManager
setMembership
in interface BambooUserManager
group
- - The group to modify the user list. Cannot be null.members
- - List
of username String
s. Can be nullpublic java.util.List<java.lang.String> getMemberNamesAsList(com.atlassian.user.Group group)
getMemberNamesAsList
in interface BambooUserManager
public static <T> java.util.Collection<T> subtractNewList(java.util.Collection<T> oldList, java.util.Collection<T> newList)
CollectionUtils.removeAll(Collection,Collection)
only that it's null safe
oldList
- - can be nullnewList
- - can be null
CollectionUtils.removeAll(Collection,Collection)
. Null lists count as empty lists.public static java.lang.String[] stringListToArray(java.util.Collection<java.lang.String> strings)
Collection
of Strings to an array of Strings
strings
- - Collection
of String
s. May be nukk
public BambooUser injectUser(@NotNull BambooUser user)
BambooUserManager
injectUser
in interface BambooUserManager
user
- user data
BambooUser
object with the created propertiespublic boolean isDeletable(com.atlassian.user.User user)
BambooUserManager
isDeletable
in interface BambooUserManager
boolean
whether user deletablepublic boolean isReadOnly(com.atlassian.user.User user)
BambooUserManager
isReadOnly
in interface BambooUserManager
protected boolean isExternalReadOnly()
public boolean isReadOnly(com.atlassian.user.Group group)
BambooUserManager
isReadOnly
in interface BambooUserManager
public void setupInitialAdminUser(java.lang.String username, java.lang.String password, java.lang.String email, java.lang.String fullName)
BambooUserManager
setupInitialAdminUser
in interface BambooUserManager
@NotNull public PasswordResetToken createPasswordResetToken(java.lang.String username)
BambooUserManager
createPasswordResetToken
in interface BambooUserManager
username
- user login name
@Nullable public PasswordResetToken getPasswordResetToken(java.lang.String username)
BambooUserManager
getPasswordResetToken
in interface BambooUserManager
username
- user login name
public void deletePasswordResetToken(java.lang.String username)
BambooUserManager
deletePasswordResetToken
in interface BambooUserManager
username
- user login namepublic BambooUser findUserWithJabberAddress(@NotNull java.lang.String jabberAddress)
BambooUserManager
findUserWithJabberAddress
in interface BambooUserManager
jabberAddress
- address to be matched
BambooUser
or null if none foundpublic org.acegisecurity.userdetails.UserDetails loadUserByUsername(java.lang.String username) throws org.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadUserByUsername
in interface org.acegisecurity.userdetails.UserDetailsService
org.acegisecurity.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException
public void setAuthorDao(AuthorDao authorDao)
public void setCommentDao(CommentDao commentDao)
public void setLabelDao(LabelDao labelDao)
public void setTokenDao(PasswordResetTokenDao tokenDao)
public void setAclService(HibernateMutableAclService aclService)
public void setAclAuthorizationStrategy(org.acegisecurity.acls.domain.AclAuthorizationStrategy aclAuthorizationStrategy)
public void setLoginInformationManager(LoginInformationManager loginInformationManager)
public void setRememberMeTokenDao(com.atlassian.seraph.spi.rememberme.RememberMeTokenDao rememberMeTokenDao)
public void setPropertySetDao(BambooPropertySetDao propertySetDao)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |