com.atlassian.bamboo.user
Class DefaultBambooUser

java.lang.Object
  extended by com.atlassian.bamboo.user.DefaultBambooUser
All Implemented Interfaces:
BambooUser, com.atlassian.user.Entity, com.atlassian.user.User, java.io.Serializable, java.security.Principal, org.acegisecurity.userdetails.UserDetails

public class DefaultBambooUser
extends java.lang.Object
implements BambooUser

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_ADMIN_GROUP
          The name of the default admin group in Bamboo that's created on setup.
static org.acegisecurity.GrantedAuthorityImpl RESTRICTED_ADMIN_AUTHORITY
           
static java.lang.String ROLE_ADMIN
           
static java.lang.String ROLE_ANONYMOUS
           
static java.lang.String ROLE_RESTRICTED_ADMIN
           
static java.lang.String ROLE_USER
           
 
Fields inherited from interface com.atlassian.bamboo.user.BambooUser
BOTH_PREF, DEFAULT_IDE_PORT, DEFAULT_NOTIFICATION_PREFERENCE, DEFAULT_TRANSPORT_PREFERENCE, EMAIL_PREF, IM_PREF, MULTIPART_EMAIL, NONE_PREF, TEXT_EMAIL
 
Constructor Summary
DefaultBambooUser(com.atlassian.user.User user)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 org.acegisecurity.acls.MutableAclService getAclService()
           
 org.acegisecurity.GrantedAuthority[] getAuthorities()
           
 BambooUserManager getBambooUserManager()
           
 java.lang.String getEmail()
           
 java.lang.String getFullName()
           
 java.lang.String getIdePort()
          Returns the port the user has configured for direct click through to their IDE
 java.lang.String getJabberAddress()
          Returns the user's jabber address for IMs
 java.lang.String getName()
           
 java.lang.String getNotificationPreference()
          Returns the user's preferences for how they receive notifications
 java.lang.String getNotificationTransportPreference()
          Returns the user's preference for the format of emails
 java.lang.String getPassword()
           
 com.atlassian.user.User getUser()
          Returns the user, which contains the user's details
 java.lang.String getUsername()
           
 int hashCode()
           
 boolean isAccountNonExpired()
           
 boolean isAccountNonLocked()
           
 boolean isCredentialsNonExpired()
           
 boolean isEnabled()
           
 void setEmail(java.lang.String email)
           
 void setFullName(java.lang.String fullName)
           
 void setPassword(java.lang.String passw)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
toString
 

Field Detail

DEFAULT_ADMIN_GROUP

public static final java.lang.String DEFAULT_ADMIN_GROUP
The name of the default admin group in Bamboo that's created on setup. This should NOT be used to check permissions, as the users can configure other groups to be admin, and using it will introduce security vulnerabilities. If a list of admin groups is needed, use BambooPermissionManager.getAdminGroups().

See Also:
Constant Field Values

ROLE_USER

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

ROLE_ADMIN

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

ROLE_RESTRICTED_ADMIN

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

RESTRICTED_ADMIN_AUTHORITY

public static final org.acegisecurity.GrantedAuthorityImpl RESTRICTED_ADMIN_AUTHORITY

ROLE_ANONYMOUS

public static final java.lang.String ROLE_ANONYMOUS
See Also:
Constant Field Values
Constructor Detail

DefaultBambooUser

public DefaultBambooUser(com.atlassian.user.User user)
Method Detail

getJabberAddress

public java.lang.String getJabberAddress()
Description copied from interface: BambooUser
Returns the user's jabber address for IMs

Specified by:
getJabberAddress in interface BambooUser
Returns:
jabber address.

getNotificationPreference

public java.lang.String getNotificationPreference()
Description copied from interface: BambooUser
Returns the user's preferences for how they receive notifications

Specified by:
getNotificationPreference in interface BambooUser
Returns:
notification preference.

getNotificationTransportPreference

public java.lang.String getNotificationTransportPreference()
Description copied from interface: BambooUser
Returns the user's preference for the format of emails

Specified by:
getNotificationTransportPreference in interface BambooUser
Returns:
notification transport preference.

getIdePort

@NotNull
public java.lang.String getIdePort()
Description copied from interface: BambooUser
Returns the port the user has configured for direct click through to their IDE

Specified by:
getIdePort in interface BambooUser
Returns:
IDE port number

getUser

public com.atlassian.user.User getUser()
Description copied from interface: BambooUser
Returns the user, which contains the user's details

Specified by:
getUser in interface BambooUser
Returns:
user.

getName

public java.lang.String getName()
Specified by:
getName in interface com.atlassian.user.Entity
Specified by:
getName in interface java.security.Principal

getFullName

public java.lang.String getFullName()
Specified by:
getFullName in interface com.atlassian.user.User

getEmail

public java.lang.String getEmail()
Specified by:
getEmail in interface com.atlassian.user.User

setFullName

public void setFullName(java.lang.String fullName)
Specified by:
setFullName in interface com.atlassian.user.User

setEmail

public void setEmail(java.lang.String email)
Specified by:
setEmail in interface com.atlassian.user.User

setPassword

public void setPassword(java.lang.String passw)
Specified by:
setPassword in interface com.atlassian.user.User

hashCode

public int hashCode()
Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object

getBambooUserManager

public BambooUserManager getBambooUserManager()

getAclService

public org.acegisecurity.acls.MutableAclService getAclService()

getAuthorities

@NotNull
public org.acegisecurity.GrantedAuthority[] getAuthorities()
Specified by:
getAuthorities in interface org.acegisecurity.userdetails.UserDetails

getPassword

public java.lang.String getPassword()
Specified by:
getPassword in interface org.acegisecurity.userdetails.UserDetails

getUsername

public java.lang.String getUsername()
Specified by:
getUsername in interface org.acegisecurity.userdetails.UserDetails

isAccountNonExpired

public boolean isAccountNonExpired()
Specified by:
isAccountNonExpired in interface org.acegisecurity.userdetails.UserDetails

isAccountNonLocked

public boolean isAccountNonLocked()
Specified by:
isAccountNonLocked in interface org.acegisecurity.userdetails.UserDetails

isCredentialsNonExpired

public boolean isCredentialsNonExpired()
Specified by:
isCredentialsNonExpired in interface org.acegisecurity.userdetails.UserDetails

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface org.acegisecurity.userdetails.UserDetails


Copyright © 2012 Atlassian. All Rights Reserved.