avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon/proposal/4.0/src/java/org/apache/framework/component DefaultComponentManager.java DefaultRoleManager.java RoleManager.java
Date Fri, 06 Apr 2001 14:12:31 GMT
bloritsch    01/04/06 07:12:30

  Modified:    proposal/4.0/src/java/org/apache/framework/component
                        DefaultComponentManager.java
                        DefaultRoleManager.java RoleManager.java
  Log:
  Fixed package errors
  
  Revision  Changes    Path
  1.4       +18 -22    jakarta-avalon/proposal/4.0/src/java/org/apache/framework/component/DefaultComponentManager.java
  
  Index: DefaultComponentManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/framework/component/DefaultComponentManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultComponentManager.java	2001/04/06 14:00:05	1.3
  +++ DefaultComponentManager.java	2001/04/06 14:12:26	1.4
  @@ -6,7 +6,7 @@
    * the LICENSE file.                                                         *
    *****************************************************************************/
   
  -package org.apache.avalon.component;
  +package org.apache.framework.component;
   
   import java.util.HashMap;
   import java.util.Map;
  @@ -15,26 +15,22 @@
   import java.util.ArrayList;
   import java.util.List;
   
  -import org.apache.avalon.ComponentManager;
  -import org.apache.avalon.Component;
  -import org.apache.avalon.ComponentManagerException;
  -import org.apache.avalon.Context;
  -import org.apache.avalon.Contextualizable;
  -import org.apache.avalon.configuration.Configurable;
  -import org.apache.avalon.configuration.Configuration;
  -import org.apache.avalon.Composer;
  -import org.apache.avalon.configuration.ConfigurationException;
  -import org.apache.avalon.configuration.DefaultConfiguration;
  -import org.apache.avalon.Disposable;
  -import org.apache.avalon.Initializable;
  -import org.apache.avalon.AbstractLoggable;
  +import org.apache.framework.context.Context;
  +import org.apache.framework.context.Contextualizable;
  +import org.apache.framework.configuration.Configurable;
  +import org.apache.framework.configuration.Configuration;
  +import org.apache.framework.configuration.ConfigurationException;
  +import org.apache.framework.configuration.DefaultConfiguration;
  +import org.apache.framework.lifecycle.Disposable;
  +import org.apache.framework.lifecycle.Initializable;
  +import org.apache.framework.logger.AbstractLoggable;
   
   /**
    * Default component manager for Avalon's 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.3 $ $Date: 2001/04/06 14:00:05 $
  + * @version CVS $Revision: 1.4 $ $Date: 2001/04/06 14:12:26 $
    */
   public class DefaultComponentManager extends AbstractLoggable
           implements ComponentManager, Configurable, Contextualizable, Disposable {
  @@ -106,7 +102,7 @@
        * case, the Role's FQN is appended with "Selector", and we return a ComponentSelector.
        */
       public Component lookup( String role )
  -    throws ComponentManagerException {
  +    throws ComponentException {
   
           if (disposed) throw new IllegalStateException("You cannot lookup components on
a disposed ComponentManager");
   
  @@ -115,7 +111,7 @@
   
           if ( role == null ) {
               getLogger().error("ComponentManager Attempted to retrieve component with null
role.");
  -            throw new ComponentManagerException("Attempted to retrieve component with null
role.");
  +            throw new ComponentException("Attempted to retrieve component with null role.");
           }
   
           handler = (DefaultComponentHandler) this.componentHandlers.get(role);
  @@ -133,7 +129,7 @@
                   handler.init();
               } catch (Exception e) {
                   getLogger().error("ComponentManager Could not find component for role:
" + role, e);
  -                throw new ComponentManagerException("Could not find component for role:
" + role, e);
  +                throw new ComponentException("Could not find component for role: " + role,
e);
               }
   
               this.componentHandlers.put(role, handler);
  @@ -147,10 +143,10 @@
               try {
                   component = handler.get();
               } catch (Exception ee) {
  -                throw new ComponentManagerException("Could not access the Component for
you", ee);
  +                throw new ComponentException("Could not access the Component for you",
ee);
               }
           } catch (Exception e) {
  -            throw new ComponentManagerException("Could not access the Component for you",
e);
  +            throw new ComponentException("Could not access the Component for you", e);
           }
   
           this.componentMapping.put(component, handler);
  @@ -216,13 +212,13 @@
        * @param Configuration the configuration for this component.
        */
       public void addComponent(String role, Class component, Configuration config)
  -    throws ComponentManagerException {
  +    throws ComponentException {
           try {
               DefaultComponentHandler handler = new DefaultComponentHandler(component, config,
this, this.context);
               handler.setLogger(getLogger());
               this.componentHandlers.put(role, handler);
           } catch (Exception e) {
  -            throw new ComponentManagerException ("Could not set up Component for role:
" + role, e);
  +            throw new ComponentException ("Could not set up Component for role: " + role,
e);
           }
       }
   
  
  
  
  1.2       +6 -8      jakarta-avalon/proposal/4.0/src/java/org/apache/framework/component/DefaultRoleManager.java
  
  Index: DefaultRoleManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/framework/component/DefaultRoleManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultRoleManager.java	2001/04/06 14:00:06	1.1
  +++ DefaultRoleManager.java	2001/04/06 14:12:27	1.2
  @@ -6,20 +6,18 @@
    * the LICENSE file.                                                         *
    *****************************************************************************/
   
  -package org.apache.avalon.component;
  +package org.apache.framework.component;
   
   import java.util.Map;
   import java.util.Iterator;
   import java.util.HashMap;
   import java.util.Collections;
   
  -import org.apache.avalon.configuration.Configurable;
  -import org.apache.avalon.configuration.Configuration;
  +import org.apache.framework.configuration.Configurable;
  +import org.apache.framework.configuration.Configuration;
  +import org.apache.framework.configuration.ConfigurationException;
  +import org.apache.framework.logger.AbstractLoggable;
   
  -import org.apache.avalon.AbstractLoggable;
  -
  -import org.apache.avalon.configuration.ConfigurationException;
  -
   /**
    * Default RoleManager implementation.  It populates the RoleManager
    * from a configuration file.
  @@ -27,7 +25,7 @@
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:ricardo@apache,org">Ricardo Rocha</a>
    * @author <a href="mailto:giacomo@apache,org">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2001/04/06 14:00:06 $
  + * @version CVS $Revision: 1.2 $ $Date: 2001/04/06 14:12:27 $
    */
   public class DefaultRoleManager extends AbstractLoggable implements RoleManager, Configurable
{
       private Map shorthands = new HashMap();
  
  
  
  1.2       +2 -2      jakarta-avalon/proposal/4.0/src/java/org/apache/framework/component/RoleManager.java
  
  Index: RoleManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/framework/component/RoleManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RoleManager.java	2001/04/06 14:00:07	1.1
  +++ RoleManager.java	2001/04/06 14:12:28	1.2
  @@ -6,7 +6,7 @@
    * the LICENSE file.                                                         *
    *****************************************************************************/
   
  -package org.apache.avalon.component;
  +package org.apache.framework.component;
   
   import java.util.Iterator;
   
  @@ -17,7 +17,7 @@
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:ricardo@apache,org">Ricardo Rocha</a>
    * @author <a href="mailto:giacomo@apache,org">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2001/04/06 14:00:07 $
  + * @version CVS $Revision: 1.2 $ $Date: 2001/04/06 14:12:28 $
    */
   public interface RoleManager {
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Mime
View raw message