Package org.ametys.core.minimize.js
Class MinimizedJSResourceHandler
- java.lang.Object
- 
- org.ametys.runtime.plugin.component.AbstractLogEnabled
- 
- org.ametys.core.resources.AbstractResourceHandler
- 
- org.ametys.core.resources.I18nTextResourceHandler
- 
- org.ametys.core.resources.JSResourceHandler
- 
- org.ametys.core.minimize.js.MinimizedJSResourceHandler
 
 
 
 
 
- 
- All Implemented Interfaces:
- ResourceHandler,- LogEnabled,- Component,- Configurable,- Contextualizable,- Serviceable
 
 public class MinimizedJSResourceHandler extends JSResourceHandler Resource handler for minimized javascript file
- 
- 
Field SummaryFields Modifier and Type Field Description private static String__FILE_LOCATIONprivate static String__REAL_FILE_URIprotected MinimizeJSManager_jSMinimizeManagerJS minimize manager- 
Fields inherited from class org.ametys.core.resources.JSResourceHandler__PARAMETER_SET_EXPIRES_HEADER_TO_NO_CACHE
 - 
Fields inherited from class org.ametys.core.resources.AbstractResourceHandler_cocoonContext, _context, _resolver, _supportedSuffixes
 - 
Fields inherited from interface org.ametys.core.resources.ResourceHandlerMAX_PRIORITY, MIN_PRIORITY
 
- 
 - 
Constructor SummaryConstructors Constructor Description MinimizedJSResourceHandler()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateResource(Source source, OutputStream out, Map objectModel, Parameters par, Map<String,Object> additionalParameters)Generate the resource configured during setup, and output itSerializablegetKey(Source source, Map objectModel, Parameters parameters, Map<String,Object> additionalParameters)Get the unique key for this resource, for cache purpose.intgetPriority()Get the priority of this handlervoidservice(ServiceManager manager)Sourcesetup(String location, Map objectModel, Parameters par, Map<String,Object> additionalParameters)Initialize the resource handler with a resource.- 
Methods inherited from class org.ametys.core.resources.JSResourceHandlergetMimeType
 - 
Methods inherited from class org.ametys.core.resources.I18nTextResourceHandlergetLocale
 - 
Methods inherited from class org.ametys.core.resources.AbstractResourceHandlerconfigure, contextualize, getLastModified, getSize, getValidity, isSupported
 - 
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabledgetLogger, setLogger
 
- 
 
- 
- 
- 
Field Detail- 
__REAL_FILE_URIprivate static final String __REAL_FILE_URI - See Also:
- Constant Field Values
 
 - 
__FILE_LOCATIONprivate static final String __FILE_LOCATION - See Also:
- Constant Field Values
 
 - 
_jSMinimizeManagerprotected MinimizeJSManager _jSMinimizeManager JS minimize manager
 
- 
 - 
Constructor Detail- 
MinimizedJSResourceHandlerpublic MinimizedJSResourceHandler() 
 
- 
 - 
Method Detail- 
servicepublic void service(ServiceManager manager) throws ServiceException - Specified by:
- servicein interface- Serviceable
- Overrides:
- servicein class- I18nTextResourceHandler
- Throws:
- ServiceException
 
 - 
getPrioritypublic int getPriority() Description copied from interface:ResourceHandlerGet the priority of this handler- Specified by:
- getPriorityin interface- ResourceHandler
- Overrides:
- getPriorityin class- AbstractResourceHandler
- Returns:
- the priority. The bigger the highest priority
 
 - 
setuppublic Source setup(String location, Map objectModel, Parameters par, Map<String,Object> additionalParameters) throws IOException, ProcessingException Description copied from interface:ResourceHandlerInitialize the resource handler with a resource.- Specified by:
- setupin interface- ResourceHandler
- Overrides:
- setupin class- JSResourceHandler
- Parameters:
- location- The source uri
- objectModel- The object model
- par- The parameters
- additionalParameters- Additional parameters that can be filled, and will be transmitted to getKey, getValidity and generateResource
- Returns:
- the resolved source
- Throws:
- IOException- If an error occurs
- ProcessingException- If an error occurs
 
 - 
getKeypublic Serializable getKey(Source source, Map objectModel, Parameters parameters, Map<String,Object> additionalParameters) Description copied from interface:ResourceHandlerGet the unique key for this resource, for cache purpose.- Specified by:
- getKeyin interface- ResourceHandler
- Overrides:
- getKeyin class- I18nTextResourceHandler
- Parameters:
- source- The source
- objectModel- The object model
- parameters- The parameters
- additionalParameters- Additional parameters
- Returns:
- The cache key.
 
 - 
generateResourcepublic void generateResource(Source source, OutputStream out, Map objectModel, Parameters par, Map<String,Object> additionalParameters) throws IOException, ProcessingException Description copied from interface:ResourceHandlerGenerate the resource configured during setup, and output it- Specified by:
- generateResourcein interface- ResourceHandler
- Overrides:
- generateResourcein class- I18nTextResourceHandler
- Parameters:
- source- The source
- out- The output stream to write to
- objectModel- The object model
- par- The sitemap parameters
- additionalParameters- Additional parameters
- Throws:
- IOException- If an error occurs
- ProcessingException- If an error occurs
 
 
- 
 
-