public class UserManagerGeneric extends Object implements UserManager
Constructor and Description |
---|
UserManagerGeneric(ProfileManager profileManager,
UserDAO userDAO,
AuthRecordDAO authRecordDAO,
OpenIDPropertyManager openIDPropertyManager,
CrowdClient crowdClient) |
Modifier and Type | Method and Description |
---|---|
List<AuthRecord> |
getAuthRecords(User user,
int startIndex,
int maxResults)
Retrieves a subset of the authentication history for a given user,
in reverse chronological order.
|
int |
getTotalAuthRecords(User user)
Retrieves the total number of authentication records for a given user.
|
User |
getUser(User principal,
Locale locale)
Retrieves or creates a User from the database matching
the name of the supplied principal.
|
boolean |
isAdministrator(String username) |
public UserManagerGeneric(ProfileManager profileManager, UserDAO userDAO, AuthRecordDAO authRecordDAO, OpenIDPropertyManager openIDPropertyManager, CrowdClient crowdClient)
public User getUser(User principal, Locale locale) throws UserManagerException
UserManager
getUser
in interface UserManager
principal
- the principal corresponding to the user.locale
- the Locale of the user (to get country/language information) if default profile needs to get created.UserManagerException
- error creating a default profile for a new user.public boolean isAdministrator(String username)
isAdministrator
in interface UserManager
public List<AuthRecord> getAuthRecords(User user, int startIndex, int maxResults)
UserManager
getAuthRecords
in interface UserManager
user
- owner of authentication records.startIndex
- start index.maxResults
- maximum number of results.public int getTotalAuthRecords(User user)
UserManager
getTotalAuthRecords
in interface UserManager
user
- owner of the authentication records.Copyright © 2021 Atlassian. All rights reserved.