Class MinimizeTransformer
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
org.apache.cocoon.transformation.ServiceableTransformer
org.ametys.plugins.core.ui.minimize.MinimizeTransformer
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,Configurable
,Contextualizable
,LogEnabled
,Serviceable
,SitemapModelComponent
,Transformer
,XMLConsumer
,XMLPipe
,XMLProducer
,XMLConsumer
,ContentHandler
,LexicalHandler
- Direct Known Subclasses:
FrontMinimizeTransformer
public class MinimizeTransformer
extends ServiceableTransformer
implements Contextualizable, Configurable
This transformer will minimize every scripts together
-
Field Summary
Modifier and TypeFieldDescriptionprotected Context
The avalon contextprotected String
The current contextprotected Boolean
Should css medias be taken in account?protected Boolean
Is developer mode?protected String
The current localThe list of patterns available for minimizationFields inherited from class org.apache.cocoon.transformation.ServiceableTransformer
manager, objectModel, parameters, resolver, source
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Fields inherited from interface org.apache.cocoon.transformation.Transformer
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
Get the url of the minimizerprotected String
_removeContextPath
(String uri) Remove the context path from the uri to be able to analyse correctly the patternsvoid
configure
(Configuration configuration) void
contextualize
(Context context) void
endElement
(String uri, String loc, String raw) protected String
Return the salt used by the hash cachevoid
service
(ServiceManager smanager) void
setup
(SourceResolver res, Map obj, String src, Parameters par) void
void
startElement
(String uri, String loc, String raw, Attributes a) Methods inherited from class org.apache.cocoon.transformation.ServiceableTransformer
dispose, recycle
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startEntity, startPrefixMapping
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
characters, declaration, endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
Field Details
-
_isSuperDevMode
Is developer mode? -
_context
The avalon context -
_patterns
The list of patterns available for minimization -
_locale
The current local -
_inlineCssMedias
Should css medias be taken in account? -
_currentContextPath
The current context
-
-
Constructor Details
-
MinimizeTransformer
public MinimizeTransformer()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableTransformer
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
_getMinimizeUrl
Get the url of the minimizer- Returns:
- The minimizer url
-
setup
public void setup(SourceResolver res, Map obj, String src, Parameters par) throws ProcessingException, SAXException, IOException - Specified by:
setup
in interfaceSitemapModelComponent
- Overrides:
setup
in classServiceableTransformer
- Throws:
ProcessingException
SAXException
IOException
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classAbstractXMLPipe
- Throws:
SAXException
-
startElement
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classAbstractXMLPipe
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classAbstractXMLPipe
- Throws:
SAXException
-
_removeContextPath
Remove the context path from the uri to be able to analyse correctly the patterns- Parameters:
uri
- The incomming uri- Returns:
- The uri with no context path
-
getHashSalt
Return the salt used by the hash cache- Returns:
- The salt string
-