airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1485036 - in /airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/ airavata-client/src/main/java/org/apache/airavata/client/api/ airavata-client/src/main/java/org/apache/airavata/client/impl/ gfac-core/src/main...
Date Wed, 22 May 2013 03:20:14 GMT
Author: samindaw
Date: Wed May 22 03:20:14 2013
New Revision: 1485036

URL: http://svn.apache.org/r1485036
Log:
https://issues.apache.org/jira/browse/AIRAVATA-859 + refactoring phoebus code + refactoring deprecated code

Added:
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJob.java   (with props)
Modified:
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.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/api/ProvenanceManager.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/ExecutionManagerImpl.java
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ProvenanceManagerImpl.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/phoebus/PhoebusGridConfigurationHandler.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GridConfigurationHandler.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
    airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
    airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/Node.java

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java Wed May 22 03:20:14 2013
@@ -65,19 +65,4 @@ public class AiravataAPIFactory {
 		}
     }
 
-	@Deprecated
-    public static AiravataAPI getAPI(URI registryURL, String username, String password) throws AiravataAPIInvocationException{
-		return getAPI(registryURL, username, password, username);
-	}
-	
-    @Deprecated
-    public static AiravataAPI getAPI(URI registryURL, String username, PasswordCallback callback) throws AiravataAPIInvocationException{
-        return getAPI(registryURL, null, username, callback);
-    }
-
-    @Deprecated
-	public static AiravataAPI getAPI(URI registryURL, String username, String password, String alternateUsername) throws AiravataAPIInvocationException{
-		return getAPI(registryURL, null, username, alternateUsername, new PasswordCallBackImpl(username, password));
-	}
-
 }

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataManager.java Wed May 22 03:20:14 2013
@@ -35,31 +35,6 @@ import java.util.List;
 public interface AiravataManager {
 	
     /**
-     * @deprecated - The GFaC service is deprecated from 0.7 version onwards
-     * Return a list of GFaC service urls registered in the system
-     * @return 0 or more urls
-     * @throws AiravataAPIInvocationException
-     */
-	public List<URI> getGFaCURLs() throws AiravataAPIInvocationException;
-
-    /**
-     * @deprecated - The GFaC service is deprecated from 0.7 version onwards
-     * Return a the first GFaC service url registered in the system
-     * @return url or null if a url is not registered
-     * @throws AiravataAPIInvocationException
-     */
-	public URI getGFaCURL() throws AiravataAPIInvocationException;
-
-    /**
-     * @deprecated - The GFaC service is deprecated from 0.7 version onwards
-     * Return a the first GFaC service url registered in the system orelse return the <code>defaultURL</code>
-     * @param defaultURL
-     * @return url
-     * @throws AiravataAPIInvocationException
-     */
-	public URI getGFaCURL(URI defaultURL) throws AiravataAPIInvocationException;
-
-    /**
      * Return a list of Workflow Interpreter service urls registered in the system
      * @return 0 or more urls
      * @throws AiravataAPIInvocationException
@@ -125,22 +100,6 @@ public interface AiravataManager {
      */
 	public URI getEventingServiceURL(URI defaultURL) throws AiravataAPIInvocationException;
 
-    /**
-     * Return the Airavata registry url 
-     * @return url or null if url is not defined
-     * @throws AiravataAPIInvocationException
-     */
-    @Deprecated
-	public URI getRegistryURL() throws AiravataAPIInvocationException;
-
-    /**
-     * Return the Airavata registry url or return default url
-     * @param defaultURL
-     * @return url
-     * @throws AiravataAPIInvocationException
-     */
-	public URI getRegistryURL(URI defaultURL) throws AiravataAPIInvocationException;
-
     public void setConfiguration(String key, String value, Date expire) throws AiravataAPIInvocationException;
 
     public void addConfiguration(String key, String value, Date expire) throws AiravataAPIInvocationException;
@@ -148,27 +107,12 @@ public interface AiravataManager {
     public void removeAllConfiguration(String key) throws AiravataAPIInvocationException;
 
     public void removeConfiguration(String key, String value) throws AiravataAPIInvocationException;
-    
-    /**
-     * @deprecated - The GFaC service is deprecated from 0.7 version onwards
-     * @param uri
-     * @throws AiravataAPIInvocationException
-     */
-    public void addGFacURI(URI uri) throws AiravataAPIInvocationException;
 
     public void addWorkflowInterpreterURI(URI uri) throws AiravataAPIInvocationException;
 
     public void setEventingURI(URI uri) throws AiravataAPIInvocationException;
 
     public void setMessageBoxURI(URI uri) throws AiravataAPIInvocationException;
-    
-    /**
-     * @deprecated - The GFaC service is deprecated from 0.7 version onwards
-     * @param uri
-     * @param expire
-     * @throws AiravataAPIInvocationException
-     */
-    public void addGFacURI(URI uri, Date expire) throws AiravataAPIInvocationException;
 
     public void addWorkflowInterpreterURI(URI uri, Date expire) throws AiravataAPIInvocationException;
 
@@ -176,19 +120,6 @@ public interface AiravataManager {
 
     public void setMessageBoxURI(URI uri, Date expire) throws AiravataAPIInvocationException;
 
-    /**
-     * @deprecated - The GFaC service is deprecated from 0.7 version onwards
-     * @param uri
-     * @throws AiravataAPIInvocationException
-     */
-    public void removeGFacURI(URI uri) throws AiravataAPIInvocationException ;
-
-    /**
-     * @deprecated - The GFaC service is deprecated from 0.7 version onwards
-     * @throws AiravataAPIInvocationException
-     */
-    public void removeAllGFacURI() throws AiravataAPIInvocationException;
-
     public void removeWorkflowInterpreterURI(URI uri) throws AiravataAPIInvocationException;
 
     public void removeAllWorkflowInterpreterURI() throws AiravataAPIInvocationException;

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=1485036&r1=1485035&r2=1485036&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 Wed May 22 03:20:14 2013
@@ -25,7 +25,6 @@ import java.util.List;
 
 import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
 import org.apache.airavata.registry.api.ExecutionErrors;
-import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.workflow.ExecutionError;
 import org.apache.airavata.registry.api.workflow.ExperimentExecutionError;
 import org.apache.airavata.registry.api.workflow.GFacJobExecutionError;
@@ -33,8 +32,8 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.workflow.WorkflowExecutionError;
 import org.apache.airavata.workflow.model.wf.Workflow;
 import org.apache.airavata.workflow.model.wf.WorkflowInput;
-import org.apache.airavata.ws.monitor.Monitor;
 import org.apache.airavata.ws.monitor.EventDataListener;
+import org.apache.airavata.ws.monitor.Monitor;
 
 public interface ExecutionManager {
     /**
@@ -77,58 +76,6 @@ public interface ExecutionManager {
 	public String runExperiment(Workflow workflow,List<WorkflowInput> inputs, ExperimentAdvanceOptions options) throws AiravataAPIInvocationException;
 
     /**
-     * @deprecated Use the function <code>runExperiment(String,List&ltWorkflowInput&gt,ExperimentAdvanceOptions)</code> instead. <br />
-     * Run an experiment containing single workflow
-     * @param workflowTemplateId
-     * @param inputs
-     * @param user
-     * @param metadata
-     * @param workflowInstanceName
-     * @return
-     * @throws AiravataAPIInvocationException
-     */
-	public String runExperiment(String workflowTemplateId,List<WorkflowInput> inputs, String user, String metadata, String workflowInstanceName)throws AiravataAPIInvocationException;
-
-	/**
-	 * @deprecated Use the function <code>runExperiment(String,List&ltWorkflowInput&gt,ExperimentAdvanceOptions)</code> instead. <br />
-     * Run an experiment containing single workflow
-     * @param workflowTemplateId
-     * @param inputs
-     * @param user
-     * @param metadata
-     * @param workflowInstanceName
-     * @return
-     * @throws AiravataAPIInvocationException
-     */
-	public String runExperiment(String workflowTemplateId,List<WorkflowInput> inputs, String user, String metadata, String workflowInstanceName, String experimentName)throws AiravataAPIInvocationException;
-
-	/**
-	 * @deprecated Use the function <code>runExperiment(String,List&ltWorkflowInput&gt,ExperimentAdvanceOptions)</code> instead. <br />
-	 * Run an experiment containing single workflow
-	 * @param workflowTemplateId
-	 * @param inputs
-	 * @param user
-	 * @param metadata
-	 * @param workflowInstanceName
-	 * @param builder
-	 * @return
-	 * @throws AiravataAPIInvocationException
-	 */
-	public String runExperiment(String workflowTemplateId,List<WorkflowInput> inputs, String user, String metadata, String workflowInstanceName, WorkflowContextHeaderBuilder builder)throws AiravataAPIInvocationException;
-
-    /**
-     * @deprecated Use the function <code>runExperiment(String,List&ltWorkflowInput&gt,ExperimentAdvanceOptions)</code> instead. <br />
-     * Run an experiment containing single workflow
-     * @param workflow
-     * @param inputs
-     * @param user
-     * @param metadata
-     * @return
-     * @throws AiravataAPIInvocationException
-     */
-	public String runExperiment(Workflow workflow,List<WorkflowInput> inputs, String user, String metadata)throws AiravataAPIInvocationException;
-
-    /**
      * Get a monitor for a running experiment
      * @param experimentId
      * @return
@@ -144,16 +91,6 @@ public interface ExecutionManager {
      * @throws AiravataAPIInvocationException
      */
 	public Monitor getExperimentMonitor(String experimentId, EventDataListener listener) throws AiravataAPIInvocationException;
-	
-	/**
-	 * @deprecated
-	 * Creates a WorkflowContextHeaderBuilder object that can be used to customize the scheduling of a workflow execution.
-	 * Once configured this object run the workflow using
-	 *   <code>runWorkflow(String workflowTemplateId,List<WorkflowInput> inputs, String user, String metadata, String workflowInstanceName, WorkflowContextHeaderBuilder builder)</code>
-	 * @return
-	 * @throws AiravataAPIInvocationException
-	 */
-	public WorkflowContextHeaderBuilder createWorkflowContextHeader() throws AiravataAPIInvocationException;
 
 	/**
 	 * Create a new experiment advance options

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ProvenanceManager.java Wed May 22 03:20:14 2013
@@ -21,11 +21,25 @@
 
 package org.apache.airavata.client.api;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.airavata.registry.api.workflow.*;
+import org.apache.airavata.registry.api.exception.RegistryException;
+import org.apache.airavata.registry.api.workflow.ExperimentData;
+import org.apache.airavata.registry.api.workflow.ExperimentMetadata;
+import org.apache.airavata.registry.api.workflow.ExperimentName;
+import org.apache.airavata.registry.api.workflow.ExperimentUser;
+import org.apache.airavata.registry.api.workflow.GFacJob;
+import org.apache.airavata.registry.api.workflow.GFacJob.GFacJobStatus;
+import org.apache.airavata.registry.api.workflow.NodeExecutionStatus;
+import org.apache.airavata.registry.api.workflow.WorkflowExecution;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionData;
+import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus;
 import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
+import org.apache.airavata.registry.api.workflow.WorkflowInstanceNode;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeGramData;
+import org.apache.airavata.registry.api.workflow.WorkflowNodeType;
 
 /**
  * This interface provide and API to manage all the provenance related methods, get Workflow inputs outputs
@@ -343,4 +357,97 @@ public interface ProvenanceManager {
     public void saveWorkflowExecutionOutput(String experimentId, String outputNodeName, String output) throws AiravataAPIInvocationException;
 
      public void updateWorkflowNodeGramData(WorkflowNodeGramData data) throws AiravataAPIInvocationException;
+     
+ 	/*---------------------------------------  Managing Data for GFac Jobs ------------------------------------------*/
+
+     /**
+      * Returns <code>true</code> if a gfac job data is existing in Airavata
+      * @param gfacJobId
+      * @return
+      * @throws RegistryException
+      */
+     public boolean isGFacJobExists(String gfacJobId) throws AiravataAPIInvocationException;
+     
+     /**
+      * Adding data related to a new GFac job submission
+      * @param job - the <code>jobId</code> cannot be <code>null</code>.
+      * @throws AiravataAPIInvocationException
+      */
+     public void addGFacJob(GFacJob job) throws AiravataAPIInvocationException;
+     
+     /**
+      * Update data related to a existing GFac job record in Airavata
+      * @param job - the <code>jobId</code> cannot be <code>null</code> and should already exist in Airavata
+      * @throws AiravataAPIInvocationException
+      */
+     public void updateGFacJob(GFacJob job) throws AiravataAPIInvocationException;
+     
+     /**
+      * Update the status of the job
+      * @param gfacJobId
+      * @param status
+      * @throws AiravataAPIInvocationException
+      */
+     public void updateGFacJobStatus(String gfacJobId, GFacJobStatus status) throws AiravataAPIInvocationException;
+     
+     /**
+      * Update the job data. GFacProvider implementation should decide the job data. Typically it'll 
+      * be a serialization of the submitted job query (eg: rsl for a GRAM job) 
+      * @param gfacJobId
+      * @param jobdata
+      * @throws AiravataAPIInvocationException
+      */
+     public void updateGFacJobData(String gfacJobId, String jobdata) throws AiravataAPIInvocationException;
+     
+     /**
+      * Update the time of job submission or job started executing
+      * @param gfacJobId
+      * @param submitted
+      * @throws AiravataAPIInvocationException
+      */
+     public void updateGFacJobSubmittedTime(String gfacJobId, Date submitted) throws AiravataAPIInvocationException;
+     
+     /**
+      * Update the time of job finished executing.
+      * @param gfacJobId
+      * @param completed
+      * @throws AiravataAPIInvocationException
+      */
+     public void updateGFacJobCompletedTime(String gfacJobId, Date completed) throws AiravataAPIInvocationException;
+     
+     /**
+      * Custom data field for users
+      * @param gfacJobId
+      * @param metadata
+      * @throws AiravataAPIInvocationException
+      */
+     public void updateGFacJobMetadta(String gfacJobId, String metadata) throws AiravataAPIInvocationException;
+     
+     /**
+      * Retrieve the GFac Job for the given job id
+      * @param gfacJobId
+      * @return
+      * @throws AiravataAPIInvocationException
+      */
+     public GFacJob getGFacJob(String gfacJobId) throws AiravataAPIInvocationException;
+     
+     /**
+      * Retrieve a list of GFac jobs executed for the given descriptors
+      * @param serviceDescriptionId - should be <code>null</code> if user does not care what service description the job corresponds to
+      * @param hostDescriptionId - should be <code>null</code> if user does not care what host description the job corresponds to
+      * @param applicationDescriptionId - should be <code>null</code> if user does not care what application description the job corresponds to
+      * @return
+      * @throws AiravataAPIInvocationException
+      */
+     public List<GFacJob> getGFacJobsForDescriptors(String serviceDescriptionId, String hostDescriptionId, String applicationDescriptionId) throws AiravataAPIInvocationException;
+     
+     /**
+      * Retrieve a list of GFac jobs executed for the given experiment credentials
+      * @param experimentId - should be <code>null</code> if user does not care what experiment the job corresponds to
+      * @param workflowExecutionId -  - should be <code>null</code> if user does not care what workflow execution the job corresponds to
+      * @param nodeId  - should be <code>null</code> if user does not care what node id the job corresponds to
+      * @return
+      * @throws AiravataAPIInvocationException
+      */
+     public List<GFacJob> getGFacJobs(String experimentId, String workflowExecutionId, String nodeId) 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=1485036&r1=1485035&r2=1485036&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 Wed May 22 03:20:14 2013
@@ -41,36 +41,6 @@ public class AiravataManagerImpl impleme
 	}
 
 	@Override
-	public List<URI> getGFaCURLs()  throws AiravataAPIInvocationException{
-	        List<URI> list=new ArrayList<URI>();
-	        try {
-	                List<URI> gFacDescriptorList = getClient().getRegistryClient().getGFacURIs();
-	                for (URI url : gFacDescriptorList) {
-	                        list.add(url);
-	                }
-	        } catch (Exception e) {
-	                throw new AiravataAPIInvocationException(e);
-	        }
-	        return list;
-	}
-
-	@Override
-	public URI getGFaCURL()  throws AiravataAPIInvocationException{
-	        try {
-	                return getClient().getClientConfiguration().getGfacURL().toURI();
-	        } catch (URISyntaxException e) {
-	                throw new AiravataAPIInvocationException(e);
-	        }
-	}
-
-	@Override
-	public URI getGFaCURL(URI defaultURL)  throws AiravataAPIInvocationException{
-	        if (getGFaCURL()==null){
-	                return defaultURL;
-	        }
-	        return getGFaCURL();
-	}
-	@Override
 	public List<URI> getWorkflowInterpreterServiceURLs()  throws AiravataAPIInvocationException{
 		try {
 			return getClient().getRegistryClient().getWorkflowInterpreterURIs();
@@ -167,25 +137,6 @@ public class AiravataManagerImpl impleme
 		return getEventingServiceURL();
 	}
 
-	@Override
-	public URI getRegistryURL() throws AiravataAPIInvocationException {
-		try {
-			return getClient().getClientConfiguration().getRegistryURL().toURI();
-		} catch (URISyntaxException e) {
-			throw new AiravataAPIInvocationException(e);
-		}
-	}
-
-	@Override
-    @Deprecated
-	public URI getRegistryURL(URI defaultURL)
-			throws AiravataAPIInvocationException {
-		if (getRegistryURL()==null){
-			return defaultURL;	
-		}
-		return getRegistryURL();
-	}
-
     @Override
     public void setConfiguration(String key, String value, Date expire) throws AiravataAPIInvocationException {
        try{
@@ -223,15 +174,6 @@ public class AiravataManagerImpl impleme
     }
 
     @Override
-    public void addGFacURI(URI uri) throws AiravataAPIInvocationException {
-        try{
-            getClient().getRegistryClient().addGFacURI(uri);
-        }catch (Exception e){
-            throw new AiravataAPIInvocationException(e);
-        }
-    }
-
-    @Override
     public void addWorkflowInterpreterURI(URI uri) throws AiravataAPIInvocationException {
         try{
             getClient().getRegistryClient().addWorkflowInterpreterURI(uri);
@@ -259,15 +201,6 @@ public class AiravataManagerImpl impleme
     }
 
     @Override
-    public void addGFacURI(URI uri, Date expire) throws AiravataAPIInvocationException {
-        try{
-            getClient().getRegistryClient().addGFacURI(uri, expire);
-        }catch (Exception e){
-            throw new AiravataAPIInvocationException(e);
-        }
-    }
-
-    @Override
     public void addWorkflowInterpreterURI(URI uri, Date expire) throws AiravataAPIInvocationException {
         try{
             getClient().getRegistryClient().addWorkflowInterpreterURI(uri, expire);
@@ -295,24 +228,6 @@ public class AiravataManagerImpl impleme
     }
 
     @Override
-    public void removeGFacURI(URI uri) throws AiravataAPIInvocationException {
-        try{
-            getClient().getRegistryClient().removeGFacURI(uri);
-        }catch (Exception e){
-            throw new AiravataAPIInvocationException(e);
-        }
-    }
-
-    @Override
-    public void removeAllGFacURI() throws AiravataAPIInvocationException {
-        try{
-            getClient().getRegistryClient().removeAllGFacURI();
-        }catch (Exception e){
-            throw new AiravataAPIInvocationException(e);
-        }
-    }
-
-    @Override
     public void removeWorkflowInterpreterURI(URI uri) throws AiravataAPIInvocationException {
         try{
             getClient().getRegistryClient().removeWorkflowInterpreterURI(uri);

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=1485036&r1=1485035&r2=1485036&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 Wed May 22 03:20:14 2013
@@ -49,8 +49,6 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.workflow.WorkflowExecutionError;
 import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus;
 import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-import org.apache.airavata.schemas.wec.ApplicationOutputDataHandlingDocument.ApplicationOutputDataHandling;
-import org.apache.airavata.schemas.wec.ApplicationSchedulingContextDocument.ApplicationSchedulingContext;
 import org.apache.airavata.workflow.model.component.ComponentException;
 import org.apache.airavata.workflow.model.component.ws.WSComponentPort;
 import org.apache.airavata.workflow.model.graph.GraphException;
@@ -338,52 +336,7 @@ public class ExecutionManagerImpl implem
 
 	//------------------Deprecated Functions---------------------//
 	
-	@Override
-	public String runExperiment(String workflowTemplateId,
-			List<WorkflowInput> inputs, String user, String metadata, String workflowInstanceName)
-			throws AiravataAPIInvocationException {
-		ExperimentAdvanceOptions options = createExperimentAdvanceOptions(workflowInstanceName, user, metadata);
-		return runExperiment(workflowTemplateId, inputs, options);
-
-	}
-
-	@Override
-	public String runExperiment(Workflow workflow, List<WorkflowInput> inputs,
-			String user, String metadata) throws AiravataAPIInvocationException {
-		ExperimentAdvanceOptions options=createExperimentAdvanceOptions(workflow.getName()+"_"+Calendar.getInstance().getTime().toString(), user, metadata);
-		return runExperiment(workflow,inputs,options);
-	}
-	
-	@Override
-	public String runExperiment(String workflowTemplateId,
-			List<WorkflowInput> inputs, String user, String metadata,
-			String workflowInstanceName, WorkflowContextHeaderBuilder builder)
-			throws AiravataAPIInvocationException {
-		ExperimentAdvanceOptions options = createExperimentAdvanceOptions(workflowInstanceName, user, metadata);
-		ApplicationSchedulingContext[] nodeSchedules = builder.getWorkflowSchedulingContext().getApplicationSchedulingContextArray();
-		for (ApplicationSchedulingContext context : nodeSchedules) {
-			NodeSettings nodeSettings = options.getCustomWorkflowSchedulingSettings().addNewNodeSettings(context.getWorkflowNodeId());
-			if (context.isSetServiceId()) nodeSettings.setServiceId(context.getServiceId());
-			if (context.isSetGatekeeperEpr()) nodeSettings.getHostSettings().setGatekeeperEPR(context.getGatekeeperEpr());
-			if (context.isSetHostName()) nodeSettings.getHostSettings().setHostId(context.getHostName());
-			if (context.isSetWsgramPreferred()) nodeSettings.getHostSettings().setWSGramPreffered(context.getWsgramPreferred());
-			if (context.isSetCpuCount()) nodeSettings.getHPCSettings().setCPUCount(context.getCpuCount());
-			if (context.isSetJobManager()) nodeSettings.getHPCSettings().setJobManager(context.getJobManager());
-			if (context.isSetMaxWallTime()) nodeSettings.getHPCSettings().setMaxWallTime(context.getMaxWallTime());
-			if (context.isSetNodeCount()) nodeSettings.getHPCSettings().setNodeCount(context.getNodeCount());
-			if (context.isSetQueueName()) nodeSettings.getHPCSettings().setQueueName(context.getQueueName());
-		}
-		ApplicationOutputDataHandling[] dataHandlingSettings = builder.getWorkflowOutputDataHandling().getApplicationOutputDataHandlingArray();
-		for (ApplicationOutputDataHandling handling : dataHandlingSettings) {
-			options.getCustomWorkflowOutputDataSettings().addNewOutputDataSettings(handling.getNodeId(), handling.getOutputDataDirectory(),handling.getDataRegistryUrl(),handling.getDataPersistance());
-		}
-		//TODO rest of the builder configurations as they are added to the experiment options
-		return runExperiment(workflowTemplateId, inputs, options);
-	}
-	
-
-	@Override
-	public WorkflowContextHeaderBuilder createWorkflowContextHeader()
+	private WorkflowContextHeaderBuilder createWorkflowContextHeader()
 			throws AiravataAPIInvocationException {
 		try {
 			return new WorkflowContextHeaderBuilder(null,
@@ -393,16 +346,6 @@ public class ExecutionManagerImpl implem
 			throw new AiravataAPIInvocationException(e);
 		}
 	}
-
-	@Override
-	public String runExperiment(String workflowName,
-			List<WorkflowInput> inputs, String user, String metadata,
-			String workflowInstanceName, String experimentName)
-			throws AiravataAPIInvocationException {
-		ExperimentAdvanceOptions options = createExperimentAdvanceOptions(workflowInstanceName, user, metadata);
-		options.setCustomExperimentId(experimentName);
-		return runExperiment(workflowName, inputs, options);
-	}
 	
 	//------------------End of Deprecated Functions---------------------//
 

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=1485036&r1=1485035&r2=1485036&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 Wed May 22 03:20:14 2013
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.client.impl;
 
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -32,6 +33,7 @@ import org.apache.airavata.common.except
 import org.apache.airavata.registry.api.AiravataExperiment;
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.workflow.*;
+import org.apache.airavata.registry.api.workflow.GFacJob.GFacJobStatus;
 import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 
 public class ProvenanceManagerImpl implements ProvenanceManager {
@@ -483,9 +485,121 @@ public class ProvenanceManagerImpl imple
         try {
             client.getRegistryClient().updateWorkflowNodeGramData(data);
         } catch (RegistryException e) {
-            new AiravataAPIInvocationException(e);
+            throw new AiravataAPIInvocationException(e);
         } catch (AiravataConfigurationException e) {
-            new AiravataAPIInvocationException(e);
+            throw new AiravataAPIInvocationException(e);
         }
     }
+
+	@Override
+	public boolean isGFacJobExists(String gfacJobId)
+			throws AiravataAPIInvocationException {
+		try {
+			return client.getRegistryClient().isGFacJobExists(gfacJobId);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+	
+	@Override
+	public void addGFacJob(GFacJob job) throws AiravataAPIInvocationException {
+		try {
+			client.getRegistryClient().addGFacJob(job);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public void updateGFacJob(GFacJob job)
+			throws AiravataAPIInvocationException {
+		try {
+			client.getRegistryClient().updateGFacJob(job);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public void updateGFacJobStatus(String gfacJobId, GFacJobStatus status)
+			throws AiravataAPIInvocationException {
+		try {
+			client.getRegistryClient().updateGFacJobStatus(gfacJobId, status);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public void updateGFacJobData(String gfacJobId, String jobdata)
+			throws AiravataAPIInvocationException {
+		try {
+			client.getRegistryClient().updateGFacJobData(gfacJobId, jobdata);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public void updateGFacJobSubmittedTime(String gfacJobId, Date submitted)
+			throws AiravataAPIInvocationException {
+		try {
+			client.getRegistryClient().updateGFacJobSubmittedTime(gfacJobId, submitted);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public void updateGFacJobCompletedTime(String gfacJobId, Date completed)
+			throws AiravataAPIInvocationException {
+		try {
+			client.getRegistryClient().updateGFacJobCompletedTime(gfacJobId, completed);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public void updateGFacJobMetadta(String gfacJobId, String metadata)
+			throws AiravataAPIInvocationException {
+		try {
+			client.getRegistryClient().updateGFacJobMetadta(gfacJobId, metadata);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public GFacJob getGFacJob(String gfacJobId)
+			throws AiravataAPIInvocationException {
+		try {
+			return client.getRegistryClient().getGFacJob(gfacJobId);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public List<GFacJob> getGFacJobsForDescriptors(String serviceDescriptionId,
+			String hostDescriptionId, String applicationDescriptionId)
+			throws AiravataAPIInvocationException {
+		try {
+			return client.getRegistryClient().getGFacJobsForDescriptors(serviceDescriptionId, hostDescriptionId, applicationDescriptionId);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
+	@Override
+	public List<GFacJob> getGFacJobs(String experimentId,
+			String workflowExecutionId, String nodeId)
+			throws AiravataAPIInvocationException {
+		try {
+			return client.getRegistryClient().getGFacJobs(experimentId, workflowExecutionId, nodeId);
+		} catch (Exception e) {
+			throw new AiravataAPIInvocationException(e);
+		}
+	}
+
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/external/GridFtp.java Wed May 22 03:20:14 2013
@@ -92,7 +92,7 @@ public class GridFtp {
                     destClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
                     destClient.authenticate(gssCred);
                     destClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
-                    makeExternalConfigurations(destClient, false);
+                    makeDirExternalConfigurations(destClient, destPath);
 
                     if (!destClient.exists(destPath)) {
                         destClient.makeDir(destPath);
@@ -152,7 +152,7 @@ public class GridFtp {
             ftpClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
             ftpClient.authenticate(gsCredential);
             ftpClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
-            makeExternalConfigurations(ftpClient, false);
+            makeFileTransferExternalConfigurations(null, ftpClient);
 
             log.info("Uploading file");
             if (checkBinaryExtensions(remoteFile)) {
@@ -197,14 +197,14 @@ public class GridFtp {
             srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
             srcClient.authenticate(gsCredential);
             srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
-            makeExternalConfigurations(srcClient, true);
 
             GridFTPClient destClient = new GridFTPClient(destContactInfo.hostName, destContactInfo.port);
             destClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
             destClient.authenticate(gsCredential);
             destClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
-            makeExternalConfigurations(destClient, false);
-		log.debug("Uploading file");
+            makeFileTransferExternalConfigurations(srcClient, destClient);
+            
+            log.debug("Uploading file");
             if (checkBinaryExtensions(remoteFile)) {
                 log.debug("Transfer mode is set to Binary for a file upload");
                 srcClient.setType(Session.TYPE_IMAGE);
@@ -255,7 +255,7 @@ public class GridFtp {
             ftpClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
             ftpClient.authenticate(gsCredential);
             ftpClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
-            makeExternalConfigurations(ftpClient, false);
+            makeFileTransferExternalConfigurations(null, ftpClient);
 
             log.debug("Uploading file");
             if (checkBinaryExtensions(remoteFile)) {
@@ -308,7 +308,7 @@ public class GridFtp {
             ftpClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
             ftpClient.authenticate(gsCredential);
             ftpClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
-            makeExternalConfigurations(ftpClient, true);
+            makeFileTransferExternalConfigurations(ftpClient, null);
 
             log.debug("Downloading file");
             if (checkBinaryExtensions(remoteFile)) {
@@ -407,7 +407,6 @@ public class GridFtp {
             destClient = new GridFTPClient(desthost.getHost(), desthost.getPort());
             destClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
             destClient.authenticate(gssCred);
-            makeExternalConfigurations(destClient, false);
 
             if (checkBinaryExtensions(desthost.getPath())) {
                 log.debug("Transfer mode is set to Binary");
@@ -417,7 +416,7 @@ public class GridFtp {
             srcClient = new GridFTPClient(srchost.getHost(), srchost.getPort());
             srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
             srcClient.authenticate(gssCred);
-            makeExternalConfigurations(srcClient, true);
+            makeFileTransferExternalConfigurations(srcClient, destClient);
 
             if (checkBinaryExtensions(srchost.getPath())) {
                 log.debug("Transfer mode is set to Binary");
@@ -493,8 +492,8 @@ public class GridFtp {
 				srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
 				srcClient.setType(Session.TYPE_ASCII);
 				srcClient.changeDir(dirURI.getPath());
-	            makeExternalConfigurations(srcClient, true);
-
+				makelistDirExternalConfigurations(srcClient);
+				
 				Vector<Object> fileInfo = null;
 				try {
 					fileInfo = srcClient.mlsd();
@@ -555,26 +554,67 @@ public class GridFtp {
     }
 
     /**
-     * This function will call the external configuration handlers to configure the GridFTPClient
+     * This function will call the external configuration handlers to configure the GridFTPClients 
+     * when file transferring is required
      * object.
      * @param client
      * @param source
      */
-	private void makeExternalConfigurations(GridFTPClient client, boolean source) {
+	private void makeFileTransferExternalConfigurations(GridFTPClient source, GridFTPClient destination) {
 		GridConfigurationHandler[] handlers = GFacConfiguration.getGridConfigurationHandlers();
 		for(GridConfigurationHandler handler:handlers){
 			try {
-				if (source) {
-					handler.handleSourceFTPClient(client);
-				}else{
-					handler.handleDestinationFTPClient(client);
-				}
+				handler.handleFileTransferFTPClientConfigurations(source,destination);
+			} catch (Exception e) {
+				//TODO Right now we are just catching & ignoring the exception. But later on we need
+				//to throw this exception to notify the user of configuration errors of their
+				//custom configuration handlers.
+				log.error("Error while external configurings for GridFTPClient(s) of " 
+				+ (source!=null? " "+source.getHost():"")+" "+(destination!=null? " "+destination.getHost():""), e);
+			}
+		}
+
+	}
+	
+	/**
+     * This function will call the external configuration handlers to configure the GridFTPClients 
+     * when file transferring is required
+     * object.
+     * @param client
+     * @param source
+     */
+	private void makeDirExternalConfigurations(GridFTPClient client, String dirPath) {
+		GridConfigurationHandler[] handlers = GFacConfiguration.getGridConfigurationHandlers();
+		for(GridConfigurationHandler handler:handlers){
+			try {
+				handler.handleMakeDirFTPClientConfigurations(client, dirPath);
+			} catch (Exception e) {
+				//TODO Right now we are just catching & ignoring the exception. But later on we need
+				//to throw this exception to notify the user of configuration errors of their
+				//custom configuration handlers.
+				log.error("Error while external configurings for GridFTPClient(s) of " + client.getHost(), e);
+			}
+		}
+
+	}
+	
+	/**
+     * This function will call the external configuration handlers to configure the GridFTPClients 
+     * when file transferring is required
+     * object.
+     * @param client
+     * @param source
+     */
+	private void makelistDirExternalConfigurations(GridFTPClient client) {
+		GridConfigurationHandler[] handlers = GFacConfiguration.getGridConfigurationHandlers();
+		for(GridConfigurationHandler handler:handlers){
+			try {
+				handler.handleListDirFTPClientConfigurations(client);
 			} catch (Exception e) {
 				//TODO Right now we are just catching & ignoring the exception. But later on we need
 				//to throw this exception to notify the user of configuration errors of their
 				//custom configuration handlers.
-				log.error("Error while configuring GridFTPClient for "
-								+ client.getHost(), e);
+				log.error("Error while external configurings for GridFTPClient(s) of " + client.getHost(), e);
 			}
 		}
 

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/phoebus/PhoebusGridConfigurationHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/phoebus/PhoebusGridConfigurationHandler.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/phoebus/PhoebusGridConfigurationHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/phoebus/PhoebusGridConfigurationHandler.java Wed May 22 03:20:14 2013
@@ -27,15 +27,27 @@ import org.globus.ftp.GridFTPClient;
 
 public class PhoebusGridConfigurationHandler implements GridConfigurationHandler{
 
-    public void handleSourceFTPClient(GridFTPClient client) throws Exception {
-        if (PhoebusUtils.isPhoebusDriverConfigurationsDefined(client.getHost())) {
-            client.setDataChannelAuthentication(DataChannelAuthentication.NONE);
-            client.site("SITE SETNETSTACK phoebus:" + PhoebusUtils.getPhoebusDataChannelXIODriverParameters(client.getHost()));
+    public void handleFileTransferFTPClientConfigurations(GridFTPClient source, GridFTPClient destination) throws Exception {
+        if (source!=null && PhoebusUtils.isPhoebusDriverConfigurationsDefined(source.getHost())) {
+            source.setDataChannelAuthentication(DataChannelAuthentication.NONE);
+            source.site("SITE SETNETSTACK phoebus:" + PhoebusUtils.getPhoebusDataChannelXIODriverParameters(source.getHost()));
         }
     }
 
-    public void handleDestinationFTPClient(GridFTPClient client)
+    public void handleMakeDirFTPClientConfigurations(GridFTPClient client, String dirPath)
             throws Exception {
-
+    	//nothing to do
     }
+
+	@Override
+	public void handleListDirFTPClientConfigurations(GridFTPClient client)
+			throws Exception {
+    	//nothing to do
+	}
+
+	@Override
+	public void handleFTPClientConfigurations(GridFTPClient client,
+			String taskDescription) throws Exception {
+    	//nothing to do
+	}
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GridConfigurationHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GridConfigurationHandler.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GridConfigurationHandler.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/utils/GridConfigurationHandler.java Wed May 22 03:20:14 2013
@@ -24,17 +24,34 @@ import org.globus.ftp.GridFTPClient;
 public interface GridConfigurationHandler {
 
 	/**
-	 * Do the configurations required for the source GridFTPClient object
+	 * Gets triggered if any GridFTP tasks other than mentioned below if called. This is there to 
+	 * support future extensions in GridFTP tasks so that the handlers need not be updated necessarily 
 	 * @param client
+	 * @param taskDescription - a description of the task that is being carried out.
+	 * @throws Exception
+	 */
+	public void handleFTPClientConfigurations(GridFTPClient client, String taskDescription) throws Exception;
+
+	/**
+	 * Do the configurations required for the source GridFTPClient object
+	 * @param source - <code>null</code> if the transfer is from the local file-system
+	 * @param destination - <code>null</code> if the transfer is to the local file-system 
 	 * @throws Exception
 	 */
-	public void handleSourceFTPClient(GridFTPClient client) throws Exception;
+	public void handleFileTransferFTPClientConfigurations(GridFTPClient source, GridFTPClient destination) throws Exception;
 
 	/**
-	 * Do the configurations required for the destination GridFTPClient object
+	 * Do the configurations required for the GridFTPClient object which is going to create a directory
+	 * @param client
+	 * @throws Exception
+	 */
+	public void handleMakeDirFTPClientConfigurations(GridFTPClient client, String dirPath) throws Exception;
+	
+	/**
+	 * Do the configurations required for the GridFTPClient object which is going to list a directory
 	 * @param client
 	 * @throws Exception
 	 */
-	public void handleDestinationFTPClient(GridFTPClient client) throws Exception;
+	public void handleListDirFTPClientConfigurations(GridFTPClient client) throws Exception;
 }
 

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java Wed May 22 03:20:14 2013
@@ -63,6 +63,7 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
 import org.apache.airavata.registry.api.util.RegistryConstants;
 import org.apache.airavata.registry.api.workflow.*;
+import org.apache.airavata.registry.api.workflow.GFacJob.GFacJobStatus;
 import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 import org.apache.xmlbeans.XmlException;
 import org.slf4j.Logger;
@@ -2189,4 +2190,78 @@ public class AiravataJPARegistry extends
 		return executionError.getErrorID();
 	}
 
+	@Override
+	public void addGFacJob(GFacJob job) throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJob(GFacJob job) throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobStatus(String gfacJobId, GFacJobStatus status)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobData(String gfacJobId, String jobdata)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobSubmittedTime(String gfacJobId, Date submitted)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobCompletedTime(String gfacJobId, Date completed)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobMetadta(String gfacJobId, String metadata)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public GFacJob getGFacJob(String gfacJobId) throws RegistryException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public List<GFacJob> getGFacJobsForDescriptors(String serviceDescriptionId,
+			String hostDescriptionId, String applicationDescriptionId)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public List<GFacJob> getGFacJobs(String experimentId,
+			String workflowExecutionId, String nodeId) throws RegistryException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public boolean isGFacJobExists(String gfacJobId) throws RegistryException {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
 }

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java Wed May 22 03:20:14 2013
@@ -26,7 +26,7 @@ import java.util.List;
 
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowExecutionData;
+import org.apache.airavata.registry.api.workflow.GFacJob.GFacJobStatus;
 import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
 
 public interface ProvenanceRegistry extends AiravataSubRegistry{
@@ -307,6 +307,7 @@ public interface ProvenanceRegistry exte
     public Date getWorkflowStartTime(WorkflowExecution workflowInstance)throws RegistryException;
     
     /**
+     * @deprecated - Will be removed from 0.9 release onwards. Use {@see #addGFacJob #updateGFacJob(GFacJob) etc.} functions instead.
      * This will store the gram specific data in to repository, this can be called before submitting the workflow in to Grid
      * @param workflowNodeGramData
      * @return
@@ -327,10 +328,9 @@ public interface ProvenanceRegistry exte
     
     public void addWorkflowInstanceNode(String workflowInstance, String nodeId) throws RegistryException;
     
-    /*
-     * Errors in experiment executions
-     */
     
+	/*---------------------------------------  Errors in experiment executions ------------------------------------------*/
+
     /**
      * Return errors defined at the experiment level 
      * @param experimentId
@@ -389,38 +389,6 @@ public interface ProvenanceRegistry exte
      */
     public List<ExecutionError> getExecutionErrors(String experimentId, String workflowInstanceId, String nodeId, String gfacJobId, ExecutionErrors.Source...filterBy) throws RegistryException;
 
-    
-    
-//    /**
-//     * Return errors defined for the experiment Id
-//     * @param experimentId 
-//     * @param filterBy - what type of source types the results should contain
-//     * @return
-//     * @throws RegistryException
-//     */
-//    public List<ExecutionError> getAllExperimentErrors(String experimentId, ExecutionErrors.Source...filterBy) throws RegistryException;
-//  
-//     /**
-//     * Return errors defined for the workflow instance
-//     * @param experimentId 
-//     * @param workflowInstanceId
-//     * @param filterBy - what type of source types the results should contain
-//     * @return
-//     * @throws RegistryException
-//     */
-//    public List<ExecutionError> getAllWorkflowErrors(String experimentId, String workflowInstanceId, ExecutionErrors.Source...filterBy) throws RegistryException;
-//
-//    /**
-//     * Return errors defined for the node execution
-//     * @param experimentId 
-//     * @param workflowInstanceId
-//     * @param nodeId
-//     * @param filterBy - what type of source types the results should contain
-//     * @return
-//     * @throws RegistryException
-//     */
-//    public List<ExecutionError> getAllNodeErrors(String experimentId, String workflowInstanceId, String nodeId, ExecutionErrors.Source...filterBy) throws RegistryException;
-
     /**
      * Adds an experiment execution error 
      * @param error
@@ -452,4 +420,98 @@ public interface ProvenanceRegistry exte
      * @throws RegistryException
      */
     public int addGFacJobExecutionError(GFacJobExecutionError error) throws RegistryException;
+    
+    
+	/*---------------------------------------  Managing Data for GFac Jobs ------------------------------------------*/
+
+    /**
+     * Returns <code>true</code> if a gfac job data is existing in the registry
+     * @param gfacJobId
+     * @return
+     * @throws RegistryException
+     */
+    public boolean isGFacJobExists(String gfacJobId) throws RegistryException;
+    
+    /**
+     * Adding data related to a new GFac job submission
+     * @param job - the <code>jobId</code> cannot be <code>null</code>.
+     * @throws RegistryException
+     */
+    public void addGFacJob(GFacJob job) throws RegistryException;
+    
+    /**
+     * update data related to a existing GFac job record in the registry
+     * @param job - the <code>jobId</code> cannot be <code>null</code> and should already exist in registry
+     * @throws RegistryException
+     */
+    public void updateGFacJob(GFacJob job) throws RegistryException;
+    
+    /**
+     * Update the status of the job
+     * @param gfacJobId
+     * @param status
+     * @throws RegistryException
+     */
+    public void updateGFacJobStatus(String gfacJobId, GFacJobStatus status) throws RegistryException;
+    
+    /**
+     * Update the job data. GFacProvider implementation should decide the job data. Typically it'll 
+     * be a serialization of the submitted job query (eg: rsl for a GRAM job) 
+     * @param gfacJobId
+     * @param jobdata
+     * @throws RegistryException
+     */
+    public void updateGFacJobData(String gfacJobId, String jobdata) throws RegistryException;
+    
+    /**
+     * Update the time of job submission or job started executing
+     * @param gfacJobId
+     * @param submitted
+     * @throws RegistryException
+     */
+    public void updateGFacJobSubmittedTime(String gfacJobId, Date submitted) throws RegistryException;
+    
+    /**
+     * Update the time of job finished executing.
+     * @param gfacJobId
+     * @param completed
+     * @throws RegistryException
+     */
+    public void updateGFacJobCompletedTime(String gfacJobId, Date completed) throws RegistryException;
+    
+    /**
+     * Custom data field for users
+     * @param gfacJobId
+     * @param metadata
+     * @throws RegistryException
+     */
+    public void updateGFacJobMetadta(String gfacJobId, String metadata) throws RegistryException;
+    
+    /**
+     * Retrieve the GFac Job for the given job id
+     * @param gfacJobId
+     * @return
+     * @throws RegistryException
+     */
+    public GFacJob getGFacJob(String gfacJobId) throws RegistryException;
+    
+    /**
+     * Retrieve a list of GFac jobs executed for the given descriptors
+     * @param serviceDescriptionId - should be <code>null</code> if user does not care what service description the job corresponds to
+     * @param hostDescriptionId - should be <code>null</code> if user does not care what host description the job corresponds to
+     * @param applicationDescriptionId - should be <code>null</code> if user does not care what application description the job corresponds to
+     * @return
+     * @throws RegistryException
+     */
+    public List<GFacJob> getGFacJobsForDescriptors(String serviceDescriptionId, String hostDescriptionId, String applicationDescriptionId) throws RegistryException;
+    
+    /**
+     * Retrieve a list of GFac jobs executed for the given experiment credentials
+     * @param experimentId - should be <code>null</code> if user does not care what experiment the job corresponds to
+     * @param workflowExecutionId -  - should be <code>null</code> if user does not care what workflow execution the job corresponds to
+     * @param nodeId  - should be <code>null</code> if user does not care what node id the job corresponds to
+     * @return
+     * @throws RegistryException
+     */
+    public List<GFacJob> getGFacJobs(String experimentId, String workflowExecutionId, String nodeId) throws RegistryException;
 }
\ No newline at end of file

Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJob.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJob.java?rev=1485036&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJob.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJob.java Wed May 22 03:20:14 2013
@@ -0,0 +1,150 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.api.workflow;
+
+import java.util.Date;
+
+public class GFacJob {
+	public static enum GFacJobStatus{
+		SUBMITTED, //job is submitted, possibly waiting to start executing
+		EXECUTING, //submitted job is being executed
+		CANCELLED, //job was cancelled
+		PAUSED, //job was paused
+		WAITING_FOR_DATA, // job is waiting for data to continue executing
+		FAILED, // error occurred while job was executing and the job stopped
+		FINISHED, // job completed successfully
+		UNKNOWN // unknown status. lookup the metadata for more details.
+	}
+	
+	private String experimentId;
+	private String workflowExecutionId;
+	private String nodeId;
+	
+	private String serviceDescriptionId;
+	private String hostDescriptionId;
+	private String applicationDescriptionId;
+	
+	private String jobId;
+	private String jobData;
+	
+	private Date submittedTime;
+	private Date completedTime;
+	private GFacJobStatus jobStatus;
+	
+	private String metadata;
+
+	public String getExperimentId() {
+		return experimentId;
+	}
+
+	public void setExperimentId(String experimentId) {
+		this.experimentId = experimentId;
+	}
+
+	public String getWorkflowExecutionId() {
+		return workflowExecutionId;
+	}
+
+	public void setWorkflowExecutionId(String workflowExecutionId) {
+		this.workflowExecutionId = workflowExecutionId;
+	}
+
+	public String getNodeId() {
+		return nodeId;
+	}
+
+	public void setNodeId(String nodeId) {
+		this.nodeId = nodeId;
+	}
+
+	public String getServiceDescriptionId() {
+		return serviceDescriptionId;
+	}
+
+	public void setServiceDescriptionId(String serviceDescriptionId) {
+		this.serviceDescriptionId = serviceDescriptionId;
+	}
+
+	public String getHostDescriptionId() {
+		return hostDescriptionId;
+	}
+
+	public void setHostDescriptionId(String hostDescriptionId) {
+		this.hostDescriptionId = hostDescriptionId;
+	}
+
+	public String getApplicationDescriptionId() {
+		return applicationDescriptionId;
+	}
+
+	public void setApplicationDescriptionId(String applicationDescriptionId) {
+		this.applicationDescriptionId = applicationDescriptionId;
+	}
+
+	public String getJobId() {
+		return jobId;
+	}
+
+	public void setJobId(String jobId) {
+		this.jobId = jobId;
+	}
+
+	public String getJobData() {
+		return jobData;
+	}
+
+	public void setJobData(String jobData) {
+		this.jobData = jobData;
+	}
+
+	public Date getSubmittedTime() {
+		return submittedTime;
+	}
+
+	public void setSubmittedTime(Date submittedTime) {
+		this.submittedTime = submittedTime;
+	}
+
+	public Date getCompletedTime() {
+		return completedTime;
+	}
+
+	public void setCompletedTime(Date completedTime) {
+		this.completedTime = completedTime;
+	}
+
+	public GFacJobStatus getJobStatus() {
+		return jobStatus;
+	}
+
+	public void setJobStatus(GFacJobStatus jobStatus) {
+		this.jobStatus = jobStatus;
+	}
+
+	public String getMetadata() {
+		return metadata;
+	}
+
+	public void setMetadata(String metadata) {
+		this.metadata = metadata;
+	}
+}

Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/GFacJob.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java (original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java Wed May 22 03:20:14 2013
@@ -40,6 +40,7 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.airavata.registry.api.exception.worker.ExperimentDoesNotExistsException;
 import org.apache.airavata.registry.api.workflow.*;
+import org.apache.airavata.registry.api.workflow.GFacJob.GFacJobStatus;
 import org.apache.airavata.rest.utils.CookieManager;
 
 public class RegistryClient extends AiravataRegistry2 {
@@ -899,4 +900,78 @@ public class RegistryClient extends Aira
 			throws RegistryException {
 		return getProvenanceResourceClient().addGFacJobExecutionError(error);
 	}
+
+	@Override
+	public void addGFacJob(GFacJob job) throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJob(GFacJob job) throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobStatus(String gfacJobId, GFacJobStatus status)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobData(String gfacJobId, String jobdata)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobSubmittedTime(String gfacJobId, Date submitted)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobCompletedTime(String gfacJobId, Date completed)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void updateGFacJobMetadta(String gfacJobId, String metadata)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public GFacJob getGFacJob(String gfacJobId) throws RegistryException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public List<GFacJob> getGFacJobsForDescriptors(String serviceDescriptionId,
+			String hostDescriptionId, String applicationDescriptionId)
+			throws RegistryException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public List<GFacJob> getGFacJobs(String experimentId,
+			String workflowExecutionId, String nodeId) throws RegistryException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public boolean isGFacJobExists(String gfacJobId) throws RegistryException {
+		// TODO Auto-generated method stub
+		return false;
+	}
 }

Modified: airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/Node.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/Node.java?rev=1485036&r1=1485035&r2=1485036&view=diff
==============================================================================
--- airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/Node.java (original)
+++ airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/Node.java Wed May 22 03:20:14 2013
@@ -24,7 +24,6 @@ package org.apache.airavata.workflow.mod
 import java.awt.Point;
 import java.util.Collection;
 import java.util.List;
-import java.util.Observer;
 
 import org.apache.airavata.workflow.model.component.Component;
 



Mime
View raw message