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
public class ExpiresResourceHandler extends SimpleResourceHandler implements Contextualizable
Default resource handler that expires
-
-
Field Summary
-
Fields inherited from class org.ametys.core.resources.SimpleResourceHandler
_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source
-
-
Constructor Summary
Constructors Constructor Description ExpiresResourceHandler()
Default constructorExpiresResourceHandler(Source source)
Constructor with an already resolvedSource
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextualize(Context context)
Source
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 Detail
-
ExpiresResourceHandler
public ExpiresResourceHandler()
Default constructor
-
ExpiresResourceHandler
public ExpiresResourceHandler(Source source)
Constructor with an already resolvedSource
.- Parameters:
source
- the source
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- 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
-
-