donaldp 02/05/20 22:18:38
Modified: container/src/java/org/apache/myrmidon/interfaces/embeddor
Embeddor.java
container/src/java/org/apache/myrmidon/components/embeddor
DefaultEmbeddor.java
Log:
Make it possible for the Embeddor to create the execution frame and return it
to the EmbeddedAnt bean
Revision Changes Path
1.15 +15 -1
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java
Index: Embeddor.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/embeddor/Embeddor.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Embeddor.java 18 May 2002 04:07:44 -0000 1.14
+++ Embeddor.java 21 May 2002 05:18:38 -0000 1.15
@@ -12,12 +12,13 @@
import org.apache.myrmidon.api.event.TaskListener;
import org.apache.myrmidon.interfaces.oldmodel.Project;
import org.apache.myrmidon.interfaces.workspace.Workspace;
+import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
/**
* Interface through which you embed Myrmidon into applications.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
- * @version $Revision: 1.14 $ $Date: 2002/05/18 04:07:44 $
+ * @version $Revision: 1.15 $ $Date: 2002/05/21 05:18:38 $
*/
public interface Embeddor
{
@@ -62,4 +63,17 @@
*/
Workspace createWorkspace( Map properties )
throws Exception;
+
+ /**
+ * Creates a [EMAIL PROTECTED] ExecutionFrame} that can be used to
execute projects.
+ *
+ * @param properties The properties to define in the frame. These
+ * are added to the properties in the embeddor's
+ * root execution frame.
+ * @return the ExecutionFrame
+ * @throws Exception If the frame could not be created.
+ */
+ ExecutionFrame createExecutionFrame( Map properties )
+ throws Exception;
+
}
1.70 +23 -3
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
Index: DefaultEmbeddor.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- DefaultEmbeddor.java 19 May 2002 10:18:06 -0000 1.69
+++ DefaultEmbeddor.java 21 May 2002 05:18:38 -0000 1.70
@@ -32,8 +32,8 @@
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.api.event.TaskListener;
import org.apache.myrmidon.components.property.DefaultPropertyStore;
-import org.apache.myrmidon.interfaces.builder.ProjectBuilder;
import org.apache.myrmidon.interfaces.builder.ModelBuilder;
+import org.apache.myrmidon.interfaces.builder.ProjectBuilder;
import org.apache.myrmidon.interfaces.configurer.Configurer;
import org.apache.myrmidon.interfaces.converter.ConverterRegistry;
import org.apache.myrmidon.interfaces.deployer.Deployer;
@@ -63,7 +63,7 @@
* Instantiate this to embed inside other applications.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
- * @version $Revision: 1.69 $ $Date: 2002/05/19 10:18:06 $
+ * @version $Revision: 1.70 $ $Date: 2002/05/21 05:18:38 $
*/
public class DefaultEmbeddor
extends AbstractLogEnabled
@@ -140,6 +140,27 @@
/**
* Creates a workspace.
*/
+ public ExecutionFrame createExecutionFrame( final Map properties )
+ throws Exception
+ {
+ // Create the property store
+ final PropertyStore propStore = createBaseStore( properties );
+
+ // Create an execution frame, and attach it to the workspace
+ final TaskEventManager eventManager =
+ (TaskEventManager)m_workspaceServiceManager.lookup(
TaskEventManager.ROLE );
+
+ return new DefaultExecutionFrame( "",
+ new File( "." ),
+ getLogger(),
+ propStore,
+ m_workspaceServiceManager,
+ eventManager );
+ }
+
+ /**
+ * Creates a workspace.
+ */
public Workspace createWorkspace( final Map properties )
throws Exception
{
@@ -306,7 +327,6 @@
createComponent( TaskEventManager.ROLE,
TaskEventManager.class,
PREFIX + "event.DefaultTaskEventManager" );
-
m_serviceManager.put( Embeddor.ROLE, this );
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>