Package org.ametys.core.resources
Class AbstractSimpleResourceHandlerProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.resources.AbstractResourceHandlerProvider
org.ametys.core.resources.AbstractSimpleResourceHandlerProvider
- All Implemented Interfaces:
ResourceHandlerProvider
,LogEnabled
,Prioritizable
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
CssResourceHandlerProvider
,CSSSourceMapResourceHandlerProvider
,ImageResourceHandlerProvider
,JSResourceHandlerProvider
,JSSourceMapResourceHandlerProvider
,MinimizedCSSResourceHandlerProvider
,MinimizedJSResourceHandlerProvider
,PdfCoverResourceHandlerProvider
,UncompiledSassResourceHandlerProvider
public abstract class AbstractSimpleResourceHandlerProvider
extends AbstractResourceHandlerProvider
implements Configurable
Simple
ResourceHandlerProvider
based on source suffixes (mainly file extensions).-
Field Summary
Fields inherited from class org.ametys.core.resources.AbstractResourceHandlerProvider
_context, _manager
Fields inherited from interface org.ametys.core.resources.ResourceHandlerProvider
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) protected abstract ResourceHandler
createResourceHandler
(String source) Actually creates theResourceHandler
.getResourceHandler
(String source) Returns the correspondingResourceHandler
or null if none.
ReturnedResourceHandler
should be thread safe.Methods inherited from class org.ametys.core.resources.AbstractResourceHandlerProvider
contextualize, service, setup
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.resources.ResourceHandlerProvider
getPriority
-
Field Details
-
_supportedSuffixes
The supported suffixes
-
-
Constructor Details
-
AbstractSimpleResourceHandlerProvider
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getResourceHandler
Description copied from interface:ResourceHandlerProvider
Returns the correspondingResourceHandler
or null if none.
ReturnedResourceHandler
should be thread safe.- Specified by:
getResourceHandler
in interfaceResourceHandlerProvider
- Parameters:
source
- the requested resource.- Returns:
- a ResourceHandler able to process the resource.
- Throws:
Exception
- if an error occurs during ResourceHandler creation.
-
createResourceHandler
Actually creates theResourceHandler
.- Parameters:
source
- the requested resource.- Returns:
- the created
ResourceHandler
.
-