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
ConstructorsConstructorDescriptionDefault constructorExpiresResourceHandler(Source source) Constructor with an already resolvedSource. -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(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, serviceMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
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 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
-