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/java/org/apache/cocoon/components/source/impl AvalonToCocoonSource.java FileSource.java
Date Tue, 04 Jun 2002 07:11:27 GMT
cziegeler    2002/06/04 00:11:27

  Modified:    lib      jars.xml
               src/java/org/apache/cocoon/acting ServerPagesAction.java
               src/java/org/apache/cocoon/components/language/generator
                        GeneratorSelector.java
               src/java/org/apache/cocoon/components/language/programming
                        Program.java
               src/java/org/apache/cocoon/components/language/programming/java
                        JavaProgram.java
               src/java/org/apache/cocoon/components/language/programming/javascript
                        JavascriptProgram.java
               src/java/org/apache/cocoon/components/language/programming/python
                        PythonProgram.java
               src/java/org/apache/cocoon/components/source
                        AbstractSAXSource.java AbstractStreamSource.java
                        AbstractStreamWriteableSource.java
               src/java/org/apache/cocoon/components/source/impl
                        AvalonToCocoonSource.java FileSource.java
  Added:       lib/core avalon-excalibur-20020603.jar
  Removed:     lib/core avalon-excalibur-20020506.jar
  Log:
  Updated to latest Excalibur
  Added improvements for source resolving from Volker Schmitt [volker.schmitt@basf-it-services.com]
  
  Revision  Changes    Path
  1.9       +1 -1      xml-cocoon2/lib/jars.xml
  
  Index: jars.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/lib/jars.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jars.xml	3 Jun 2002 08:08:57 -0000	1.8
  +++ jars.xml	4 Jun 2002 07:11:25 -0000	1.9
  @@ -15,7 +15,7 @@
   	<description>Part of jakarta-avalon, it is a set of classes and patterns that
          support high level server development.</description>
   	<used-by>Cocoon</used-by>
  -	<lib>core/avalon-excalibur-20020506.jar</lib>
  +	<lib>core/avalon-excalibur-20020603.jar</lib>
   	<homepage>http://jakarta.apache.org/avalon/excalibur/</homepage>
    </file>
    <file>
  
  
  
  1.1                  xml-cocoon2/lib/core/avalon-excalibur-20020603.jar
  
  	<<Binary file>>
  
  
  1.7       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/acting/ServerPagesAction.java
  
  Index: ServerPagesAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/acting/ServerPagesAction.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ServerPagesAction.java	22 Feb 2002 06:59:26 -0000	1.6
  +++ ServerPagesAction.java	4 Jun 2002 07:11:26 -0000	1.7
  @@ -105,7 +105,7 @@
    * </pre>
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Id: ServerPagesAction.java,v 1.6 2002/02/22 06:59:26 cziegeler Exp $
  + * @version CVS $Id: ServerPagesAction.java,v 1.7 2002/06/04 07:11:26 cziegeler Exp $
    */
   public class ServerPagesAction
           extends ConfigurableComposerAction
  @@ -128,7 +128,7 @@
                   this.manager,
                   null, // Context
                   null,  // RoleManager
  -                this.logKitManager  // LogKitManager
  +                null  // LogKitManager
               );
   
               this.generatorHandler.setLogger(getLogger());
  
  
  
  1.10      +23 -6     xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java
  
  Index: GeneratorSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- GeneratorSelector.java	28 Feb 2002 14:26:43 -0000	1.9
  +++ GeneratorSelector.java	4 Jun 2002 07:11:26 -0000	1.10
  @@ -53,7 +53,9 @@
   import org.apache.avalon.excalibur.component.ComponentHandler;
   import org.apache.avalon.excalibur.component.ExcaliburComponentSelector;
   import org.apache.avalon.excalibur.component.RoleManager;
  +import org.apache.avalon.excalibur.component.LogkitLoggerManager;
   import org.apache.avalon.excalibur.logger.LogKitManager;
  +import org.apache.avalon.excalibur.logger.LoggerManager;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -77,7 +79,7 @@
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version CVS $Id: GeneratorSelector.java,v 1.9 2002/02/28 14:26:43 vgritsenko Exp $
  + * @version CVS $Id: GeneratorSelector.java,v 1.10 2002/06/04 07:11:26 cziegeler Exp $
    */
   public class GeneratorSelector extends ExcaliburComponentSelector implements Disposable
{
   
