You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/07/27 17:02:51 UTC

cvs commit: avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/writer XMLContainmentProfileWriter.java

mcconnell    2003/07/27 08:02:51

  Modified:    merlin/composition/src/java/org/apache/avalon/composition/data/builder
                        XMLContainmentProfileCreator.java
               merlin/composition/src/java/org/apache/avalon/composition/data/writer
                        XMLContainmentProfileWriter.java
  Log:
  Removal of dependency declarations on containment profiles.
  
  Revision  Changes    Path
  1.4       +3 -25     avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/builder/XMLContainmentProfileCreator.java
  
  Index: XMLContainmentProfileCreator.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/builder/XMLContainmentProfileCreator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLContainmentProfileCreator.java	27 Jul 2003 11:50:05 -0000	1.3
  +++ XMLContainmentProfileCreator.java	27 Jul 2003 15:02:51 -0000	1.4
  @@ -115,8 +115,7 @@
           //
   
           final String name = getName( null, config, "untitled" );
  -        DependencyDescriptor[] imports = 
  -          getDependencies( config.getChild( "dependencies", false ) );
  +
           ServiceDirective[] exports = 
             getServicesDirectives( config.getChild( "services", false ) );
   
  @@ -134,7 +133,7 @@
           // return the containment profile
           // 
   
  -        return new ContainmentProfile( name, classloader, imports, exports, profiles );
  +        return new ContainmentProfile( name, classloader, exports, profiles );
       }
   
       private ClassLoaderDirective getClassLoaderDirective( Configuration config )
  @@ -340,27 +339,6 @@
               }
           }
           return (Profile[]) list.toArray( new Profile[0] );
  -    }
  -
  -    protected DependencyDescriptor[] getDependencies( Configuration config )
  -       throws MetaDataException
  -    {
  -        if( config == null )
  -        {
  -            return new DependencyDescriptor[0];
  -        }
  -
  -        try
  -        {
  -            return TYPE_CREATOR.buildDependencies( config );
  -        }
  -        catch( Throwable ce )
  -        {
  -            final String error =
  -              "Invalid dependencies declaration in block specification:\n"
  -               + ConfigurationUtil.list( config );
  -            throw new MetaDataException( error, ce );
  -        }
       }
   
      /**
  
  
  
  1.2       +1 -34     avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/writer/XMLContainmentProfileWriter.java
  
  Index: XMLContainmentProfileWriter.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/writer/XMLContainmentProfileWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLContainmentProfileWriter.java	17 Jul 2003 21:21:57 -0000	1.1
  +++ XMLContainmentProfileWriter.java	27 Jul 2003 15:02:51 -0000	1.2
  @@ -123,7 +123,6 @@
           writer.write( pad + "<container name=\"" + profile.getName() + "\">");
           final String padding = pad + INDENT;
           writeServiceDirectives( writer, profile.getServiceDirectives(), padding );
  -        writeDependencies( writer, profile.getDependencies(), padding );
           writeClassLoader( writer, profile.getClassLoaderDirective( false ), padding );
           writeProfiles( writer, profile.getProfiles(), padding );
           writer.write( "\n" + pad + "</container>" );
  @@ -177,38 +176,6 @@
               writer.write( "\n" + padding + "</service>" );
           }
           writer.write( "\n" + pad + "</services>" );
  -    }
  -
  -    /**
  -     * Write out xml representation of the info descriptor from a Type.
  -     *
  -     * @param writer the writer
  -     * @param info the type info descriptor
  -     * @throws IOException if unable to write xml
  -     */
  -    private void writeDependencies( 
  -      final Writer writer, final DependencyDescriptor[] dependencies, String pad )
  -      throws IOException
  -    {
  -        if( 0 == dependencies.length )
  -        {
  -            return;
  -        }
  -
  -        final String padding = pad + INDENT;
  -        writer.write( "\n" + pad + "<dependencies>" );
  -        for( int i = 0; i < dependencies.length; i++ )
  -        {
  -            final DependencyDescriptor dependency = dependencies[ i ];
  -            writer.write( "\n" + padding + "<dependency type=\"" 
  -              + dependency.getReference().getClassname() + "\"" );
  -            if( dependency.isOptional() )
  -            {
  -                writer.write( " optional=\"true\"" );
  -            }
  -            writer.write( "/>" );
  -        }
  -        writer.write( "\n" + pad + "</dependencies>" );
       }
   
       /**
  
  
  

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