*** empty log message ***

mp2079 [2003-04-26 23:13:57]
*** empty log message ***
Filename
littlejil/LittleJILLoaderServletComponent.java
littlejil/TaskAllocatorPlugin.java
diff --git a/littlejil/LittleJILLoaderServletComponent.java b/littlejil/LittleJILLoaderServletComponent.java
index 1c50cb5..298fdf2 100644
--- a/littlejil/LittleJILLoaderServletComponent.java
+++ b/littlejil/LittleJILLoaderServletComponent.java
@@ -1,6 +1,9 @@
 package psl.workflakes.littlejil;

+import psl.ai2tv.workflow.assets.*;
+
 import java.io.*;
+import java.util.Vector;
 import javax.servlet.*;
 import javax.servlet.http.*;

@@ -9,7 +12,10 @@ import laser.littlejil.Program;
 import org.apache.log4j.Logger;
 import org.cougaar.core.blackboard.BlackboardClient;
 import org.cougaar.core.service.BlackboardService;
+import org.cougaar.core.service.PrototypeRegistryService;
+import org.cougaar.core.service.DomainService;
 import org.cougaar.core.servlet.BaseServletComponent;
+import org.cougaar.core.domain.RootFactory;

 /**
  * Servlet that can load Little-JIL diagrams into the blackboard. Mostly for testing
@@ -18,6 +24,7 @@ import org.cougaar.core.servlet.BaseServletComponent;
 public class LittleJILLoaderServletComponent extends BaseServletComponent implements BlackboardClient {

     private static final Logger logger = Logger.getLogger(LittleJILLoaderServletComponent.class);
+    private RootFactory factory;

     protected String getPath() {
         return "/littlejil";
@@ -33,13 +40,51 @@ public class LittleJILLoaderServletComponent extends BaseServletComponent implem
         this.blackboard = blackboard;
     }

+    public void setDomainService(DomainService domainService) {
+        factory = domainService.getFactory();
+    }
+
+    public void setPrototypeRegistryService(PrototypeRegistryService prototypeRegistryService) {
+
+        factory.addPropertyGroupFactory(new PropertyGroupFactory());
+
+        // set the Prototypes for Assets
+        ReportAsset reportProto = (ReportAsset) factory.createPrototype(ReportAsset.class, "ReportProto");
+        prototypeRegistryService.cachePrototype("ReportProto", reportProto);
+
+        ClientAsset clientProto = (ClientAsset)factory.createPrototype(ClientAsset.class, "ClientProto");
+        prototypeRegistryService.cachePrototype("ClientProto", clientProto);
+
+    }
+
     private class LoaderServlet extends HttpServlet {

         public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

             String diagramName = request.getParameter("diagramName");
             String msg = "";
-            if (diagramName != null) {
+            if (request.getParameter("ai2tv") != null) {
+
+                final ClientAsset client = (ClientAsset) factory.createInstance("ClientProto");
+                client.setClientPG(factory.createPropertyGroup("ClientPG"));
+                client.setFramePG(factory.createPropertyGroup("FramePG"));
+
+                ReportAsset reportAsset = (ReportAsset) factory.createInstance("ReportProto");
+                NewBucketPG bucketPG = (NewBucketPG) factory.createPropertyGroup("BucketPG");
+                bucketPG.setSampleTime(System.currentTimeMillis());
+                bucketPG.setGroup(new Vector() { { add(client);} });
+                reportAsset.setBucketPG(bucketPG);
+
+                blackboard.openTransaction();
+                blackboard.publishAdd(reportAsset);
+                blackboard.closeTransaction();
+
+                logger.debug("published report asset");
+                msg = "Published report asset";
+
+
+            }
+            else if (diagramName != null) {

                 Diagram diagram = null;
                 try {
@@ -69,6 +114,7 @@ public class LittleJILLoaderServletComponent extends BaseServletComponent implem
             out.println("Diagram name: <input type=text name=diagramName value=\"" +
                     (diagramName == null ? "" : diagramName) + "\"> " +
                     "<input type=submit>");
+            out.println("<br><br><input type=submit name=\"ai2tv\" value=\"Test ai2tv diagram\">");
             out.println("</form>");


diff --git a/littlejil/TaskAllocatorPlugin.java b/littlejil/TaskAllocatorPlugin.java
index b7a6f32..989070e 100644
--- a/littlejil/TaskAllocatorPlugin.java
+++ b/littlejil/TaskAllocatorPlugin.java
@@ -85,7 +85,7 @@ public class TaskAllocatorPlugin extends ComponentPlugin {

         // TEMPORARY: create exec agents
         {
-            ExecClassAgentAsset asset = (ExecClassAgentAsset) factory.createInstance("ExecClassAgent");
+            /*ExecClassAgentAsset asset = (ExecClassAgentAsset) factory.createInstance("ExecClassAgent");
             NewExecutorPG executorPG = (NewExecutorPG) factory.createPropertyGroup("ExecutorPG");
             executorPG.setCapabilities("any");

@@ -95,7 +95,7 @@ public class TaskAllocatorPlugin extends ComponentPlugin {
             asset.setExecutorPG(executorPG);
             asset.setClassPG(classPG);

-            blackboard.publishAdd(asset);
+            blackboard.publishAdd(asset);*/
         }

         /*{