vgritsenko    2003/09/06 23:05:06

  Modified:    
src/blocks/python/java/org/apache/cocoon/components/language/markup/xsp
                        PythonGenerator.java
               src/blocks/python/mocks/org/python/core Py.java PyCode.java
               src/blocks/python/mocks/org/python/util
                        PythonInterpreter.java
  Added:       src/blocks/python/mocks/org/python/core PyObject.java
  Removed:     src/blocks/python/conf python.samplesxpipe
               src/blocks/python/samples hello.xsp
  Log:
  Fix mocks method signatures. Remove obsolete samples config.
  
  Revision  Changes    Path
  1.3       +4 -6      
cocoon-2.1/src/blocks/python/java/org/apache/cocoon/components/language/markup/xsp/PythonGenerator.java
  
  Index: PythonGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/python/java/org/apache/cocoon/components/language/markup/xsp/PythonGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PythonGenerator.java      5 Sep 2003 07:31:45 -0000       1.2
  +++ PythonGenerator.java      7 Sep 2003 06:05:05 -0000       1.3
  @@ -141,11 +141,9 @@
                   getLogger().debug("Compiling script " + file);
               }
               
  -            this.code = Py.compile_flags(
  -                    new FileInputStream(this.file),
  -                    this.file.toString(),
  -                    "exec",
  -                    null);
  +            this.code = Py.compile(new FileInputStream(this.file),
  +                                   this.file.toString(),
  +                                   "exec");
           } catch (Exception e) {
               this.compileError = e;
           }
  
  
  
  1.2       +4 -6      
cocoon-2.1/src/blocks/python/mocks/org/python/core/Py.java
  
  Index: Py.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/python/mocks/org/python/core/Py.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Py.java   9 Mar 2003 00:06:04 -0000       1.1
  +++ Py.java   7 Sep 2003 06:05:05 -0000       1.2
  @@ -59,11 +59,9 @@
    */
   public class Py {
   
  -     public static PyCode compile_flags(
  -             InputStream fileInputStream,
  -             String string,
  -             String string1,
  -             Object object)
  +    public static PyCode compile(InputStream fileInputStream,
  +                                 String string,
  +                                 String string1)
       {
           throw new NoSuchMethodError("This is a mock object");
       }
  
  
  
  1.2       +2 -2      
cocoon-2.1/src/blocks/python/mocks/org/python/core/PyCode.java
  
  Index: PyCode.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/python/mocks/org/python/core/PyCode.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PyCode.java       9 Mar 2003 00:06:04 -0000       1.1
  +++ PyCode.java       7 Sep 2003 06:05:05 -0000       1.2
  @@ -55,6 +55,6 @@
    * 
    * @version CVS $Id$
    */
  -public class PyCode {
  +public class PyCode extends PyObject {
   
   }
  
  
  
  1.1                  
cocoon-2.1/src/blocks/python/mocks/org/python/core/PyObject.java
  
  Index: PyObject.java
  ===================================================================
  /*
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, 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
      [EMAIL PROTECTED]
  
   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 (INCLU-
   DING, 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 and was  originally created by
   Stefano Mazzocchi  <[EMAIL PROTECTED]>. For more  information on the Apache
   Software Foundation, please see <http://www.apache.org/>.
  
  */
  package org.python.core;
  
  /**
   * Mock class providing the declarations required to compile the Cocoon code 
when
   * the actual library is not present.
   * 
   * @version CVS $Id: PyObject.java,v 1.1 2003/09/07 06:05:05 vgritsenko Exp $
   */
  public class PyObject {
  
  }
  
  
  
  1.2       +10 -11    
cocoon-2.1/src/blocks/python/mocks/org/python/util/PythonInterpreter.java
  
  Index: PythonInterpreter.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/python/mocks/org/python/util/PythonInterpreter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PythonInterpreter.java    9 Mar 2003 00:06:04 -0000       1.1
  +++ PythonInterpreter.java    7 Sep 2003 06:05:06 -0000       1.2
  @@ -51,7 +51,7 @@
   
   import java.util.Properties;
   
  -import org.python.core.PyCode;
  +import org.python.core.PyObject;
   
   /**
    * Mock class providing the declarations required to compile the Cocoon code 
when
  @@ -61,18 +61,17 @@
    */
   public class PythonInterpreter {
   
  -     public static void initialize(
  -             Properties properties,
  -             Properties properties1,
  -             String[] strings) {
  +    public static void initialize(Properties preProperties,
  +                                  Properties postProperties,
  +                                  String[] argv) {
           throw new NoSuchMethodError("This is a mock object");
  -     }
  +    }
   
  -     public void set(String string, Object obj) {
  +    public void set(String string, Object obj) {
           throw new NoSuchMethodError("This is a mock object");
  -     }
  +    }
   
  -     public void exec(PyCode code) {
  +    public void exec(PyObject code) {
           throw new NoSuchMethodError("This is a mock object");
  -     }
  +    }
   }
  
  
  

Reply via email to