Package org.ametys.runtime.plugin
Class AbstractFeatureActivator
java.lang.Object
org.ametys.runtime.plugin.AbstractFeatureActivator
- All Implemented Interfaces:
FeatureActivator
- Direct Known Subclasses:
ExcludePolicyFeatureActivator,IncludePolicyFeatureActivator
Basic impl
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.runtime.plugin.FeatureActivator
FeatureActivator.PluginsInformation -
Field Summary
FieldsModifier and TypeFieldDescriptionMap of association identifier, pluginprotected org.ametys.runtime.plugin.CorrectedDependenciesthe computed and corrected dependenciesprotected final org.slf4j.LoggerLoggerprotected booleantrue when in safe mode -
Method Summary
Modifier and TypeMethodDescriptioncomputeActivePlugins(Collection<String> excludedPlugins, Map<String, Feature> initialFeatures, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Map<String, ExtensionPointDefinition> extensionPoints, Collection<PluginIssue> errors) Compute the active pluginsprotected Map<String,ComponentDefinition> computeComponents(Map<String, Feature> features, Map<String, String> componentsConfig, Collection<PluginIssue> errors) compute the componentsprotected Map<String,Map<String, ExtensionDefinition>> computeExtensions(Map<String, Feature> features, Collection<PluginIssue> errors) Compute the extensionsprotected Map<String,Collection<org.ametys.runtime.plugin.IncomingDeactivation>> computeIncomingDeactivations(Map<String, Feature> features) Compute incoming deactivationsprotected Map<String,Collection<String>> computeIncomingDependencies(Map<String, Feature> features) Compute incoming dependenciesprotected Map<String,Collection<String>> computeOutgoingDependencies(Map<String, Feature> features) Compute the outgoing dependenciesfullDump(FeatureActivator.PluginsInformation pluginInfo) Dumps the givenFeatureActivator.PluginsInformation, in order to log in debug level.processOutgoingDependencies(Map<String, Feature> initialFeatures, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Collection<PluginIssue> errors) Process the outgoing dependenciesprotected voidremoveInactiveFeatures(Map<String, Feature> initialFeatures, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Map<String, Collection<org.ametys.runtime.plugin.IncomingDeactivation>> incomingDeactivations, Map<String, String> componentsConfig) Remove inactive featuresprotected voidremoveUnusedPassiveFeatures(Map<String, Feature> features, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Map<String, Collection<String>> incomingDependencies) Remove the unused features that were declared passiveprotected voidremoveWrongPointReferences(Map<String, Feature> initialFeatures, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Map<String, ExtensionPointDefinition> extensionPoints, Collection<PluginIssue> errors) Remove the wrong pointsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.plugin.FeatureActivator
computeActiveFeatures, shortDump
-
Field Details
-
_logger
Logger -
_allPlugins
Map of association identifier, plugin -
_safeMode
true when in safe mode -
_correctedDependencies
the computed and corrected dependencies
-
-
Method Details
-
computeActivePlugins
protected Map<String,Plugin> computeActivePlugins(Collection<String> excludedPlugins, Map<String, Feature> initialFeatures, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Map<String, ExtensionPointDefinition> extensionPoints, Collection<PluginIssue> errors) Compute the active plugins- Parameters:
excludedPlugins- The excluded pluginsinitialFeatures- The featuresinactiveFeatures- The features that are inactiveextensionPoints- The extension pointserrors- The issues- Returns:
- The active plugins
-
computeIncomingDeactivations
protected Map<String,Collection<org.ametys.runtime.plugin.IncomingDeactivation>> computeIncomingDeactivations(Map<String, Feature> features) Compute incoming deactivations- Parameters:
features- The features- Returns:
- The deactivations
-
removeInactiveFeatures
protected void removeInactiveFeatures(Map<String, Feature> initialFeatures, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Map<String, Collection<org.ametys.runtime.plugin.IncomingDeactivation>> incomingDeactivations, Map<String, String> componentsConfig) Remove inactive features- Parameters:
initialFeatures- The initial featuresinactiveFeatures- The inactive featuresincomingDeactivations- The deactivationscomponentsConfig- The components
-
removeWrongPointReferences
protected void removeWrongPointReferences(Map<String, Feature> initialFeatures, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Map<String, ExtensionPointDefinition> extensionPoints, Collection<PluginIssue> errors) Remove the wrong points- Parameters:
initialFeatures- The initial featuresinactiveFeatures- The inactive featuresextensionPoints- The extension pointserrors- The errors
-
processOutgoingDependencies
protected Map<String,Feature> processOutgoingDependencies(Map<String, Feature> initialFeatures, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Collection<PluginIssue> errors) Process the outgoing dependencies- Parameters:
initialFeatures- The initial featuresinactiveFeatures- The inactive featureserrors- The errors- Returns:
- the outgoing dependencies
-
computeIncomingDependencies
Compute incoming dependencies- Parameters:
features- The features- Returns:
- The dependencies
-
computeOutgoingDependencies
Compute the outgoing dependencies- Parameters:
features- The features- Returns:
- The dependencies
-
removeUnusedPassiveFeatures
protected void removeUnusedPassiveFeatures(Map<String, Feature> features, Map<String, PluginsManager.InactivityStatus> inactiveFeatures, Map<String, Collection<String>> incomingDependencies) Remove the unused features that were declared passive- Parameters:
features- The featuresinactiveFeatures- The inactive featuresincomingDependencies- The dependencies
-
computeExtensions
protected Map<String,Map<String, computeExtensionsExtensionDefinition>> (Map<String, Feature> features, Collection<PluginIssue> errors) Compute the extensions- Parameters:
features- The featureserrors- The errors- Returns:
- The extensions
-
computeComponents
protected Map<String,ComponentDefinition> computeComponents(Map<String, Feature> features, Map<String, String> componentsConfig, Collection<PluginIssue> errors) compute the components- Parameters:
features- The featurescomponentsConfig- The component configurationserrors- The errors- Returns:
- The components
-
fullDump
Description copied from interface:FeatureActivatorDumps the givenFeatureActivator.PluginsInformation, in order to log in debug level.- Specified by:
fullDumpin interfaceFeatureActivator- Parameters:
pluginInfo- The information about plugins- Returns:
- The string to display in debug level
-