Package org.ametys.core.resources
Class ExpiresResourceHandler
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.resources.SimpleResourceHandler
org.ametys.core.resources.ExpiresResourceHandler
- All Implemented Interfaces:
ResourceHandler
,LogEnabled
,Contextualizable
,Serviceable
- Direct Known Subclasses:
CssResourceHandler
Default resource handler that expires
-
Field Summary
Fields inherited from class org.ametys.core.resources.SimpleResourceHandler
_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source
-
Constructor Summary
ConstructorDescriptionDefault constructorExpiresResourceHandler
(Source source) Constructor with an already resolvedSource
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) setup
(String location, Map objectModel, Parameters parameters, boolean readForDownload) Initialize the resource handler with a resource.Methods inherited from class org.ametys.core.resources.SimpleResourceHandler
generate, getKey, getLastModified, getMimeType, getValidity, service
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.ResourceHandler
acceptRanges, generate, getLength, shouldUseSourceContentLength
-
Constructor Details
-
ExpiresResourceHandler
public ExpiresResourceHandler()Default constructor -
ExpiresResourceHandler
Constructor with an already resolvedSource
.- Parameters:
source
- the source
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
setup
public Source setup(String location, Map objectModel, Parameters parameters, boolean readForDownload) throws IOException, ProcessingException Description copied from interface:ResourceHandler
Initialize the resource handler with a resource.- Specified by:
setup
in interfaceResourceHandler
- Overrides:
setup
in classSimpleResourceHandler
- Parameters:
location
- The source uriobjectModel
- The object modelparameters
- The parametersreadForDownload
- if the resource is to be downloaded and not rendered.- Returns:
- the resolved source
- Throws:
IOException
- If an error occursProcessingException
- If an error occurs
-