avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl DefaultFactory.java
Date Sat, 03 Jan 2004 22:08:22 GMT
mcconnell    2004/01/03 14:08:22

  Modified:    merlin/composition/api/src/java/org/apache/avalon/composition/model
                        Tag: Ver_3_4 ContainmentContext.java
               merlin/composition/impl Tag: Ver_3_4 maven.xml
               merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        Tag: Ver_3_4 DefaultContainmentContext.java
                        DefaultContainmentModel.java
                        DefaultModelFactory.java
               merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl
                        Tag: Ver_3_4 DefaultFactory.java
  Added:       merlin/composition/api/src/java/org/apache/avalon/composition/model
                        Tag: Ver_3_4 Composite.java DependencyGraph.java
                        Dependent.java
               merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl
                        Tag: Ver_3_4 DefaultDependent.java
                        DefaultModelRepository.java DefaultState.java
  Log:
  Incorporate dependecy graph management within the main meta model.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.1.1.2.2 +8 -1      avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentContext.java
  
  Index: ContainmentContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentContext.java,v
  retrieving revision 1.1.1.1.2.1
  retrieving revision 1.1.1.1.2.2
  diff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2
  --- ContainmentContext.java	3 Jan 2004 15:38:50 -0000	1.1.1.1.2.1
  +++ ContainmentContext.java	3 Jan 2004 22:08:21 -0000	1.1.1.1.2.2
  @@ -136,4 +136,11 @@
       */
       ModelRepository getModelRepository();
   
  +
  +   /**
  +    * Return the model dependency graph.
  +    *
  +    * @return the dependency graph
  +    */
  +    DependencyGraph getDependencyGraph();
   }
  
  
  
  No                   revision
  
  Index: ContainmentContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentContext.java,v
  retrieving revision 1.1.1.1.2.1
  retrieving revision 1.1.1.1.2.2
  diff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2
  --- ContainmentContext.java	3 Jan 2004 15:38:50 -0000	1.1.1.1.2.1
  +++ ContainmentContext.java	3 Jan 2004 22:08:21 -0000	1.1.1.1.2.2
  @@ -136,4 +136,11 @@
       */
       ModelRepository getModelRepository();
   
  +
  +   /**
  +    * Return the model dependency graph.
  +    *
  +    * @return the dependency graph
  +    */
  +    DependencyGraph getDependencyGraph();
   }
  
  
  
  No                   revision
  
  Index: ContainmentContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentContext.java,v
  retrieving revision 1.1.1.1.2.1
  retrieving revision 1.1.1.1.2.2
  diff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2
  --- ContainmentContext.java	3 Jan 2004 15:38:50 -0000	1.1.1.1.2.1
  +++ ContainmentContext.java	3 Jan 2004 22:08:21 -0000	1.1.1.1.2.2
  @@ -136,4 +136,11 @@
       */
       ModelRepository getModelRepository();
   
  +
  +   /**
  +    * Return the model dependency graph.
  +    *
  +    * @return the dependency graph
  +    */
  +    DependencyGraph getDependencyGraph();
   }
  
  
  
  1.1.2.1   +87 -0     avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Attic/Composite.java
  
  
  
  
  1.1.2.1   +393 -0    avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Attic/DependencyGraph.java
  
  
  
  
  1.1.2.1   +83 -0     avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/Attic/Dependent.java
  
  
  
  
  No                   revision
  No                   revision
  1.1.1.1.2.1 +2 -0      avalon/merlin/composition/impl/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/maven.xml,v
  retrieving revision 1.1.1.1
  retrieving revision 1.1.1.1.2.1
  diff -u -r1.1.1.1 -r1.1.1.1.2.1
  --- maven.xml	24 Sep 2003 09:31:24 -0000	1.1.1.1
  +++ maven.xml	3 Jan 2004 22:08:21 -0000	1.1.1.1.2.1
  @@ -51,6 +51,8 @@
         </fileset>
       </ant:delete>
   
  +    <ant:copy toDir="${basedir}/target/test-classes/repository/avalon-framework" 
  +      file="${pom.getDependencyPath('avalon-framework:avalon-framework-impl')}"/>
       <ant:copy toDir="${basedir}/target/test-classes/ext" 
         file="${pom.getDependencyPath('avalon-framework:avalon-framework-api')}"/>
       <ant:copy toDir="${basedir}/target/test-classes/ext" 
  
  
  
  No                   revision
  No                   revision
  1.2.2.2   +24 -5     avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentContext.java
  
  Index: DefaultContainmentContext.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentContext.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- DefaultContainmentContext.java	3 Jan 2004 15:38:50 -0000	1.2.2.1
  +++ DefaultContainmentContext.java	3 Jan 2004 22:08:21 -0000	1.2.2.2
  @@ -4,7 +4,7 @@
                      The Apache Software License, Version 1.1
    ============================================================================
   
  - Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
  + Copyright (C) 1999-2004 The Apache Software Foundation. All rights reserved.
   
    Redistribution and use in source and binary forms, with or without modifica-
    tion, are permitted provided that the following conditions are met:
  @@ -52,6 +52,7 @@
   
   import java.io.File;
   
  +import org.apache.avalon.composition.model.DependencyGraph;
   import org.apache.avalon.composition.model.SystemContext;
   import org.apache.avalon.composition.model.ContainmentContext;
   import org.apache.avalon.composition.model.ClassLoaderModel;
  @@ -101,6 +102,8 @@
   
       private final ModelRepository m_repository;
   
  +    private final DependencyGraph m_graph;
  +
       //==============================================================
       // constructor
       //==============================================================
  @@ -111,13 +114,15 @@
       * @param logger the logging channel to assign
       * @param system the system context
       * @param model the classloader model
  +    * @param repository the parent model repository
  +    * @param graph the parent dependency graph
       * @param profile the containment profile
       */
       public DefaultContainmentContext( 
         Logger logger, SystemContext system, ClassLoaderModel model, 
  -      ModelRepository repository, ContainmentProfile profile )
  +      ModelRepository repository, DependencyGraph graph, ContainmentProfile profile )
       {
  -        this( logger, system, model, repository,
  +        this( logger, system, model, repository, graph,
             system.getHomeDirectory(), system.getTempDirectory(), 
             profile, null, "" );
       }
  @@ -129,6 +134,7 @@
       * @param system the system context
       * @param model the classloader model
       * @param repository the parent model repository
  +    * @param graph the parent dependency graph
       * @param home the directory for the container
       * @param temp a temporary directory for the container
       * @param profile the containment profile
  @@ -137,7 +143,8 @@
       * @param name the assigned containment context name
       */
       public DefaultContainmentContext( 
  -      Logger logger, SystemContext system, ClassLoaderModel model, ModelRepository repository,
  +      Logger logger, SystemContext system, ClassLoaderModel model, 
  +      ModelRepository repository, DependencyGraph graph, 
         File home, File temp, ContainmentProfile profile, String partition, String name )
       {
           if( logger == null )
  @@ -180,6 +187,8 @@
               throw new IllegalArgumentException( error );
           }
   
  +        
  +        m_graph = new DependencyGraph( graph );
           m_repository = new DefaultModelRepository( repository, logger );
           m_logger = logger;
           m_system = system;
  @@ -298,5 +307,15 @@
       public ClassLoader getClassLoader()
       {
           return m_model.getClassLoader();
  +    }
  +
  +   /**
  +    * Return the model dependency graph.
  +    *
  +    * @return the dependency graph
  +    */
  +    public DependencyGraph getDependencyGraph()
  +    {
  +        return m_graph;
       }
   }
  
  
  
  1.13.2.4  +6 -2      avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
  
  Index: DefaultContainmentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v
  retrieving revision 1.13.2.3
  retrieving revision 1.13.2.4
  diff -u -r1.13.2.3 -r1.13.2.4
  --- DefaultContainmentModel.java	3 Jan 2004 16:12:19 -0000	1.13.2.3
  +++ DefaultContainmentModel.java	3 Jan 2004 22:08:21 -0000	1.13.2.4
  @@ -77,11 +77,13 @@
   import org.apache.avalon.composition.data.builder.XMLContainmentProfileCreator;
   import org.apache.avalon.composition.event.CompositionEvent;
   import org.apache.avalon.composition.event.CompositionEventListener;
  +import org.apache.avalon.composition.model.AssemblyException;
   import org.apache.avalon.composition.model.Composite;
   import org.apache.avalon.composition.model.ClassLoaderContext;
   import org.apache.avalon.composition.model.ClassLoaderModel;
   import org.apache.avalon.composition.model.ContainmentModel;
   import org.apache.avalon.composition.model.ContainmentContext;
  +import org.apache.avalon.composition.model.DependencyGraph;
   import org.apache.avalon.composition.model.DeploymentModel;
   import org.apache.avalon.composition.model.Model;
   import org.apache.avalon.composition.model.ModelException;
  @@ -90,7 +92,6 @@
   import org.apache.avalon.composition.model.ModelSelector;
   import org.apache.avalon.composition.model.ProfileSelector;
   import org.apache.avalon.composition.model.TypeRepository;
  -import org.apache.avalon.composition.model.AssemblyException;
   import org.apache.avalon.composition.logging.LoggingManager;
   import org.apache.avalon.composition.util.StringHelper;
   import org.apache.avalon.repository.Repository;
  @@ -696,10 +697,13 @@
               ModelRepository modelRepository = 
                 m_context.getModelRepository();
   
  +            DependencyGraph graph = 
  +              m_context.getDependencyGraph();
  +
               DefaultContainmentContext context = 
                 new DefaultContainmentContext( 
                   logger, m_context.getSystemContext(), 
  -                classLoaderModel, modelRepository, home, temp, profile, partition, name
);
  +                classLoaderModel, modelRepository, graph, home, temp, profile, partition,
