airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1358387 - /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java
Date Fri, 06 Jul 2012 19:58:46 GMT
Author: samindaw
Date: Fri Jul  6 19:58:46 2012
New Revision: 1358387

URL: http://svn.apache.org/viewvc?rev=1358387&view=rev
Log:
delete existing apps before updating service desc

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java?rev=1358387&r1=1358386&r2=1358387&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/DeploymentDescriptionDialog.java
Fri Jul  6 19:58:46 2012
@@ -669,6 +669,14 @@ public class DeploymentDescriptionDialog
 
         try {
 			getRegistry().saveServiceDescription(getServiceDescription());
+			if (!isNewDescription()){
+				Map<HostDescription, List<ApplicationDeploymentDescription>> descs = getRegistry().searchDeploymentDescription(getServiceName());
+				for (HostDescription hostDesc : descs.keySet()) {
+					for (ApplicationDeploymentDescription app : descs.get(hostDesc)) {
+						getRegistry().deleteDeploymentDescription(getServiceName(), hostDesc.getType().getHostName(),
app.getType().getApplicationName().getStringValue());	
+					}
+				}
+			}
 			for (String hostName : getDeployments().keySet()) {
 				getRegistry().saveDeploymentDescription(getServiceName(), hostName, getDeployments().get(hostName).getApplicationDescription());
 			}



Mime
View raw message