Author: chathuri
Date: Thu Nov 15 21:13:04 2012
New Revision: 1410016

URL: http://svn.apache.org/viewvc?rev=1410016&view=rev
Log:
replacing Airavata Client from REST client

Modified:
    airavata/trunk/modules/airavata-client/pom.xml
    
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
    
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
    
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java
    
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
    
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
    
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
    
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java

Modified: airavata/trunk/modules/airavata-client/pom.xml
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/pom.xml?rev=1410016&r1=1410015&r2=1410016&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/pom.xml (original)
+++ airavata/trunk/modules/airavata-client/pom.xml Thu Nov 15 21:13:04 2012
@@ -50,7 +50,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-jpa-registry</artifactId>
+            <artifactId>airavata-rest-client</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

Modified: 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java?rev=1410016&r1=1410015&r2=1410016&view=diff
==============================================================================
--- 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
 (original)
+++ 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
 Thu Nov 15 21:13:04 2012
@@ -68,6 +68,7 @@ import org.apache.airavata.common.workfl
 import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.workflow.ExperimentData;
+import org.apache.airavata.rest.client.*;
 import org.apache.airavata.workflow.model.component.ComponentException;
 import 
org.apache.airavata.workflow.model.component.registry.JCRComponentRegistry;
 import org.apache.airavata.workflow.model.component.ws.WSComponentPort;
