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
,ProfileAssignmentStorageExtensionPoint
,QueryAdapterFOSearchExtensionPoint
,ResourceDependenciesListExtensionPoint
,ResourceHandlerProviderExtensionPoint
,SiteGetterExtensionPoint
public abstract class AbstractThreadSafeComponentPrioritizableExtensionPoint<T extends Prioritizable> extends AbstractThreadSafeComponentExtensionPoint<T>
Avalon based implementation of anPrioritizable
ExtensionPoint.
-
-
Field Summary
-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description AbstractThreadSafeComponentPrioritizableExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Comparator<String>
getComparator()
Define the comparator used to order components.Set<String>
getExtensionsIds()
Returns a Set containing the ids of all known extensionsvoid
initializeExtensions()
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
sortPriorityAscending()
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 Detail
-
AbstractThreadSafeComponentPrioritizableExtensionPoint
public AbstractThreadSafeComponentPrioritizableExtensionPoint()
-
-
Method Detail
-
initializeExtensions
public void initializeExtensions() throws Exception
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
public Set<String> 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
protected Comparator<String> 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
protected boolean sortPriorityAscending()
Define if the priority is ascending sorted or reversed, default implementation istrue
.- Returns:
true
if the priority should be ascending.
-
-