ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/listener ProjectListenerDeployer.java
Date Mon, 27 May 2002 08:30:31 GMT
adammurdoch    02/05/27 01:30:31

  Modified:    ant1compat/src/java/org/apache/tools/ant
                        Ant1CompatProject.java
               container/src/java/org/apache/myrmidon/components/embeddor
                        DefaultEmbeddor.java
               container/src/java/org/apache/myrmidon/components/type
                        DefaultTypeManager.java
                        NamespaceAwareTypeFactory.java
               container/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
               container/src/java/org/apache/myrmidon/interfaces/deployer
                        DefaultTypeDeployer.java
               container/src/java/org/apache/myrmidon/interfaces/type
                        TypeManager.java
               container/src/test/org/apache/myrmidon/components
                        AbstractComponentTest.java
               container/src/test/org/apache/myrmidon/components/service/test
                        InstantiatingServiceManagerTestCase.java
               container/src/test/org/apache/myrmidon/components/type/test
                        DefaultTypeManagerTestCase.java
               framework/src/java/org/apache/myrmidon/framework
                        DataTypeDeployer.java
               framework/src/java/org/apache/myrmidon/framework/listener
                        ProjectListenerDeployer.java
  Added:       container/src/java/org/apache/myrmidon/interfaces/type
                        TypeRegistry.java
  Log:
  Moved type registration methods from TypeManager to new TypeRegistry interface.
  
  Revision  Changes    Path
  1.9       +4 -4      jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatProject.java
  
  Index: Ant1CompatProject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatProject.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Ant1CompatProject.java	27 May 2002 07:03:52 -0000	1.8
  +++ Ant1CompatProject.java	27 May 2002 08:30:30 -0000	1.9
  @@ -23,7 +23,7 @@
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.interfaces.type.DefaultTypeFactory;
  -import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.type.TypeRegistry;
   
   import org.apache.tools.ant.types.Path;
   
  @@ -35,7 +35,7 @@
    * Ant1 original, this class contains the extensions.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.8 $ $Date: 2002/05/27 07:03:52 $
  + * @version $Revision: 1.9 $ $Date: 2002/05/27 08:30:30 $
    */
   public class Ant1CompatProject
       extends Project
  @@ -288,8 +288,8 @@
       {
           // TODO - reuse the type factory, for all types typedefed in the project
           final DefaultTypeFactory factory = new DefaultTypeFactory( typeName, type );
  -        final TypeManager typeManager = (TypeManager)m_context.getService( TypeManager.class
);
  -        typeManager.registerType( roleType, typeName, factory );
  +        final TypeRegistry typeRegistry = (TypeRegistry)m_context.getService( TypeRegistry.class
);
  +        typeRegistry.registerType( roleType, null, typeName, factory );
       }
   
       /**
  
  
  
  1.76      +7 -4      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
  
  Index: DefaultEmbeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- DefaultEmbeddor.java	24 May 2002 06:23:42 -0000	1.75
  +++ DefaultEmbeddor.java	27 May 2002 08:30:30 -0000	1.76
  @@ -55,6 +55,7 @@
   import org.apache.myrmidon.interfaces.service.MultiSourceServiceManager;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.type.TypeRegistry;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
   
   /**
  @@ -62,7 +63,7 @@
    * Instantiate this to embed inside other applications.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.75 $ $Date: 2002/05/24 06:23:42 $
  + * @version $Revision: 1.76 $ $Date: 2002/05/27 08:30:30 $
    */
   public class DefaultEmbeddor
       extends AbstractLogEnabled
  @@ -281,9 +282,11 @@
           createComponent( Configurer.ROLE,
                            Configurer.class,
                            PREFIX + "configurer.DefaultConfigurer" );
  -        createComponent( TypeManager.ROLE,
  -                         TypeManager.class,
  -                         PREFIX + "type.DefaultTypeManager" );
  +        final Object typeManager =
  +            createComponent( TypeManager.ROLE,
  +                             TypeManager.class,
  +                             PREFIX + "type.DefaultTypeManager" );
  +        m_serviceManager.put( TypeRegistry.ROLE, typeManager );
           final Object roleManager =
               createComponent( RoleManager.ROLE,
                                RoleManager.class,
  
  
  
  1.25      +5 -26     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java
  
  Index: DefaultTypeManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- DefaultTypeManager.java	23 May 2002 04:26:26 -0000	1.24
  +++ DefaultTypeManager.java	27 May 2002 08:30:30 -0000	1.25
  @@ -18,6 +18,7 @@
   import org.apache.myrmidon.interfaces.type.TypeException;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.type.TypeRegistry;
   import org.apache.myrmidon.interfaces.service.ScopedService;
   
   /**
  @@ -25,10 +26,10 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.24 $ $Date: 2002/05/23 04:26:26 $
  + * @version $Revision: 1.25 $ $Date: 2002/05/27 08:30:30 $
    */
   public class DefaultTypeManager
  -    implements TypeManager, Serviceable, ScopedService
  +    implements TypeRegistry, TypeManager, Serviceable, ScopedService
   {
       private static final Resources REZ
           = ResourceManager.getPackageResources( DefaultTypeManager.class );
  @@ -76,17 +77,7 @@
       }
   
       /**
  -     * @see TypeManager#registerTypes( String, TypeFactory )
  -     */
  -    public void registerTypes( String roleName, TypeFactory factory )
  -        throws TypeException
  -    {
  -        NamespaceAwareTypeFactory nsFactory = createFactory( roleName );
  -        nsFactory.registerTypes( factory );
  -    }
  -
  -    /**
  -     * @see TypeManager#registerTypes( String, String, TypeFactory )
  +     * @see TypeRegistry#registerTypes( String, String, TypeFactory )
        */
       public void registerTypes( String roleName, String namespace, TypeFactory factory )
           throws TypeException
  @@ -96,19 +87,7 @@
       }
   
       /**
  -     * @see TypeManager#registerType( String, String, TypeFactory )
  -     */
  -    public void registerType( final String roleName,
  -                              final String shorthandName,
  -                              final TypeFactory factory )
  -        throws TypeException
  -    {
  -        final NamespaceAwareTypeFactory nsFactory = createFactory( roleName );
  -        nsFactory.registerType( shorthandName, factory );
  -    }
  -
  -    /**
  -     * @see TypeManager#registerType( String, String, String, TypeFactory )
  +     * @see TypeRegistry#registerType( String, String, String, TypeFactory )
        */
       public void registerType( final String roleName,
                                 final String namespace,
  
  
  
  1.5       +1 -24     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/type/NamespaceAwareTypeFactory.java
  
  Index: NamespaceAwareTypeFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/type/NamespaceAwareTypeFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NamespaceAwareTypeFactory.java	12 May 2002 04:03:32 -0000	1.4
  +++ NamespaceAwareTypeFactory.java	27 May 2002 08:30:30 -0000	1.5
  @@ -24,7 +24,7 @@
    * searched for a type matching the type name.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.4 $ $Date: 2002/05/12 04:03:32 $
  + * @version $Revision: 1.5 $ $Date: 2002/05/27 08:30:30 $
    */
   class NamespaceAwareTypeFactory
       extends AbstractTypeFactory
  @@ -75,15 +75,6 @@
       }
   
       /**
  -     * Registers all types in a factory under the default namespace.
  -     * @param newTypes The factory containing types to register.
  -     */
  -    public void registerTypes( final TypeFactory newTypes )
  -    {
  -        registerTypes( null, newTypes );
  -    }
  -
  -    /**
        * Registers all types in a factory under the specified namespace.
        * @param namespace The namespace to register the types under, or
        *                  <code>null</code> to use the default namespace.
  @@ -115,20 +106,6 @@
           // Clear the cache of type factories.
           clearCache();
   
  -    }
  -
  -    /**
  -     * Register a named type under the default namespace ("").
  -     * Equivelant to calling <code>registerType( null, name, factory )</code>
  -     * @param name The name of the type.
  -     * @param factory The factory for instances of this type.
  -     * @throws TypeException If the type name is invalid.
  -     */
  -    public void registerType( final String name,
  -                              final TypeFactory factory )
  -        throws TypeException
  -    {
  -        registerType( null, name, factory );
       }
   
       /**
  
  
  
  1.72      +3 -1      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
  
  Index: DefaultWorkspace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- DefaultWorkspace.java	23 May 2002 09:18:10 -0000	1.71
  +++ DefaultWorkspace.java	27 May 2002 08:30:30 -0000	1.72
  @@ -28,6 +28,7 @@
   import org.apache.myrmidon.interfaces.oldmodel.Target;
   import org.apache.myrmidon.interfaces.service.ScopedService;
   import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.type.TypeRegistry;
   import org.apache.myrmidon.interfaces.workspace.Workspace;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   
  @@ -35,7 +36,7 @@
    * This is the default implementation of Workspace.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.71 $ $Date: 2002/05/23 09:18:10 $
  + * @version $Revision: 1.72 $ $Date: 2002/05/27 08:30:30 $
    * @todo Merge m_entries and m_projects
    */
   public class DefaultWorkspace
  @@ -128,6 +129,7 @@
           // Add child services, for the scoped services.
           final Map scopedServices = new HashMap();
           addChildService( TypeManager.ROLE, serviceManager, scopedServices );
  +        addChildService( TypeRegistry.ROLE, serviceManager, scopedServices );
           addChildService( Deployer.ROLE, serviceManager, scopedServices );
           addChildService( Configurer.ROLE, serviceManager, scopedServices );
           setupServices( scopedServices.values(), serviceManager );
  
  
  
  1.4       +7 -8      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/deployer/DefaultTypeDeployer.java
  
  Index: DefaultTypeDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/deployer/DefaultTypeDeployer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultTypeDeployer.java	22 May 2002 07:36:22 -0000	1.3
  +++ DefaultTypeDeployer.java	27 May 2002 08:30:30 -0000	1.4
  @@ -10,31 +10,30 @@
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.Serviceable;
  -import org.apache.myrmidon.interfaces.deployer.TypeDefinition;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
  -import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.type.TypeRegistry;
   
   /**
    * A general-purpose type deployer, which registers the type with the type
    * manager.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.3 $ $Date: 2002/05/22 07:36:22 $
  + * @version $Revision: 1.4 $ $Date: 2002/05/27 08:30:30 $
    */
   public class DefaultTypeDeployer
       implements TypeDeployer, Serviceable
   {
  -    private TypeManager m_typeManager;
  +    private TypeRegistry m_typeRegistry;
   
  -    protected TypeManager getTypeManager()
  +    protected TypeRegistry getTypeRegistry()
       {
  -        return m_typeManager;
  +        return m_typeRegistry;
       }
   
       public void service( final ServiceManager serviceManager )
           throws ServiceException
       {
  -        m_typeManager = (TypeManager)serviceManager.lookup( TypeManager.ROLE );
  +        m_typeRegistry = (TypeRegistry)serviceManager.lookup( TypeRegistry.ROLE );
       }
   
       /**
  @@ -47,6 +46,6 @@
           final String roleName = typeDefinition.getRole();
           final String typeName = typeDefinition.getName();
           final TypeFactory typeFactory = typeDefinition.getFactory();
  -        m_typeManager.registerType( roleName, namespace, typeName, typeFactory );
  +        m_typeRegistry.registerType( roleName, namespace, typeName, typeFactory );
       }
   }
  
  
  
  1.14      +2 -46     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/type/TypeManager.java
  
  Index: TypeManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/type/TypeManager.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TypeManager.java	23 May 2002 04:26:26 -0000	1.13
  +++ TypeManager.java	27 May 2002 08:30:30 -0000	1.14
  @@ -8,11 +8,11 @@
   package org.apache.myrmidon.interfaces.type;
   
   /**
  - * The interface that is used to manage types.
  + * This interface is used to lookup type factories.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.13 $ $Date: 2002/05/23 04:26:26 $
  + * @version $Revision: 1.14 $ $Date: 2002/05/27 08:30:30 $
    */
   public interface TypeManager
   {
  @@ -23,50 +23,6 @@
        * Character used to separate namespace from type name.
        */
       char NAMESPACE_SEPARATOR = '.';
  -
  -    /**
  -     * Registers all types in a factor, with no namespace specified.
  -     * All types provided by the factory must be of the role specified.
  -     * @param roleName The role for the types.
  -     * @param factory The factory contianing types to register.
  -     * @throws TypeException If an error occurs.
  -     */
  -    void registerTypes( String roleName, TypeFactory factory )
  -        throws TypeException;
  -
  -    /**
  -     * Registers all types in a factor, under the namespace specified.
  -     * All types provided by the factory must be of the role specified.
  -     * @param roleName The role for the types.
  -     * @param namespace The namespace to register the type under
  -     * @param factory The factory contianing types to register.
  -     * @throws TypeException If an error occurs.
  -     */
  -    void registerTypes( String roleName, String namespace, TypeFactory factory )
  -        throws TypeException;
  -
  -    /**
  -     * Registers a single type, with no namespace specified.
  -     *
  -     * @param roleName The role for the type.
  -     * @param shorthandName The shorthand name for the type.
  -     * @param factory The type factory.
  -     * @throws TypeException If an error occurs.
  -     */
  -    void registerType( String roleName, String shorthandName, TypeFactory factory )
  -        throws TypeException;
  -
  -    /**
  -     * Registers a single type under the specified namespace.
  -     * @param roleName The role for the type.
  -     * @param namespace The namespace to register the type under
  -     * @param shorthandName The shorthand name for the type.
  -     * @param factory The type factory for instances of this type.
  -     * @throws TypeException If an error occurs.
  -     */
  -    void registerType( String roleName, String namespace,
  -                       String shorthandName, TypeFactory factory )
  -        throws TypeException;
   
       /**
        * Returns the factory for a role.
  
  
  
  1.1                  jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/type/TypeRegistry.java
  
  Index: TypeRegistry.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.interfaces.type;
  
  /**
   * This interface is used to manage types.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/05/27 08:30:30 $
   */
  public interface TypeRegistry
  {
      String ROLE = TypeRegistry.class.getName();
  
      /**
       * Registers all types in a factory.  All types provided by the factory
       * must be assignable to the implementation class of the specified role.
       *
       * @param roleName The role for the types.
       * @param namespace The namespace to register the types under.  Use
       *        null to register the types into the default namespace.
       * @param factory The factory to register the types for.
       */
      void registerTypes( String roleName, String namespace, TypeFactory factory )
          throws TypeException;
  
      /**
       * Registers a single type.
       *
       * @param roleName The role for the type.
       * @param namespace The namespace to register the type under.  Use
       *        null to register the types into the default namespace.
       * @param shorthandName The shorthand name for the type.
       * @param factory The type factory for instances of this type.
       * @throws TypeException If an error occurs.
       */
      void registerType( String roleName,
                         String namespace,
                         String shorthandName,
                         TypeFactory factory )
          throws TypeException;
  }
  
  
  
  1.42      +5 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/AbstractComponentTest.java
  
  Index: AbstractComponentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/AbstractComponentTest.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- AbstractComponentTest.java	27 May 2002 02:17:45 -0000	1.41
  +++ AbstractComponentTest.java	27 May 2002 08:30:30 -0000	1.42
  @@ -56,12 +56,13 @@
   import org.apache.myrmidon.interfaces.service.ServiceFactory;
   import org.apache.myrmidon.interfaces.type.DefaultTypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.type.TypeRegistry;
   
   /**
    * A base class for tests for the default components.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.41 $ $Date: 2002/05/27 02:17:45 $
  + * @version $Revision: 1.42 $ $Date: 2002/05/27 08:30:30 $
    */
   public abstract class AbstractComponentTest
       extends AbstractContainerTestCase
  @@ -93,6 +94,7 @@
   
               component = createComponent( TypeManager.ROLE, DefaultTypeManager.class );
               m_serviceManager.put( TypeManager.ROLE, component );
  +            m_serviceManager.put( TypeRegistry.ROLE, component );
               components.add( component );
   
               component = createComponent( Configurer.ROLE, DefaultConfigurer.class );
  @@ -270,7 +272,8 @@
           throws Exception
       {
           final DefaultTypeFactory factory = new DefaultTypeFactory( typeName, type );
  -        getTypeManager().registerType( roleName, typeName, factory );
  +        final TypeRegistry typeRegistry = (TypeRegistry)getServiceManager().lookup( TypeRegistry.ROLE
);
  +        typeRegistry.registerType( roleName, null, typeName, factory );
       }
   
       /**
  
  
  
  1.8       +4 -4      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/service/test/InstantiatingServiceManagerTestCase.java
  
  Index: InstantiatingServiceManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/service/test/InstantiatingServiceManagerTestCase.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- InstantiatingServiceManagerTestCase.java	22 May 2002 07:36:23 -0000	1.7
  +++ InstantiatingServiceManagerTestCase.java	27 May 2002 08:30:30 -0000	1.8
  @@ -16,13 +16,13 @@
   import org.apache.myrmidon.interfaces.role.RoleRegistry;
   import org.apache.myrmidon.interfaces.service.ServiceFactory;
   import org.apache.myrmidon.interfaces.type.DefaultTypeFactory;
  -import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.type.TypeRegistry;
   
   /**
    * Test cases for the default service manager.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.7 $ $Date: 2002/05/22 07:36:23 $
  + * @version $Revision: 1.8 $ $Date: 2002/05/27 08:30:30 $
    */
   public class InstantiatingServiceManagerTestCase
       extends AbstractComponentTest
  @@ -143,7 +143,7 @@
           final RoleRegistry roleRegistry = (RoleRegistry)getServiceManager().lookup( RoleRegistry.ROLE
);
           roleRegistry.addRole( new RoleInfo( serviceRoleName, serviceType ) );
           final DefaultTypeFactory typeFactory = new DefaultTypeFactory( serviceRoleName,
factoryClass );
  -        final TypeManager typeManager = (TypeManager)getServiceManager().lookup( TypeManager.ROLE
);
  -        typeManager.registerType( ServiceFactory.ROLE, serviceRoleName, typeFactory );
  +        final TypeRegistry typeRegistry = (TypeRegistry)getServiceManager().lookup( TypeRegistry.ROLE
);
  +        typeRegistry.registerType( ServiceFactory.ROLE, null, serviceRoleName, typeFactory
);
       }
   }
  
  
  
  1.6       +4 -11     jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/type/test/DefaultTypeManagerTestCase.java
  
  Index: DefaultTypeManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/type/test/DefaultTypeManagerTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultTypeManagerTestCase.java	23 May 2002 04:26:26 -0000	1.5
  +++ DefaultTypeManagerTestCase.java	27 May 2002 08:30:30 -0000	1.6
  @@ -14,13 +14,14 @@
   import org.apache.myrmidon.interfaces.type.TypeException;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
  +import org.apache.myrmidon.interfaces.type.TypeRegistry;
   import org.apache.myrmidon.interfaces.role.RoleInfo;
   
   /**
    * Test cases for the DefaultTypeManager
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.5 $ $Date: 2002/05/23 04:26:26 $
  + * @version $Revision: 1.6 $ $Date: 2002/05/27 08:30:30 $
    */
   public class DefaultTypeManagerTestCase
       extends AbstractComponentTest
  @@ -326,7 +327,7 @@
       /**
        * Registers a type with the provided TypeManager.
        */
  -    private void registerType( final TypeManager typeManager,
  +    private void registerType( final TypeRegistry typeRegistry,
                                  final String roleName,
                                  final String namespace,
                                  final String typeName,
  @@ -334,15 +335,7 @@
           throws TypeException
       {
           DefaultTypeFactory factory = new DefaultTypeFactory( typeName, type );
  -
  -        if( namespace == null )
  -        {
  -            typeManager.registerType( roleName, typeName, factory );
  -        }
  -        else
  -        {
  -            typeManager.registerType( roleName, namespace, typeName, factory );
  -        }
  +        typeRegistry.registerType( roleName, namespace, typeName, factory );
       }
   
       /**
  
  
  
  1.5       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/DataTypeDeployer.java
  
  Index: DataTypeDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/DataTypeDeployer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DataTypeDeployer.java	22 May 2002 07:36:24 -0000	1.4
  +++ DataTypeDeployer.java	27 May 2002 08:30:30 -0000	1.5
  @@ -19,7 +19,7 @@
    * task with the same name.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.4 $ $Date: 2002/05/22 07:36:24 $
  + * @version $Revision: 1.5 $ $Date: 2002/05/27 08:30:30 $
    */
   public class DataTypeDeployer
       extends DefaultTypeDeployer
  @@ -41,6 +41,6 @@
           final String name = typeDefinition.getName();
           final TypeFactory typeFactory = typeDefinition.getFactory();
           m_factory.addMapping( name, typeFactory );
  -        getTypeManager().registerType( Task.ROLE, namespace, name, m_factory );
  +        getTypeRegistry().registerType( Task.ROLE, namespace, name, m_factory );
       }
   }
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/listener/ProjectListenerDeployer.java
  
  Index: ProjectListenerDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/listener/ProjectListenerDeployer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProjectListenerDeployer.java	22 May 2002 07:36:24 -0000	1.2
  +++ ProjectListenerDeployer.java	27 May 2002 08:30:30 -0000	1.3
  @@ -18,7 +18,7 @@
    * ProjectListener, and a TaskListener.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/05/22 07:36:24 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/27 08:30:30 $
    */
   public class ProjectListenerDeployer
       extends DefaultTypeDeployer
  @@ -39,6 +39,6 @@
           final String typeName = typeDefinition.getName();
           final TypeFactory typeFactory = typeDefinition.getFactory();
           m_factory.addMapping( typeName, typeFactory );
  -        getTypeManager().registerType( TaskListener.ROLE, namespace, typeDefinition.getName(),
m_factory );
  +        getTypeRegistry().registerType( TaskListener.ROLE, namespace, typeDefinition.getName(),
m_factory );
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message