@@ -237,7 +238,7 @@ public class AiravataClient implements A
                if (clientConfiguration.getJcrURL() != null
                                && clientConfiguration.getGfacURL() == null) {
                        try {
-                               
clientConfiguration.setGfacURL(getRegistry().getGFacURIs()
+                               
clientConfiguration.setGfacURL(getConfigurationResourceClient().getGFacURIs()
                                                .get(0).toURL());
                                configuration.put(GFAC, 
clientConfiguration.getGfacURL()
                                                .toString());
@@ -412,15 +413,15 @@ public class AiravataClient implements A
        private void runPreWorkflowExecutionTasks(String topic, String user,
                        String metadata, String experimentName) throws 
RegistryException {
                if (user != null) {
-                       getRegistry().updateExperimentExecutionUser(topic, 
user);
+                       
getProvenanceResouceClient().updateExperimentExecutionUser(topic, user);
                }
                if (metadata != null) {
-                       getRegistry().updateExperimentMetadata(topic, metadata);
+                       
getProvenanceResouceClient().updateExperimentMetadata(topic, metadata);
                }
                if (experimentName == null) {
                        experimentName = topic;
                }
-               getRegistry().updateExperimentName(topic, experimentName);
+               getProvenanceResouceClient().updateExperimentName(topic, 
experimentName);
        }
 
        public String runWorkflow(String topic, NameValue[] inputs)
@@ -469,13 +470,11 @@ public class AiravataClient implements A
                        }).start();
                        int timeout = 0;
                        try {
-                               while (!getRegistry().isExperimentExists(topic)
+                               while 
(!getExperimentResourceClient().isExperimentExists(topic)
                                                && timeout < MAX_TIMEOUT) {
                                        Thread.sleep(TIMEOUT_STEP);
                                        timeout += MAX_TIMEOUT;
                                }
-                       } catch (RegistryException e) {
-                               throw new AiravataAPIInvocationException(e);
                        } catch (InterruptedException e) {
                                throw new AiravataAPIInvocationException(e);
                        }
@@ -487,17 +486,18 @@ public class AiravataClient implements A
 
        public List<ExperimentData> getWorkflowExecutionDataByUser(String user)
                        throws RegistryException {
-               return getRegistry().getExperimentByUser(user);
+               return getProvenanceResouceClient().getExperimentByUser(user);
        }
 
        public ExperimentData getWorkflowExecutionData(String topic)
                        throws RegistryException {
-               return getRegistry().getExperiment(topic);
+               return getProvenanceResouceClient().getExperiment(topic);
        }
 
        public List<ExperimentData> getWorkflowExecutionData(String user,
                        int pageSize, int PageNo) throws RegistryException {
-               return getRegistry().getExperimentByUser(user, pageSize, 
PageNo);
+        return null;
+//             return getProvenanceResouceClient().getExperimentByUser(user, 
pageSize, PageNo);
        }
 
        public static String getWorkflow() {
@@ -508,14 +508,59 @@ public class AiravataClient implements A
                AiravataClient.workflow = workflow;
        }
 
-       public AiravataRegistry2 getRegistry() throws RegistryException {
-               if (registry == null) {
-                       String jcrUsername = 
getClientConfiguration().getJcrUsername();
-                       String jcrPassword = 
getClientConfiguration().getJcrPassword();
-                       registry = getRegistryObject(jcrUsername, jcrPassword);
-               }
-               return registry;
-       }
+    public AllRegistryResourceClients getRegistryResourceClient(){
+        AllRegistryResourceClients allRegistryResourceClients = new 
AllRegistryResourceClients();
+        return allRegistryResourceClients;
+    }
+
+       public ConfigurationResourceClient getConfigurationResourceClient (){
+       ConfigurationResourceClient configurationResourceClient = new 
ConfigurationResourceClient();
+        return configurationResourceClient;
+    }
+
+    public DescriptorResourceClient getDescriptorResourceClient (){
+        DescriptorResourceClient descriptorResourceClient = new 
DescriptorResourceClient();
+        return descriptorResourceClient;
+    }
+
+    public ExperimentResourceClient getExperimentResourceClient (){
+        ExperimentResourceClient experimentResourceClient = new 
ExperimentResourceClient();
+        return experimentResourceClient;
+    }
+
+    public ProvenanceResourceClient getProvenanceResouceClient (){
+        ProvenanceResourceClient provenanceResourceClient = new 
ProvenanceResourceClient();
+        return provenanceResourceClient;
+    }
+
+    public ProjectResourceClient getProjectResourceClient (){
+        ProjectResourceClient projectResourceClient = new 
ProjectResourceClient();
+        return projectResourceClient;
+    }
+
+    public PublishedWorkflowResourceClient getPublishedWFResourceClient (){
+        PublishedWorkflowResourceClient publishedWorkflowResourceClient = new 
PublishedWorkflowResourceClient();
+        return publishedWorkflowResourceClient;
+    }
+
+    public UserWorkflowResourceClient getUserWFResourceClient () {
+        UserWorkflowResourceClient userWorkflowResourceClient = new 
UserWorkflowResourceClient();
+        return userWorkflowResourceClient;
+    }
+
+    public BasicRegistryResourceClient getBasicResourceClient (){
+        BasicRegistryResourceClient basicRegistryResourceClient = new 
BasicRegistryResourceClient();
+        return basicRegistryResourceClient;
+    }
+
+//    public AiravataRegistry2 getRegistry() throws RegistryException {
+//             if (registry == null) {
+//                     String jcrUsername = 
getClientConfiguration().getJcrUsername();
+//                     String jcrPassword = 
getClientConfiguration().getJcrPassword();
+//                     registry = getRegistryObject(jcrUsername, jcrPassword);
+//             }
+//             return registry;
+//     }
 
        private static AiravataRegistry2 getRegistryObject(String jcrUsername,
                        String jcrPassword) throws RegistryException {
@@ -574,11 +619,11 @@ public class AiravataClient implements A
                List<String> workflowList = new ArrayList<String>();
                Map<String, String> workflows;
                try {
-                       workflows = getRegistry().getWorkflows();
+                       workflows = getUserWFResourceClient().getWorkflows();
                        for (String name : workflows.keySet()) {
                                workflowList.add(name);
                        }
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
@@ -587,7 +632,7 @@ public class AiravataClient implements A
 
        public String runWorkflow(String workflowTemplateId,
                        List<WorkflowInput> inputs) throws Exception {
-               return runWorkflow(workflowTemplateId, inputs, 
getRegistry().getUser()
+               return runWorkflow(workflowTemplateId, inputs, 
getBasicResourceClient().getUser()
                                .getUserName(), null, workflowTemplateId + "_"
                                + Calendar.getInstance().getTime().toString());
        }
@@ -595,7 +640,7 @@ public class AiravataClient implements A
        public String runWorkflow(String workflowTemplateId,
                        List<WorkflowInput> inputs, String workflowInstanceName)
                        throws Exception {
-               return runWorkflow(workflowTemplateId, inputs, 
getRegistry().getUser()
+               return runWorkflow(workflowTemplateId, inputs, 
getBasicResourceClient().getUser()
                                .getUserName(), null, workflowInstanceName);
        }
 
@@ -657,17 +702,17 @@ public class AiravataClient implements A
                        }
                        workflow = workflowString;
                        String topic = workflowObj.getName() + "_" + 
UUID.randomUUID();
-                       getRegistry().setWorkflowInstanceTemplateName(topic,
-                                       workflowObj.getName());
+                       
getProvenanceResouceClient().setWorkflowInstanceTemplateName(topic,
+                    workflowObj.getName());
                        return runWorkflow(topic, inputValues.toArray(new 
NameValue[] {}),
                                        user, metadata, workflowInstanceName, 
builder);
-               } catch (RegistryException e) {
-                       throw new AiravataAPIInvocationException(e);
                } catch (GraphException e) {
                        throw new AiravataAPIInvocationException(e);
                } catch (ComponentException e) {
                        throw new AiravataAPIInvocationException(e);
-               }
+               } catch (Exception e) {
+            throw new AiravataAPIInvocationException(e);
+        }
        }
 
        public String runWorkflow(String workflowName, List<WorkflowInput> 
inputs,
@@ -701,22 +746,20 @@ public class AiravataClient implements A
                        if (experimentID == null || experimentID.isEmpty()) {
                                experimentID = workflowObj.getName() + "_" + 
UUID.randomUUID();
                        }
-                       
getRegistry().setWorkflowInstanceTemplateName(experimentID,
-                                       workflowObj.getName());
+                       
getProvenanceResouceClient().setWorkflowInstanceTemplateName(experimentID,
+                    workflowObj.getName());
                        return runWorkflow(experimentID,
                                        inputValues.toArray(new NameValue[] 
{}), user, metadata,
                                        workflowInstanceName, this.builder);
-               } catch (RegistryException e) {
-                       throw new AiravataAPIInvocationException(
-                                       "Error working with Airavata Registry: "
-                                                       + 
e.getLocalizedMessage(), e);
-               } catch (GraphException e) {
+               }  catch (GraphException e) {
                        throw new AiravataAPIInvocationException(e);
                } catch (ComponentException e) {
                        throw new AiravataAPIInvocationException(e);
                } catch (Exception e) {
-                       throw new AiravataAPIInvocationException(e);
-               }
+            throw new AiravataAPIInvocationException(
+                    "Error working with Airavata Registry: "
+                            + e.getLocalizedMessage(), e);
+        }
        }
 
        public List<WorkflowInput> getWorkflowInputs(String workflowTemplateId)
