Package org.ametys.runtime.plugin
Class AbstractExtensionPoint<T>
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.plugin.AbstractExtensionPoint<T>
- Type Parameters:
T
- the type of the managed extensions
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<T>
,Initializable
,Component
- Direct Known Subclasses:
DocbookEnhancementExtensionPoint
,HTMLEnhancementExtensionPoint
,XHTMLSerializerExtensionPoint
public abstract class AbstractExtensionPoint<T>
extends AbstractLogEnabled
implements ExtensionPoint<T>, Initializable, Component
Abstract implementation of an extension point.
Contains only helper methods. Tha actual job has to be done in the
Contains only helper methods. Tha actual job has to be done in the
ExtensionPoint.addExtension(String, String, String, org.apache.avalon.framework.configuration.Configuration)
-
Field Summary
Modifier and TypeFieldDescriptionMap containing the extensions.
The key is the unique id of the extension. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetExtension
(String id) Returns the named extensionReturns a Set containing the ids of all known extensionsboolean
hasExtension
(String id) Returns true if the named extension existsvoid
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.runtime.plugin.ExtensionPoint
addExtension, initializeExtensions
-
Field Details
-
_extensions
Map containing the extensions.
The key is the unique id of the extension.
-
-
Constructor Details
-
AbstractExtensionPoint
public AbstractExtensionPoint()
-
-
Method Details
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
getExtension
Description copied from interface:ExtensionPoint
Returns the named extension- Specified by:
getExtension
in interfaceExtensionPoint<T>
- Parameters:
id
- the unique id of the extension- Returns:
- the named extension
-
getExtensionsIds
Description copied from interface:ExtensionPoint
Returns a Set containing the ids of all known extensions- Specified by:
getExtensionsIds
in interfaceExtensionPoint<T>
- Returns:
- a Set containing the ids of all known extensions
-
hasExtension
Description copied from interface:ExtensionPoint
Returns true if the named extension exists- Specified by:
hasExtension
in interfaceExtensionPoint<T>
- Parameters:
id
- the unique id of the extension- Returns:
- true if the named extension exists
-