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>_credentialProvidersThe list of the credential providersprotected boolean_enabledThe enabled nature of the population.protected String_idThe idprotected I18nizableText_labelThe labelprotected List<UserDirectory>_userDirectoriesThe 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 voiddispose()Dispose the user directories and credential providers of this population.voidenable(boolean enabled)Enables/disables a population.CredentialProvidergetCredentialProvider(String id)Get the selected CredentialProviderList<CredentialProvider>getCredentialProviders()Get the associatedCredentialProvidersStringgetId()Get the id of the population.I18nizableTextgetLabel()Get the label of the population.List<UserDirectory>getUserDirectories()Get the associatedUserDirectorysUserDirectorygetUserDirectory(String id)Get the selected UserDirectorybooleanisEnabled()Tells if the population is enabled.voidresetCredentialProviders()Reset the credential providers, i.e.voidresetUserDirectories()Reset the user directories, i.e.voidsetCredentialProviders(List<CredentialProvider> credentialProviders)Set the credential providersvoidsetId(String id)Set the id of the population.voidsetLabel(I18nizableText label)Set the label of the population.voidsetUserDirectories(List<UserDirectory> userDirectories)Set the user directoriesStringtoString()
-
-
-
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 associatedUserDirectorys- 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 ofUserDirectorys 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 associatedCredentialProviders- 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 ofCredentialProviders 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.
-
-