avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/data/builder XMLContainmentProfileCreator.java
Date Sun, 06 Jul 2003 02:54:34 GMT
mcconnell    2003/07/05 19:54:34

  Modified:    merlin/meta/src/java/org/apache/avalon/meta/data/builder
                        XMLContainmentProfileCreator.java
  Log:
  Add XML builder support for <block> nested within an <implementation> or <container>
tag.
  
  Revision  Changes    Path
  1.3       +12 -3     avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/data/builder/XMLContainmentProfileCreator.java
  
  Index: XMLContainmentProfileCreator.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/data/builder/XMLContainmentProfileCreator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLContainmentProfileCreator.java	3 Jul 2003 19:06:47 -0000	1.2
  +++ XMLContainmentProfileCreator.java	6 Jul 2003 02:54:34 -0000	1.3
  @@ -67,9 +67,10 @@
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.ServiceDescriptor;
  +import org.apache.avalon.meta.data.CompositionProfile;
   import org.apache.avalon.meta.data.ContainmentProfile;
  -import org.apache.avalon.meta.data.ContextDirective;
   import org.apache.avalon.meta.data.DeploymentProfile;
  +import org.apache.avalon.meta.data.ContextDirective;
   import org.apache.avalon.meta.data.FilesetDirective;
   import org.apache.avalon.meta.data.LibraryDirective;
   import org.apache.avalon.meta.data.ClasspathDirective;
  @@ -102,6 +103,9 @@
       private static final XMLDeploymentProfileCreator DEPLOYMENT_CREATOR = 
         new XMLDeploymentProfileCreator();
   
  +    private static final XMLCompositionProfileCreator BLOCK_CREATOR = 
  +      new XMLCompositionProfileCreator();
  +
       /**
        * Create a {@link ContainmentProfile} from a configuration
        *
  @@ -367,10 +371,15 @@
                   }
                   else if( child.getName().equals( "block" ) )
                   {
  -                    System.out.println( "NESTED BLOCKS NOT IMPLEMENTED YET" );
  +                    list.add( createCompositionProfile( child ) );
                   }
               }
           }
           return (Profile[]) list.toArray( new Profile[0] );
  +    }
  +
  +    private CompositionProfile createCompositionProfile( Configuration config ) throws
Exception
  +    {
  +        return BLOCK_CREATOR.createCompositionProfile( config );
       }
   }
  
  
  

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


Mime
View raw message