@@ -748,14 +791,14 @@ public class AiravataClient implements A
        public String getWorkflowAsString(String workflowTemplateId)
                        throws AiravataAPIInvocationException {
                try {
-                       Map<String, String> workflows = 
getRegistry().getWorkflows();
+                       Map<String, String> workflows = 
getUserWFResourceClient().getWorkflows();
                        for (String name : workflows.keySet()) {
                                if (name.equals(workflowTemplateId)) {
                                        return workflows.get(name);
                                }
                        }
                        return null;
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
 

Modified: 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java?rev=1410016&r1=1410015&r2=1410016&view=diff
==============================================================================
--- 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
 (original)
+++ 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
 Thu Nov 15 21:13:04 2012
@@ -129,6 +129,6 @@ public interface ExecutionManager {
      * @return DefaultExecutionContext
      * @throws AiravataAPIInvocationException AiravataAPIInvocationException
      */
-    public DefaultExecutionContext createDefaultExecutionContext() throws 
AiravataAPIInvocationException;
+//    public DefaultExecutionContext createDefaultExecutionContext() throws 
AiravataAPIInvocationException;
 
 }

Modified: 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java?rev=1410016&r1=1410015&r2=1410016&view=diff
==============================================================================
--- 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java
 (original)
+++ 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/AiravataManagerImpl.java
 Thu Nov 15 21:13:04 2012
@@ -42,11 +42,11 @@ public class AiravataManagerImpl impleme
        public List<URI> getGFaCURLs()  throws AiravataAPIInvocationException{
                List<URI> list=new ArrayList<URI>();
                try {
-                       List<URI> gFacDescriptorList = 
getClient().getRegistry().getGFacURIs();
+                       List<URI> gFacDescriptorList = 
getClient().getConfigurationResourceClient().getGFacURIs();
                        for (URI url : gFacDescriptorList) {
                                list.add(url);
                        }
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
                return list;
@@ -72,8 +72,8 @@ public class AiravataManagerImpl impleme
        @Override
        public List<URI> getWorkflowInterpreterServiceURLs()  throws 
AiravataAPIInvocationException{
                try {
-                       return 
getClient().getRegistry().getWorkflowInterpreterURIs();
-               } catch (RegistryException e) {
+                       return 
getClient().getConfigurationResourceClient().getWorkflowInterpreterURIs();
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -113,8 +113,8 @@ public class AiravataManagerImpl impleme
        public List<URI> getMessageBoxServiceURLs()
                        throws AiravataAPIInvocationException {
                try {
-                       return new 
ArrayList<URI>(){{add(getClient().getRegistry().getMessageBoxURI());}};
-               } catch (RegistryException e) {
+                       return new 
ArrayList<URI>(){{add(getClient().getConfigurationResourceClient().getMsgBoxURI());}};
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -142,8 +142,8 @@ public class AiravataManagerImpl impleme
        public List<URI> getEventingServiceURLs()
                        throws AiravataAPIInvocationException {
                try {
-                       return new 
ArrayList<URI>(){{add(getClient().getRegistry().getEventingServiceURI());}};
-               } catch (RegistryException e) {
+                       return new 
ArrayList<URI>(){{add(getClient().getConfigurationResourceClient().getEventingURI());}};
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }

Modified: 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java?rev=1410016&r1=1410015&r2=1410016&view=diff
==============================================================================
--- 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
 (original)
+++ 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
 Thu Nov 15 21:13:04 2012
@@ -46,12 +46,12 @@ public class ApplicationManagerImpl impl
        public ServiceDescription getServiceDescription(String serviceId)
                        throws AiravataAPIInvocationException {
                try {
-                       ServiceDescription desc = 
getClient().getRegistry().getServiceDescriptor(serviceId);
+                       ServiceDescription desc = 
getClient().getDescriptorResourceClient().getServiceDescriptor(serviceId);
                        if(desc!=null){
                        return desc;
                }
                        throw new AiravataAPIInvocationException(new 
Exception("Service Description not found in registry."));
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -60,8 +60,8 @@ public class ApplicationManagerImpl impl
        public List<ServiceDescription> getAllServiceDescriptions()
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getServiceDescriptors();
-               } catch (RegistryException e) {
+                       return 
getClient().getDescriptorResourceClient().getServiceDescriptors();
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -70,13 +70,13 @@ public class ApplicationManagerImpl impl
        public String saveServiceDescription(ServiceDescription service)
                        throws AiravataAPIInvocationException {
                try {
-                       if 
(getClient().getRegistry().isServiceDescriptorExists(service.getType().getName()))
 {
-                               
getClient().getRegistry().updateServiceDescriptor(service);
+                       if 
(getClient().getDescriptorResourceClient().isServiceDescriptorExists(service.getType().getName()))
 {
+                               
getClient().getDescriptorResourceClient().updateServiceDescriptor(service);
                        }else{
-                               
getClient().getRegistry().addServiceDescriptor(service);
+                               
getClient().getDescriptorResourceClient().addServiceDescriptor(service);
                        }
                        return service.getType().getName();
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -85,8 +85,8 @@ public class ApplicationManagerImpl impl
        public void deleteServiceDescription(String serviceId)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().removeServiceDescriptor(serviceId);
-               } catch (RegistryException e) {
+                       
getClient().getDescriptorResourceClient().removeServiceDescriptor(serviceId);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
 
@@ -103,8 +103,8 @@ public class ApplicationManagerImpl impl
                        String serviceId, String hostId)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getApplicationDescriptors(serviceId, hostId);
-               } catch (RegistryException e) {
+                       return 
getClient().getDescriptorResourceClient().getApplicationDescriptors(serviceId, 
hostId);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -114,13 +114,13 @@ public class ApplicationManagerImpl impl
                        ApplicationDeploymentDescription app)
                        throws AiravataAPIInvocationException {
                try {
-                       if 
(getClient().getRegistry().isApplicationDescriptorExists(serviceId, hostId, 
app.getType().getApplicationName().getStringValue())) {
-                               
getClient().getRegistry().updateApplicationDescriptor(serviceId, hostId, app);
+                       if 
(getClient().getDescriptorResourceClient().isApplicationDescriptorExists(serviceId,
 hostId, app.getType().getApplicationName().getStringValue())) {
+                               
getClient().getDescriptorResourceClient().updateApplicationDescriptor(serviceId,
 hostId, app);
                        }else{
-                               
getClient().getRegistry().addApplicationDescriptor(serviceId, hostId, app);
+                               
getClient().getDescriptorResourceClient().addApplicationDescriptor(serviceId, 
hostId, app);
                        }
                        return 
app.getType().getApplicationName().getStringValue();
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -136,8 +136,8 @@ public class ApplicationManagerImpl impl
        public Map<String[], ApplicationDeploymentDescription> 
getAllDeploymentDescriptions()
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getApplicationDescriptors();
-               } catch (RegistryException e) {
+                       return 
getClient().getDescriptorResourceClient().getApplicationDescriptors();
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -154,11 +154,11 @@ public class ApplicationManagerImpl impl
                        String serviceName) throws 
AiravataAPIInvocationException {
                try {
                        Map<HostDescription, 
List<ApplicationDeploymentDescription>> map=new HashMap<HostDescription, 
List<ApplicationDeploymentDescription>>();
-                       Map<String, ApplicationDeploymentDescription> 
applicationDescriptors = 
getClient().getRegistry().getApplicationDescriptors(serviceName);
+                       Map<String, ApplicationDeploymentDescription> 
applicationDescriptors = 
getClient().getDescriptorResourceClient().getApplicationDescriptors(serviceName);
                        for (String hostName : applicationDescriptors.keySet()) 
{
                                ArrayList<ApplicationDeploymentDescription> 
list = new ArrayList<ApplicationDeploymentDescription>();
                                list.add(applicationDescriptors.get(hostName));
-                               
map.put(getClient().getRegistry().getHostDescriptor(hostName),list);
+                               
map.put(getClient().getDescriptorResourceClient().getHostDescriptor(hostName),list);
                        }
                        return map;
                } catch (Exception e) {
@@ -171,8 +171,8 @@ public class ApplicationManagerImpl impl
                        String hostName, String applicationName)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().removeApplicationDescriptor(serviceName, hostName, 
applicationName);
-               } catch (RegistryException e) {
+                       
getClient().getDescriptorResourceClient().removeApplicationDescriptor(serviceName,
 hostName, applicationName);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -181,8 +181,8 @@ public class ApplicationManagerImpl impl
        public HostDescription getHostDescription(String hostId)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getHostDescriptor(hostId);
-               } catch (RegistryException e) {
+                       return 
getClient().getDescriptorResourceClient().getHostDescriptor(hostId);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -191,8 +191,8 @@ public class ApplicationManagerImpl impl
        public List<HostDescription> getAllHostDescriptions()
                        throws AiravataAPIInvocationException {
                try {
-                       return getClient().getRegistry().getHostDescriptors();
-               } catch (RegistryException e) {
+                       return 
getClient().getDescriptorResourceClient().getHostDescriptors();
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -201,13 +201,13 @@ public class ApplicationManagerImpl impl
        public String saveHostDescription(HostDescription host)
                        throws AiravataAPIInvocationException {
                try {
-                       if 
(getClient().getRegistry().isHostDescriptorExists(host.getType().getHostName()))
 {
-                               
getClient().getRegistry().updateHostDescriptor(host);
+                       if 
(getClient().getDescriptorResourceClient().isHostDescriptorExists(host.getType().getHostName()))
 {
+                               
getClient().getDescriptorResourceClient().updateHostDescriptor(host);
                        }else{
-                               
getClient().getRegistry().addHostDescriptor(host);
+                               
getClient().getDescriptorResourceClient().addHostDescriptor(host);
                        }
                        return host.getType().getHostName();
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -222,8 +222,8 @@ public class ApplicationManagerImpl impl
        public void deleteHostDescription(String hostId)
                        throws AiravataAPIInvocationException {
                try {
-                       getClient().getRegistry().removeHostDescriptor(hostId);
-               } catch (RegistryException e) {
+                       
getClient().getDescriptorResourceClient().removeHostDescriptor(hostId);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }

Modified: 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java?rev=1410016&r1=1410015&r2=1410016&view=diff
==============================================================================
--- 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
 (original)
+++ 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
 Thu Nov 15 21:13:04 2012
@@ -122,17 +122,18 @@ public class ExecutionManagerImpl implem
                }
        }
 
-    @Override
-    public DefaultExecutionContext createDefaultExecutionContext() throws 
AiravataAPIInvocationException {
-        DefaultExecutionContext ec = new DefaultExecutionContext();
-//        ec.addNotifiable(new LoggingNotification());
-        try {
-            ec.setRegistryService(getClient().getRegistry());
-        } catch (RegistryException e) {
-            throw new AiravataAPIInvocationException(e);
-        }
-        return  ec;
-    }
+//    @Override
+//    public DefaultExecutionContext createDefaultExecutionContext() throws 
AiravataAPIInvocationException {
+//        DefaultExecutionContext ec = new DefaultExecutionContext();
+////        ec.addNotifiable(new LoggingNotification());
+////        try {
+//            // TODO : Fix me
+////            ec.setRegistryService(getClient().getRegistry());
+////        } catch (RegistryException e) {
+////            throw new AiravataAPIInvocationException(e);
+////        }
+//        return  ec;
+//    }
 
        @Override
        public String runExperiment(String workflowName,

Modified: 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java?rev=1410016&r1=1410015&r2=1410016&view=diff
==============================================================================
--- 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
 (original)
+++ 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
 Thu Nov 15 21:13:04 2012
@@ -53,8 +53,8 @@ public class ProvenanceManagerImpl imple
        public void setWorkflowInstanceNodeInput(WorkflowInstanceNode node, 
String data)
                        throws AiravataAPIInvocationException {
                try {
-                       getClient().getRegistry().updateWorkflowNodeInput(node, 
data);
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().updateWorkflowNodeInput(node, data);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -70,8 +70,8 @@ public class ProvenanceManagerImpl imple
        public void setWorkflowInstanceNodeOutput(WorkflowInstanceNode node, 
String data)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().updateWorkflowNodeOutput(node, data);
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().updateWorkflowNodeOutput(node, data);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -87,8 +87,8 @@ public class ProvenanceManagerImpl imple
        @Override
        public String getWorkflowInstanceNodeInput(WorkflowInstanceNode node) 
throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowInstanceId(),
 node.getNodeId()).getInput();
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowInstanceId(),
 node.getNodeId()).getInput();
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -102,9 +102,9 @@ public class ProvenanceManagerImpl imple
        @Override
        public Map<WorkflowInstanceNode,String> 
getWorkflowInstanceNodeInput(String workflowName, String nodeId) throws 
AiravataAPIInvocationException{
                try {
-                       List<WorkflowNodeIOData> list = 
getClient().getRegistry().searchWorkflowInstanceNodeInput(".*", workflowName, 
nodeId);
+                       List<WorkflowNodeIOData> list = 
getClient().getProvenanceResouceClient().searchWorkflowInstanceNodeInput(".*", 
workflowName, nodeId);
                        return groupNodePortData(list);
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -120,8 +120,8 @@ public class ProvenanceManagerImpl imple
        @Override
        public String getWorkflowInstanceNodeOutput(WorkflowInstanceNode node) 
throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowInstanceId(),
 node.getNodeId()).getOutput();
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getWorkflowInstanceNodeData(node.getWorkflowInstance().getWorkflowInstanceId(),
 node.getNodeId()).getOutput();
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -136,9 +136,9 @@ public class ProvenanceManagerImpl imple
        @Override
        public Map<WorkflowInstanceNode,String> 
getWorkflowInstanceNodeOutput(String workflowName, String nodeId) throws 
AiravataAPIInvocationException{
                try {
-                       List<WorkflowNodeIOData> list = 
getClient().getRegistry().searchWorkflowInstanceNodeOutput(".*", workflowName, 
nodeId);
+                       List<WorkflowNodeIOData> list = 
getClient().getProvenanceResouceClient().searchWorkflowInstanceNodeOutput(".*", 
workflowName, nodeId);
                        return groupNodePortData(list);
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -153,8 +153,8 @@ public class ProvenanceManagerImpl imple
        public void setWorkflowInstanceStatus(WorkflowInstanceStatus status)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().updateWorkflowInstanceStatus(status);
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().updateWorkflowInstanceStatus(status);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
                
@@ -165,8 +165,8 @@ public class ProvenanceManagerImpl imple
                        String experimentId, String workflowInstanceId)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getWorkflowInstanceStatus(experimentId);
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getWorkflowInstanceStatus(experimentId);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -181,8 +181,8 @@ public class ProvenanceManagerImpl imple
        @Override
        public void setExperimentUser(String experimentId, String user) throws 
AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().updateExperimentExecutionUser(experimentId, user);
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().updateExperimentExecutionUser(experimentId,
 user);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -196,8 +196,8 @@ public class ProvenanceManagerImpl imple
        @Override
        public ExperimentUser getExperimentUser(String experimentId)throws 
AiravataAPIInvocationException {
                try {
-                       return new 
ExperimentUser(experimentId,getClient().getRegistry().getExperimentExecutionUser(experimentId));
-               } catch (RegistryException e) {
+                       return new 
ExperimentUser(experimentId,getClient().getProvenanceResouceClient().getExperimentExecutionUser(experimentId));
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -206,8 +206,8 @@ public class ProvenanceManagerImpl imple
        public void setExperimentMetadata(String experimentId, String metadata)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().updateExperimentMetadata(experimentId, metadata);
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().updateExperimentMetadata(experimentId, 
metadata);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
                
@@ -222,8 +222,8 @@ public class ProvenanceManagerImpl imple
        @Override
        public ExperimentMetadata getExperimentMetadata(String 
experimentId)throws AiravataAPIInvocationException {
                try {
-                       return new ExperimentMetadata(experimentId, 
getClient().getRegistry().getExperimentMetadata(experimentId));
-               } catch (RegistryException e) {
+                       return new ExperimentMetadata(experimentId, 
getClient().getProvenanceResouceClient().getExperimentMetadata(experimentId));
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -231,8 +231,8 @@ public class ProvenanceManagerImpl imple
     @Override
     public boolean isExperimentNameExist(String experimentName) throws 
AiravataAPIInvocationException {
         try {
-            return 
getClient().getRegistry().isExperimentNameExist(experimentName);
-        } catch (RegistryException e) {
+            return 
getClient().getProvenanceResouceClient().isExperimentNameExist(experimentName);
+        } catch (Exception e) {
             throw new AiravataAPIInvocationException(e);
         }
     }
@@ -240,8 +240,8 @@ public class ProvenanceManagerImpl imple
     @Override
        public List<String> getExperimentIdList(String owner) throws 
AiravataAPIInvocationException{
                try {
-                       return 
getClient().getRegistry().getExperimentIdByUser(owner);
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getExperimentIdByUser(owner);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -261,8 +261,8 @@ public class ProvenanceManagerImpl imple
        public List<ExperimentData> getWorkflowExperimentDataList(String user)
                        throws AiravataAPIInvocationException {
                try {
-                       return  
getClient().getRegistry().getExperimentByUser(user);
-               } catch (RegistryException e) {
+                       return  
getClient().getProvenanceResouceClient().getExperimentByUser(user);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -271,8 +271,8 @@ public class ProvenanceManagerImpl imple
        public List<ExperimentData> getWorkflowExperimentData(String user,
                        int pageSize, int pageNo) throws 
AiravataAPIInvocationException {
                try {
-                       return  
getClient().getRegistry().getExperimentByUser(user, pageSize, pageNo);
-               } catch (RegistryException e) {
+                       return  
getClient().getProvenanceResouceClient().getExperimentByUser(user, pageSize, 
pageNo);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -281,8 +281,8 @@ public class ProvenanceManagerImpl imple
        public WorkflowInstanceData getWorkflowInstanceData(String experimentId,
                        String workflowInstanceId) throws 
AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getWorkflowInstanceData(workflowInstanceId);
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getWorkflowInstanceData(workflowInstanceId);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -311,8 +311,8 @@ public class ProvenanceManagerImpl imple
        public void setExperimentName(String experimentId, String 
experimentName)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().updateExperimentName(experimentId, experimentName);
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().updateExperimentName(experimentId, 
experimentName);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -327,8 +327,8 @@ public class ProvenanceManagerImpl imple
        public ExperimentName getExperimentName(String experimentId)
                        throws AiravataAPIInvocationException {
                try {
-                       return new ExperimentName(experimentId, 
getClient().getRegistry().getExperimentName(experimentId));
-               } catch (RegistryException e) {
+                       return new ExperimentName(experimentId, 
getClient().getProvenanceResouceClient().getExperimentName(experimentId));
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -337,8 +337,8 @@ public class ProvenanceManagerImpl imple
        public ExperimentData getWorkflowExperimentData(String experimentId)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getExperiment(experimentId);
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getExperiment(experimentId);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -348,8 +348,8 @@ public class ProvenanceManagerImpl imple
                        String workflowInstaceId, String nodeId, 
ExecutionStatus status)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().updateWorkflowNodeStatus(workflowInstaceId, nodeId, 
status);
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().updateWorkflowNodeStatus(workflowInstaceId,
 nodeId, status);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
                
@@ -359,8 +359,8 @@ public class ProvenanceManagerImpl imple
        public void setWorkflowInstanceNodeStatus(WorkflowInstanceNodeStatus 
status)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().updateWorkflowNodeStatus(status);
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().updateWorkflowNodeStatus(status);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -376,8 +376,8 @@ public class ProvenanceManagerImpl imple
        public WorkflowInstanceNodeStatus getWorkflowInstanceNodeStatus(
                        WorkflowInstanceNode node) throws 
AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getWorkflowNodeStatus(node);
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getWorkflowNodeStatus(node);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }       
        }
@@ -388,9 +388,9 @@ public class ProvenanceManagerImpl imple
                try {
                        AiravataExperiment experiment = new 
AiravataExperiment();
                        experiment.setExperimentId(experimentId);
-                       getClient().getRegistry().addExperiment(projectName, 
experiment);
-                       
getClient().getRegistry().updateExperimentName(experimentId, experimentName);
-               } catch (RegistryException e) {
+                       
getClient().getExperimentResourceClient().addExperiment(projectName, 
experiment);
+                       
getClient().getProvenanceResouceClient().updateExperimentName(experimentId, 
experimentName);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }       
        }
@@ -400,8 +400,8 @@ public class ProvenanceManagerImpl imple
                        WorkflowInstance workflowInstance)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().addWorkflowInstance(experimentId, 
workflowInstance.getWorkflowInstanceId(),workflowInstance.getTemplateName());
-               } catch (RegistryException e) {
+                       
getClient().getProvenanceResouceClient().addWorkflowInstance(experimentId, 
workflowInstance.getWorkflowInstanceId(),workflowInstance.getTemplateName());
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
                
@@ -411,8 +411,8 @@ public class ProvenanceManagerImpl imple
        public ExperimentData getExperimentMetaInformation(String experimentId)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getExperimentMetaInformation(experimentId);
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getExperimentMetaInformation(experimentId);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -421,8 +421,8 @@ public class ProvenanceManagerImpl imple
        public List<ExperimentData> getAllExperimentMetaInformation(String user)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getAllExperimentMetaInformation(user);
-               } catch (RegistryException e) {
+                       return 
getClient().getProvenanceResouceClient().getAllExperimentMetaInformation(user);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }

Modified: 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java?rev=1410016&r1=1410015&r2=1410016&view=diff
==============================================================================
--- 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
 (original)
+++ 
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
 Thu Nov 15 21:13:04 2012
@@ -66,16 +66,16 @@ public class WorkflowManagerImpl impleme
                        throws AiravataAPIInvocationException {
                try {
                        
-                       if 
(getClient().getRegistry().isWorkflowExists(workflow.getName())) {
-                               
getClient().getRegistry().updateWorkflow(workflow.getName(),workflowAsString);
+                       if 
(getClient().getUserWFResourceClient().isWorkflowExists(workflow.getName())) {
+                               
getClient().getUserWFResourceClient().updateWorkflow(workflow.getName(),workflowAsString);
                        }else{
-                               
getClient().getRegistry().addWorkflow(workflow.getName(),workflowAsString);
+                               
getClient().getUserWFResourceClient().addWorkflow(workflow.getName(),workflowAsString);
                        }
                        if (owner==null){
-                               
getClient().getRegistry().publishWorkflow(workflow.getName());
+                               
getClient().getPublishedWFResourceClient().publishWorkflow(workflow.getName());
                        }
                        return true;
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -85,7 +85,7 @@ public class WorkflowManagerImpl impleme
                        throws AiravataAPIInvocationException {
                try {
                        List<Workflow> workflows=new ArrayList<Workflow>();
-                       Map<String, String> workflowMap = 
getClient().getRegistry().getWorkflows();
+                       Map<String, String> workflowMap = 
getClient().getUserWFResourceClient().getWorkflows();
                        for(String workflowStr:workflowMap.values()){
                                
workflows.add(getWorkflowFromString(workflowStr));
                        }
@@ -101,12 +101,12 @@ public class WorkflowManagerImpl impleme
                try {
                        List<String> workflowList = new ArrayList<String>();
                        Map<String, String> workflows;
-                       workflows = getClient().getRegistry().getWorkflows();
+                       workflows = 
getClient().getUserWFResourceClient().getWorkflows();
                        for (String name : workflows.keySet()) {
                                workflowList.add(name);
                        }
                        return workflowList;
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -121,7 +121,7 @@ public class WorkflowManagerImpl impleme
        public String getWorkflowAsString(String workflowName, String owner)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getWorkflowGraphXML(workflowName);
+                       return 
getClient().getUserWFResourceClient().getWorkflowGraphXML(workflowName);
                } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
@@ -131,9 +131,9 @@ public class WorkflowManagerImpl impleme
        public boolean deleteWorkflow(String workflowName, String owner)
                        throws AiravataAPIInvocationException {
                try {
-                       getClient().getRegistry().removeWorkflow(workflowName);
+                       
getClient().getUserWFResourceClient().removeWorkflow(workflowName);
                        return true;
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -220,8 +220,8 @@ public class WorkflowManagerImpl impleme
        public boolean isPublishedWorkflowExists(String workflowName)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().isPublishedWorkflowExists(workflowName);
-               } catch (RegistryException e) {
+                       return 
getClient().getPublishedWFResourceClient().isPublishedWorkflowExists(workflowName);
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -230,7 +230,7 @@ public class WorkflowManagerImpl impleme
        public void publishWorkflow(String workflowName, String 
publishWorkflowName)
                        throws AiravataAPIInvocationException {
                try {
-                       getClient().getRegistry().publishWorkflow(workflowName, 
publishWorkflowName);
+                       
getClient().getPublishedWFResourceClient().publishWorkflow(workflowName, 
publishWorkflowName);
                } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
@@ -240,7 +240,7 @@ public class WorkflowManagerImpl impleme
        public void publishWorkflow(String workflowName)
                        throws AiravataAPIInvocationException {
                try {
-                       getClient().getRegistry().publishWorkflow(workflowName);
+                       
getClient().getPublishedWFResourceClient().publishWorkflow(workflowName);
                } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
@@ -250,7 +250,7 @@ public class WorkflowManagerImpl impleme
        public String getPublishedWorkflowGraphXML(String workflowName)
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getPublishedWorkflowGraphXML(workflowName);
+                       return 
getClient().getPublishedWFResourceClient().getPublishedWorkflowGraphXML(workflowName);
                } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
@@ -266,8 +266,8 @@ public class WorkflowManagerImpl impleme
        public List<String> getPublishedWorkflowNames()
                        throws AiravataAPIInvocationException {
                try {
-                       return 
getClient().getRegistry().getPublishedWorkflowNames();
-               } catch (RegistryException e) {
+                       return 
getClient().getPublishedWFResourceClient().getPublishedWorkflowNames();
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -277,12 +277,12 @@ public class WorkflowManagerImpl impleme
                        throws AiravataAPIInvocationException {
                try {
                        Map<String, Workflow> workflows=new HashMap<String, 
Workflow>();
-                       Map<String, String> publishedWorkflows = 
getClient().getRegistry().getPublishedWorkflows();
+                       Map<String, String> publishedWorkflows = 
getClient().getPublishedWFResourceClient().getPublishedWorkflows();
                        for (String name : publishedWorkflows.keySet()) {
                                workflows.put(name, 
getWorkflowFromString(publishedWorkflows.get(name)));
                        }
                        return workflows;
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }
@@ -291,7 +291,7 @@ public class WorkflowManagerImpl impleme
        public void removePublishedWorkflow(String workflowName)
                        throws AiravataAPIInvocationException {
                try {
-                       
getClient().getRegistry().removePublishedWorkflow(workflowName);
+                       
getClient().getPublishedWFResourceClient().removePublishedWorkflow(workflowName);
                } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
@@ -305,7 +305,7 @@ public class WorkflowManagerImpl impleme
        @Override
        public List<WorkflowInput> getWorkflowInputs(WorkflowData workflowData) 
throws AiravataAPIInvocationException, Exception {
                if (workflowData.isPublished()){
-                       return 
getWorkflowFromString(getClient().getRegistry().getPublishedWorkflowGraphXML(workflowData.getName())).getWorkflowInputs();
+                       return 
getWorkflowFromString(getClient().getPublishedWFResourceClient().getPublishedWorkflowGraphXML(workflowData.getName())).getWorkflowInputs();
                }else{
                        return getWorkflowInputs(workflowData.getName());
                }
@@ -319,12 +319,12 @@ public class WorkflowManagerImpl impleme
                        for (String id : workflowTemplateIds) {
                                list.add(new WorkflowData(id,null,false));
                        }
-                       List<String> publishedWorkflowNames = 
getClient().getRegistry().getPublishedWorkflowNames();
+                       List<String> publishedWorkflowNames = 
getClient().getPublishedWFResourceClient().getPublishedWorkflowNames();
                        for (String id : publishedWorkflowNames) {
                                list.add(new WorkflowData(id,null,false));
                        }
                        return list;
-               } catch (RegistryException e) {
+               } catch (Exception e) {
                        throw new AiravataAPIInvocationException(e);
                }
        }


Reply via email to