public class UserManager extends AbstractLogEnabled implements Component, Serviceable
Modifier and Type | Field and Description |
---|---|
protected PopulationContextHelper |
_populationContextHelper
The helper for the associations population/context
|
protected UserPopulationDAO |
_userPopulationDAO
The DAO for User Population
|
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
UserManager() |
Modifier and Type | Method and Description |
---|---|
User |
getUser(String userPopulationId,
String login)
Get a particular user of the given users population by his login.
|
User |
getUser(UserIdentity userIdentity)
Get the user from its user identity
|
User |
getUser(UserPopulation userPopulation,
String login)
Get a particular user of the given user population by his login.
|
User |
getUserByContext(Set<String> contexts,
String login)
Get a user by his login on some given contexts
|
User |
getUserByDirectory(String userPopulationId,
String userDirectoryId,
String login)
Get a particular user of the given user population and given user directory by his login.
|
User |
getUserByDirectory(UserPopulation userPopulation,
String userDirectoryId,
String login)
Get a particular user of the given user population and given user directory by his login.
|
UserDirectory |
getUserDirectory(String userPopulationId,
String login)
Get the user directory the given user belongs to
|
List<User> |
getUsers(List<UserPopulation> userPopulations,
int count,
int offset,
Map<String,Object> parameters)
Get a list of users given the parameters
|
Collection<User> |
getUsers(String userPopulationId)
Gets all the users of a
UserPopulation |
Collection<User> |
getUsers(String userPopulationId,
int count,
int offset,
Map<String,Object> parameters)
Gets all the users of a
UserPopulation |
Collection<User> |
getUsers(UserPopulation userPopulation)
Gets all the users of a
UserPopulation |
Collection<User> |
getUsers(UserPopulation userPopulation,
int count,
int offset,
Map<String,Object> parameters)
Gets all the users of a
UserPopulation |
Collection<User> |
getUsersByContext(Set<String> contexts)
Get the list of users on some given contexts
|
List<User> |
getUsersByContext(Set<String> contexts,
int count,
int offset,
Map<String,Object> parameters)
Get a list of users given the parameters
|
Collection<User> |
getUsersByDirectory(String userPopulationId,
String userDirectoryId,
int count,
int offset,
Map<String,Object> parameters)
Gets all the users of a given
UserPopulation and UserDirectory |
Collection<User> |
getUsersByDirectory(UserPopulation userPopulation,
String userDirectoryId,
int count,
int offset,
Map<String,Object> parameters)
Gets all the users of a
UserPopulation |
Collection<User> |
getUsersByPopulationIds(List<String> userPopulationIds)
Get the users for given users' populations
|
Collection<User> |
getUsersByPopulations(List<UserPopulation> userPopulations)
Get the users for given users' populations
|
void |
service(ServiceManager manager) |
getLogger, setLogger
protected UserPopulationDAO _userPopulationDAO
protected PopulationContextHelper _populationContextHelper
public UserManager()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Collection<User> getUsersByContext(Set<String> contexts)
contexts
- The contextspublic Collection<User> getUsersByPopulationIds(List<String> userPopulationIds)
userPopulationIds
- the id of population of userspublic Collection<User> getUsersByPopulations(List<UserPopulation> userPopulations)
userPopulations
- the population of userspublic Collection<User> getUsers(String userPopulationId)
UserPopulation
userPopulationId
- The ID of user populationUser
s, empty if a problem occurs.public Collection<User> getUsers(UserPopulation userPopulation)
UserPopulation
userPopulation
- The user populationUser
s, empty if a problem occurs.public List<User> getUsersByContext(Set<String> contexts, int count, int offset, Map<String,Object> parameters)
contexts
- The contextscount
- The limit of users to retrieveoffset
- The number of result to ignore before starting to collect users.parameters
- A map of additional parameters, see implementation.User
public List<User> getUsers(List<UserPopulation> userPopulations, int count, int offset, Map<String,Object> parameters)
userPopulations
- the population of userscount
- The limit of users to retrieveoffset
- The number of result to ignore before starting to collect users.parameters
- A map of additional parameters, see implementation.User
public Collection<User> getUsers(String userPopulationId, int count, int offset, Map<String,Object> parameters)
UserPopulation
userPopulationId
- The ID of user populationcount
- The limit of users to retrieveoffset
- The number of result to ignore before starting to collect users.parameters
- A map of additional parameters, see implementation.User
s, empty if a problem occurs.public Collection<User> getUsersByDirectory(String userPopulationId, String userDirectoryId, int count, int offset, Map<String,Object> parameters)
UserPopulation
and UserDirectory
userPopulationId
- The ID of user populationuserDirectoryId
- The id of the user directorycount
- The limit of users to retrieveoffset
- The number of result to ignore before starting to collect users.parameters
- A map of additional parameters, see implementation.User
s, empty if a problem occurs.public Collection<User> getUsers(UserPopulation userPopulation, int count, int offset, Map<String,Object> parameters)
UserPopulation
userPopulation
- The users populationcount
- The limit of users to retrieveoffset
- The number of result to ignore before starting to collect users.parameters
- A map of additional parameters, see implementation.User
s, empty if a problem occurs.public Collection<User> getUsersByDirectory(UserPopulation userPopulation, String userDirectoryId, int count, int offset, Map<String,Object> parameters)
UserPopulation
userPopulation
- The users populationuserDirectoryId
- The id of the user directorycount
- The limit of users to retrieveoffset
- The number of result to ignore before starting to collect users.parameters
- A map of additional parameters, see implementation.User
s, empty if a problem occurs.public User getUserByContext(Set<String> contexts, String login)
contexts
- The contextslogin
- Login of the user to get. Cannot be null.User
instance or null if the user login does not exist.public User getUser(UserIdentity userIdentity)
userIdentity
- The user identitypublic User getUser(String userPopulationId, String login)
userPopulationId
- The ID of user populationlogin
- Login of the user to get. Cannot be null.User
instance or null if the user login does not exist.public User getUserByDirectory(String userPopulationId, String userDirectoryId, String login)
userPopulationId
- The ID of user populationuserDirectoryId
- The id of the user directorylogin
- Login of the user to get. Cannot be null.User
instance or null if the user login does not exist.public User getUser(UserPopulation userPopulation, String login)
userPopulation
- The user populationlogin
- Login of the user to get. Cannot be null.User
instance or null if the user login does not exist.public User getUserByDirectory(UserPopulation userPopulation, String userDirectoryId, String login)
userPopulation
- The user populationuserDirectoryId
- The id of the user directorylogin
- Login of the user to get. Cannot be null.User
instance or null if the user login does not exist.public UserDirectory getUserDirectory(String userPopulationId, String login)
userPopulationId
- The id of the user populationlogin
- Login of the user to get. Cannot be null.