  @@ -88,7 +90,7 @@
       /** The component manager */
       protected ComponentManager manager;
   
  -    private LogKitManager logKitManager;
  +    private LogkitLoggerManager logKitManager;
   
       protected Context context;
   
  @@ -110,9 +112,24 @@
           this.roles = roleMgr;
       }
   
  -    public void setLogKitManager(LogKitManager logKitMgr) {
  -        super.setLogKitManager(logKitMgr);
  -        this.logKitManager = logKitMgr;
  +    /**
  +     * Configure the LogKitManager
  +     */
  +    public void setLogKitManager( final LogKitManager logkit ) {
  +        super.setLogKitManager(logkit);
  +        if( null == this.logKitManager ) {
  +             this.logKitManager = new LogkitLoggerManager( null, logkit );
  +        }
  +    }
  +
  +    /**
  +     * Configure the LoggerManager.
  +     */
  +    public void setLoggerManager( final LoggerManager logkit ) {
  +        super.setLoggerManager(logkit);
  +        if( null ==  this.logKitManager ) {
  +             this.logKitManager = new LogkitLoggerManager( logkit, null );
  +        }
       }
   
       public void compose (ComponentManager manager) throws ComponentException {
  @@ -166,7 +183,7 @@
           try {
               final ComponentHandler handler =
                       generator.getHandler(newManager, this.context, this.roles, this.logKitManager);
  -            handler.setLogger(getLogger());
  +            handler.setLogger(getLogkitLogger());
               handler.initialize();
               this.componentHandlers.put(hint, handler);
               if (getLogger().isDebugEnabled()) {
  
  
  
  1.3       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/Program.java
  
  Index: Program.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/Program.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Program.java	22 Feb 2002 07:00:09 -0000	1.2
  +++ Program.java	4 Jun 2002 07:11:26 -0000	1.3
  @@ -55,7 +55,7 @@
   
   import org.apache.avalon.excalibur.component.ComponentHandler;
   import org.apache.avalon.excalibur.component.RoleManager;
  -import org.apache.avalon.excalibur.logger.LogKitManager;
  +import org.apache.avalon.excalibur.component.LogkitLoggerManager;
   
   import org.apache.cocoon.components.language.generator.CompiledComponent;
   
  @@ -64,7 +64,7 @@
    * For compilable languages this is the wrapper for a Java Class object.
    *
    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version CVS $Id: Program.java,v 1.2 2002/02/22 07:00:09 cziegeler Exp $
  + * @version CVS $Id: Program.java,v 1.3 2002/06/04 07:11:26 cziegeler Exp $
    */
   public interface Program {
   
  @@ -79,7 +79,7 @@
       ComponentHandler getHandler(ComponentManager manager,
                                   Context context,
                                   RoleManager roles,
  -                                LogKitManager logKitManager) throws Exception;
  +                                LogkitLoggerManager logKitManager) throws Exception;
   
       /**
        * Create new instance of the program.
  
  
  
  1.3       +4 -4      xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/java/JavaProgram.java
  
  Index: JavaProgram.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/java/JavaProgram.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaProgram.java	22 Feb 2002 07:00:09 -0000	1.2
  +++ JavaProgram.java	4 Jun 2002 07:11:26 -0000	1.3
  @@ -56,17 +56,17 @@
   
   import org.apache.avalon.excalibur.component.ComponentHandler;
   import org.apache.avalon.excalibur.component.RoleManager;
  -import org.apache.avalon.excalibur.logger.LogKitManager;
  +import org.apache.avalon.excalibur.component.LogkitLoggerManager;
   
   import org.apache.cocoon.components.language.generator.CompiledComponent;
   import org.apache.cocoon.components.language.programming.Program;
   
   /**
  - * This represents program in Java language. 
  + * This represents program in Java language.
    * It wraps Java Class object.
    *
    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version CVS $Id: JavaProgram.java,v 1.2 2002/02/22 07:00:09 cziegeler Exp $
  + * @version CVS $Id: JavaProgram.java,v 1.3 2002/06/04 07:11:26 cziegeler Exp $
    */
   public class JavaProgram implements Program {
   
  @@ -83,7 +83,7 @@
       public ComponentHandler getHandler(ComponentManager manager,
                                          Context context,
                                          RoleManager roles,
  -                                       LogKitManager logKitManager)
  +                                       LogkitLoggerManager logKitManager)
               throws Exception {
   
           return ComponentHandler.getComponentHandler(
  
  
  
  1.5       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/javascript/JavascriptProgram.java
  
  Index: JavascriptProgram.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/javascript/JavascriptProgram.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JavascriptProgram.java	18 Apr 2002 13:58:21 -0000	1.4
  +++ JavascriptProgram.java	4 Jun 2002 07:11:26 -0000	1.5
  @@ -57,7 +57,7 @@
   
   import org.apache.avalon.excalibur.component.ComponentHandler;
   import org.apache.avalon.excalibur.component.RoleManager;
  -import org.apache.avalon.excalibur.logger.LogKitManager;
  +import org.apache.avalon.excalibur.component.LogkitLoggerManager;
   
   import org.apache.cocoon.components.language.generator.CompiledComponent;
   import org.apache.cocoon.components.language.programming.Program;
  @@ -70,7 +70,7 @@
    * This class represents program in the Javascript language.
    *
    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version CVS $Id: JavascriptProgram.java,v 1.4 2002/04/18 13:58:21 vgritsenko Exp $
  + * @version CVS $Id: JavascriptProgram.java,v 1.5 2002/06/04 07:11:26 cziegeler Exp $
    */
   public class JavascriptProgram implements Program {
   
  @@ -103,7 +103,7 @@
       public ComponentHandler getHandler(ComponentManager manager,
                                          Context context,
                                          RoleManager roles,
  -                                       LogKitManager logKitManager)
  +                                       LogkitLoggerManager logKitManager)
               throws Exception {
   
           return ComponentHandler.getComponentHandler(
  
  
  
  1.3       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/python/PythonProgram.java
  
  Index: PythonProgram.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/programming/python/PythonProgram.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PythonProgram.java	18 Apr 2002 13:58:21 -0000	1.2
  +++ PythonProgram.java	4 Jun 2002 07:11:27 -0000	1.3
  @@ -62,7 +62,7 @@
   
   import org.apache.avalon.excalibur.component.ComponentHandler;
   import org.apache.avalon.excalibur.component.RoleManager;
  -import org.apache.avalon.excalibur.logger.LogKitManager;
  +import org.apache.avalon.excalibur.component.LogkitLoggerManager;
   
   import org.apache.cocoon.components.language.programming.Program;
   import org.apache.cocoon.components.language.generator.CompiledComponent;
  @@ -75,7 +75,7 @@
    * This class represents program in the Python language.
    *
    * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  - * @version CVS $Id: PythonProgram.java,v 1.2 2002/04/18 13:58:21 vgritsenko Exp $
  + * @version CVS $Id: PythonProgram.java,v 1.3 2002/06/04 07:11:27 cziegeler Exp $
    */
   public class PythonProgram implements Program {
   
  @@ -106,7 +106,7 @@
       public ComponentHandler getHandler(ComponentManager manager,
                                          Context context,
                                          RoleManager roles,
  -                                       LogKitManager logKitManager)
  +                                       LogkitLoggerManager logKitManager)
               throws Exception {
   
           return ComponentHandler.getComponentHandler(
  
  
  
  1.6       +2 -1      xml-cocoon2/src/java/org/apache/cocoon/components/source/AbstractSAXSource.java
  
  Index: AbstractSAXSource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/AbstractSAXSource.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractSAXSource.java	22 Feb 2002 07:00:13 -0000	1.5
  +++ AbstractSAXSource.java	4 Jun 2002 07:11:27 -0000	1.6
  @@ -79,8 +79,9 @@
    * optionally override getLastModified() and getContentLength() to
    * obtain a valid Source implementation.
    *
  + * @deprecated Use the new Avalon Excalibur Source Resolving
    * @author <a href="mailto:gianugo@apache.org">Gianugo Rabellino</a>
  - * @version $Id: AbstractSAXSource.java,v 1.5 2002/02/22 07:00:13 cziegeler Exp $
  + * @version $Id: AbstractSAXSource.java,v 1.6 2002/06/04 07:11:27 cziegeler Exp $
    */
   
   public abstract class AbstractSAXSource
  
  
  
  1.4       +2 -1      xml-cocoon2/src/java/org/apache/cocoon/components/source/AbstractStreamSource.java
  
  Index: AbstractStreamSource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/AbstractStreamSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractStreamSource.java	19 Apr 2002 11:02:57 -0000	1.3
  +++ AbstractStreamSource.java	4 Jun 2002 07:11:27 -0000	1.4
  @@ -98,9 +98,10 @@
    * considered to contain HTML if <code>isHTMLContent()</code> returns
    * true.
    *
  + * @deprecated Use the new Avalon Excalibur Source Resolving
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version $Id: AbstractStreamSource.java,v 1.3 2002/04/19 11:02:57 cziegeler Exp $
  + * @version $Id: AbstractStreamSource.java,v 1.4 2002/06/04 07:11:27 cziegeler Exp $
    */
   
   public abstract class AbstractStreamSource extends AbstractLoggable
  
  
  
  1.4       +2 -1      xml-cocoon2/src/java/org/apache/cocoon/components/source/AbstractStreamWriteableSource.java
  
  Index: AbstractStreamWriteableSource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/AbstractStreamWriteableSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractStreamWriteableSource.java	7 May 2002 08:44:35 -0000	1.3
  +++ AbstractStreamWriteableSource.java	4 Jun 2002 07:11:27 -0000	1.4
  @@ -83,8 +83,9 @@
    * the sitemap 'xml' serializer to write SAX events to the stream returned by
    * <code>getOutputStream()</code>.
    *
  + * @deprecated Use the new Avalon Excalibur Source Resolving
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version $Id: AbstractStreamWriteableSource.java,v 1.3 2002/05/07 08:44:35 cziegeler
Exp $
  + * @version $Id: AbstractStreamWriteableSource.java,v 1.4 2002/06/04 07:11:27 cziegeler
Exp $
    */
   
   public abstract class AbstractStreamWriteableSource
  
  
  
  1.4       +5 -1      xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/AvalonToCocoonSource.java
  
  Index: AvalonToCocoonSource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/AvalonToCocoonSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AvalonToCocoonSource.java	26 Apr 2002 10:42:16 -0000	1.3
  +++ AvalonToCocoonSource.java	4 Jun 2002 07:11:27 -0000	1.4
  @@ -54,6 +54,7 @@
   import java.io.InputStream;
   import org.apache.avalon.excalibur.xml.XMLizable;
   import org.apache.excalibur.source.*;
  +import org.apache.excalibur.source.impl.validity.FileTimeStampValidity;
   import org.apache.excalibur.source.impl.validity.TimeStampValidity;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.Environment;
  @@ -68,7 +69,7 @@
    * resolve() method of the environment!
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2002/04/26 10:42:16 $
  + * @version CVS $Revision: 1.4 $ $Date: 2002/06/04 07:11:27 $
    */
   
   public final class AvalonToCocoonSource
  @@ -102,6 +103,9 @@
           final SourceValidity validity = this.source.getValidity();
           if (validity instanceof TimeStampValidity) {
               return ((TimeStampValidity)validity).getTimeStamp();
  +        }
  +        if (validity instanceof FileTimeStampValidity) {
  +            return ((FileTimeStampValidity)validity).getTimeStamp();
           }
           return 0;
       }
  
  
  
  1.2       +2 -7      xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/FileSource.java
  
  Index: FileSource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/FileSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileSource.java	8 May 2002 07:03:58 -0000	1.1
  +++ FileSource.java	4 Jun 2002 07:11:27 -0000	1.2
  @@ -74,16 +74,13 @@
    * for 'file:/' system IDs.
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version $Id: FileSource.java,v 1.1 2002/05/08 07:03:58 cziegeler Exp $
  + * @version $Id: FileSource.java,v 1.2 2002/06/04 07:11:27 cziegeler Exp $
    */
   
   public class FileSource
       extends URLSource
       implements WriteableSource {
   
  -    /** The underlying file. */
  -    protected File file;
  -
       /**
        * Initialize a new object from a <code>URL</code>.
        * @param parameters This is optional
  @@ -93,11 +90,9 @@
       throws IOException {
           super.init( url, parameters );
   
  -        if (!isFile) {
  +        if ( null == this.file ) {
               throw new IllegalArgumentException("Malformed url for a file source : " + url);
           }
  -
  -        this.file = new File(this.systemId.substring(5)); // 5 == "file:".length()
       }
   
       /**
  
  
  

----------------------------------------------------------------------
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