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.2/src/java/org/apache/cocoon/transformation/pagination Paginator.java
Date Fri, 06 Feb 2004 22:24:41 GMT
joerg       2004/02/06 14:24:41

  Modified:    src/java/org/apache/cocoon/transformation
                        AbstractDOMTransformer.java
                        XIncludeTransformer.java TraxTransformer.java
               src/java/org/apache/cocoon/serialization
                        ZipArchiveSerializer.java
               src/java/org/apache/cocoon/components/language/markup
                        NamedLogicsheet.java AbstractMarkupLanguage.java
                        Logicsheet.java
               src/java/org/apache/cocoon/components/xscript
                        XScriptManagerImpl.java XScriptObjectFromURL.java
                        XScriptObject.java
               src/java/org/apache/cocoon/components/xpointer
                        XPointerContext.java XPointerPart.java
               src/java/org/apache/cocoon/components/modules/input
                        XMLFileModule.java XMLMetaModule.java
                        AbstractMetaModule.java LocateResource.java
                        ChainMetaModule.java
               src/java/org/apache/cocoon/i18n AbstractBundleFactory.java
               src/java/org/apache/cocoon/matching/modular
                        WildcardMatcher.java
               src/java/org/apache/cocoon/transformation/pagination
                        Paginator.java
  Log:
  replaced the last Composables (besides the deprecated) with Serviceables
  
  Revision  Changes    Path
  1.4       +9 -9      cocoon-2.2/src/java/org/apache/cocoon/transformation/AbstractDOMTransformer.java
  
  Index: AbstractDOMTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/transformation/AbstractDOMTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractDOMTransformer.java	6 Dec 2003 21:22:07 -0000	1.3
  +++ AbstractDOMTransformer.java	6 Feb 2004 22:24:40 -0000	1.4
  @@ -52,9 +52,9 @@
   
   import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.SourceResolver;
  @@ -73,7 +73,7 @@
    * An Abstract DOM Transformer, for use when a transformer needs a DOM-based
    * view of the document.
    * Subclass this interface and implement <code>transform(Document doc)</code>.
  - * If you need a ComponentManager there is an instance variable
  + * If you need a ServiceManager there is an instance variable
    * <code>manager</code> for use.
    *
    * @author <a href="mailto:rossb@apache.org">Ross Burton</a>
  @@ -82,7 +82,7 @@
    * @version CVS $Id$
    */
   public abstract class AbstractDOMTransformer extends AbstractTransformer
  -        implements Transformer, DOMBuilder.Listener, Composable, Disposable, Recyclable {
  +        implements Transformer, DOMBuilder.Listener, Serviceable, Disposable, Recyclable {
   
       /**
        *  The SAX entity resolver
  @@ -105,9 +105,9 @@
       protected Parameters parameters;
   
       /**
  -     * A <code>ComponentManager</code> which is available for use.
  +     * A <code>ServiceManager</code> which is available for use.
        */
  -    protected ComponentManager manager;
  +    protected ServiceManager manager;
   
       /**
        * The <code>DOMBuilder</code> used to build DOM tree out of
  @@ -122,9 +122,9 @@
       }
   
       /**
  -     * Set the component manager.
  +     * Set the service manager.
        */
  -    public void compose(ComponentManager manager) {
  +    public void service(ServiceManager manager) {
           this.manager = manager;
       }
   
  
  
  
  1.13      +25 -18    cocoon-2.2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java
  
  Index: XIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XIncludeTransformer.java	6 Dec 2003 21:22:07 -0000	1.12
  +++ XIncludeTransformer.java	6 Feb 2004 22:24:40 -0000	1.13
  @@ -50,33 +50,40 @@
   */
   package org.apache.cocoon.transformation;
   
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.parameters.Parameters;
  -import org.apache.avalon.framework.CascadingRuntimeException;
  +import java.io.BufferedReader;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.InputStreamReader;
  +import java.io.Reader;
  +import java.net.MalformedURLException;
  +import java.util.Map;
  +
   import org.apache.avalon.framework.CascadingException;
  +import org.apache.avalon.framework.CascadingRuntimeException;
  +import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
  -import org.apache.cocoon.util.NetUtils;
  -import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.components.xpointer.XPointer;
  -import org.apache.cocoon.components.xpointer.parser.XPointerFrameworkParser;
  -import org.apache.cocoon.components.xpointer.parser.ParseException;
   import org.apache.cocoon.components.xpointer.XPointerContext;
  +import org.apache.cocoon.components.xpointer.parser.ParseException;
  +import org.apache.cocoon.components.xpointer.parser.XPointerFrameworkParser;
  +import org.apache.cocoon.environment.SourceResolver;
  +import org.apache.cocoon.util.NetUtils;
  +import org.apache.cocoon.xml.AbstractXMLPipe;
   import org.apache.cocoon.xml.IncludeXMLConsumer;
   import org.apache.cocoon.xml.XMLBaseSupport;
  -import org.apache.cocoon.xml.AbstractXMLPipe;
   import org.apache.cocoon.xml.XMLConsumer;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
  -import org.xml.sax.*;
  +import org.xml.sax.Attributes;
  +import org.xml.sax.ContentHandler;
  +import org.xml.sax.Locator;
  +import org.xml.sax.SAXException;
   import org.xml.sax.ext.LexicalHandler;
   
  -import java.io.*;
  -import java.net.MalformedURLException;
  -import java.util.Map;
  -
   /**
    * Implementation of an XInclude transformer. It supports xml:base attributes,
    * xpointer fragment identifiers (see the xpointer package to see what exactly is supported),
  @@ -86,9 +93,9 @@
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a> (wrote the original version)
    * @version CVS $Id$
    */
  -public class XIncludeTransformer extends AbstractTransformer implements Composable {
  +public class XIncludeTransformer extends AbstractTransformer implements Serviceable {
       protected SourceResolver resolver;
  -    protected ComponentManager manager;
  +    protected ServiceManager manager;
       private XIncludePipe xIncludePipe;
   
       public static final String XMLBASE_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
  @@ -122,7 +129,7 @@
           xIncludePipe.setLexicalHandler(handler);
       }
   
  -    public void compose(ComponentManager manager) {
  +    public void service(ServiceManager manager) {
           this.manager = manager;
       }
   
  
  
  
  1.13      +11 -11    cocoon-2.2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TraxTransformer.java	27 Dec 2003 15:11:57 -0000	1.12
  +++ TraxTransformer.java	6 Feb 2004 22:24:40 -0000	1.13
  @@ -63,14 +63,14 @@
   import javax.xml.transform.sax.TransformerHandler;
   
   import org.apache.avalon.framework.activity.Disposable;
  -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.LogEnabled;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.components.source.SourceUtil;
  @@ -171,10 +171,10 @@
    * @x-avalon.info name=trax-transformer
    */
   public class TraxTransformer extends AbstractTransformer
  -implements Transformer, Composable, Configurable, CacheableProcessingComponent, Disposable {
  +implements Transformer, Serviceable, Configurable, CacheableProcessingComponent, Disposable {
   
  -    /** The component manager (protected because used by subclasses) */
  -    protected ComponentManager manager;
  +    /** The service manager (protected because used by subclasses) */
  +    protected ServiceManager manager;
   
       /** The object model (protected because used by subclasses) */
       protected Map objectModel;
  @@ -272,7 +272,7 @@
               if (traxFactory != null) {
                   this.xsltProcessor.setTransformerFactory(traxFactory);
               }
  -        } catch (ComponentException e) {
  +        } catch (ServiceException e) {
               throw new ConfigurationException("Cannot load XSLT processor", e);
           }
   
  @@ -288,10 +288,10 @@
       }
   
       /**
  -     * 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>.
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
       }
   
  
  
  
  1.9       +2 -2      cocoon-2.2/src/java/org/apache/cocoon/serialization/ZipArchiveSerializer.java
  
  Index: ZipArchiveSerializer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/serialization/ZipArchiveSerializer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ZipArchiveSerializer.java	29 Dec 2003 15:24:35 -0000	1.8
  +++ ZipArchiveSerializer.java	6 Feb 2004 22:24:40 -0000	1.9
  @@ -159,7 +159,7 @@
   
   
       /**
  -     * @see org.apache.avalon.framework.component.Composable#compose(ComponentManager)
  +     * @see org.apache.avalon.framework.service.Serviceable#service(ServiceManager)
        * 
        * @avalon.dependency type=SourceResolver
        */
  
  
  
  1.3       +3 -3      cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/NamedLogicsheet.java
  
  Index: NamedLogicsheet.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/NamedLogicsheet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NamedLogicsheet.java	22 May 2003 13:02:47 -0000	1.2
  +++ NamedLogicsheet.java	6 Feb 2004 22:24:40 -0000	1.3
  @@ -50,7 +50,7 @@
   */
   package org.apache.cocoon.components.language.markup;
   
  -import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.excalibur.source.SourceException;
   import org.apache.excalibur.source.SourceResolver;
  @@ -80,7 +80,7 @@
        */
       private String prefix;
   
  -    public NamedLogicsheet(String systemId, ComponentManager manager, SourceResolver resolver)
  +    public NamedLogicsheet(String systemId, ServiceManager manager, SourceResolver resolver)
           throws IOException, ProcessingException, SourceException, SAXException
       {
           super(systemId, manager, resolver);
  
  
  
  1.5       +10 -10    cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/AbstractMarkupLanguage.java
  
  Index: AbstractMarkupLanguage.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/AbstractMarkupLanguage.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractMarkupLanguage.java	6 Dec 2003 21:22:10 -0000	1.4
  +++ AbstractMarkupLanguage.java	6 Feb 2004 22:24:40 -0000	1.5
  @@ -52,9 +52,6 @@
   
   import org.apache.avalon.excalibur.pool.Recyclable;
   import org.apache.avalon.framework.activity.Disposable;
  -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;
  @@ -62,6 +59,9 @@
   import org.apache.avalon.framework.parameters.ParameterException;
   import org.apache.avalon.framework.parameters.Parameterizable;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
  @@ -97,7 +97,7 @@
    */
   public abstract class AbstractMarkupLanguage
           extends AbstractLogEnabled
  -        implements MarkupLanguage, Composable, Configurable, Parameterizable,
  +        implements MarkupLanguage, Serviceable, Configurable, Parameterizable,
                      Recyclable, Disposable
   {
       /** The 'file' URL protocol. */
  @@ -121,8 +121,8 @@
       /** The markup language's namespace prefix */
       protected String prefix;
   
  -    /** The component manager */
  -    protected ComponentManager manager;
  +    /** The service manager */
  +    protected ServiceManager manager;
   
       /** The URL factory source resolver used to resolve URIs */
       private SourceResolver resolver;
  @@ -217,10 +217,10 @@
       }
   
       /**
  -     * Set the global component manager.
  -     * @param manager The sitemap-specified component manager
  +     * Set the global service manager.
  +     * @param manager The sitemap-specified service manager
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
   
           // Initialize logicsheet cache
  
  
  
  1.3       +8 -8      cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/Logicsheet.java
  
  Index: Logicsheet.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/language/markup/Logicsheet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Logicsheet.java	22 May 2003 13:02:47 -0000	1.2
  +++ Logicsheet.java	6 Feb 2004 22:24:40 -0000	1.3
  @@ -52,9 +52,9 @@
   
   import org.apache.excalibur.xml.xslt.XSLTProcessor;
   import org.apache.excalibur.xml.xslt.XSLTProcessorException;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.excalibur.source.Source;
  @@ -104,11 +104,11 @@
       protected Map namespaceURIs = new HashMap();
   
       /**
  -     * The ComponentManager of this instance.
  +     * The ServiceManager of this instance.
        */
  -    private ComponentManager manager;
  +    private ServiceManager manager;
   
  -    public Logicsheet(Source source, ComponentManager manager, SourceResolver resolver)
  +    public Logicsheet(Source source, ServiceManager manager, SourceResolver resolver)
           throws SAXException, IOException, ProcessingException
       {
           this.resolver = resolver;
  @@ -116,7 +116,7 @@
           this.manager = manager;
       }
   
  -    public Logicsheet(String systemId, ComponentManager manager, SourceResolver resolver)
  +    public Logicsheet(String systemId, ServiceManager manager, SourceResolver resolver)
           throws SAXException, IOException, SourceException, ProcessingException
       {
           this.resolver = resolver;
  @@ -167,7 +167,7 @@
               XMLFilter saveNSFilter = new SaveNamespaceFilter(namespaceURIs);
               return xsltProcessor.getTransformerHandler(source, saveNSFilter);
   
  -        } catch (ComponentException e) {
  +        } catch (ServiceException e) {
               throw new ProcessingException("Could not obtain XSLT processor", e);
           } catch (MalformedURLException e) {
               throw new ProcessingException("Could not resolve " + this.systemId, e);
  
  
  
  1.2       +10 -11    cocoon-2.2/src/java/org/apache/cocoon/components/xscript/XScriptManagerImpl.java
  
  Index: XScriptManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/xscript/XScriptManagerImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XScriptManagerImpl.java	9 Mar 2003 00:09:27 -0000	1.1
  +++ XScriptManagerImpl.java	6 Feb 2004 22:24:40 -0000	1.2
  @@ -51,13 +51,13 @@
   package org.apache.cocoon.components.xscript;
   
   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.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.ParameterException;
   import org.apache.avalon.framework.parameters.Parameterizable;
   import org.apache.avalon.framework.parameters.Parameters;
  +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.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.context.ContextException;
  @@ -79,14 +79,14 @@
    */
   public class XScriptManagerImpl
           extends AbstractLogEnabled
  -        implements XScriptManager, Composable, Component, Parameterizable, Contextualizable, ThreadSafe
  +        implements XScriptManager, Serviceable, Component, Parameterizable, Contextualizable, ThreadSafe
   {
       public static final String CONTEXT = "org.apache.cocoon.components.xscript.scope";
   
       /**
  -     * The <code>ComponentManager</code> instance.
  +     * The <code>ServiceManager</code> instance.
        */
  -    protected ComponentManager manager = null;
  +    protected ServiceManager manager = null;
   
       /**
        * The <code>Context</code> instance.
  @@ -100,16 +100,15 @@
           this.context = (Context)context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
       }
   
  -    public void compose(ComponentManager manager)
  -            throws ComponentException
  +    public void service(ServiceManager manager) throws ServiceException
       {
           this.manager = manager;
       }
   
       public void register(XScriptObject object) {
           try {
  -            object.compose(manager);
  -        } catch (ComponentException ignored) { }
  +            object.service(manager);
  +        } catch (ServiceException ignored) { }
       }
   
       public void parameterize(Parameters params)
  
  
  
  1.3       +3 -3      cocoon-2.2/src/java/org/apache/cocoon/components/xscript/XScriptObjectFromURL.java
  
  Index: XScriptObjectFromURL.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/xscript/XScriptObjectFromURL.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XScriptObjectFromURL.java	11 Mar 2003 14:42:54 -0000	1.2
  +++ XScriptObjectFromURL.java	6 Feb 2004 22:24:40 -0000	1.3
  @@ -88,7 +88,7 @@
           SourceResolver resolver = null;
           Source source = null;
           try {
  -            resolver = (SourceResolver) componentManager.lookup(SourceResolver.ROLE);
  +            resolver = (SourceResolver) serviceManager.lookup(SourceResolver.ROLE);
               source = resolver.resolveURI(this.systemId);
               return source.getInputStream();
           } catch (Exception e) {
  @@ -96,7 +96,7 @@
           } finally {
               if (resolver != null) {
                   resolver.release(source);
  -                componentManager.release(resolver);
  +                serviceManager.release(resolver);
               }
           }
       }
  
  
  
  1.3       +12 -13    cocoon-2.2/src/java/org/apache/cocoon/components/xscript/XScriptObject.java
  
  Index: XScriptObject.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/xscript/XScriptObject.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XScriptObject.java	11 Mar 2003 14:42:54 -0000	1.2
  +++ XScriptObject.java	6 Feb 2004 22:24:40 -0000	1.3
  @@ -50,11 +50,10 @@
   */
   package org.apache.cocoon.components.xscript;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   
   import org.apache.excalibur.xml.xslt.XSLTProcessor;
   import org.apache.excalibur.xml.xslt.XSLTProcessorException;
  @@ -83,7 +82,7 @@
    * @version CVS $Id$
    * @since August  4, 2001
    */
  -public abstract class XScriptObject implements Source, Composable {
  +public abstract class XScriptObject implements Source, Serviceable {
   
       /**
        * The creation date of this <code>XScriptObject</code>.
  @@ -96,7 +95,7 @@
        */
       XScriptManager xscriptManager;
   
  -    protected ComponentManager componentManager;
  +    protected ServiceManager serviceManager;
   
       /**
        * Creates a new <code>XScriptObject</code> instance.
  @@ -108,8 +107,8 @@
           ((XScriptManagerImpl) this.xscriptManager).register(this);
       }
   
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        this.componentManager = manager;
  +    public void service(ServiceManager manager) throws ServiceException {
  +        this.serviceManager = manager;
       }
   
       /**
  @@ -132,12 +131,12 @@
               StreamResult result = new StreamResult(writer);
   
               XSLTProcessor transformer
  -                    = (XSLTProcessor) componentManager.lookup(XSLTProcessor.ROLE);
  +                    = (XSLTProcessor) serviceManager.lookup(XSLTProcessor.ROLE);
   
               try {
                   transformer.transform(this, stylesheet, params, result);
               } finally {
  -                componentManager.release(transformer);
  +                serviceManager.release(transformer);
               }
   
               return new XScriptObjectResult(xscriptManager, writer.toString());
  @@ -158,7 +157,7 @@
       public void toSAX(ContentHandler handler) throws SAXException {
           SAXParser parser = null;
           try {
  -            parser = (SAXParser) componentManager.lookup(SAXParser.ROLE);
  +            parser = (SAXParser) serviceManager.lookup(SAXParser.ROLE);
               InputSource source = getInputSource();
               parser.parse(source, handler);
           } catch (SAXException e) {
  @@ -167,7 +166,7 @@
               throw new SAXException(e);
           } finally {
               if (parser != null) {
  -                componentManager.release((Component)parser);
  +                serviceManager.release(parser);
               }
           }
       }
  
  
  
  1.2       +6 -6      cocoon-2.2/src/java/org/apache/cocoon/components/xpointer/XPointerContext.java
  
  Index: XPointerContext.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/xpointer/XPointerContext.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XPointerContext.java	20 May 2003 11:57:13 -0000	1.1
  +++ XPointerContext.java	6 Feb 2004 22:24:40 -0000	1.2
  @@ -54,7 +54,7 @@
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.xml.xpath.PrefixResolver;
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.xml.XMLConsumer;
   import org.xml.sax.SAXException;
  @@ -71,7 +71,7 @@
       private Logger logger;
       private String xpointer;
       private HashMap prefixes = new HashMap();
  -    private ComponentManager componentManager;
  +    private ServiceManager manager;
   
       /**
        * Constructs an XPointerContext object.
  @@ -80,11 +80,11 @@
        * @param source the source into which the xpointer points
        * @param xmlConsumer the consumer to which the result of the xpointer evaluation should be send
        */
  -    public XPointerContext(String xpointer, Source source, XMLConsumer xmlConsumer, Logger logger, ComponentManager componentManager) {
  +    public XPointerContext(String xpointer, Source source, XMLConsumer xmlConsumer, Logger logger, ServiceManager manager) {
           this.source = source;
           this.xmlConsumer = xmlConsumer;
           this.logger = logger;
  -        this.componentManager = componentManager;
  +        this.manager = manager;
           this.xpointer = xpointer;
   
           prefixes.put("xml", "http://www.w3.org/XML/1998/namespace");
  @@ -117,8 +117,8 @@
           return xpointer;
       }
   
  -    public ComponentManager getComponentManager() {
  -        return componentManager;
  +    public ServiceManager getServiceManager() {
  +        return manager;
       }
   
       public void addPrefix(String prefix, String namespace) throws SAXException {
  
  
  
  1.3       +3 -4      cocoon-2.2/src/java/org/apache/cocoon/components/xpointer/XPointerPart.java
  
  Index: XPointerPart.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/xpointer/XPointerPart.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XPointerPart.java	23 May 2003 07:29:58 -0000	1.2
  +++ XPointerPart.java	6 Feb 2004 22:24:40 -0000	1.3
  @@ -50,8 +50,7 @@
   */
   package org.apache.cocoon.components.xpointer;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.cocoon.xml.XMLConsumer;
   import org.apache.cocoon.xml.dom.DOMStreamer;
   import org.apache.excalibur.xml.xpath.XPathProcessor;
  @@ -72,7 +71,7 @@
   
       public boolean process(XPointerContext xpointerContext) throws SAXException {
           Document document = xpointerContext.getDocument();
  -        ComponentManager manager = xpointerContext.getComponentManager();
  +        ServiceManager manager = xpointerContext.getServiceManager();
           XPathProcessor xpathProcessor = null;
           try {
               try {
  @@ -99,7 +98,7 @@
               }
           } finally {
               if (xpathProcessor != null)
  -                manager.release((Component)xpathProcessor);
  +                manager.release(xpathProcessor);
           }
       }
   }
  
  
  
  1.11      +10 -10    cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java
  
  Index: XMLFileModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XMLFileModule.java	23 Sep 2003 12:35:43 -0000	1.10
  +++ XMLFileModule.java	6 Feb 2004 22:24:40 -0000	1.11
  @@ -51,12 +51,12 @@
   
   package org.apache.cocoon.components.modules.input;
   
  -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.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.Logger;
  +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.components.source.SourceUtil;
   import org.apache.excalibur.source.Source;
  @@ -89,7 +89,7 @@
    * @version CVS $Id$
    */
   public class XMLFileModule extends AbstractJXPathModule
  -    implements Composable, ThreadSafe {
  +    implements Serviceable, ThreadSafe {
   
       /** Static (cocoon.xconf) configuration location, for error reporting */
       String staticConfLocation;
  @@ -103,7 +103,7 @@
       String src = null;
   
       SourceResolver resolver = null;
  -    ComponentManager manager = null;
  +    ServiceManager manager = null;
       
   
       /**
  @@ -144,7 +144,7 @@
            * @return a <code>Document</code> value
            * @exception Exception if an error occurs
            */
  -        public synchronized Document getDocument(ComponentManager manager, 
  +        public synchronized Document getDocument(ServiceManager manager, 
                                                    SourceResolver resolver, 
                                                    Logger logger) throws Exception {
               Source src = null;
  @@ -196,10 +196,10 @@
   
   
       /**
  -     * 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>.
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
           this.resolver = (SourceResolver)manager.lookup(SourceResolver.ROLE);
       }
  
  
  
  1.3       +7 -8      cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/XMLMetaModule.java
  
  Index: XMLMetaModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/XMLMetaModule.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLMetaModule.java	18 Dec 2003 14:46:21 -0000	1.2
  +++ XMLMetaModule.java	6 Feb 2004 22:24:40 -0000	1.3
  @@ -57,11 +57,10 @@
   import java.util.TreeSet;
   import java.util.Vector;
   
  -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.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
   import org.apache.cocoon.environment.ObjectModelHelper;
  @@ -355,10 +354,10 @@
       }
   
       /* (non-Javadoc)
  -     * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
  +     * @see org.apache.avalon.framework.service.Serviceable#compose(org.apache.avalon.framework.service.ServiceManager)
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -        super.compose(manager);
  +    public void service(ServiceManager manager) throws ServiceException {
  +        super.service(manager);
           this.xpathProcessor = (XPathProcessor)this.manager.lookup(XPathProcessor.ROLE);
       }
   
  @@ -367,7 +366,7 @@
        */
       public void dispose() {
           if ( this.manager != null ) {
  -            this.manager.release((Component)this.xpathProcessor);
  +            this.manager.release(this.xpathProcessor);
               this.xpathProcessor = null;
           }
           super.dispose();
  
  
  
  1.6       +31 -32    cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java
  
  Index: AbstractMetaModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractMetaModule.java	24 Sep 2003 21:41:12 -0000	1.5
  +++ AbstractMetaModule.java	6 Feb 2004 22:24:40 -0000	1.6
  @@ -55,12 +55,12 @@
   import java.util.Map;
   
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.ComponentSelector;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.ServiceSelector;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
   /**
  @@ -74,13 +74,13 @@
    * @version CVS $Id$
    */
   public abstract class AbstractMetaModule extends AbstractInputModule
  -    implements Composable, Disposable {
  +    implements Serviceable, Disposable {
   
  -    /** The component manager instance */
  -    protected ComponentManager manager;
  +    /** The service manager instance */
  +    protected ServiceManager manager;
   
       /** The cached InputModule-Selector */
  -    protected ComponentSelector inputSelector = null;
  +    protected ServiceSelector inputSelector = null;
   
       /** The cached default InputModule */
       protected InputModule input = null;
  @@ -107,11 +107,10 @@
   
   
       /**
  -     * 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>.
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  -
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager=manager;
       }
   
  @@ -133,7 +132,7 @@
           try {
               // obtain input modules
               if (!this.initialized) {
  -                this.inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  +                this.inputSelector = (ServiceSelector)this.manager.lookup(INPUT_MODULE_SELECTOR); 
                   if (this.inputSelector != null && this.inputSelector instanceof ThreadSafe) {
                       
                       if (this.defaultInput != null) {
  @@ -172,15 +171,15 @@
        * Obtain a permanent reference to an InputModule.
        */
       protected InputModule obtainModule(String type) {
  -        ComponentSelector inputSelector = this.inputSelector;
  +        ServiceSelector inputSelector = this.inputSelector;
           InputModule module = null;
           try {
               if (inputSelector == null) 
  -                inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  +                inputSelector = (ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
   
  -            if (inputSelector.hasComponent(type)){
  +            if (inputSelector.isSelectable(type)){
                   
  -                if (type != null && inputSelector.hasComponent(type))
  +                if (type != null && inputSelector.isSelectable(type))
                       module = (InputModule) inputSelector.select(type);
                   
                   if (!(module instanceof ThreadSafe) ) {
  @@ -191,13 +190,13 @@
               if (type != null && module == null)
                   if (getLogger().isWarnEnabled())
                       getLogger().warn("A problem occurred setting up '" + type
  -                                     +"': Selector is "+(inputSelector!=null?"not ":"")
  -                                     +"null, Component is "
  -                                     +(inputSelector!=null && inputSelector.hasComponent(type)?"known":"unknown"));
  +                                     + "': Selector is " + (inputSelector != null ? "not " : "")
  +                                     + "null, Component is "
  +                                     + (inputSelector != null && inputSelector.isSelectable(type) ? "known" : "unknown"));
               
  -        } catch (ComponentException ce) {
  +        } catch (ServiceException se) {
               if (getLogger().isWarnEnabled())
  -                getLogger().warn("Could not obtain selector for InputModules: "+ce.getMessage());
  +                getLogger().warn("Could not obtain selector for InputModules: " + se.getMessage());
           } finally {
               if (this.inputSelector == null) 
                   this.manager.release(inputSelector);
  @@ -212,19 +211,19 @@
        * release a permanent reference to an InputModule.
        */
       protected void releaseModule(InputModule module) {
  -        ComponentSelector inputSelector = this.inputSelector;
  +        ServiceSelector inputSelector = this.inputSelector;
           if (module != null) {
               try {
                   // FIXME: Is it OK to release a module when we have released the selector before?
                   if (inputSelector == null) 
  -                    inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  +                    inputSelector = (ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
                   
                   inputSelector.release(module);
                   module = null;
                   
  -            } catch (ComponentException ce) {
  +            } catch (ServiceException se) {
                   if (getLogger().isWarnEnabled())
  -                    getLogger().warn("Could not obtain selector for InputModules: "+ce.getMessage());
  +                    getLogger().warn("Could not obtain selector for InputModules: " + se.getMessage());
               } finally {
                   if (this.inputSelector == null) 
                       this.manager.release(inputSelector);
  @@ -327,7 +326,7 @@
                            InputModule dynamicMod, String dynamicModName, Configuration dynamicModConf)
           throws ConfigurationException {
   
  -        ComponentSelector cs = this.inputSelector;
  +        ServiceSelector cs = this.inputSelector;
           Object value = null;
           String name = null;
           InputModule input = null;
  @@ -337,8 +336,8 @@
           try {
               if (cs == null) {
                   try {
  -                cs = (ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
  -                } catch (ComponentException e) {
  +                cs = (ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
  +                } catch (ServiceException e) {
                       throw new ConfigurationException("Could not find MetaModule's module selector", e);
                   }
               }
  @@ -364,11 +363,11 @@
               }
   
               if (input == null) {
  -                if (cs.hasComponent(name)) {
  +                if (cs.isSelectable(name)) {
                       release = true;
                       try {
                       input = (InputModule) cs.select(name);
  -                    } catch (ComponentException e) {
  +                    } catch (ServiceException e) {
                           throw new ConfigurationException(
                                   "MetaModule unable to create "+
                                   (useDynamic ? "dynamically" : "statically")+
  
  
  
  1.3       +10 -10    cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/LocateResource.java
  
  Index: LocateResource.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/LocateResource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocateResource.java	15 Nov 2003 04:21:57 -0000	1.2
  +++ LocateResource.java	6 Feb 2004 22:24:40 -0000	1.3
  @@ -50,11 +50,11 @@
   */
   package org.apache.cocoon.components.modules.input;
   
  -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.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +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.excalibur.source.Source;
  @@ -91,14 +91,14 @@
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class LocateResource extends AbstractInputModule implements Composable, ThreadSafe {
  +public class LocateResource extends AbstractInputModule implements Serviceable, ThreadSafe {
   
       protected static Collection col = null;
       static {
           col = new TreeSet();
       }
   
  -    protected ComponentManager manager = null;
  +    protected ServiceManager manager = null;
   
       /**
        * Calculate the minimal length of the URL, that is the position
  @@ -181,7 +181,7 @@
                       urlstring = shortenURI(urlstring, minLen);
                   }
               }
  -        } catch (ComponentException e1) {
  +        } catch (ServiceException e1) {
               if (this.getLogger().isErrorEnabled())
                   this.getLogger().error("Exception obtaining source resolver ", e1);
           } finally {
  @@ -193,10 +193,10 @@
       }
   
       /**
  -     * 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>.
        */
  -    public void compose(ComponentManager manager) throws ComponentException {
  +    public void service(ServiceManager manager) throws ServiceException {
           this.manager = manager;
       }
   
  
  
  
  1.2       +3 -3      cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/ChainMetaModule.java
  
  Index: ChainMetaModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/ChainMetaModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ChainMetaModule.java	9 Mar 2003 00:09:02 -0000	1.1
  +++ ChainMetaModule.java	6 Feb 2004 22:24:40 -0000	1.2
  @@ -52,7 +52,7 @@
   
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.ComponentSelector;
  +import org.apache.avalon.framework.service.ServiceSelector;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
   import java.util.Map;
  @@ -141,7 +141,7 @@
           try {
               // obtain input modules
               if (!this.initialized) {
  -                this.inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  +                this.inputSelector = (ServiceSelector)this.manager.lookup(INPUT_MODULE_SELECTOR); 
                   if (this.inputSelector != null && this.inputSelector instanceof ThreadSafe) {
                       
                       for (int i=0; i<this.inputs.length; i++) {
  
  
  
  1.3       +6 -6      cocoon-2.2/src/java/org/apache/cocoon/i18n/AbstractBundleFactory.java
  
  Index: AbstractBundleFactory.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/i18n/AbstractBundleFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractBundleFactory.java	16 Mar 2003 17:49:15 -0000	1.2
  +++ AbstractBundleFactory.java	6 Feb 2004 22:24:40 -0000	1.3
  @@ -51,13 +51,13 @@
   package org.apache.cocoon.i18n;
   
   import org.apache.avalon.framework.activity.Disposable;
  -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.logger.LogEnabled;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
   /**
  @@ -68,7 +68,7 @@
    */
   public abstract class AbstractBundleFactory 
     extends AbstractLogEnabled
  -  implements BundleFactory, Composable, Configurable, Disposable, LogEnabled, ThreadSafe {
  +  implements BundleFactory, Serviceable, Configurable, Disposable, LogEnabled, ThreadSafe {
   
       /** Should we load bundles to cache on startup or not. */
       protected boolean cacheAtStartup = false;
  @@ -76,9 +76,9 @@
       /** Root directory to all bundle names */
       protected String directory;
   
  -    protected ComponentManager manager = null;
  +    protected ServiceManager manager = null;
   
  -    public void compose(ComponentManager manager) {
  +    public void service(ServiceManager manager) {
           this.manager = manager;
       }
   
  
  
  
  1.4       +5 -5      cocoon-2.2/src/java/org/apache/cocoon/matching/modular/WildcardMatcher.java
  
  Index: WildcardMatcher.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/matching/modular/WildcardMatcher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WildcardMatcher.java	5 Jan 2004 08:17:31 -0000	1.3
  +++ WildcardMatcher.java	6 Feb 2004 22:24:40 -0000	1.4
  @@ -52,13 +52,13 @@
   
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.ComponentSelector;
   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.parameters.Parameters;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.ServiceSelector;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.cocoon.components.modules.input.InputModule;
   import org.apache.cocoon.matching.AbstractWildcardMatcher;
  @@ -122,7 +122,7 @@
           }
   
           InputModule input = null;
  -        ComponentSelector inputSelector = null;
  +        ServiceSelector inputSelector = null;
           Object result = null;
   
           // one could test whether the input module is ThreadSafe and
  @@ -134,8 +134,8 @@
   
           try {
               // obtain input module
  -            inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  -            if (inputName != null && inputSelector != null && inputSelector.hasComponent(inputName)){
  +            inputSelector = (ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  +            if (inputName != null && inputSelector != null && inputSelector.isSelectable(inputName)){
                   input = (InputModule) inputSelector.select(inputName);
               }
               if (input != null) {
  
  
  
  1.8       +17 -14    cocoon-2.2/src/java/org/apache/cocoon/transformation/pagination/Paginator.java
  
  Index: Paginator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/transformation/pagination/Paginator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Paginator.java	8 Dec 2003 10:23:46 -0000	1.7
  +++ Paginator.java	6 Feb 2004 22:24:41 -0000	1.8
  @@ -50,17 +50,23 @@
   */
   package org.apache.cocoon.transformation.pagination;
   
  +import java.io.IOException;
  +import java.io.Serializable;
  +import java.util.Map;
  +
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.avalon.framework.service.Serviceable;
  +
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.transformation.AbstractTransformer;
  +
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
   import org.apache.excalibur.source.SourceValidity;
  @@ -68,15 +74,12 @@
   import org.apache.excalibur.source.impl.validity.TimeStampValidity;
   import org.apache.excalibur.store.Store;
   import org.apache.excalibur.xml.sax.SAXParser;
  +
   import org.xml.sax.Attributes;
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
   
  -import java.io.IOException;
  -import java.io.Serializable;
  -import java.util.Map;
  -
   /**
    * A paginating transformer.
    *
  @@ -86,13 +89,13 @@
    * @version    CVS $Id$
    */
   public class Paginator extends AbstractTransformer
  -  implements Composable, Disposable, CacheableProcessingComponent {
  +  implements Serviceable, Disposable, CacheableProcessingComponent {
   
       public static final String PAGINATE_URI = "http://apache.org/cocoon/paginate/1.0";
       public static final String PAGINATE_PREFIX = "page";
       public static final String PAGINATE_PREFIX_TOKEN = PAGINATE_PREFIX+":";
   
  -    private ComponentManager manager;
  +    private ServiceManager manager;
       private SAXParser parser;
       private Store store;
       private SourceResolver resolver;
  @@ -107,12 +110,12 @@
       private boolean prefixMapping;
   
       /**
  -     * 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 the Parameter
        */
  -    public void compose(ComponentManager manager) {
  +    public void service(ServiceManager manager) throws ServiceException {
           try {
               this.manager = manager;
               getLogger().debug("Looking up "+SAXParser.ROLE);
  @@ -129,7 +132,7 @@
        */
       public void dispose() {
           if (this.parser!=null) {
  -            this.manager.release((Component) this.parser);
  +            this.manager.release(this.parser);
           } else {
               this.parser = null;
           }
  
  
  

Mime
View raw message