Package org.ametys.runtime.plugin
Class ExcludePolicyFeatureActivator
- java.lang.Object
-
- org.ametys.runtime.plugin.AbstractFeatureActivator
-
- org.ametys.runtime.plugin.ExcludePolicyFeatureActivator
-
- All Implemented Interfaces:
FeatureActivator
public final class ExcludePolicyFeatureActivator extends AbstractFeatureActivator
DefaultFeatureActivator
which activates all non-passive and non-excluded features.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.runtime.plugin.FeatureActivator
FeatureActivator.PluginsInformation
-
-
Field Summary
-
Fields inherited from class org.ametys.runtime.plugin.AbstractFeatureActivator
_allPlugins, _correctedDependencies, _logger, _safeMode
-
-
Constructor Summary
Constructors Constructor Description ExcludePolicyFeatureActivator(Map<String,Plugin> allPlugins, Collection<String> excludedPlugins, Collection<String> excludedFeatures)
Constructs a new feature activator with an 'exclude' policy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureActivator.PluginsInformation
computeActiveFeatures(Map<String,String> componentsConfig, boolean safeMode)
Computes the actual plugins and features to load, based on values selected by the administrator.
This method does not actually load nor execute any Java code.String
shortDump(FeatureActivator.PluginsInformation pluginInfo)
Dumps the givenFeatureActivator.PluginsInformation
, in order to log in info level.-
Methods inherited from class org.ametys.runtime.plugin.AbstractFeatureActivator
computeActivePlugins, computeComponents, computeExtensions, computeIncomingDeactivations, computeIncomingDependencies, computeOutgoingDependencies, fullDump, processOutgoingDependencies, removeInactiveFeatures, removeUnusedPassiveFeatures, removeWrongPointReferences
-
-
-
-
Constructor Detail
-
ExcludePolicyFeatureActivator
public ExcludePolicyFeatureActivator(Map<String,Plugin> allPlugins, Collection<String> excludedPlugins, Collection<String> excludedFeatures)
Constructs a new feature activator with an 'exclude' policy- Parameters:
allPlugins
- all pluginsexcludedPlugins
- The plugins to excludeexcludedFeatures
- The features to exclude
-
-
Method Detail
-
computeActiveFeatures
public FeatureActivator.PluginsInformation computeActiveFeatures(Map<String,String> componentsConfig, boolean safeMode)
Description copied from interface:FeatureActivator
Computes the actual plugins and features to load, based on values selected by the administrator.
This method does not actually load nor execute any Java code. It reads plugins definitions, selects active features and gets components and extensions definitions.- Parameters:
componentsConfig
- chosen components, among those with the same role.safeMode
-true
if application is in safe mode- Returns:
- all information gathered during plugins reading.
-
shortDump
public String shortDump(FeatureActivator.PluginsInformation pluginInfo)
Description copied from interface:FeatureActivator
Dumps the givenFeatureActivator.PluginsInformation
, in order to log in info level.- Parameters:
pluginInfo
- The information about plugins- Returns:
- The string to display in info level
-
-