Package org.ametys.core.user.population
Class UserPopulation
- java.lang.Object
-
- org.ametys.core.user.population.UserPopulation
-
public class UserPopulation extends Object
This class represents a population of users.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<CredentialProvider>
_credentialProviders
The list of the credential providersprotected boolean
_enabled
The enabled nature of the population.protected String
_id
The idprotected I18nizableText
_label
The labelprotected List<UserDirectory>
_userDirectories
The list of the user directories
-
Constructor Summary
Constructors Constructor Description UserPopulation()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Dispose the user directories and credential providers of this population.void
enable(boolean enabled)
Enables/disables a population.CredentialProvider
getCredentialProvider(String id)
Get the selected CredentialProviderList<CredentialProvider>
getCredentialProviders()
Get the associatedCredentialProvider
sString
getId()
Get the id of the population.I18nizableText
getLabel()
Get the label of the population.List<UserDirectory>
getUserDirectories()
Get the associatedUserDirectory
sUserDirectory
getUserDirectory(String id)
Get the selected UserDirectoryboolean
isEnabled()
Tells if the population is enabled.void
resetCredentialProviders()
Reset the credential providers, i.e.void
resetUserDirectories()
Reset the user directories, i.e.void
setCredentialProviders(List<CredentialProvider> credentialProviders)
Set the credential providersvoid
setId(String id)
Set the id of the population.void
setLabel(I18nizableText label)
Set the label of the population.void
setUserDirectories(List<UserDirectory> userDirectories)
Set the user directoriesString
toString()
-
-
-
Field Detail
-
_label
protected I18nizableText _label
The label
-
_enabled
protected boolean _enabled
The enabled nature of the population. True if enabled, false otherwise.
-
_userDirectories
protected List<UserDirectory> _userDirectories
The list of the user directories
-
_credentialProviders
protected List<CredentialProvider> _credentialProviders
The list of the credential providers
-
-
Constructor Detail
-
UserPopulation
public UserPopulation()
Default constructor
-
-
Method Detail
-
getLabel
public I18nizableText getLabel()
Get the label of the population.- Returns:
- the label of the population
-
setLabel
public void setLabel(I18nizableText label)
Set the label of the population.- Parameters:
label
- the label
-
isEnabled
public boolean isEnabled()
Tells if the population is enabled.- Returns:
- True if the population is enabled, false otherwise
-
enable
public void enable(boolean enabled)
Enables/disables a population.- Parameters:
enabled
- True to enable the population, false to disable it.
-
getUserDirectories
public List<UserDirectory> getUserDirectories()
Get the associatedUserDirectory
s- Returns:
- The associated user directories
-
getUserDirectory
public UserDirectory getUserDirectory(String id)
Get the selected UserDirectory- Parameters:
id
- The id of the directory to get- Returns:
- The associated user directory or null
-
setUserDirectories
public void setUserDirectories(List<UserDirectory> userDirectories)
Set the user directories- Parameters:
userDirectories
- The list ofUserDirectory
s to set.
-
resetUserDirectories
public void resetUserDirectories()
Reset the user directories, i.e. remove all the user directories linked to this population.
-
getCredentialProviders
public List<CredentialProvider> getCredentialProviders()
Get the associatedCredentialProvider
s- Returns:
- The associated credential providers
-
getCredentialProvider
public CredentialProvider getCredentialProvider(String id)
Get the selected CredentialProvider- Parameters:
id
- The id of the credential provider to get- Returns:
- The associated credential provider or null
-
setCredentialProviders
public void setCredentialProviders(List<CredentialProvider> credentialProviders)
Set the credential providers- Parameters:
credentialProviders
- The list ofCredentialProvider
s to set
-
resetCredentialProviders
public void resetCredentialProviders()
Reset the credential providers, i.e. remove all the credential providers linked to this population.
-
dispose
public void dispose()
Dispose the user directories and credential providers of this population.
-
-