Package org.ametys.core.minimize.js
Class MinimizedJSResourceHandler
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.resources.SimpleResourceHandler
-
- org.ametys.core.resources.I18nTextResourceHandler
-
- org.ametys.core.resources.JSResourceHandler
-
- org.ametys.core.minimize.js.MinimizedJSResourceHandler
-
- All Implemented Interfaces:
ResourceHandler
,LogEnabled
,Contextualizable
,Serviceable
public class MinimizedJSResourceHandler extends JSResourceHandler
Resource handler for minimized javascript file
-
-
Field Summary
Fields Modifier and Type Field Description protected MinimizeJSManager
_jSMinimizeManager
JS minimize manager-
Fields inherited from class org.ametys.core.resources.JSResourceHandler
_setExpiresToNoCache
-
Fields inherited from class org.ametys.core.resources.I18nTextResourceHandler
_context
-
Fields inherited from class org.ametys.core.resources.SimpleResourceHandler
_objectModel, _parameters, _readForDownload, _requestedLocation, _resolver, _source
-
-
Constructor Summary
Constructors Constructor Description MinimizedJSResourceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate(OutputStream out)
Generate the resource configured during setup, and output itSerializable
getKey()
Get the unique key for this resource, for cache purpose.void
service(ServiceManager manager)
Source
setup(String location, Map objectModel, Parameters par, boolean readForDownload)
Initialize the resource handler with a resource.-
Methods inherited from class org.ametys.core.resources.JSResourceHandler
getMimeType
-
Methods inherited from class org.ametys.core.resources.I18nTextResourceHandler
contextualize, getLocale
-
Methods inherited from class org.ametys.core.resources.SimpleResourceHandler
getLastModified, getValidity
-
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
-
-
-
-
Field Detail
-
_jSMinimizeManager
protected MinimizeJSManager _jSMinimizeManager
JS minimize manager
-
-
Constructor Detail
-
MinimizedJSResourceHandler
public MinimizedJSResourceHandler()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classI18nTextResourceHandler
- Throws:
ServiceException
-
setup
public Source setup(String location, Map objectModel, Parameters par, 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 classJSResourceHandler
- Parameters:
location
- The source uriobjectModel
- The object modelpar
- 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
-
getKey
public Serializable getKey()
Description copied from interface:ResourceHandler
Get the unique key for this resource, for cache purpose.- Specified by:
getKey
in interfaceResourceHandler
- Overrides:
getKey
in classI18nTextResourceHandler
- Returns:
- The cache key.
-
generate
public void generate(OutputStream out) throws IOException, ProcessingException
Description copied from interface:ResourceHandler
Generate the resource configured during setup, and output it- Specified by:
generate
in interfaceResourceHandler
- Overrides:
generate
in classI18nTextResourceHandler
- Parameters:
out
- The output stream to write to- Throws:
IOException
- If an error occursProcessingException
- If an error occurs
-
-