ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime Facility.java
Date Sun, 21 Apr 2002 02:00:18 GMT
donaldp     02/04/20 19:00:18

  Modified:    antlib/src/java/org/apache/antlib/core IfTask.java
                        TryCatchTask.java
               antlib/src/java/org/apache/antlib/runtime Facility.java
  Log:
  Configuration --> ModelElement
  
  Revision  Changes    Path
  1.2       +5 -5      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/IfTask.java
  
  Index: IfTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/IfTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IfTask.java	14 Apr 2002 10:55:08 -0000	1.1
  +++ IfTask.java	21 Apr 2002 02:00:18 -0000	1.2
  @@ -10,8 +10,8 @@
   import java.util.ArrayList;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.framework.AbstractContainerTask;
   import org.apache.myrmidon.framework.conditions.AndCondition;
   import org.apache.myrmidon.framework.conditions.Condition;
  @@ -23,7 +23,7 @@
    * then it will execute the inner tasks, else it won't.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:55:08 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/21 02:00:18 $
    * @ant.task name="if"
    */
   public class IfTask
  @@ -74,7 +74,7 @@
           m_condition = andCondition;
       }
   
  -    public void add( final Configuration task )
  +    public void add( final ModelElement task )
       {
           m_tasks.add( task );
       }
  @@ -94,8 +94,8 @@
               return;
           }
   
  -        final Configuration[] tasks =
  -            (Configuration[])m_tasks.toArray( new Configuration[ m_tasks.size() ] );
  +        final ModelElement[] tasks =
  +            (ModelElement[])m_tasks.toArray( new ModelElement[ m_tasks.size() ] );
   
           executeTasks( tasks );
       }
  
  
  
  1.2       +5 -5      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/TryCatchTask.java
  
  Index: TryCatchTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/TryCatchTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TryCatchTask.java	14 Apr 2002 10:55:08 -0000	1.1
  +++ TryCatchTask.java	21 Apr 2002 02:00:18 -0000	1.2
  @@ -9,8 +9,8 @@
   
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.framework.AbstractContainerTask;
   import org.apache.myrmidon.framework.TaskList;
   
  @@ -19,7 +19,7 @@
    * of languages.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:55:08 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/21 02:00:18 $
    * @ant.task name="try-catch"
    */
   public final class TryCatchTask
  @@ -82,14 +82,14 @@
   
           try
           {
  -            final Configuration[] tasks = m_try.getTasks();
  +            final ModelElement[] tasks = m_try.getTasks();
               executeTasks( tasks );
           }
           catch( final TaskException te )
           {
               if( null != m_catch )
               {
  -                final Configuration[] tasks = m_catch.getTasks();
  +                final ModelElement[] tasks = m_catch.getTasks();
                   executeTasks( tasks );
               }
               else
  @@ -101,7 +101,7 @@
           {
               if( null != m_finally )
               {
  -                final Configuration[] tasks = m_finally.getTasks();
  +                final ModelElement[] tasks = m_finally.getTasks();
                   executeTasks( tasks );
               }
           }
  
  
  
  1.2       +11 -11    jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/Facility.java
  
  Index: Facility.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/runtime/Facility.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Facility.java	14 Apr 2002 10:55:08 -0000	1.1
  +++ Facility.java	21 Apr 2002 02:00:18 -0000	1.2
  @@ -9,10 +9,10 @@
   
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.framework.configuration.Configurable;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.metadata.ModelElement;
  +import org.apache.myrmidon.api.metadata.ModelException;
  +import org.apache.myrmidon.api.metadata.Modeller;
   import org.apache.myrmidon.aspects.AspectHandler;
   import org.apache.myrmidon.framework.AbstractContainerTask;
   import org.apache.myrmidon.interfaces.aspect.AspectManager;
  @@ -25,7 +25,7 @@
    */
   public class Facility
       extends AbstractContainerTask
  -    implements Configurable
  +    implements Modeller
   {
       private static final Resources REZ =
           ResourceManager.getPackageResources( Facility.class );
  @@ -33,18 +33,18 @@
       private String m_namespace;
       private AspectHandler m_aspectHandler;
   
  -    public void configure( final Configuration configuration )
  -        throws ConfigurationException
  +    public void model( final ModelElement element )
  +        throws ModelException
       {
  -        final String[] attributes = configuration.getAttributeNames();
  +        final String[] attributes = element.getAttributeNames();
           for( int i = 0; i < attributes.length; i++ )
           {
               final String name = attributes[ i ];
  -            final String value = configuration.getAttribute( name );
  +            final String value = element.getAttribute( name );
               configureAttribute( this, name, value );
           }
   
  -        final Configuration[] children = configuration.getChildren();
  +        final ModelElement[] children = element.getChildren();
   
           if( 1 == children.length )
           {
  @@ -57,7 +57,7 @@
               {
                   final String message =
                       REZ.getString( "facility.no-create.error", typeName );
  -                throw new ConfigurationException( message, e );
  +                throw new ModelException( message, e );
               }
   
               configureElement( m_aspectHandler, children[ 0 ] );
  @@ -65,7 +65,7 @@
           else
           {
               final String message = REZ.getString( "facility.multi-element.error" );
  -            throw new ConfigurationException( message );
  +            throw new ModelException( message );
           }
       }
   
  
  
  

--
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