Package org.ametys.core.resources
Class ExpiresResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.DefaultResourceHandler
-
- org.ametys.core.resources.ExpiresResourceHandler
-
- All Implemented Interfaces:
ResourceHandler,LogEnabled,Contextualizable,Serviceable
- Direct Known Subclasses:
CssResourceHandler
public class ExpiresResourceHandler extends DefaultResourceHandler implements Contextualizable
Default resource handler that expires
-
-
Field Summary
Fields Modifier and Type Field Description private Context_context-
Fields inherited from class org.ametys.core.resources.DefaultResourceHandler
_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 voidcontextualize(Context context)Sourcesetup(String location, Map objectModel, Parameters parameters, boolean readForDownload)Initialize the resource handler with a resource.-
Methods inherited from class org.ametys.core.resources.DefaultResourceHandler
generate, getKey, getLastModified, getLength, 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
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:
contextualizein interfaceContextualizable- Throws:
ContextException
-
setup
public Source setup(String location, Map objectModel, Parameters parameters, boolean readForDownload) throws IOException, ProcessingException
Description copied from interface:ResourceHandlerInitialize the resource handler with a resource.- Specified by:
setupin interfaceResourceHandler- Overrides:
setupin classDefaultResourceHandler- 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
-
-