cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation EncodeURLTransformer.java XMLDBTransformer.java
Date Thu, 07 Feb 2002 07:41:25 GMT
cziegeler    02/02/06 23:41:24

  Modified:    src/java/org/apache/cocoon/transformation
                        CIncludeTransformer.java
                        CachingCIncludeTransformer.java
                        FilterTransformer.java
                        FragmentExtractorTransformer.java
                        I18nTransformer.java LDAPTransformer.java
                        ReadDOMSessionTransformer.java SQLTransformer.java
                        TraxTransformer.java
                        WriteDOMSessionTransformer.java
                        XIncludeTransformer.java XTTransformer.java
               src/scratchpad/src/org/apache/cocoon/transformation
                        EncodeURLTransformer.java XMLDBTransformer.java
  Log:
  Added Licence to EncodeURLTransformer
  Removed references to HttpRequest etc. from EncodeURLTransformer
  Cleaned up lifecycle marker interfaces for transformers
  
  Revision  Changes    Path
  1.5       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java
  
  Index: CIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CIncludeTransformer.java	4 Feb 2002 14:08:33 -0000	1.4
  +++ CIncludeTransformer.java	7 Feb 2002 07:41:24 -0000	1.5
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.parameters.Parameters;
  @@ -79,10 +78,10 @@
    * which surrounds the included content.
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Id: CIncludeTransformer.java,v 1.4 2002/02/04 14:08:33 cziegeler Exp $
  + * @version CVS $Id: CIncludeTransformer.java,v 1.5 2002/02/07 07:41:24 cziegeler Exp $
    */
   public class CIncludeTransformer extends AbstractTransformer
  -implements Recyclable, Composable {
  +implements Composable {
   
       public static final String CINCLUDE_NAMESPACE_URI = "http://apache.org/cocoon/include/1.0";
       public static final String CINCLUDE_INCLUDE_ELEMENT = "include";
  
  
  
  1.6       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/CachingCIncludeTransformer.java
  
  Index: CachingCIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/CachingCIncludeTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CachingCIncludeTransformer.java	4 Feb 2002 14:08:33 -0000	1.5
  +++ CachingCIncludeTransformer.java	7 Feb 2002 07:41:24 -0000	1.6
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  @@ -95,10 +94,10 @@
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:maciejka@tiger.com.pl">Maciek Kaminski</a>
  - * @version CVS $Id: CachingCIncludeTransformer.java,v 1.5 2002/02/04 14:08:33 cziegeler
Exp $
  + * @version CVS $Id: CachingCIncludeTransformer.java,v 1.6 2002/02/07 07:41:24 cziegeler
Exp $
    */
   public class CachingCIncludeTransformer extends AbstractTransformer
  -implements Recyclable, Composable, Cacheable {
  +implements Composable, Cacheable {
   
       public static final String CINCLUDE_NAMESPACE_URI = "http://apache.org/cocoon/include/1.0";
       public static final String CINCLUDE_INCLUDE_ELEMENT = "include";
  
  
  
  1.6       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/FilterTransformer.java
  
  Index: FilterTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/FilterTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FilterTransformer.java	4 Feb 2002 14:17:58 -0000	1.5
  +++ FilterTransformer.java	7 Feb 2002 07:41:24 -0000	1.6
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.Cacheable;
  @@ -84,12 +83,12 @@
    *
    * @author <a href="mailto:sven.beauprez@the-ecorp.com">Sven Beauprez</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Id: FilterTransformer.java,v 1.5 2002/02/04 14:17:58 cziegeler Exp $
  + * @version CVS $Id: FilterTransformer.java,v 1.6 2002/02/07 07:41:24 cziegeler Exp $
    */
   
   public class FilterTransformer
   extends AbstractTransformer
  -implements Poolable, Cacheable {
  +implements Cacheable {
   
       private static final String ELEMENT = "element-name";
       private static final String COUNT = "count";
  
  
  
  1.11      +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
  
  Index: FragmentExtractorTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FragmentExtractorTransformer.java	4 Feb 2002 14:08:33 -0000	1.10
  +++ FragmentExtractorTransformer.java	7 Feb 2002 07:41:24 -0000	1.11
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -103,10 +102,10 @@
    * and the associated generator are very likely to fail on a clustered server.</b>
    *
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Id: FragmentExtractorTransformer.java,v 1.10 2002/02/04 14:08:33 cziegeler
Exp $
  + * @version CVS $Id: FragmentExtractorTransformer.java,v 1.11 2002/02/07 07:41:24 cziegeler
Exp $
    */
   public class FragmentExtractorTransformer extends AbstractTransformer
  -    implements Composable, Disposable, Cacheable, Poolable, Configurable {
  +    implements Composable, Disposable, Cacheable, Configurable {
   
       private static final String EXTRACT_URI_NAME = "extract-uri";
       private static final String EXTRACT_ELEMENT_NAME = "extract-element";
  
  
  
  1.10      +3 -4      xml-cocoon2/src/java/org/apache/cocoon/transformation/I18nTransformer.java
  
  Index: I18nTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/I18nTransformer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- I18nTransformer.java	5 Feb 2002 14:25:33 -0000	1.9
  +++ I18nTransformer.java	7 Feb 2002 07:41:24 -0000	1.10
  @@ -76,8 +76,6 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
   
  -import org.apache.avalon.excalibur.pool.Poolable;
  -import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  @@ -231,12 +229,12 @@
    * @author <a href="mailto:Marcus.Crafter@managesoft.com">Marcus Crafter</a>
    * @author <a href="mailto:Michael.Enke@wincor-nixdorf.com">Michael Enke</a>
    * @author <a href="mailto:lassi.immonen@valkeus.com">Lassi Immonen</a>
  - * @version CVS $Id: I18nTransformer.java,v 1.9 2002/02/05 14:25:33 cziegeler Exp $
  + * @version CVS $Id: I18nTransformer.java,v 1.10 2002/02/07 07:41:24 cziegeler Exp $
    *
    * @todo Move all formatting/parsing routines to I18nUtils
    */
   public class I18nTransformer extends AbstractTransformer
  -    implements Composable, Poolable, Configurable, Recyclable, Disposable {
  +    implements Composable, Configurable, Disposable {
   
       /**
        * The namespace for i18n is "http://apache.org/cocoon/i18n/2.0".
  @@ -1511,6 +1509,7 @@
       }
   
       public void recycle() {
  +        super.recycle();
           // restore untranslated-text if necessary
           if (globalUntranslated != null &&
                !untranslated.equals(globalUntranslated)) {
  
  
  
  1.5       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/LDAPTransformer.java
  
  Index: LDAPTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/LDAPTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LDAPTransformer.java	4 Feb 2002 14:08:34 -0000	1.4
  +++ LDAPTransformer.java	7 Feb 2002 07:41:24 -0000	1.5
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.SourceResolver;
  @@ -119,10 +118,10 @@
    * <br>
    *
    * @author Felix Knecht
  - * @version CVS $Id: LDAPTransformer.java,v 1.4 2002/02/04 14:08:34 cziegeler Exp $
  + * @version CVS $Id: LDAPTransformer.java,v 1.5 2002/02/07 07:41:24 cziegeler Exp $
    */
   
  -public class LDAPTransformer extends AbstractTransformer implements Poolable {
  +public class LDAPTransformer extends AbstractTransformer {
   
       /** The LDAP namespace ("http://apache.org/cocoon/LDAP/1.0")**/
       public static final String my_uri = "http://apache.org/cocoon/LDAP/1.0";
  
  
  
  1.6       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/ReadDOMSessionTransformer.java
  
  Index: ReadDOMSessionTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/ReadDOMSessionTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ReadDOMSessionTransformer.java	6 Feb 2002 17:10:17 -0000	1.5
  +++ ReadDOMSessionTransformer.java	7 Feb 2002 07:41:24 -0000	1.6
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
  @@ -90,10 +89,10 @@
    *  the trigger-element
    *
    * @author <a href="mailto:sven.beauprez@the-ecorp.com">Sven Beauprez</a>
  - * @version CVS $Id: ReadDOMSessionTransformer.java,v 1.5 2002/02/06 17:10:17 cziegeler
Exp $
  + * @version CVS $Id: ReadDOMSessionTransformer.java,v 1.6 2002/02/07 07:41:24 cziegeler
Exp $
    */
   
  -public class ReadDOMSessionTransformer extends AbstractTransformer implements Poolable
{
  +public class ReadDOMSessionTransformer extends AbstractTransformer  {
   
       public static final String DOM_NAME = "dom-name";
       public static final String TRIGGER_ELEMENT = "trigger-element";
  
  
  
  1.7       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SQLTransformer.java	5 Feb 2002 12:11:07 -0000	1.6
  +++ SQLTransformer.java	7 Feb 2002 07:41:24 -0000	1.7
  @@ -55,7 +55,6 @@
   package org.apache.cocoon.transformation;
   
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
  -import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.*;
   import org.apache.avalon.framework.configuration.Configurable;
  @@ -83,12 +82,12 @@
    * @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
    *         (PWR Organisation & Entwicklung)
    * @author <a href="mailto:sven.beauprez@the-ecorp.com">Sven Beauprez</a>
  - * @version CVS $Id: SQLTransformer.java,v 1.6 2002/02/05 12:11:07 cziegeler Exp $
  + * @version CVS $Id: SQLTransformer.java,v 1.7 2002/02/07 07:41:24 cziegeler Exp $
    */
   
   public class SQLTransformer
     extends AbstractTransformer
  -  implements Composable, Recyclable, Disposable, Configurable {
  +  implements Composable, Disposable, Configurable {
   
       /** The SQL namespace **/
       public static final String NAMESPACE = "http://apache.org/cocoon/SQL/2.0";
  
  
  
  1.12      +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TraxTransformer.java	6 Feb 2002 17:10:17 -0000	1.11
  +++ TraxTransformer.java	7 Feb 2002 07:41:24 -0000	1.12
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -162,10 +161,10 @@
    * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
    * @author <a href="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
    * @author <a href="mailto:marbut@hplb.hpl.hp.com">Mark H. Butler</a>
  - * @version CVS $Id: TraxTransformer.java,v 1.11 2002/02/06 17:10:17 cziegeler Exp $
  + * @version CVS $Id: TraxTransformer.java,v 1.12 2002/02/07 07:41:24 cziegeler Exp $
    */
   public class TraxTransformer extends AbstractTransformer
  -implements Transformer, Composable, Recyclable, Configurable, Cacheable, Disposable {
  +implements Transformer, Composable, Configurable, Cacheable, Disposable {
   
       private static final String FILE = "file:";
   
  
  
  
  1.7       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/WriteDOMSessionTransformer.java
  
  Index: WriteDOMSessionTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/WriteDOMSessionTransformer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WriteDOMSessionTransformer.java	6 Feb 2002 17:10:17 -0000	1.6
  +++ WriteDOMSessionTransformer.java	7 Feb 2002 07:41:24 -0000	1.7
  @@ -55,7 +55,6 @@
   
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -93,11 +92,11 @@
    *   dom-root-element is the trigger that will be the root element of the DOM
    *
    * @author <a href="mailto:sven.beauprez@the-ecorp.com">Sven Beauprez</a>
  - * @version CVS $Id: WriteDOMSessionTransformer.java,v 1.6 2002/02/06 17:10:17 cziegeler
Exp $
  + * @version CVS $Id: WriteDOMSessionTransformer.java,v 1.7 2002/02/07 07:41:24 cziegeler
Exp $
    */
   
   public class WriteDOMSessionTransformer extends AbstractTransformer implements
  -  Poolable, Composable, Disposable {
  +  Composable, Disposable {
   
       public static final String DOM_NAME = "dom-name";
       public static final String DOM_ROOT_ELEMENT = "dom-root-element";
  
  
  
  1.7       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java
  
  Index: XIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XIncludeTransformer.java	4 Feb 2002 14:08:34 -0000	1.6
  +++ XIncludeTransformer.java	7 Feb 2002 07:41:24 -0000	1.7
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -88,9 +87,9 @@
    * by the SAX event FSM yet.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version CVS $Id: XIncludeTransformer.java,v 1.6 2002/02/04 14:08:34 cziegeler Exp $
  + * @version CVS $Id: XIncludeTransformer.java,v 1.7 2002/02/07 07:41:24 cziegeler Exp $
    */
  -public class XIncludeTransformer extends AbstractTransformer implements Composable, Recyclable,
Disposable {
  +public class XIncludeTransformer extends AbstractTransformer implements Composable, Disposable
{
   
       private SourceResolver resolver;
   
  
  
  
  1.6       +2 -3      xml-cocoon2/src/java/org/apache/cocoon/transformation/XTTransformer.java
  
  Index: XTTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XTTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XTTransformer.java	4 Feb 2002 14:08:34 -0000	1.5
  +++ XTTransformer.java	7 Feb 2002 07:41:24 -0000	1.6
  @@ -62,7 +62,6 @@
   import com.jclark.xsl.tr.EngineImpl;
   import com.jclark.xsl.tr.ParameterSet;
   import com.jclark.xsl.tr.Sheet;
  -import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentManager;
  @@ -95,10 +94,10 @@
    * This Transformer use the XT processor.
    *
    * @author <a href="mailto:ssahuc@imediation.com">Sahuc Sebastien</a>
  - * @version CVS $Id: XTTransformer.java,v 1.5 2002/02/04 14:08:34 cziegeler Exp $
  + * @version CVS $Id: XTTransformer.java,v 1.6 2002/02/07 07:41:24 cziegeler Exp $
    */
   public class XTTransformer extends DocumentHandlerWrapper
  -implements Transformer, Composable, Loggable, Recyclable, Disposable {
  +implements Transformer, Composable, Loggable, Disposable {
       private Logger log;
   
       /** The component manager */
  
  
  
  1.2       +80 -26    xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/EncodeURLTransformer.java
  
  Index: EncodeURLTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/EncodeURLTransformer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EncodeURLTransformer.java	6 Feb 2002 21:18:49 -0000	1.1
  +++ EncodeURLTransformer.java	7 Feb 2002 07:41:24 -0000	1.2
  @@ -1,18 +1,71 @@
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache Cocoon" and "Apache Software Foundation" must
  + *    not be used to endorse or promote products derived from this
  + *    software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    nor may "Apache" appear in their name, without prior written
  + *    permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
   package org.apache.cocoon.transformation;
  +
   import java.io.IOException;
   import java.util.Map;
  -import javax.servlet.http.HttpServletRequest;
  -import javax.servlet.http.HttpServletResponse;
  -import javax.servlet.http.HttpSession;
  -import org.apache.avalon.excalibur.pool.Poolable;
  -import org.apache.avalon.excalibur.pool.Recyclable;
   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.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.environment.ObjectModelHelper;
  +import org.apache.cocoon.environment.Request;
  +import org.apache.cocoon.environment.Response;
  +import org.apache.cocoon.environment.Session;
   import org.apache.cocoon.environment.SourceResolver;
  -import org.apache.cocoon.environment.http.HttpEnvironment;
   import org.apache.cocoon.transformation.AbstractTransformer;
   import org.apache.regexp.RE;
   import org.apache.regexp.RESyntaxException;
  @@ -44,7 +97,7 @@
    *   ...
    *     <map:transformers>
    *     ...
  - *       <map:transformer type="encodeURL" 
  + *       <map:transformer type="encodeURL"
    *         src="org.apache.cocoon.optional.transformation.EncodeURLTransformer">
    *         <exclude-name>img/@src</exclude-name>
    *         <include-name>.&asterik;/@href|.&asterik;/@src|.&asterik;/@action</include-name>
  @@ -58,11 +111,11 @@
    * </pre></tt>
    *
    * @author     <a href="mailto:bh22351@i-one.at">Bernhard Huber</a>
  - * @version    CVS $Id: EncodeURLTransformer.java,v 1.1 2002/02/06 21:18:49 huber Exp $
  + * @version    CVS $Id: EncodeURLTransformer.java,v 1.2 2002/02/07 07:41:24 cziegeler Exp
$
    *
    * @cocoon:name encodeURL
    * @cocoon:status scratchpad
  - * @cocoon:parameter name="exclude-name" 
  + * @cocoon:parameter name="exclude-name"
    *   default-value="img/@src"
    *   description="RE pattern for excluding attributes from encode URL rewriting"
    * @cocoon:parameter name="include-name"
  @@ -71,7 +124,9 @@
    *
    */
   
  -public class EncodeURLTransformer extends AbstractTransformer implements Configurable,
Recyclable {
  +public class EncodeURLTransformer
  +  extends AbstractTransformer
  +  implements Configurable {
   
       /**
        * Configuration name for specifying excluding patterns,
  @@ -89,14 +144,14 @@
       public final static String INCLUDE_NAME = "include-name";
   
       /**
  -     * Configuration default exclude pattern, 
  +     * Configuration default exclude pattern,
        * ie img/@src
        *
        * @since
        */
       public final static String EXCLUDE_NAME_DEFAULT = "img/@src";
       /**
  -     * Configuration default exclude pattern, 
  +     * Configuration default exclude pattern,
        * ie .*\/@href|.*\/@action|frame/@src
        *
        * @since
  @@ -110,8 +165,8 @@
       private String excludeName;
   
       private ElementAttributeMatching elementAttributeMatching;
  -    private HttpServletResponse response;
  -    private HttpServletRequest request;
  +    private Response response;
  +    private Request request;
   
   
       /**
  @@ -126,7 +181,7 @@
        *
        */
       public void setup(SourceResolver resolver, Map objectModel, String source, Parameters
parameters)
  -             throws ProcessingException, SAXException, IOException {
  +    throws ProcessingException, SAXException, IOException {
   
           includeName = parameters.getParameter(EncodeURLTransformer.INCLUDE_NAME, this.includeNameConfigure);
           excludeName = parameters.getParameter(EncodeURLTransformer.EXCLUDE_NAME, this.excludeNameConfigure);
  @@ -139,10 +194,8 @@
               throw new ProcessingException(message, reex);
           }
   
  -        response =
  -                (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
  -        request =
  -                (HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);
  +        this.response = ObjectModelHelper.getResponse(objectModel);
  +        this.request = ObjectModelHelper.getRequest(objectModel);
       }
   
   
  @@ -180,8 +233,9 @@
        * @since
        */
       public void recycle() {
  -        response = null;
  -        request = null;
  +        super.recycle();
  +        this.response = null;
  +        this.request = null;
           elementAttributeMatching = null;
       }
   
  @@ -234,16 +288,16 @@
        * </p>
        *
        * @param  url       the URL probably without sessionid.
  -     * @param  request   the http request
  -     * @param  response  the http response
  +     * @param  request   the request
  +     * @param  response  the response
        * @return           String the original url inclusive the sessionid
        * @since
        */
  -    private String encodeURL(String url, HttpServletRequest request, HttpServletResponse
response) {
  +    private String encodeURL(String url, Request request, Response response) {
           String encoded_url;
           if (response != null) {
               // As some servlet-engine does not check if url has been already rewritten
  -            HttpSession session = request.getSession(false);
  +            Session session = request.getSession(false);
               if (session != null && url.indexOf(session.getId()) > -1) {
                   encoded_url = url;
               } else {
  @@ -265,7 +319,7 @@
        * </p>
        *
        * @author     <a href="mailto:bh22351@i-one.at">Bernhard Huber</a>
  -     * @version    CVS $Id: EncodeURLTransformer.java,v 1.1 2002/02/06 21:18:49 huber Exp
$
  +     * @version    CVS $Id: EncodeURLTransformer.java,v 1.2 2002/02/07 07:41:24 cziegeler
Exp $
        */
       public class ElementAttributeMatching {
           /**
  
  
  
  1.5       +2 -3      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/XMLDBTransformer.java
  
  Index: XMLDBTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/XMLDBTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLDBTransformer.java	4 Feb 2002 14:08:34 -0000	1.4
  +++ XMLDBTransformer.java	7 Feb 2002 07:41:24 -0000	1.5
  @@ -54,7 +54,6 @@
    */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.parameters.Parameters;
  @@ -154,10 +153,10 @@
    * </ul>
    *
    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version CVS $Id: XMLDBTransformer.java,v 1.4 2002/02/04 14:08:34 cziegeler Exp $
  + * @version CVS $Id: XMLDBTransformer.java,v 1.5 2002/02/07 07:41:24 cziegeler Exp $
    */
   public class XMLDBTransformer extends AbstractTransformer
  -    implements Disposable, Cacheable, Poolable, Configurable, Initializable {
  +    implements Disposable, Cacheable, Configurable, Initializable {
   
       private static String XMLDB_URI = "http://apache.org/cocoon/xmldb/1.0";
       private static String XMLDB_QUERY_ELEMENT = "query";
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message