name );
   
               //
               // TODO: lookup the profile for a factory declaration, then 
  
  
  
  1.3.2.2   +2 -2      avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultModelFactory.java
  
  Index: DefaultModelFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultModelFactory.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- DefaultModelFactory.java	3 Jan 2004 15:38:50 -0000	1.3.2.1
  +++ DefaultModelFactory.java	3 Jan 2004 22:08:21 -0000	1.3.2.2
  @@ -244,7 +244,7 @@
                 new DefaultClassLoaderModel( classLoaderContext );
   
               return new DefaultContainmentContext( 
  -                logger, m_system, classLoaderModel, null, profile );
  +                logger, m_system, classLoaderModel, null, null, profile );
           }
           catch( Throwable e )
           {
  
  
  
  No                   revision
  
  Index: DefaultModelFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultModelFactory.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- DefaultModelFactory.java	3 Jan 2004 15:38:50 -0000	1.3.2.1
  +++ DefaultModelFactory.java	3 Jan 2004 22:08:21 -0000	1.3.2.2
  @@ -244,7 +244,7 @@
                 new DefaultClassLoaderModel( classLoaderContext );
   
               return new DefaultContainmentContext( 
  -                logger, m_system, classLoaderModel, null, profile );
  +                logger, m_system, classLoaderModel, null, null, profile );
           }
           catch( Throwable e )
           {
  
  
  
  No                   revision
  
  Index: DefaultModelFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultModelFactory.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- DefaultModelFactory.java	3 Jan 2004 15:38:50 -0000	1.3.2.1
  +++ DefaultModelFactory.java	3 Jan 2004 22:08:21 -0000	1.3.2.2
  @@ -244,7 +244,7 @@
                 new DefaultClassLoaderModel( classLoaderContext );
   
               return new DefaultContainmentContext( 
  -                logger, m_system, classLoaderModel, null, profile );
  +                logger, m_system, classLoaderModel, null, null, profile );
           }
           catch( Throwable e )
           {
  
  
  
  1.1.2.1   +124 -0    avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/Attic/DefaultDependent.java
  
  
  
  
  1.1.2.1   +236 -0    avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/Attic/DefaultModelRepository.java
  
  
  
  
  1.1.2.1   +94 -0     avalon/merlin/composition/impl/src/java/org/apache/avalon/composition/model/impl/Attic/DefaultState.java
  
  
  
  
  No                   revision
  No                   revision
  1.7.2.2   +1 -0      avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java
  
  Index: DefaultFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- DefaultFactory.java	3 Jan 2004 15:38:50 -0000	1.7.2.1
  +++ DefaultFactory.java	3 Jan 2004 22:08:22 -0000	1.7.2.2
  @@ -624,6 +624,7 @@
             context, 
             classLoaderModel,
             null,
  +          null,
             profile );
       }
   
  
  
  

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


Mime
View raw message