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/batik/java/org/apache/cocoon/transformation FragmentExtractorTransformer.java
Date Thu, 20 Nov 2003 15:13:54 GMT
joerg       2003/11/20 07:13:54

  Modified:    src/blocks/batik/java/org/apache/cocoon/transformation
                        FragmentExtractorTransformer.java
  Log:
  Composable => Serviceable
  
  Revision  Changes    Path
  1.6       +16 -18    cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
  
  Index: FragmentExtractorTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/batik/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FragmentExtractorTransformer.java	5 Sep 2003 07:10:54 -0000	1.5
  +++ FragmentExtractorTransformer.java	20 Nov 2003 15:13:54 -0000	1.6
  @@ -56,13 +56,13 @@
   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.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.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.excalibur.pool.Recyclable;
   
  @@ -100,7 +100,7 @@
    * @version CVS $Id$
    */
   public class FragmentExtractorTransformer extends AbstractTransformer
  -    implements CacheableProcessingComponent, Configurable, Composable, Disposable, Recyclable
{
  +    implements CacheableProcessingComponent, Configurable, Serviceable, Disposable, Recyclable
{
   
       private static final String EXTRACT_URI_NAME = "extract-uri";
       private static final String EXTRACT_ELEMENT_NAME = "extract-element";
  @@ -113,8 +113,8 @@
       private String extractURI;
       private String extractElement;
   
  -    /** The component manager instance */
  -    protected ComponentManager manager = null;
  +    /** The ServiceManager instance */
  +    protected ServiceManager manager = null;
   
       private XMLSerializer serializer;
   
  @@ -149,10 +149,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;
       }
   
  @@ -263,8 +263,8 @@
   
               try {
                   this.serializer = (XMLSerializer) this.manager.lookup(XMLSerializer.ROLE);
  -            } catch (ComponentException ce) {
  -                throw new SAXException("Could not lookup for XMLSerializer.", ce);
  +            } catch (ServiceException se) {
  +                throw new SAXException("Could not lookup for XMLSerializer.", se);
               }
   
               // Start the DOM document
  @@ -323,17 +323,15 @@
                       this.serializer.endDocument();
   
                       Store store = null;
  -                    String id = Long.toHexString((hashCode()^HashUtil.hash(requestURI))+fragmentID);
  +                    String id = Long.toHexString((hashCode()^HashUtil.hash(requestURI))
+ fragmentID);
                       try {
                           store = (Store) this.manager.lookup(Store.TRANSIENT_STORE);
  -
                           store.store(id, this.serializer.getSAXFragment());
  -                    } catch (ComponentException ce) {
  -                        throw new SAXException("Could not lookup for transient store.",
ce);
  +                    } catch (ServiceException se) {
  +                        throw new SAXException("Could not lookup for transient store.",
se);
                       } catch (IOException ioe) {
                           throw new SAXException("Could not store fragment.", ioe);
  -                    } finally
  -                    {
  +                    } finally {
                           this.manager.release(store);
                           this.manager.release(this.serializer);
                           this.serializer = null;
  
  
  

Mime
View raw message