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/framework/src/java/org/apache/myrmidon/framework AbstractContainerTask.java
Date Fri, 21 Jun 2002 08:09:55 GMT
donaldp     2002/06/21 01:09:55

  Modified:    container/src/java/org/apache/myrmidon/components/executor
                        DefaultExecutor.java
               container/src/java/org/apache/myrmidon/components/workspace
                        DefaultWorkspace.java
               container/src/java/org/apache/myrmidon/interfaces/executor
                        Executor.java
               framework/src/java/org/apache/myrmidon/framework
                        AbstractContainerTask.java
  Log:
  Make executor take a TaskContext rather than a frame
  
  Revision  Changes    Path
  1.50      +2 -5      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
  
  Index: DefaultExecutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- DefaultExecutor.java	21 Jun 2002 00:59:38 -0000	1.49
  +++ DefaultExecutor.java	21 Jun 2002 08:09:54 -0000	1.50
  @@ -18,7 +18,6 @@
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.event.TaskEventManager;
  -import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.executor.Executor;
   import org.apache.myrmidon.interfaces.type.TypeFactory;
   import org.apache.myrmidon.interfaces.type.TypeManager;
  @@ -40,11 +39,9 @@
        * Executes a task.
        */
       public void execute( final ModelElement taskModel,
  -                         final ExecutionFrame frame )
  +                         final TaskContext context )
           throws TaskException
       {
  -        final TaskContext context = frame.createTaskContext( taskModel.getName(), taskModel.getName()
);
  -
           final TaskEventManager eventManager =
               (TaskEventManager)context.getService( TaskEventManager.class );
           final String taskName = taskModel.getName();
  
  
  
  1.97      +5 -2      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.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- DefaultWorkspace.java	21 Jun 2002 08:05:35 -0000	1.96
  +++ DefaultWorkspace.java	21 Jun 2002 08:09:55 -0000	1.97
  @@ -17,6 +17,7 @@
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.metadata.ModelElement;
   import org.apache.myrmidon.interfaces.deployer.Deployer;
   import org.apache.myrmidon.interfaces.embeddor.Embeddor;
  @@ -344,6 +345,8 @@
           final ExecutionFrame frame =
               entry.getFrame().createChildFrame( target.getName() );
           final Executor executor = (Executor)frame.lookup( Executor.ROLE );
  -        executor.execute( targetModel, frame );
  +        final TaskContext context =
  +            frame.createTaskContext( targetModel.getName(), targetModel.getName() );
  +        executor.execute( targetModel, context );
       }
   }
  
  
  
  1.11      +4 -3      jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/Executor.java
  
  Index: Executor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/executor/Executor.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Executor.java	23 May 2002 01:50:26 -0000	1.10
  +++ Executor.java	21 Jun 2002 08:09:55 -0000	1.11
  @@ -7,6 +7,7 @@
    */
   package org.apache.myrmidon.interfaces.executor;
   
  +import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.metadata.ModelElement;
   
  @@ -25,9 +26,9 @@
        * execute a task.
        *
        * @param task the configruation data for task
  -     * @param frame The frame in which the task is executed.
  +     * @param context The context in which the task is executed.
        * @throws TaskException if an error occurs
        */
  -    void execute( ModelElement task, ExecutionFrame frame )
  +    void execute( ModelElement task, TaskContext context )
           throws TaskException;
   }
  
  
  
  1.11      +6 -4      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java
  
  Index: AbstractContainerTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractContainerTask.java	20 Jun 2002 07:54:44 -0000	1.10
  +++ AbstractContainerTask.java	21 Jun 2002 08:09:55 -0000	1.11
  @@ -167,9 +167,11 @@
       protected final void executeTask( final ModelElement task )
           throws TaskException
       {
  -        final ExecutionFrame frame =
  -            m_frame.createChildFrame( task.getName() );
  -        m_executor.execute( task, frame );
  +        final ExecutionFrame frame = m_frame.createChildFrame( task.getName() );
  +        final TaskContext context =
  +            frame.createTaskContext( task.getName(), task.getName() );
  +
  +        m_executor.execute( task, context );
       }
   
       /**
  
  
  

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