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/transformation XalanTransformer.java
Date Fri, 05 Jan 2001 16:21:07 GMT
bloritsch    01/01/05 08:21:06

  Modified:    lib      Tag: xml-cocoon2 avalonapi.jar
               src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java
                        CocoonComponentSelector.java
                        DefaultComponentManager.java
               src/org/apache/cocoon/transformation Tag: xml-cocoon2
                        XalanTransformer.java
  Log:
  Updated to current AvalonAPI.  The main change is that the
  ComponentManager throws a ComponentManagerException
  (an abstract class).  This way, if we need to distinguish between
  the reasons of failure when we catch the exception we can, or
  we can catch the parent exception.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.11  +713 -692  xml-cocoon/lib/Attic/avalonapi.jar
  
  	<<Binary file>>
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.40  +7 -6      xml-cocoon/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.4.2.39
  retrieving revision 1.4.2.40
  diff -u -r1.4.2.39 -r1.4.2.40
  --- Cocoon.java	2000/12/29 18:50:44	1.4.2.39
  +++ Cocoon.java	2001/01/05 16:20:57	1.4.2.40
  @@ -21,8 +21,7 @@
   import org.apache.avalon.Component;
   import org.apache.avalon.Composer;
   import org.apache.avalon.ComponentManager;
  -import org.apache.avalon.ComponentNotFoundException;
  -import org.apache.avalon.ComponentNotAccessibleException;
  +import org.apache.avalon.ComponentManagerException;
   import org.apache.avalon.Modifiable;
   import org.apache.avalon.Configurable;
   import org.apache.avalon.Configuration;
  @@ -47,7 +46,7 @@
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.4.2.39 $ $Date: 2000/12/29 18:50:44 $
  + * @version CVS $Revision: 1.4.2.40 $ $Date: 2001/01/05 16:20:57 $
    */
   public class Cocoon
     implements Component, Configurable, ComponentManager, Modifiable, Processor, Constants
{
  @@ -111,8 +110,10 @@
        * the specified file.
        */
       public Cocoon(final URL configurationFile, final String classpath, File workDir, final
String root)
  -    throws SAXException, IOException, ConfigurationException,
  -    ComponentNotFoundException, ComponentNotAccessibleException {
  +    throws SAXException,
  +           IOException,
  +	   ConfigurationException,
  +           ComponentManagerException {
           this();
   
           this.classpath = classpath;
  @@ -218,7 +219,7 @@
        * Get the <code>Component</code> associated with the given role.
        */
       public Component lookup(String role)
  -    throws ComponentNotFoundException, ComponentNotAccessibleException {
  +    throws ComponentManagerException {
           return this.componentManager.lookup(role);
       }
   
  
  
  
  1.1.2.9   +10 -9     xml-cocoon/src/org/apache/cocoon/Attic/CocoonComponentSelector.java
  
  Index: CocoonComponentSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/CocoonComponentSelector.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- CocoonComponentSelector.java	2000/11/30 21:40:30	1.1.2.8
  +++ CocoonComponentSelector.java	2001/01/05 16:20:58	1.1.2.9
  @@ -15,6 +15,7 @@
   import org.apache.avalon.ComponentManager;
   import org.apache.avalon.ComponentSelector;
   import org.apache.avalon.Component;
  +import org.apache.avalon.ComponentManagerException;
   import org.apache.avalon.ComponentNotFoundException;
   import org.apache.avalon.ComponentNotAccessibleException;
   import org.apache.avalon.SingleThreaded;
  @@ -34,7 +35,7 @@
   /** Default component manager for Cocoon's non sitemap components.
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Revision: 1.1.2.8 $ $Date: 2000/11/30 21:40:30 $
  + * @version CVS $Revision: 1.1.2.9 $ $Date: 2001/01/05 16:20:58 $
    */
   public class CocoonComponentSelector implements ComponentSelector, Composer, ThreadSafe
{
       protected Logger log = LogKit.getLoggerFor("cocoon");
  @@ -74,7 +75,8 @@
   
       /** Implement Composer interface
        */
  -    public void compose(ComponentManager manager) {
  +    public void compose(ComponentManager manager)
  +    throws ComponentManagerException {
           if (this.manager == null) {
               this.manager = manager;
           }
  @@ -82,8 +84,8 @@
   
       /** Return an instance of a component.
        */
  -    public Component select( Object hint ) throws
  -        ComponentNotFoundException, ComponentNotAccessibleException {
  +    public Component select( Object hint )
  +    throws ComponentManagerException {
   
           Component component;
   
  @@ -166,8 +168,7 @@
        * @return and instance of the component.
        */
       private Component getThreadsafeComponent(Class componentClass)
  -    throws ComponentNotAccessibleException,
  -           ComponentNotFoundException {
  +    throws ComponentManagerException {
           Component component = (Component)threadSafeInstances.get(componentClass);
   
           if ( component == null ) {
  @@ -195,7 +196,8 @@
       /** Return an instance of a component from its associated pool.
        * @param componentClass the class of the component of which we need an instance.
        */
  -    private Component getPooledComponent(Class componentClass) throws ComponentNotAccessibleException
{
  +    private Component getPooledComponent(Class componentClass)
  +    throws ComponentManagerException {
           ComponentPool pool = (ComponentPool)pools.get(componentClass);
   
           if ( pool == null ) {
  @@ -233,8 +235,7 @@
        * @param c the component to configure.
        */
       private void setupComponent(Component c)
  -    throws ComponentNotAccessibleException,
  -           ComponentNotFoundException {
  +    throws ComponentManagerException {
           if ( c instanceof Configurable ) {
               try {
                   ((Configurable)c).configure(
  
  
  
  1.1.2.8   +9 -8      xml-cocoon/src/org/apache/cocoon/Attic/DefaultComponentManager.java
  
  Index: DefaultComponentManager.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/DefaultComponentManager.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- DefaultComponentManager.java	2000/12/02 13:40:05	1.1.2.7
  +++ DefaultComponentManager.java	2001/01/05 16:20:59	1.1.2.8
  @@ -15,6 +15,7 @@
   
   import org.apache.avalon.ComponentManager;
   import org.apache.avalon.Component;
  +import org.apache.avalon.ComponentManagerException;
   import org.apache.avalon.ComponentNotFoundException;
   import org.apache.avalon.ComponentNotAccessibleException;
   import org.apache.avalon.SingleThreaded;
  @@ -35,7 +36,7 @@
   
   /** Default component manager for Cocoon's non sitemap components.
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/12/02 13:40:05 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/01/05 16:20:59 $
    */
   public class DefaultComponentManager implements ComponentManager {
   
  @@ -75,7 +76,7 @@
       /** Return an instance of a component.
        */
       public Component lookup( String role ) throws
  -        ComponentNotFoundException, ComponentNotAccessibleException {
  +        ComponentManagerException {
   
           Component component;
   
  @@ -169,8 +170,7 @@
        * @return and instance of the component.
        */
       private Component getThreadsafeComponent(Class componentClass)
  -    throws ComponentNotAccessibleException,
  -           ComponentNotFoundException {
  +    throws ComponentManagerException {
           Component component = (Component)threadSafeInstances.get(componentClass);
   
           if ( component == null ) {
  @@ -198,7 +198,8 @@
       /** Return an instance of a component from its associated pool.
        * @param componentClass the class of the component of which we need an instance.
        */
  -    private Component getPooledComponent(Class componentClass) throws ComponentNotAccessibleException
{
  +    private Component getPooledComponent(Class componentClass)
  +    throws ComponentManagerException {
           ComponentPool pool = (ComponentPool)pools.get(componentClass);
   
           if ( pool == null ) {
  @@ -237,8 +238,7 @@
        * @param c the component to configure.
        */
       private void setupComponent(Component c)
  -    throws ComponentNotAccessibleException,
  -           ComponentNotFoundException {
  +    throws ComponentManagerException {
           if ( c instanceof Configurable ) {
               try {
                   ((Configurable)c).configure(
  @@ -264,7 +264,8 @@
        * @param Configuration the configuration for this component.
        */
       public void addComponent(String role, Class component, Configuration config)
  -    throws ConfigurationException {
  +    throws ConfigurationException,
  +           ComponentManagerException {
           if (component.equals(CocoonComponentSelector.class)) {
               CocoonComponentSelector selector = new CocoonComponentSelector();
               Iterator instances = config.getChildren("component-instance");
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.27  +3 -8      xml-cocoon/src/org/apache/cocoon/transformation/Attic/XalanTransformer.java
  
  Index: XalanTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/XalanTransformer.java,v
  retrieving revision 1.1.2.26
  retrieving revision 1.1.2.27
  diff -u -r1.1.2.26 -r1.1.2.27
  --- XalanTransformer.java	2000/12/08 20:40:45	1.1.2.26
  +++ XalanTransformer.java	2001/01/05 16:21:04	1.1.2.27
  @@ -54,7 +54,7 @@
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:cziegeler@sundn.de">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1.2.26 $ $Date: 2000/12/08 20:40:45 $
  + * @version CVS $Revision: 1.1.2.27 $ $Date: 2001/01/05 16:21:04 $
    */
   public class XalanTransformer extends ContentHandlerWrapper
   implements Transformer, Composer, Poolable, Configurable {
  @@ -133,13 +133,8 @@
       public void configure(Configuration conf)
       throws ConfigurationException {
           if (conf != null) {
  -        try {
  -                Configuration child = conf.getChild("use-cache");
  -                this.useCache = child.getValueAsBoolean(true);
  -        } catch (ConfigurationException ce) {
  -            log.debug("XalanTransformer", ce);
  -                this.useCache = false;
  -            }
  +            Configuration child = conf.getChild("use-cache");
  +            this.useCache = child.getValueAsBoolean(true);
           }
       }
   
  
  
  

Mime
View raw message