[jboss-svn-commits] JBL Code SVN: r22525 - labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Sep 8 13:05:36 EDT 2008


Author: tfennelly
Date: 2008-09-08 13:05:36 -0400 (Mon, 08 Sep 2008)
New Revision: 22525

Modified:
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentDetailsNotification.java
Log:
toNotification method

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentDetailsNotification.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentDetailsNotification.java	2008-09-08 16:52:38 UTC (rev 22524)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/federate/notify/DeploymentDetailsNotification.java	2008-09-08 17:05:36 UTC (rev 22525)
@@ -21,10 +21,11 @@
 
 import org.jboss.esb.deploy.DeploymentRuntime;
 import org.jboss.esb.deploy.config.DeploymentUnit;
-import org.jboss.esb.routing.OutboundRouter;
 import org.jboss.esb.service.ServiceName;
 
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 /**
  * Deployment details notification.
@@ -39,17 +40,17 @@
     /**
      * The list of services contained in the deployment.
      */
-    private List<ServiceName> services;
+    private Set<ServiceName> services;
     /**
-     * The list of outbound routers contained in the deployment.
+     * The list of services for which the deployment defines outbound routers.
      */
-    private List<OutboundRouter> outboundRouters;
+    private Set<ServiceName> outboundRoutedServices;
 
     /**
      * Get the deployment service list.
      * @return The deployment service list.
      */
-    public final List<ServiceName> getServices()
+    public final Set<ServiceName> getServices()
     {
         return services;
     }
@@ -58,27 +59,27 @@
      * Set the deployment service list.
      * @param services The deployment service list.
      */
-    public final void setServices(final List<ServiceName> services)
+    public final void setServices(final Set<ServiceName> services)
     {
         this.services = services;
     }
 
     /**
-     * Get the deployment {@link OutboundRouter} list.
-     * @return The deployment {@link OutboundRouter} list.
+     * Get the list of services for which the deployment defines outbound routers
+     * @return The list of services for which the deployment defines outbound routers
      */
-    public final List<OutboundRouter> getOutboundRouters()
+    public final Set<ServiceName> getOutboundRoutedServices()
     {
-        return outboundRouters;
+        return outboundRoutedServices;
     }
 
     /**
-     * Set the deployment {@link OutboundRouter} list.
-     * @param outboundRouters The deployment {@link OutboundRouter} list.
+     * Set the list of services for which the deployment defines outbound routers
+     * @param outboundRoutedServices The list of services for which the deployment defines outbound routers
      */
-    public final void setOutboundRouters(final List<OutboundRouter> outboundRouters)
+    public final void setOutboundRoutedServices(final Set<ServiceName> outboundRoutedServices)
     {
-        this.outboundRouters = outboundRouters;
+        this.outboundRoutedServices = outboundRoutedServices;
     }
 
     /**
@@ -92,10 +93,22 @@
 
         notification.setName(runtime.getDeploymentName());
         notification.setId(runtime.getDeploymentID());
+        notification.services = new HashSet<ServiceName>();
+        notification.outboundRoutedServices = new HashSet<ServiceName>();
 
         List<DeploymentUnit> deploymentUnits = runtime.getDeploymentUnits();
-
-
+        for (DeploymentUnit deploymentUnit : deploymentUnits)
+        {
+            if(deploymentUnit.getServices() != null)
+            {
+                notification.services.addAll(deploymentUnit.getServices().keySet());
+            }
+            if(deploymentUnit.getOutboundRouters() != null)
+            {
+                notification.outboundRoutedServices.addAll(deploymentUnit.getOutboundRouters().keySet());
+            }
+        }
+        
         return notification;
     }
 }




More information about the jboss-svn-commits mailing list