Class AbstractComponentExtensionPoint<T>
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.runtime.plugin.component.AbstractComponentExtensionPoint<T>
- Type Parameters:
T- the type of the managed extensions
- All Implemented Interfaces:
ExtensionPoint<T>,Disposable,Initializable,Component,Contextualizable,LogEnabled,Serviceable,ThreadSafe
- Direct Known Subclasses:
EnhancementHandlersExtensionPoint,HTMLEditionHandlerExtensionPoint,SitemapDecoratorsExtensionPoint,SitemapIconsExtensionPoint
public abstract class AbstractComponentExtensionPoint<T>
extends AbstractLogEnabled
implements ExtensionPoint<T>, Component, ThreadSafe, Serviceable, Contextualizable, Initializable, Disposable
Avalon based implementation of an ExtensionPoint.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThis class is a storage for an extension informations -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContextAvalon contextprotected Map<String,AbstractComponentExtensionPoint<T>.ExtensionConfiguration> Extensions id and configuration associatedprotected ServiceManagerAvalon service manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtension(String id, String pluginName, String featureName, Configuration configuration) Add an extension to this point.voidcontextualize(Context context) voiddispose()getExtension(String id) Returns the named extensionReturns a Set containing the ids of all known extensionsbooleanhasExtension(String id) Returns true if the named extension existsvoidvoidFinalize the initialization of the extensions.
This method is called after alladdExtension()calls.
This is the last step before the actual startup of the application.voidservice(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_manager
Avalon service manager -
_context
Avalon context -
_extensions
Extensions id and configuration associated
-
-
Constructor Details
-
AbstractComponentExtensionPoint
public AbstractComponentExtensionPoint()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
dispose
- Specified by:
disposein interfaceDisposable
-
addExtension
public void addExtension(String id, String pluginName, String featureName, Configuration configuration) throws ConfigurationException Description copied from interface:ExtensionPointAdd an extension to this point. Each implementation knows the meaning of the given configuration.- Specified by:
addExtensionin interfaceExtensionPoint<T>- Parameters:
id- the unique identifier of the extension.pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)configuration- the information about the extension to be added- Throws:
ConfigurationException- when a configuration problem occurs
-
getExtension
Description copied from interface:ExtensionPointReturns the named extension- Specified by:
getExtensionin interfaceExtensionPoint<T>- Parameters:
id- the unique id of the extension- Returns:
- the named extension
-
getExtensionsIds
Description copied from interface:ExtensionPointReturns a Set containing the ids of all known extensions- Specified by:
getExtensionsIdsin interfaceExtensionPoint<T>- Returns:
- a Set containing the ids of all known extensions
-
hasExtension
Description copied from interface:ExtensionPointReturns true if the named extension exists- Specified by:
hasExtensionin interfaceExtensionPoint<T>- Parameters:
id- the unique id of the extension- Returns:
- true if the named extension exists
-
initializeExtensions
Description copied from interface:ExtensionPointFinalize the initialization of the extensions.
This method is called after alladdExtension()calls.
This is the last step before the actual startup of the application.- Specified by:
initializeExtensionsin interfaceExtensionPoint<T>- Throws:
Exception- if something wrong occurs
-