airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1405024 - /airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/DescriptorUtil.java
Date Fri, 02 Nov 2012 16:03:42 GMT
Author: chathuri
Date: Fri Nov  2 16:03:42 2012
New Revision: 1405024

URL: http://svn.apache.org/viewvc?rev=1405024&view=rev
Log: (empty)

Modified:
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/DescriptorUtil.java

Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/DescriptorUtil.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/DescriptorUtil.java?rev=1405024&r1=1405023&r2=1405024&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/DescriptorUtil.java
(original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/DescriptorUtil.java
Fri Nov  2 16:03:42 2012
@@ -279,20 +279,30 @@ public class DescriptorUtil {
         if(applicationDeploymentDescription.getType() != null){
             if(applicationDeploymentDescription.getType() instanceof GramApplicationDeploymentType){
                 GramApplicationDeploymentType gramApplicationDeploymentType = (GramApplicationDeploymentType)applicationDeploymentDescription.getType();
-                applicationDescriptor.setCpuCount(gramApplicationDeploymentType.getCpuCount());
-                applicationDescriptor.setNodeCount(gramApplicationDeploymentType.getNodeCount());
-                applicationDescriptor.setMaxMemory(gramApplicationDeploymentType.getMaxMemory());
-                applicationDescriptor.setMinMemory(gramApplicationDeploymentType.getMinMemory());
-                applicationDescriptor.setMaxWallTime(gramApplicationDeploymentType.getMaxWallTime());
-                applicationDescriptor.setQueueName(gramApplicationDeploymentType.getQueue().getQueueName());
+                if(gramApplicationDeploymentType != null){
+                    applicationDescriptor.setCpuCount(gramApplicationDeploymentType.getCpuCount());
+                    applicationDescriptor.setNodeCount(gramApplicationDeploymentType.getNodeCount());
+                    applicationDescriptor.setMaxMemory(gramApplicationDeploymentType.getMaxMemory());
+                    applicationDescriptor.setMinMemory(gramApplicationDeploymentType.getMinMemory());
+                    applicationDescriptor.setMaxWallTime(gramApplicationDeploymentType.getMaxWallTime());
+                    if(gramApplicationDeploymentType.getQueue() != null){
+                        applicationDescriptor.setQueueName(gramApplicationDeploymentType.getQueue().getQueueName());
+                    }
+                }
             } else if (applicationDeploymentDescription.getType() instanceof BatchApplicationDeploymentDescriptionType){
                 BatchApplicationDeploymentDescriptionType batchApplicationDeploymentDescriptionType
= (BatchApplicationDeploymentDescriptionType)applicationDeploymentDescription.getType();
-                applicationDescriptor.setCpuCount(batchApplicationDeploymentDescriptionType.getCpuCount());
-                applicationDescriptor.setNodeCount(batchApplicationDeploymentDescriptionType.getNodeCount());
-                applicationDescriptor.setMaxMemory(batchApplicationDeploymentDescriptionType.getMaxMemory());
-                applicationDescriptor.setMinMemory(batchApplicationDeploymentDescriptionType.getMinMemory());
-                applicationDescriptor.setMaxWallTime(batchApplicationDeploymentDescriptionType.getMaxWallTime());
-                applicationDescriptor.setQueueName(batchApplicationDeploymentDescriptionType.getQueue().getQueueName());
+                if (batchApplicationDeploymentDescriptionType != null){
+                    applicationDescriptor.setCpuCount(batchApplicationDeploymentDescriptionType.getCpuCount());
+                    applicationDescriptor.setNodeCount(batchApplicationDeploymentDescriptionType.getNodeCount());
+                    applicationDescriptor.setMaxMemory(batchApplicationDeploymentDescriptionType.getMaxMemory());
+                    applicationDescriptor.setMinMemory(batchApplicationDeploymentDescriptionType.getMinMemory());
+                    applicationDescriptor.setMaxWallTime(batchApplicationDeploymentDescriptionType.getMaxWallTime());
+                    if (batchApplicationDeploymentDescriptionType.getQueue() != null){
+                        applicationDescriptor.setQueueName(batchApplicationDeploymentDescriptionType.getQueue().getQueueName());
+                    }
+
+                }
+
             }
         }
 



Mime
View raw message