cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/components/search SimpleLuceneXMLIndexerImpl.java
Date Fri, 06 Feb 2004 22:45:58 GMT
joerg       2004/02/06 14:45:58

  Modified:    src/blocks/lucene/java/org/apache/cocoon/transformation
                        LuceneIndexTransformer.java
               src/blocks/lucene/java/org/apache/cocoon/components/search
                        SimpleLuceneXMLIndexerImpl.java
  Log:
  Composable => Serviceable
  
  Revision  Changes    Path
  1.10      +1 -8      cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/transformation/LuceneIndexTransformer.java
  
  Index: LuceneIndexTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/transformation/LuceneIndexTransformer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- LuceneIndexTransformer.java	5 Sep 2003 07:21:49 -0000	1.9
  +++ LuceneIndexTransformer.java	6 Feb 2004 22:45:58 -0000	1.10
  @@ -56,8 +56,6 @@
   import java.util.Map;
   import java.util.Stack;
   
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -128,7 +126,6 @@
       private static final int STATE_DOCUMENT = 2; // processing a lucene:document element
   
       // Initialization time variables
  -    protected ComponentManager manager = null;
       protected File workDir = null;
   
       // Declaration time parameters values (specified in sitemap component config)
  @@ -192,10 +189,6 @@
               parameters.getParameter(DIRECTORY_PARAMETER, configureConfiguration.indexDirectory),
               parameters.getParameterAsInteger(MERGE_FACTOR_PARAMETER, configureConfiguration.mergeFactor)
           );
  -    }
  -
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        this.manager = manager;
       }
   
       /**
  
  
  
  1.6       +14 -15    cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneXMLIndexerImpl.java
  
  Index: SimpleLuceneXMLIndexerImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneXMLIndexerImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SimpleLuceneXMLIndexerImpl.java	15 Nov 2003 04:21:30 -0000	1.5
  +++ SimpleLuceneXMLIndexerImpl.java	6 Feb 2004 22:45:58 -0000	1.6
  @@ -50,14 +50,13 @@
   */
   package org.apache.cocoon.components.search;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   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.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.util.Tokenizer;
  @@ -103,14 +102,14 @@
    * @version CVS $Id$
    */
   public class SimpleLuceneXMLIndexerImpl extends AbstractLogEnabled
  -         implements LuceneXMLIndexer, Configurable, Composable, ThreadSafe {
  +         implements LuceneXMLIndexer, Configurable, Serviceable, ThreadSafe {
   
       /**
  -     * The component manager instance
  +     * The service manager instance
        *
        * @since
        */
  -    protected ComponentManager manager = null;
  +    protected ServiceManager manager = null;
   
       /**
        * Config element name specifying query-string appendend for requesting links
  @@ -204,14 +203,14 @@
   
   
       /**
  -     * Set the current <code>ComponentManager</code> instance used by this
  -     * <code>Composable</code>.
  +     * Set the current <code>ServiceManager</code> instance used by this
  +     * <code>Serviceable</code>.
        *
        * @param  manager                 Description of Parameter
  -     * @exception  ComponentException  Description of Exception
  +     * @exception  ServiceException  Description of Exception
        * @since
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
       }
   
  @@ -315,11 +314,11 @@
               throw new ProcessingException("Cannot read!", ioe);
           } catch (SAXException saxe) {
               throw new ProcessingException("Cannot parse!", saxe);
  -        } catch (ComponentException ce) {
  -            throw new ProcessingException("Cannot lookup xml parser!", ce);
  +        } catch (ServiceException se) {
  +            throw new ProcessingException("Cannot lookup xml parser!", se);
           } finally {
               if (parser != null) {
  -                this.manager.release((Component)parser);
  +                this.manager.release(parser);
               }
           }
       }
  
  
  

Mime
View raw message