cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/producers DefaultProducerFactory.java FileProducer.java Producer.java ProducerFactory.java
Date Wed, 09 Feb 2000 01:11:15 GMT
pier        00/02/08 17:11:15

  Modified:    src/org/apache/cocoon/producers Tag: xml-cocoon2-alpha0
                        DefaultProducerFactory.java FileProducer.java
                        Producer.java ProducerFactory.java
  Log:
  Javadocs are good :)
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +14 -1     xml-cocoon/src/org/apache/cocoon/producers/Attic/DefaultProducerFactory.java
  
  Index: DefaultProducerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/producers/Attic/DefaultProducerFactory.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- DefaultProducerFactory.java	2000/02/07 15:35:40	1.1.2.1
  +++ DefaultProducerFactory.java	2000/02/09 01:11:13	1.1.2.2
  @@ -12,20 +12,33 @@
   import org.apache.cocoon.framework.ConfigurationException;
   
   /**
  + * The <code>DefaultProducerFactory</code> is a standard implementation of
  + * a <code>Producer</code> factory.
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>,

    *         Exoffice Technologies, INC.</a>
    * @author Copyright 1999 &copy; <a href="http://www.apache.org">The Apache
    *         Software Foundation</a>. All rights reserved.
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/02/07 15:35:40 $
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/02/09 01:11:13 $
  + * @since Cocoon 2.0
    */
   public class DefaultProducerFactory extends AbstractFactory
                                       implements ProducerFactory {
  +    /**
  +     * Instantiate a new <code>Producer</code> whose name class is derived
from
  +     * the configurations passed to the <code>AbstractFactory</code>.
  +     */
       public Producer getProducer()
       throws ConfigurationException {
           return((Producer)this.createInstance());
       }
   
  +    /**
  +     * Return the class name of the objects that need to be instantiated by
  +     * the <code>AbstractFactory</code>.
  +     *
  +     * @return Always <code>org.apache.cocoon.producers.Producer</code>
  +     */
       public String getAssignableClassName() {
           return("org.apache.cocoon.producers.Producer");
       }
  
  
  
  1.1.2.2   +7 -1      xml-cocoon/src/org/apache/cocoon/producers/Attic/FileProducer.java
  
  Index: FileProducer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/producers/Attic/FileProducer.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- FileProducer.java	2000/02/07 15:35:40	1.1.2.1
  +++ FileProducer.java	2000/02/09 01:11:14	1.1.2.2
  @@ -28,7 +28,8 @@
    *         Exoffice Technologies, INC.</a>
    * @author Copyright 1999 &copy; <a href="http://www.apache.org">The Apache
    *         Software Foundation</a>. All rights reserved.
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/02/07 15:35:40 $
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/02/09 01:11:14 $
  + * @since Cocoon 2.0
    */
   public class FileProducer extends AbstractComponent implements Producer {
       /** The current parserFactory instance */
  @@ -37,6 +38,9 @@
       /**
        * Return an <code>XMLSource</code> instance producing XML data from a
        * file.
  +     *
  +     * @param job The current <code>Job</code>.
  +     * @param source The sitemap-translate source URI that will be parsed.
        */
       public XMLSource getXMLSource(Job job, String source) {
           return(Source.create(this.parserFactory,source));
  @@ -83,6 +87,8 @@
            */
           public boolean modifiedSince(long date) {
               long modified=this.file.lastModified();
  +            // If lastModified() returns zero it means we weren't able to 
  +            // access the file. Return true for safety.
               if (modified==0) return(true);
               else return(modified>date);
           }
  
  
  
  1.1.4.2   +10 -1     xml-cocoon/src/org/apache/cocoon/producers/Attic/Producer.java
  
  Index: Producer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/producers/Attic/Producer.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- Producer.java	2000/02/07 15:35:40	1.1.4.1
  +++ Producer.java	2000/02/09 01:11:14	1.1.4.2
  @@ -13,13 +13,22 @@
   import org.apache.cocoon.framework.Configurable;
   
   /**
  + * The <code>Producer</code> interface is an abstraction for those compoments
  + * whose task is to generate SAX events into the Cocoon pipeline.
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>,

    *         Exoffice Technologies, INC.</a>
    * @author Copyright 1999 &copy; <a href="http://www.apache.org">The Apache
    *         Software Foundation</a>. All rights reserved.
  - * @version CVS $Revision: 1.1.4.1 $ $Date: 2000/02/07 15:35:40 $
  + * @version CVS $Revision: 1.1.4.2 $ $Date: 2000/02/09 01:11:14 $
  + * @since Cocoon 2.0
    */
   public interface Producer extends Component, Configurable {
  +    /**
  +     * Get the <code>XMLSource</code> object that will produce SAX events.
  +     *
  +     * @param job The current <code>Job</code>.
  +     * @param source The sitemap-translate source URI.
  +     */
       public XMLSource getXMLSource(Job job, String source);
   }
  
  
  
  1.1.2.2   +7 -1      xml-cocoon/src/org/apache/cocoon/producers/Attic/ProducerFactory.java
  
  Index: ProducerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/producers/Attic/ProducerFactory.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- ProducerFactory.java	2000/02/07 15:35:40	1.1.2.1
  +++ ProducerFactory.java	2000/02/09 01:11:14	1.1.2.2
  @@ -11,14 +11,20 @@
   import org.apache.cocoon.framework.ConfigurationException;
   
   /**
  + * The <code>ProducerFactory</code> interface must be implemented by all those
  + * factories creating instances of <code>Producer</code> objects.
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>,

    *         Exoffice Technologies, INC.</a>
    * @author Copyright 1999 &copy; <a href="http://www.apache.org">The Apache
    *         Software Foundation</a>. All rights reserved.
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/02/07 15:35:40 $
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/02/09 01:11:14 $
  + * @since Cocoon 2.0
    */
   public interface ProducerFactory extends Configurable {
  +    /**
  +     * Return a non configured instance of a <code>Producer</code>.
  +     */
       public Producer getProducer()
       throws ConfigurationException;
   }
  
  
  

Mime
View raw message