cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/serialization SVGSerializer.java
Date Sun, 08 Feb 2004 18:33:58 GMT
sylvain     2004/02/08 10:33:58

  Modified:    src/blocks/batik/java/org/apache/cocoon/serialization
                        SVGSerializer.java
  Log:
  Reinstall the previous handling of "resource" and "context" protocols
  
  Revision  Changes    Path
  1.13      +19 -12    cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/serialization/SVGSerializer.java
  
  Index: SVGSerializer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/serialization/SVGSerializer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SVGSerializer.java	7 Feb 2004 13:18:16 -0000	1.12
  +++ SVGSerializer.java	8 Feb 2004 18:33:58 -0000	1.13
  @@ -57,14 +57,21 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.context.Context;
  +import org.apache.avalon.framework.context.ContextException;
  +import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.batik.transcoder.Transcoder;
  -import org.apache.batik.transcoder.TranscoderException;
   import org.apache.batik.transcoder.TranscoderInput;
   import org.apache.batik.transcoder.TranscoderOutput;
   import org.apache.batik.transcoder.TranscodingHints;
  +import org.apache.batik.transcoder.TranscoderException;
  +import org.apache.batik.util.ParsedURL;
  +import org.apache.cocoon.Constants;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.transcoder.ExtendableTranscoderFactory;
   import org.apache.cocoon.components.transcoder.TranscoderFactory;
  +import org.apache.cocoon.components.url.ParsedContextURLProtocolHandler;
  +import org.apache.cocoon.components.url.ParsedResourceURLProtocolHandler;
   import org.apache.cocoon.util.ClassUtils;
   import org.apache.cocoon.xml.dom.SVGBuilder;
   import org.apache.excalibur.source.SourceValidity;
  @@ -80,17 +87,17 @@
    * @version CVS $Id$
    */
   public class SVGSerializer extends SVGBuilder
  -implements Serializer, Configurable, Poolable, CacheableProcessingComponent/*, Serviceable,
Disposable , Contextualizable*/ {
  +implements Serializer, Configurable, Poolable, CacheableProcessingComponent, Contextualizable
{
   
  -//    /**
  -//     * Get the context
  -//     */
  -//    public void contextualize(Context context) throws ContextException {
  -//        ParsedContextURLProtocolHandler.setContext(
  -//            (org.apache.cocoon.environment.Context)context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT));
  -//        ParsedURL.registerHandler(new ParsedContextURLProtocolHandler());
  -//        ParsedURL.registerHandler(new ParsedResourceURLProtocolHandler());
  -//    }
  +    /**
  +     * Get the context
  +     */
  +    public void contextualize(Context context) throws ContextException {
  +        ParsedContextURLProtocolHandler.setContext(
  +            (org.apache.cocoon.environment.Context)context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT));
  +        ParsedURL.registerHandler(new ParsedContextURLProtocolHandler());
  +        ParsedURL.registerHandler(new ParsedResourceURLProtocolHandler());
  +    }
   
       /** The current <code>OutputStream</code>. */
       private OutputStream output;
  
  
  

Mime
View raw message