org.apache.lenya.cms.cocoon.transformation
Class ProxyTransformer

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.xml.AbstractXMLPipe
              extended by org.apache.cocoon.transformation.AbstractTransformer
                  extended by org.apache.cocoon.transformation.AbstractSAXTransformer
                      extended by org.apache.lenya.cms.cocoon.transformation.AbstractLinkTransformer
                          extended by org.apache.lenya.cms.cocoon.transformation.ProxyTransformer
All Implemented Interfaces:
org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.transformation.Transformer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer, org.apache.excalibur.xml.sax.XMLConsumer, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

public class ProxyTransformer
extends AbstractLinkTransformer

Proxy transformer.

The resulting URLs can either be absolute (default) or relative. You can either configure this when declaring the transformer:

     <map:transformer ... >
       <urls type="relative"/>
       ...
     </map:transformer>
 

or pass a parameter:

     <map:parameter name="urls" value="relative"/>
 

See Also:
OutgoingLinkRewriter

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lenya.cms.cocoon.transformation.AbstractLinkTransformer
AbstractLinkTransformer.AttributeConfiguration
 
Field Summary
protected static java.lang.String ATTRIBUTE_TYPE
           
protected static java.lang.String PARAMETER_URLS
           
protected static java.lang.String URL_TYPE_ABSOLUTE
           
protected static java.lang.String URL_TYPE_RELATIVE
           
 
Fields inherited from class org.apache.lenya.cms.cocoon.transformation.AbstractLinkTransformer
ignoreLinkElement, indent
 
Fields inherited from class org.apache.cocoon.transformation.AbstractSAXTransformer
context, defaultNamespaceURI, EMPTY_ATTRIBUTES, emptyAttributes, ignoreEmptyCharacters, ignoreEventsCount, ignoreHooksCount, ignoreWhitespaces, manager, namespaceURI, objectModel, parameters, recorderStack, request, resolver, response, source, stack
 
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
ProxyTransformer()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration config)
           
protected  LinkRewriter getLinkRewriter()
           
 void setup(org.apache.cocoon.environment.SourceResolver _resolver, java.util.Map _objectModel, java.lang.String _source, org.apache.avalon.framework.parameters.Parameters _parameters)
           
protected  void setUrlType(java.lang.String value)
           
 
Methods inherited from class org.apache.lenya.cms.cocoon.transformation.AbstractLinkTransformer
endElement, existsMatchingConfiguration, getCacheKey, getMatchingConfigurations, handleLink, setAttribute, startElement
 
Methods inherited from class org.apache.cocoon.transformation.AbstractSAXTransformer
addRecorder, characters, comment, dispose, endCDATA, endDocument, endDTD, endEntity, endParametersRecording, endParametersRecording, endPrefixMapping, endRecording, endSAXRecording, endSerializedXMLRecording, endTextRecording, endTransformingElement, findPrefixMapping, getMutableAttributes, ignorableWhitespace, processingInstruction, recycle, removeRecorder, sendEndElementEvent, sendEndElementEventNS, sendEndPrefixMapping, sendEvents, sendParametersEvents, sendStartElementEvent, sendStartElementEvent, sendStartElementEventNS, sendStartElementEventNS, sendStartPrefixMapping, sendTextEvent, service, setDocumentLocator, setupTransforming, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startParametersRecording, startPrefixMapping, startRecording, startSAXRecording, startSerializedXMLRecording, startTextRecording, startTransformingElement
 
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.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

ATTRIBUTE_TYPE

protected static final java.lang.String ATTRIBUTE_TYPE
See Also:
Constant Field Values

URL_TYPE_ABSOLUTE

protected static final java.lang.String URL_TYPE_ABSOLUTE
See Also:
Constant Field Values

URL_TYPE_RELATIVE

protected static final java.lang.String URL_TYPE_RELATIVE
See Also:
Constant Field Values

PARAMETER_URLS

protected static final java.lang.String PARAMETER_URLS
See Also:
Constant Field Values
Constructor Detail

ProxyTransformer

public ProxyTransformer()
Method Detail

setup

public void setup(org.apache.cocoon.environment.SourceResolver _resolver,
                  java.util.Map _objectModel,
                  java.lang.String _source,
                  org.apache.avalon.framework.parameters.Parameters _parameters)
           throws org.apache.cocoon.ProcessingException,
                  org.xml.sax.SAXException,
                  java.io.IOException
Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
Overrides:
setup in class org.apache.cocoon.transformation.AbstractSAXTransformer
Throws:
org.apache.cocoon.ProcessingException
org.xml.sax.SAXException
java.io.IOException

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Overrides:
configure in class AbstractLinkTransformer
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

setUrlType

protected void setUrlType(java.lang.String value)
                   throws org.apache.avalon.framework.configuration.ConfigurationException
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

getLinkRewriter

protected LinkRewriter getLinkRewriter()
Specified by:
getLinkRewriter in class AbstractLinkTransformer
Returns:
The link rewriter used by this transformer.


Copyright $ Apache Software Foundation. All Rights Reserved.