cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/util RoleUtils.java
Date Fri, 16 Feb 2001 15:38:34 GMT
bloritsch    01/02/16 07:38:34

  Modified:    src/org/apache/cocoon/components/language/generator Tag:
                        xml-cocoon2 ProgramGenerator.java
                        ProgramGeneratorImpl.java
               src/org/apache/cocoon/components/language/programming Tag:
                        xml-cocoon2 CompiledProgrammingLanguage.java
                        ProgrammingLanguage.java
               src/org/apache/cocoon/components/language/programming/java
                        Tag: xml-cocoon2 JavaLanguage.java
               src/org/apache/cocoon/components/store Tag: xml-cocoon2
                        FilesystemStore.java Store.java
               src/org/apache/cocoon/generation Tag: xml-cocoon2
                        AbstractServerPage.java ServletGenerator.java
               src/org/apache/cocoon/sitemap Tag: xml-cocoon2 Sitemap.java
               src/org/apache/cocoon/util Tag: xml-cocoon2 RoleUtils.java
  Log:
  Updated ProgramGenerator system so that interfaces are narrowed, and the
  cache and repository are universal.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +2 -2      xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGenerator.java
  
  Index: ProgramGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGenerator.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- ProgramGenerator.java	2000/12/11 16:06:37	1.1.2.7
  +++ ProgramGenerator.java	2001/02/16 15:38:27	1.1.2.8
  @@ -17,7 +17,7 @@
    * documents writeen in a <code>MarkupLanguage</code>
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/12/11 16:06:37 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/16 15:38:27 $
    */
   public interface ProgramGenerator extends Component {
     /**
  @@ -32,7 +32,7 @@
      * @return The loaded object
      * @exception Exception If an error occurs during generation or loading
      */
  -  Object load(
  +  CompiledComponent load(
       File file, String markupLanguage, String programmingLanguage,
       EntityResolver resolver
     ) throws Exception;
  
  
  
  1.1.2.26  +24 -40    xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java
  
  Index: ProgramGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java,v
  retrieving revision 1.1.2.25
  retrieving revision 1.1.2.26
  diff -u -r1.1.2.25 -r1.1.2.26
  --- ProgramGeneratorImpl.java	2001/02/15 20:28:45	1.1.2.25
  +++ ProgramGeneratorImpl.java	2001/02/16 15:38:27	1.1.2.26
  @@ -26,15 +26,14 @@
   import org.apache.avalon.Parameters;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.Roles;
  -import org.apache.cocoon.components.store.MemoryStore;
  -import org.apache.cocoon.components.store.FilesystemStore;
  +import org.apache.cocoon.components.store.Store;
   import org.apache.cocoon.components.language.LanguageException;
   import org.apache.cocoon.components.language.markup.MarkupLanguage;
   import org.apache.cocoon.components.language.programming.CodeFormatter;
   import org.apache.cocoon.components.language.programming.ProgrammingLanguage;
   import org.apache.cocoon.util.IOUtils;
  -import org.apache.log.Logger;
   import org.apache.avalon.Loggable;
  +import org.apache.avalon.AbstractLoggable;
   import org.w3c.dom.Document;
   import org.w3c.dom.Document;
   import org.xml.sax.InputSource;
  @@ -44,19 +43,18 @@
   /**
    * The default implementation of <code>ProgramGenerator</code>
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.25 $ $Date: 2001/02/15 20:28:45 $
  + * @version CVS $Revision: 1.1.2.26 $ $Date: 2001/02/16 15:38:27 $
    */
  -public class ProgramGeneratorImpl implements ProgramGenerator, Contextualizable, Composer,
Configurable, ThreadSafe, Loggable {
  -    private Logger log;
  +public class ProgramGeneratorImpl extends AbstractLoggable implements ProgramGenerator,
Contextualizable, Composer, Configurable, ThreadSafe {
   
       /** The auto-reloading option */
  -    protected boolean autoReload = true;
  +    protected boolean autoReload = false;
   
       /** The in-memory store */
  -    protected MemoryStore cache = new MemoryStore();
  +    protected Store cache;
   
       /** The repository store */
  -    FilesystemStore repository;
  +    protected Store repository;
   
       /** The component manager */
       protected ComponentManager manager = null;
  @@ -70,19 +68,11 @@
       /** The working directory */
       protected File workDir;
   
  -    public void setLogger(Logger logger) {
  -        if (this.log == null) {
  -            this.log = logger;
  -        }
  -    }
  -
  -    public void contextualize(Context appContext) {
  -        this.workDir = (File) appContext.get(Constants.CONTEXT_WORK_DIR);
  -        try {
  -            this.repository = new FilesystemStore(this.workDir);
  -        } catch (IOException ioe) {
  -            log.error("Could not get the Work Directory", ioe);
  -        }
  +    /** Contextualize this class */
  +    public void contextualize(Context context) {
  +       if (this.workDir == null) {
  +           this.workDir = (File) context.get(Constants.CONTEXT_WORK_DIR);
  +       }
       }
   
       /**
  @@ -94,10 +84,12 @@
           if ((this.manager == null) && (manager != null)) {
               this.manager = manager;
               try {
  +                this.cache = (Store) this.manager.lookup(Roles.STORE);
  +                this.repository = (Store) this.manager.lookup(Roles.REPOSITORY);
                   this.markupSelector = (ComponentSelector)this.manager.lookup(Roles.MARKUP_LANGUAGE);
                   this.languageSelector = (ComponentSelector)this.manager.lookup(Roles.PROGRAMMING_LANGUAGE);
               } catch (Exception e) {
  -                log.warn("Could not lookup Component", e);
  +                getLogger().warn("Could not lookup Component", e);
               }
           }
       }
  @@ -120,7 +112,7 @@
        * @return The loaded program instance
        * @exception Exception If an error occurs during generation or loading
        */
  -    public Object load(File file, String markupLanguageName, String programmingLanguageName,
  +    public CompiledComponent load(File file, String markupLanguageName, String programmingLanguageName,
           EntityResolver resolver) throws Exception {
               // Get markup and programming languages
               MarkupLanguage markupLanguage = (MarkupLanguage)this.markupSelector.select(markupLanguageName);
  @@ -130,14 +122,14 @@
               // Create filesystem store
               // Set filenames
               String filename = IOUtils.getFullFilename(file);
  -            String normalizedName = repository.normalizedFilename(filename);
  +            String normalizedName = IOUtils.normalizedFilename(filename);
               String sourceExtension = programmingLanguage.getSourceExtension();
               // Ensure no 2 requests for the same file overlap
  -            Object program = null;
  -            Object programInstance = null;
  +            Class program = null;
  +            CompiledComponent programInstance = null;
               synchronized(filename.intern()) {
                   // Attempt to load program object from cache
  -                program = this.cache.get(filename);
  +                program = (Class) this.cache.get(filename);
                   try {
                       if (program == null) {
             /*
  @@ -152,20 +144,17 @@
                       // Instantiate program
                       programInstance = programmingLanguage.instantiate(program);
                       if (programInstance instanceof Loggable) {
  -                        ((Loggable)programInstance).setLogger(this.log);
  -                    }
  -                    if (programInstance instanceof Composer) {
  -                        ((Composer)programInstance).compose(this.manager);
  +                        ((Loggable)programInstance).setLogger(getLogger());
                       }
  -                } catch (LanguageException e) { log.debug("Language Exception", e); }
  +                    programInstance.compose(this.manager);
  +                } catch (LanguageException e) { getLogger().debug("Language Exception",
e); }
   
         /*
            FIXME: It's the program (not the instance) that must
            be queried for changes!!!
         */
   
  -                if (this.autoReload && programInstance != null && programInstance
instanceof Modifiable &&
  -                    ((Modifiable)programInstance).modifiedSince(file.lastModified())) {
  +                if (this.autoReload && programInstance != null && programInstance.modifiedSince(file.lastModified()))
{
                           // Unload program
                           programmingLanguage.unload(program, normalizedName, this.workDir);
                           // Invalidate previous program/instance pair
  @@ -186,11 +175,6 @@
                       // Store generated code
                       String sourceFilename = filename + "." + sourceExtension;
                       repository.store(sourceFilename, code);
  -                    // Verify source file generation was successful
  -                    File sourceFile = (File)repository.get(sourceFilename);
  -                    if (sourceFile == null) {
  -                        throw new IOException("Error creating source file: " + sourceFilename);
  -                    }
                       // [Compile]/Load generated program
                       program = programmingLanguage.load(normalizedName, this.workDir, encoding);
                       // Store generated program in cache
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.15  +8 -7      xml-cocoon/src/org/apache/cocoon/components/language/programming/Attic/CompiledProgrammingLanguage.java
  
  Index: CompiledProgrammingLanguage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/programming/Attic/CompiledProgrammingLanguage.java,v
  retrieving revision 1.1.2.14
  retrieving revision 1.1.2.15
  diff -u -r1.1.2.14 -r1.1.2.15
  --- CompiledProgrammingLanguage.java	2001/02/15 20:29:04	1.1.2.14
  +++ CompiledProgrammingLanguage.java	2001/02/16 15:38:28	1.1.2.15
  @@ -17,13 +17,14 @@
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.Roles;
   import org.apache.cocoon.util.ClassUtils;
  +import org.apache.cocoon.util.IOUtils;
   import org.apache.cocoon.components.language.LanguageException;
   
   /**
    * A compiled programming language. This class extends <code>AbstractProgrammingLanguage</code>
adding support for compilation
    * and object program files
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.14 $ $Date: 2001/02/15 20:29:04 $
  + * @version CVS $Revision: 1.1.2.15 $ $Date: 2001/02/16 15:38:28 $
    */
   public abstract class CompiledProgrammingLanguage extends AbstractProgrammingLanguage implements
Contextualizable {
       /** The compiler */
  @@ -92,7 +93,7 @@
        * @return The loaded object program
        * @exception LanguageException If an error occurs during loading
        */
  -    protected abstract Object loadProgram(String filename, File baseDirectory) throws LanguageException;
  +    protected abstract Class loadProgram(String filename, File baseDirectory) throws LanguageException;
   
       /**
        * Compile a source file yielding a loadable object file.
  @@ -111,7 +112,7 @@
        * @return The loaded object program
        * @exception LanguageException If an error occurs during compilation
        */
  -    public Object load(String filename, File baseDirectory, String encoding) throws LanguageException
{
  +    public Class load(String filename, File baseDirectory, String encoding) throws LanguageException
{
           // Does object file exist? Load and return instance
           File objectFile = new File(baseDirectory, filename + "." + this.getObjectExtension());
           if (objectFile.exists() && objectFile.isFile() && objectFile.canRead())
{
  @@ -120,19 +121,19 @@
           // Does source file exist?
           File sourceFile = new File(baseDirectory, filename + "." + this.getSourceExtension());
           if (!sourceFile.exists()) {
  -            throw new LanguageException("Can't load program - File doesn't exist: " + sourceFile.toString());
  +            throw new LanguageException("Can't load program - File doesn't exist: " + IOUtils.getFullFilename(sourceFile));
           }
           if (!sourceFile.isFile()) {
  -            throw new LanguageException("Can't load program - File is not a normal file:
" + sourceFile.toString());
  +            throw new LanguageException("Can't load program - File is not a normal file:
" + IOUtils.getFullFilename(sourceFile));
           }
           if (!sourceFile.canRead()) {
  -            throw new LanguageException("Can't load program - File cannot be read: " +
sourceFile.toString());
  +            throw new LanguageException("Can't load program - File cannot be read: " +
IOUtils.getFullFilename(sourceFile));
           }
           this.compile(filename, baseDirectory, encoding);
           if (this.deleteSources) {
               sourceFile.delete();
           }
  -        Object program = this.loadProgram(filename, baseDirectory);
  +        Class program = this.loadProgram(filename, baseDirectory);
           if (program == null) {
               throw new LanguageException("Can't load program : " + baseDirectory.toString()
+ File.separator + filename);
           }
  
  
  
  1.1.2.8   +4 -3      xml-cocoon/src/org/apache/cocoon/components/language/programming/Attic/ProgrammingLanguage.java
  
  Index: ProgrammingLanguage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/programming/Attic/ProgrammingLanguage.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- ProgrammingLanguage.java	2000/12/11 16:06:43	1.1.2.7
  +++ ProgrammingLanguage.java	2001/02/16 15:38:29	1.1.2.8
  @@ -11,13 +11,14 @@
   
   import org.apache.avalon.Component;
   
  +import org.apache.cocoon.components.language.generator.CompiledComponent;
   import org.apache.cocoon.components.language.LanguageException;
   
   /**
    * This interface states the functionality of a programming language processor
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/12/11 16:06:43 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/16 15:38:29 $
    */
   public interface ProgrammingLanguage extends Component {
     /**
  @@ -37,7 +38,7 @@
      * @return The loaded program
      * @exception LanguageException If an error occurs during loading
      */
  -  Object load(String filename, File baseDirectory, String encoding)
  +  Class load(String filename, File baseDirectory, String encoding)
       throws LanguageException;
   
     /**
  @@ -47,7 +48,7 @@
      * @return A new program type instance
      * @exception LanguageException If an instantiation error occurs
      */
  -  Object instantiate(Object program) throws LanguageException;
  +  CompiledComponent instantiate(Class program) throws LanguageException;
   
     /**
      * Unload from memory and invalidate a given program
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.23  +5 -4      xml-cocoon/src/org/apache/cocoon/components/language/programming/java/Attic/JavaLanguage.java
  
  Index: JavaLanguage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/programming/java/Attic/JavaLanguage.java,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- JavaLanguage.java	2001/02/15 20:29:10	1.1.2.22
  +++ JavaLanguage.java	2001/02/16 15:38:30	1.1.2.23
  @@ -25,6 +25,7 @@
   import org.apache.cocoon.util.ClassUtils;
   import org.apache.cocoon.util.JavaArchiveFilter;
   import org.apache.cocoon.components.classloader.ClassLoaderManager;
  +import org.apache.cocoon.components.language.generator.CompiledComponent;
   import org.apache.cocoon.components.language.programming.*;
   import org.apache.cocoon.components.language.LanguageException;
   
  @@ -32,7 +33,7 @@
    * The Java programming language processor
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.22 $ $Date: 2001/02/15 20:29:10 $
  + * @version CVS $Revision: 1.1.2.23 $ $Date: 2001/02/16 15:38:30 $
    */
   public class JavaLanguage extends CompiledProgrammingLanguage implements ThreadSafe, Composer
{
   
  @@ -111,7 +112,7 @@
      * @return The loaded object program
      * @exception LanguageException If an error occurs during loading
      */
  -  protected Object loadProgram(String name, File baseDirectory)
  +  protected Class loadProgram(String name, File baseDirectory)
       throws LanguageException
     {
       try {
  @@ -219,9 +220,9 @@
      * @return A new class instance
      * @exception LanguageException If an instantiation error occurs
      */
  -  public Object instantiate(Object program) throws LanguageException {
  +  public CompiledComponent instantiate(Class program) throws LanguageException {
       try {
  -      return ((Class) program).newInstance();
  +      return (CompiledComponent) program.newInstance();
       } catch (Exception e) {
         log.warn("Could not instantiate program instance", e);
         throw new LanguageException("Could not instantiate program instance due to a " +
e.getClass().getName() + ": " + e.getMessage());
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.9   +2 -11     xml-cocoon/src/org/apache/cocoon/components/store/Attic/FilesystemStore.java
  
  Index: FilesystemStore.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/store/Attic/FilesystemStore.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- FilesystemStore.java	2001/01/22 21:56:39	1.1.2.8
  +++ FilesystemStore.java	2001/02/16 15:38:30	1.1.2.9
  @@ -88,8 +88,7 @@
      * 2) String values are dumped to text files
      * 3) Object values are serialized
      */
  -  public void store(Object key, Object value) {
  -    try {
  +  public void store(Object key, Object value) throws IOException {
         File file = fileFromKey(key);
   
         /* Create subdirectories as needed */
  @@ -113,16 +112,12 @@
         } else { /* Serialized Object */
           IOUtils.serializeObject(file, value);
         }
  -    } catch (Exception e) { /* FAILURE */
  -      log.warn("FilesystemStore.store()", e);
  -      throw new RuntimeException(e.getMessage());
  -    }
     }
   
     /**
      * Holds the given object in a volatile state.
      */
  -  public void hold(Object key, Object value) {
  +  public void hold(Object key, Object value) throws IOException {
       this.store(key, value);
       File file = (File) this.get(key);
       if (file != null) {
  @@ -202,9 +197,5 @@
       }
   
       return null;
  -  }
  -
  -  public String normalizedFilename(String filename) {
  -    return IOUtils.normalizedFilename(filename);
     }
   }
  
  
  
  1.1.2.8   +4 -3      xml-cocoon/src/org/apache/cocoon/components/store/Attic/Store.java
  
  Index: Store.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/store/Attic/Store.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- Store.java	2000/12/11 16:06:46	1.1.2.7
  +++ Store.java	2001/02/16 15:38:31	1.1.2.8
  @@ -9,6 +9,7 @@
   
   import java.util.Enumeration;
   import org.apache.avalon.Component;
  +import java.io.IOException;
   
   /**
    *
  @@ -18,7 +19,7 @@
    *         (Apache Software Foundation)
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/12/11 16:06:46 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/16 15:38:31 $
    */
   public interface Store extends Component {
   
  @@ -32,14 +33,14 @@
        * caller to ensure that the key has a persistent state across
        * different JVM executions.
        */
  -    void store(Object key, Object value);
  +    void store(Object key, Object value) throws IOException;
   
       /**
        * Holds the given object in a volatile state. This means
        * the object store will discard held objects if the
        * virtual machine is restarted or some error happens.
        */
  -    void hold(Object key, Object value);
  +    void hold(Object key, Object value) throws IOException;
   
       /**
        * Remove the object associated to the given key.
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +12 -13    xml-cocoon/src/org/apache/cocoon/generation/Attic/AbstractServerPage.java
  
  Index: AbstractServerPage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/AbstractServerPage.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- AbstractServerPage.java	2000/08/04 21:11:41	1.1.2.5
  +++ AbstractServerPage.java	2001/02/16 15:38:32	1.1.2.6
  @@ -7,7 +7,7 @@
    *****************************************************************************/
   package org.apache.cocoon.generation;
   
  -import org.apache.avalon.Modifiable;
  +import org.apache.cocoon.components.language.generator.CompiledComponent;
   
   import java.io.File;
   import javax.servlet.http.HttpServletRequest;
  @@ -20,11 +20,10 @@
    * declares variables that must be explicitly initialized by code generators.
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/08/04 21:11:41 $
  + * @version CVS $Revision: 1.1.2.6 $ $Date: 2001/02/16 15:38:32 $
    */
   public abstract class AbstractServerPage
  -  extends ServletGenerator
  -  implements Modifiable
  +  extends ServletGenerator implements CompiledComponent
   {
     /**
      * Code generators should produce a static
  @@ -90,10 +89,10 @@
      */
     protected void attribute(AttributesImpl attr, String name, String value) {
       attr.addAttribute("", name, name, "CDATA", value);
  -  } 
  +  }
   
     /**
  -   * Start an element 
  +   * Start an element
      *
      * @param name The element name
      * @param attr The element attributes
  @@ -101,32 +100,32 @@
     protected void start(String name, AttributesImpl attr) throws SAXException {
       this.contentHandler.startElement("", name, name, attr);
       attr.clear();
  -  } 
  +  }
   
     /**
      * End an element
  -   * 
  +   *
      * @param name The element name
      */
     protected void end(String name) throws SAXException {
       this.contentHandler.endElement("", name, name);
  -  } 
  +  }
   
     /**
      * Add character data
  -   * 
  +   *
      * @param data The character data
      */
     protected void characters(String data) throws SAXException {
       this.contentHandler.characters(data.toCharArray(), 0, data.length());
  -  } 
  +  }
   
     /**
      * Add a comment
  -   * 
  +   *
      * @param comment The comment data
      */
     protected void comment(String data) throws SAXException {
       this.lexicalHandler.comment(data.toCharArray(), 0, data.length());
  -  } 
  +  }
   }
  
  
  
  1.1.2.9   +3 -3      xml-cocoon/src/org/apache/cocoon/generation/Attic/ServletGenerator.java
  
  Index: ServletGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/ServletGenerator.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- ServletGenerator.java	2001/02/15 20:29:42	1.1.2.8
  +++ ServletGenerator.java	2001/02/16 15:38:32	1.1.2.9
  @@ -14,10 +14,9 @@
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   
  -import org.apache.avalon.Composer;
  -import org.apache.avalon.ComponentManager;
   import org.apache.avalon.Parameters;
   import org.apache.avalon.Poolable;
  +import org.apache.avalon.Composer;
   
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
  @@ -28,7 +27,7 @@
   /**
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/15 20:29:42 $
  + * @version CVS $Revision: 1.1.2.9 $ $Date: 2001/02/16 15:38:32 $
    */
   public abstract class ServletGenerator extends ComposerGenerator
   implements Composer, Poolable {
  @@ -39,6 +38,7 @@
   
       public void setup(EntityResolver resolver, Map objectModel, String src, Parameters
par)
           throws ProcessingException, SAXException, IOException {
  +
         super.setup(resolver, objectModel, src, par);
         this.request = (HttpServletRequest) objectModel.get(Constants.REQUEST_OBJECT);
         this.response = (HttpServletResponse) objectModel.get(Constants.RESPONSE_OBJECT);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.12  +3 -5      xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Sitemap.java
  
  Index: Sitemap.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Sitemap.java,v
  retrieving revision 1.1.4.11
  retrieving revision 1.1.4.12
  diff -u -r1.1.4.11 -r1.1.4.12
  --- Sitemap.java	2000/12/11 16:06:56	1.1.4.11
  +++ Sitemap.java	2001/02/16 15:38:33	1.1.4.12
  @@ -7,20 +7,18 @@
    *****************************************************************************/
   package org.apache.cocoon.sitemap;
   
  -import org.apache.avalon.Composer;
  -import org.apache.avalon.Modifiable;
   import org.apache.avalon.Configurable;
  -import org.apache.avalon.Configuration;
   import org.apache.avalon.ComponentManager;
   
  +import org.apache.cocoon.components.language.generator.CompiledComponent;
   import org.apache.cocoon.Processor;
   
   /**
    * Base interface for generated <code>Sitemap</code> classes
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.4.11 $ $Date: 2000/12/11 16:06:56 $
  + * @version CVS $Revision: 1.1.4.12 $ $Date: 2001/02/16 15:38:33 $
    */
  -public interface Sitemap extends Composer, Configurable, Processor, Modifiable {
  +public interface Sitemap extends CompiledComponent, Configurable, Processor {
       void setParentSitemapComponentManager (ComponentManager sitemapComponentManager);
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.7   +3 -1      xml-cocoon/src/org/apache/cocoon/util/Attic/RoleUtils.java
  
  Index: RoleUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/util/Attic/RoleUtils.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- RoleUtils.java	2001/02/15 20:30:50	1.1.2.6
  +++ RoleUtils.java	2001/02/16 15:38:33	1.1.2.7
  @@ -19,7 +19,7 @@
    * role aliases and the real Avalon role names.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.6 $ $Date: 2001/02/15 20:30:50 $
  + * @version CVS $Revision: 1.1.2.7 $ $Date: 2001/02/16 15:38:33 $
    */
   
   public class RoleUtils {
  @@ -33,6 +33,7 @@
           setup.put("parser", Roles.PARSER);
           setup.put("processor", Roles.PROCESSOR);
           setup.put("store", Roles.STORE);
  +        setup.put("repository", Roles.REPOSITORY);
           setup.put("markup-languages", Roles.MARKUP_LANGUAGE);
           setup.put("programming-languages", Roles.PROGRAMMING_LANGUAGE);
           setup.put("program-generator", Roles.PROGRAM_GENERATOR);
  @@ -48,6 +49,7 @@
   
           setup.put(Roles.PARSER, "org.apache.cocoon.components.parser.JaxpParser");
           setup.put(Roles.STORE, "org.apache.cocoon.components.store.MemoryStore");
  +        setup.put(Roles.REPOSITORY, "org.apache.cocoon.components.store.FilesystemStore");
           setup.put(Roles.PROGRAMMING_LANGUAGE, "org.apache.cocoon.CocoonComponentSelector");
           setup.put(Roles.MARKUP_LANGUAGE, "org.apache.cocoon.CocoonComponentSelector");
           setup.put(Roles.CLASS_LOADER, "org.apache.cocoon.components.classloader.ClassLoaderManagerImpl");
  
  
  

Mime
View raw message