com.atlassian.sal.crowd.user
Class DefaultUserManager

java.lang.Object
  extended by com.atlassian.sal.crowd.user.DefaultUserManager
All Implemented Interfaces:
com.atlassian.sal.api.user.UserManager

public class DefaultUserManager
extends Object
implements com.atlassian.sal.api.user.UserManager

Crowd implementation of the UserManager


Constructor Summary
DefaultUserManager(UserService userService, CrowdService crowdService, com.atlassian.sal.api.web.context.HttpContext httpContext)
           
 
Method Summary
 boolean authenticate(String username, String password)
           
 Iterable<String> findGroupNamesByPrefix(String prefix, int startIndex, int maxResults)
           
 com.atlassian.sal.api.user.UserProfile getRemoteUser()
           
 com.atlassian.sal.api.user.UserProfile getRemoteUser(javax.servlet.http.HttpServletRequest httpServletRequest)
           
 com.atlassian.sal.api.user.UserKey getRemoteUserKey()
           
 com.atlassian.sal.api.user.UserKey getRemoteUserKey(javax.servlet.http.HttpServletRequest httpServletRequest)
           
 String getRemoteUsername()
           
 String getRemoteUsername(javax.servlet.http.HttpServletRequest request)
           
 com.atlassian.sal.api.user.UserProfile getUserProfile(String username)
           
 com.atlassian.sal.api.user.UserProfile getUserProfile(com.atlassian.sal.api.user.UserKey userKey)
           
 boolean isAdmin(String username)
           
 boolean isAdmin(com.atlassian.sal.api.user.UserKey userKey)
           
 boolean isSystemAdmin(String username)
           
 boolean isSystemAdmin(com.atlassian.sal.api.user.UserKey userKey)
           
 boolean isUserInGroup(String username, String group)
           
 boolean isUserInGroup(com.atlassian.sal.api.user.UserKey userKey, String group)
           
 Principal resolve(String username)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUserManager

public DefaultUserManager(UserService userService,
                          CrowdService crowdService,
                          com.atlassian.sal.api.web.context.HttpContext httpContext)
Method Detail

getRemoteUsername

public String getRemoteUsername()
Specified by:
getRemoteUsername in interface com.atlassian.sal.api.user.UserManager

getRemoteUser

@Nullable
public com.atlassian.sal.api.user.UserProfile getRemoteUser()
Specified by:
getRemoteUser in interface com.atlassian.sal.api.user.UserManager

getRemoteUserKey

@Nullable
public com.atlassian.sal.api.user.UserKey getRemoteUserKey()
Specified by:
getRemoteUserKey in interface com.atlassian.sal.api.user.UserManager

isSystemAdmin

public boolean isSystemAdmin(String username)
Specified by:
isSystemAdmin in interface com.atlassian.sal.api.user.UserManager

isSystemAdmin

public boolean isSystemAdmin(@Nullable
                             com.atlassian.sal.api.user.UserKey userKey)
Specified by:
isSystemAdmin in interface com.atlassian.sal.api.user.UserManager

isAdmin

public boolean isAdmin(String username)
Specified by:
isAdmin in interface com.atlassian.sal.api.user.UserManager

isAdmin

public boolean isAdmin(@Nullable
                       com.atlassian.sal.api.user.UserKey userKey)
Specified by:
isAdmin in interface com.atlassian.sal.api.user.UserManager

isUserInGroup

public boolean isUserInGroup(String username,
                             String group)
Specified by:
isUserInGroup in interface com.atlassian.sal.api.user.UserManager

isUserInGroup

public boolean isUserInGroup(@Nullable
                             com.atlassian.sal.api.user.UserKey userKey,
                             @Nullable
                             String group)
Specified by:
isUserInGroup in interface com.atlassian.sal.api.user.UserManager

authenticate

public boolean authenticate(String username,
                            String password)
Specified by:
authenticate in interface com.atlassian.sal.api.user.UserManager

resolve

public Principal resolve(String username)
                  throws com.atlassian.sal.api.user.UserResolutionException
Specified by:
resolve in interface com.atlassian.sal.api.user.UserManager
Throws:
com.atlassian.sal.api.user.UserResolutionException

findGroupNamesByPrefix

public Iterable<String> findGroupNamesByPrefix(String prefix,
                                               int startIndex,
                                               int maxResults)
Specified by:
findGroupNamesByPrefix in interface com.atlassian.sal.api.user.UserManager

getRemoteUsername

public String getRemoteUsername(javax.servlet.http.HttpServletRequest request)
Specified by:
getRemoteUsername in interface com.atlassian.sal.api.user.UserManager

getRemoteUser

@Nullable
public com.atlassian.sal.api.user.UserProfile getRemoteUser(javax.servlet.http.HttpServletRequest httpServletRequest)
Specified by:
getRemoteUser in interface com.atlassian.sal.api.user.UserManager

getRemoteUserKey

@Nullable
public com.atlassian.sal.api.user.UserKey getRemoteUserKey(javax.servlet.http.HttpServletRequest httpServletRequest)
Specified by:
getRemoteUserKey in interface com.atlassian.sal.api.user.UserManager

getUserProfile

public com.atlassian.sal.api.user.UserProfile getUserProfile(String username)
Specified by:
getUserProfile in interface com.atlassian.sal.api.user.UserManager

getUserProfile

@Nullable
public com.atlassian.sal.api.user.UserProfile getUserProfile(@Nullable
                                                                      com.atlassian.sal.api.user.UserKey userKey)
Specified by:
getUserProfile in interface com.atlassian.sal.api.user.UserManager


Copyright © 2013 Atlassian. All Rights Reserved.