Class PopulationDataSourceConsumer
- java.lang.Object
-
- org.ametys.plugins.core.impl.user.population.PopulationDataSourceConsumer
-
- All Implemented Interfaces:
DataSourceConsumer
,Component
,Serviceable
public class PopulationDataSourceConsumer extends Object implements DataSourceConsumer, Component, Serviceable
Implementation ofDataSourceConsumer
allowing to know whether a data source is used by the populations or not. It also allows to retrieve the data source ids that are currently in use.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.datasource.DataSourceConsumer
DataSourceConsumer.TypeOfUse
-
-
Field Summary
Fields Modifier and Type Field Description private CredentialProviderFactory
_credentialProviderFactory
The credential providers factoryprivate UserDirectoryFactory
_userDirectoryFactory
The user directories factoryprivate UserPopulationDAO
_userPopulationDAO
The DAO forUserPopulation
sstatic String
ROLE
Avalon Role
-
Constructor Summary
Constructors Constructor Description PopulationDataSourceConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private DataSourceConsumer.TypeOfUse
_isInUseByCredentialProviders(String id)
private DataSourceConsumer.TypeOfUse
_isInUseByUserDirectories(String id)
Map<String,DataSourceConsumer.TypeOfUse>
getUsedDataSourceIds()
Retrieve the ids of the used data sourcesDataSourceConsumer.TypeOfUse
isInUse(String id)
Determines if a data source is usedvoid
service(ServiceManager manager)
-
-
-
Field Detail
-
_userPopulationDAO
private UserPopulationDAO _userPopulationDAO
The DAO forUserPopulation
s
-
_userDirectoryFactory
private UserDirectoryFactory _userDirectoryFactory
The user directories factory
-
_credentialProviderFactory
private CredentialProviderFactory _credentialProviderFactory
The credential providers factory
-
-
Constructor Detail
-
PopulationDataSourceConsumer
public PopulationDataSourceConsumer()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
isInUse
public DataSourceConsumer.TypeOfUse isInUse(String id)
Description copied from interface:DataSourceConsumer
Determines if a data source is used- Specified by:
isInUse
in interfaceDataSourceConsumer
- Parameters:
id
- The id of data source to check- Returns:
- true if the data source is currently in use
-
_isInUseByUserDirectories
private DataSourceConsumer.TypeOfUse _isInUseByUserDirectories(String id)
-
_isInUseByCredentialProviders
private DataSourceConsumer.TypeOfUse _isInUseByCredentialProviders(String id)
-
getUsedDataSourceIds
public Map<String,DataSourceConsumer.TypeOfUse> getUsedDataSourceIds()
Description copied from interface:DataSourceConsumer
Retrieve the ids of the used data sources- Specified by:
getUsedDataSourceIds
in interfaceDataSourceConsumer
- Returns:
- the set of ids of the data source(s) used by this data source customer
-
-