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 theThreadSafeComponentManagerfor more details.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classPluginsComponentManager.ComponentInvocationHandlerprivate classPluginsComponentManager.ExtensionPointFactoryprivate classPluginsComponentManager.ProxyComponentFactory-
Nested classes/interfaces inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
ThreadSafeComponentManager.ComponentFactory
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,Collection<ExtensionDefinition>>_extensionPoints(package private) ComponentManager_parentManager-
Fields inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
_componentsInitializing, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description PluginsComponentManager(ComponentManager parentManager)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExtensionPoint(String pluginName, String point, Class<? extends ExtensionPoint> extensionPoint, Configuration configuration, Collection<ExtensionDefinition> extensions)Add a new extension point, and its extensions, to the manager.(package private) ThreadSafeComponentManager.ComponentFactorygetComponentFactory(String pluginName, String featureName, String role, Class<? extends Object> componentClass, Configuration configuration)booleanhasComponent(String role)Componentlookup(String role)Return an instance of a component based on a Role.voidrelease(Component object)-
Methods inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
_addComponent, addComponent, contextualize, dispose, hasComponent, hasRole, initialize, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_parentManager
ComponentManager _parentManager
-
_extensionPoints
private Map<String,Collection<ExtensionDefinition>> _extensionPoints
-
-
Constructor Detail
-
PluginsComponentManager
public PluginsComponentManager(ComponentManager parentManager)
Constructor.- Parameters:
parentManager- the parent manager
-
-
Method Detail
-
hasComponent
public boolean hasComponent(String role)
- Specified by:
hasComponentin interfaceComponentManager
-
lookup
public Component lookup(String role) throws ComponentException
Description copied from class:ThreadSafeComponentManagerReturn an instance of a component based on a Role. The Role is usually the Interface Fully Qualified Name(FQN).- Specified by:
lookupin interfaceComponentManager- Overrides:
lookupin classThreadSafeComponentManager<Object>- Parameters:
role- The key name of theComponentto retrieve.- Returns:
- the desired component or null if no component exist for the given role
- Throws:
ComponentException- if an error occurs
-
release
public void release(Component object)
- Specified by:
releasein 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.
-
getComponentFactory
ThreadSafeComponentManager.ComponentFactory getComponentFactory(String pluginName, String featureName, String role, Class<? extends Object> componentClass, Configuration configuration)
- Overrides:
getComponentFactoryin classThreadSafeComponentManager<Object>
-
-