Package org.ametys.core.resources
Class ResourceHandlerProviderExtensionPoint
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<T>
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentPrioritizableExtensionPoint<ResourceHandlerProvider>
-
- org.ametys.core.resources.ResourceHandlerProviderExtensionPoint
-
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<ResourceHandlerProvider>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class ResourceHandlerProviderExtensionPoint extends AbstractThreadSafeComponentPrioritizableExtensionPoint<ResourceHandlerProvider>
Extension point forResourceHandlerProvider
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ROLE
Avalon Role-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description ResourceHandlerProviderExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceHandler
getResourceHandler(String source)
Get the extension of max priority matching the provided source, based on the registered suffixesprotected boolean
sortPriorityAscending()
Define if the priority is ascending sorted or reversed, default implementation istrue
.-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentPrioritizableExtensionPoint
getComparator, getExtensionsIds, initializeExtensions
-
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
-
ResourceHandlerProviderExtensionPoint
public ResourceHandlerProviderExtensionPoint()
-
-
Method Detail
-
sortPriorityAscending
protected boolean sortPriorityAscending()
Description copied from class:AbstractThreadSafeComponentPrioritizableExtensionPoint
Define if the priority is ascending sorted or reversed, default implementation istrue
.- Overrides:
sortPriorityAscending
in classAbstractThreadSafeComponentPrioritizableExtensionPoint<ResourceHandlerProvider>
- Returns:
true
if the priority should be ascending.
-
getResourceHandler
public ResourceHandler getResourceHandler(String source) throws Exception
Get the extension of max priority matching the provided source, based on the registered suffixes- Parameters:
source
- The source- Returns:
- The corresponding extension
- Throws:
Exception
- if an error occurs during ResourceHandler creation.
-
-