Class AbstractMinimizeReader
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.reading.AbstractReader
-
- org.apache.cocoon.reading.ServiceableReader
-
- org.ametys.plugins.core.ui.minimize.AbstractMinimizeReader
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,LogEnabled
,Serviceable
,CacheableProcessingComponent
,Reader
,SitemapModelComponent
,SitemapOutputComponent
- Direct Known Subclasses:
MinimizeCSSReader
,MinimizeJSReader
public abstract class AbstractMinimizeReader extends ServiceableReader implements CacheableProcessingComponent
This generator generates a single file to load all ui items files. Can generates a list of imports of directly intergrates all files.
-
-
Field Summary
Fields Modifier and Type Field Description private HashCache
_hashCache
private ProxiedContextPathProvider
_proxiedContextPathProvider
-
Fields inherited from class org.apache.cocoon.reading.ServiceableReader
manager
-
Fields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
-
-
Constructor Summary
Constructors Constructor Description AbstractMinimizeReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
_handleFiles(List<HashCache.UriData> files, boolean generateSourceMap)
Minimize filesvoid
generate()
Serializable
getKey()
long
getLastModified()
SourceValidity
getValidity()
void
service(ServiceManager smanager)
void
setup(SourceResolver res, Map obj, String src, Parameters par)
-
Methods inherited from class org.apache.cocoon.reading.AbstractReader
getMimeType, recycle, setOutputStream, shouldSetContentLength
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_hashCache
private HashCache _hashCache
-
_proxiedContextPathProvider
private ProxiedContextPathProvider _proxiedContextPathProvider
-
-
Constructor Detail
-
AbstractMinimizeReader
public AbstractMinimizeReader()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableReader
- Throws:
ServiceException
-
getKey
public Serializable getKey()
- Specified by:
getKey
in interfaceCacheableProcessingComponent
-
getValidity
public SourceValidity getValidity()
- Specified by:
getValidity
in interfaceCacheableProcessingComponent
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfaceReader
- Overrides:
getLastModified
in classAbstractReader
-
setup
public void setup(SourceResolver res, Map obj, String src, Parameters par) throws ProcessingException, SAXException, IOException
- Specified by:
setup
in interfaceSitemapModelComponent
- Overrides:
setup
in classAbstractReader
- Throws:
ProcessingException
SAXException
IOException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
- Specified by:
generate
in interfaceReader
- Throws:
IOException
SAXException
ProcessingException
-
_handleFiles
protected abstract String _handleFiles(List<HashCache.UriData> files, boolean generateSourceMap)
Minimize files- Parameters:
files
- The filesgenerateSourceMap
- true to generate the source map- Returns:
- The minimized string
-
-