Class PluginsComponentManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.plugin.component.ThreadSafeComponentManager<Object>
org.ametys.runtime.plugin.component.PluginsComponentManager
- All Implemented Interfaces:
LogEnabled
,Disposable
,Initializable
,ComponentManager
,Contextualizable
,Serviceable
public class PluginsComponentManager
extends ThreadSafeComponentManager<Object>
implements ComponentManager
Implementation of an Avalon ComponentManager handling the PluginAware and ParentAware interfaces.
See the
See the
ThreadSafeComponentManager
for more details.-
Field Summary
Fields inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
_manager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtensionPoint
(String pluginName, String point, Class<? extends ExtensionPoint> extensionPoint, Configuration configuration, Collection<ExtensionDefinition> extensions) Add a new extension point, and its extensions, to the manager.boolean
hasComponent
(String role) void
Properly initialize of the Child handlers.Return an instance of a component based on a Role.void
Methods inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
addComponent, contextualize, dispose, hasComponent, hasRole, service
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
PluginsComponentManager
Constructor.- Parameters:
parentManager
- the parent manager
-
-
Method Details
-
initialize
Description copied from class:ThreadSafeComponentManager
Properly initialize of the Child handlers.- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classThreadSafeComponentManager<Object>
- Throws:
Exception
-
hasComponent
- Specified by:
hasComponent
in interfaceComponentManager
-
lookup
Description copied from class:ThreadSafeComponentManager
Return an instance of a component based on a Role. The Role is usually the Interface Fully Qualified Name(FQN).- Specified by:
lookup
in interfaceComponentManager
- Overrides:
lookup
in classThreadSafeComponentManager<Object>
- Parameters:
role
- The key name of theComponent
to retrieve.- Returns:
- the desired component or null if no component exist for the given role
- Throws:
ComponentException
- if an error occurs
-
release
- Specified by:
release
in interfaceComponentManager
-
addExtensionPoint
public void addExtensionPoint(String pluginName, String point, Class<? extends ExtensionPoint> extensionPoint, Configuration configuration, Collection<ExtensionDefinition> extensions) Add a new extension point, and its extensions, to the manager.- Parameters:
pluginName
- the plugin containing the extension pointpoint
- the extension point name.extensionPoint
- the class of the extension point.configuration
- the configuration for the extension point.extensions
- definitions of extensions.
-