Package org.ametys.core.resources
Interface ResourceHandlerProvider
-
- All Superinterfaces:
Prioritizable
- All Known Implementing Classes:
AbstractResourceHandlerProvider
,AbstractSimpleResourceHandlerProvider
,CompiledCssResourceHandlerProvider
,CssResourceHandlerProvider
,CSSSourceMapResourceHandlerProvider
,ImageResourceHandlerProvider
,JSResourceHandlerProvider
,JSSourceMapResourceHandlerProvider
,MinimizedCSSResourceHandlerProvider
,MinimizedJSResourceHandlerProvider
,PdfCoverResourceHandlerProvider
,SassSourceMapResourceHandlerProvider
,UncompiledSassResourceHandlerProvider
,VueJsResourceHandlerProvider
public interface ResourceHandlerProvider extends Prioritizable
Provides aResourceHandler
able to process aSource
.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_PRIORITY
Maximum priority.static int
MIN_PRIORITY
Minimum priority.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getPriority()
Get the priority for the component.ResourceHandler
getResourceHandler(String source)
Returns the correspondingResourceHandler
or null if none.
ReturnedResourceHandler
should be thread safe.
-
-
-
Field Detail
-
MIN_PRIORITY
static final int MIN_PRIORITY
Minimum priority.- See Also:
- Constant Field Values
-
MAX_PRIORITY
static final int MAX_PRIORITY
Maximum priority.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPriority
default int getPriority()
Description copied from interface:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriority
in interfacePrioritizable
- Returns:
- the priority
-
getResourceHandler
ResourceHandler getResourceHandler(String source) throws Exception
Returns the correspondingResourceHandler
or null if none.
ReturnedResourceHandler
should be thread safe.- Parameters:
source
- the requested resource.- Returns:
- a ResourceHandler able to process the resource.
- Throws:
Exception
- if an error occurs during ResourceHandler creation.
-
-