Class AbstractThreadSafeComponentPrioritizableExtensionPoint<T extends Prioritizable>
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<T>
org.ametys.runtime.plugin.component.AbstractThreadSafeComponentPrioritizableExtensionPoint<T>
- Type Parameters:
T
- the type of the managed extensions, must implementPrioritizable
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<T>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
- Direct Known Subclasses:
AnalysisExtensionPoint
,ContentImporterExtensionPoint
,OdfRefTableDataExtensionPoint
,ProfileAssignmentStorageExtensionPoint
,QueryAdapterFOSearchExtensionPoint
,ResourceDependenciesListExtensionPoint
,ResourceHandlerProviderExtensionPoint
,SiteGetterExtensionPoint
public abstract class AbstractThreadSafeComponentPrioritizableExtensionPoint<T extends Prioritizable>
extends AbstractThreadSafeComponentExtensionPoint<T>
Avalon based implementation of an
Prioritizable
ExtensionPoint.-
Field Summary
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Comparator<String>
Define the comparator used to order components.Returns a Set containing the ids of all known extensionsvoid
Finalize the initialization of the extensions.
This method is called after alladdExtension()
calls.
This is the last step before the actual startup of the application.protected boolean
Define if the priority is ascending sorted or reversed, default implementation istrue
.Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, addExtension, contextualize, dispose, getExtension, hasExtension, initialize, service
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
AbstractThreadSafeComponentPrioritizableExtensionPoint
-
-
Method Details
-
initializeExtensions
Description copied from interface:ExtensionPoint
Finalize 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:
initializeExtensions
in interfaceExtensionPoint<T extends Prioritizable>
- Overrides:
initializeExtensions
in classAbstractThreadSafeComponentExtensionPoint<T extends Prioritizable>
- Throws:
Exception
- if something wrong occurs
-
getExtensionsIds
Description copied from interface:ExtensionPoint
Returns a Set containing the ids of all known extensions- Specified by:
getExtensionsIds
in interfaceExtensionPoint<T extends Prioritizable>
- Overrides:
getExtensionsIds
in classAbstractThreadSafeComponentExtensionPoint<T extends Prioritizable>
- Returns:
- a Set containing the ids of all known extensions
-
getComparator
Define the comparator used to order components. Default is based on priority (could be ascending or descending depending ofsortPriorityAscending()
value, then on the extension ID.- Returns:
- the comparator used to order components
-
sortPriorityAscending
Define if the priority is ascending sorted or reversed, default implementation istrue
.- Returns:
true
if the priority should be ascending.
-