airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1378642 - in /incubator/airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/impl/ gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/ gfac-core/src/main/java/org/apache/airavata/core/gfac...
Date Wed, 29 Aug 2012 16:59:00 GMT
Author: samindaw
Date: Wed Aug 29 16:59:00 2012
New Revision: 1378642

URL: http://svn.apache.org/viewvc?rev=1378642&view=rev
Log:
patch by bhathiya (getServiceDescription_2.patch) https://issues.apache.org/jira/browse/AIRAVATA-541

Modified:
    incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
    incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/GfacAPI.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/ApplicationDeploymentDescriptionWrap.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java

Modified: incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java?rev=1378642&r1=1378641&r2=1378642&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
(original)
+++ incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
Wed Aug 29 16:59:00 2012
@@ -43,7 +43,11 @@ public class ApplicationManagerImpl impl
 	public ServiceDescription getServiceDescription(String serviceId)
 			throws AiravataAPIInvocationException {
 		try {
-			return getClient().getRegistry().getServiceDescription(serviceId);
+			ServiceDescription desc = getClient().getRegistry().getServiceDescription(serviceId);
+			if(desc!=null){
+	        	return desc;
+	        }
+			throw new AiravataAPIInvocationException(new Exception("Service Description not found
in registry."));
 		} catch (RegistryException e) {
 			throw new AiravataAPIInvocationException(e);
 		}

Modified: incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java?rev=1378642&r1=1378641&r2=1378642&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
(original)
+++ incubator/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/reciever/GFacMessageReciever.java
Wed Aug 29 16:59:00 2012
@@ -173,6 +173,9 @@ public class GFacMessageReciever impleme
         WorkflowContextHeaderBuilder.setCurrentContextHeader(document.getContextHeader());
         Map<Parameter,ActualParameter> actualParameters = new LinkedHashMap<Parameter,ActualParameter>();
         ServiceDescription serviceDescription = getRegistry(context).getServiceDescription(serviceName);
+        if(serviceDescription==null){
+        	throw new RegistryException(new Exception("Service Description not found in registry."));
+        }
         ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
         for (Parameter parameter : serviceDescriptionType.getInputParametersArray()) {
             OMElement element = input.getFirstChildWithName(new QName(null,parameter.getParameterName().replaceAll(WSDLConstants.HYPHEN,
WSDLConstants.HYPHEN_REPLACEMENT)));

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/GfacAPI.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/GfacAPI.java?rev=1378642&r1=1378641&r2=1378642&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/GfacAPI.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/GfacAPI.java
Wed Aug 29 16:59:00 2012
@@ -20,6 +20,7 @@
 */
 package org.apache.airavata.core.gfac;
 
+import org.apache.airavata.common.registry.api.exception.RegistryException;
 import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
@@ -81,6 +82,9 @@ public class GfacAPI {
     * Add workflow context
     */
         ServiceDescription serviceDescription = gfacConfig.getRegistry().getServiceDescription(jobContext.getServiceName());
+        if(serviceDescription==null){
+        	throw new RegistryException(new Exception("Service Description not found in registry."));
+        }
         ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
         ParameterContextImpl inputParam = new ParameterContextImpl();
         WorkflowContextImpl workflowContext = new WorkflowContextImpl();

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java?rev=1378642&r1=1378641&r2=1378642&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
Wed Aug 29 16:59:00 2012
@@ -233,6 +233,9 @@ public class EmbeddedGFacInvoker impleme
             this.inputNames.add(name);
             this.inputValues.add(value);
             ServiceDescription serviceDescription = registry.getServiceDescription(this.serviceName);
+            if(serviceDescription==null){
+            	throw new RegistryException(new Exception("Service Description not found in
registry."));
+            }
             ServiceDescriptionType serviceDescriptionType = serviceDescription.getType();
             for (Parameter parameter : serviceDescriptionType.getInputParametersArray())
{
                 //todo this implementation doesn't work when there are n number of nodes
connecting .. need to fix

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/ApplicationDeploymentDescriptionWrap.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/ApplicationDeploymentDescriptionWrap.java?rev=1378642&r1=1378641&r2=1378642&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/ApplicationDeploymentDescriptionWrap.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/model/registrybrowser/ApplicationDeploymentDescriptionWrap.java
Wed Aug 29 16:59:00 2012
@@ -54,7 +54,11 @@ public class ApplicationDeploymentDescri
     }
 
     public ServiceDescription getServiceDescription() throws RegistryException{
-        return getRegistry().getServiceDescription(getService());
+        ServiceDescription desc = getRegistry().getServiceDescription(getService());
+        if(desc!=null){
+        	return desc;
+        }
+        throw new RegistryException(new Exception("Service Description not found in registry."));
     }
 
     public void setService(String service) {

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java?rev=1378642&r1=1378641&r2=1378642&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java
Wed Aug 29 16:59:00 2012
@@ -158,7 +158,11 @@ public class ApplicationDescriptionDialo
         iniGUI();
         if (originalService!=null){
     		try {
-				setServiceDescription(getRegistry().getServiceDescription(originalService));
+    			ServiceDescription disc = getRegistry().getServiceDescription(originalService);
+    			if(disc!=null){
+    				setServiceDescription(disc);
+    			}
+    			throw new RegistryException(new Exception("Service Description not found in registry."));
 			} catch (RegistryException e) {
 				e.printStackTrace();
 			}



Mime
View raw message