Class ConfigurationDataSourceConsumer
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.core.impl.datasource.ConfigurationDataSourceConsumer
-
- All Implemented Interfaces:
DataSourceConsumer
,LogEnabled
public class ConfigurationDataSourceConsumer extends AbstractLogEnabled implements DataSourceConsumer
Implementation ofDataSourceConsumer
allowing to know whether a data source is used in the configuration 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
-
-
Constructor Summary
Constructors Constructor Description ConfigurationDataSourceConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
_isMandatory(ElementDefinition def)
Map<String,DataSourceConsumer.TypeOfUse>
getUsedDataSourceIds()
Retrieve the ids of the used data sourcesDataSourceConsumer.TypeOfUse
isInUse(String id)
Determines if a data source is used-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
ConfigurationDataSourceConsumer
public ConfigurationDataSourceConsumer()
-
-
Method Detail
-
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
-
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
-
_isMandatory
private boolean _isMandatory(ElementDefinition def)
-
-