airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1485717 - in /airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/api/ airavata-client/src/main/java/org/apache/airavata/client/impl/ workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflo...
Date Thu, 23 May 2013 14:07:30 GMT
Author: samindaw
Date: Thu May 23 14:07:30 2013
New Revision: 1485717

URL: http://svn.apache.org/r1485717
Log:
refactor

Modified:
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
    airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowInput.java

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java?rev=1485717&r1=1485716&r2=1485717&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
(original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
Thu May 23 14:07:30 2013
@@ -26,7 +26,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.api.exception.DescriptorAlreadyExistsException;
+import org.apache.airavata.client.api.exception.WorkflowAlreadyExistsException;
 import org.apache.airavata.workflow.model.wf.Workflow;
 import org.apache.airavata.workflow.model.wf.WorkflowData;
 import org.apache.airavata.workflow.model.wf.WorkflowInput;
@@ -55,10 +55,10 @@ public interface WorkflowManager {
      * @param owner Under which user workflow should be added. This is a privileged method
and usually
      *              only admin calls this.
      * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
-     * @throws DescriptorAlreadyExistsException If adding workflow already exists for the
given owner.
+     * @throws WorkflowAlreadyExistsException If adding workflow already exists for the given
owner.
      */
     public void addOwnerWorkflow (String workflowAsString, String owner) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException;
+            WorkflowAlreadyExistsException;
 
     /**
      * Adds a new workflow. Workflow is added to users private space. i.e. only user who
added the
@@ -67,10 +67,10 @@ public interface WorkflowManager {
      * @param owner Under which user workflow should be added. This is a privileged method
and usually
      *              only admin calls this.
      * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
-     * @throws DescriptorAlreadyExistsException If adding workflow already exists for the
given owner.
+     * @throws WorkflowAlreadyExistsException If adding workflow already exists for the given
owner.
      */
     public void addOwnerWorkflow (URI workflowPath, String owner) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException;
+            WorkflowAlreadyExistsException;
 
     /**
      * Adds a new workflow. Workflow is added to users private space. i.e. only user who
added the
@@ -79,10 +79,10 @@ public interface WorkflowManager {
      * @param owner Under which user workflow should be added. This is a privileged method
and usually
      *              only admin calls this.
      * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
-     * @throws DescriptorAlreadyExistsException If adding workflow already exists for the
given owner.
+     * @throws WorkflowAlreadyExistsException If adding workflow already exists for the given
owner.
      */
     public void addOwnerWorkflow (Workflow workflow, String owner) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException;
+            WorkflowAlreadyExistsException;
 
     /**
      * Updates a given workflow. Only user who added the workflow will be able to update
it.
@@ -207,8 +207,8 @@ public interface WorkflowManager {
      * @param workflowAsString The new workflow to add and its content as a string.
      * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
      */
-    public void addWorkflowAsPublic (String workflowAsString) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException;
+    public void addWorkflowAsPublic (String workflowAsString) throws WorkflowAlreadyExistsException,
+    	AiravataAPIInvocationException;
 
     /**
      * Updates a given workflow. Only user who added the workflow will be able to update
it.
@@ -223,8 +223,8 @@ public interface WorkflowManager {
      * @param workflowUri Where the workflow file (xml file) exists.
      * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
      */
-    public void addWorkflowAsPublic (URI workflowUri) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException;
+    public void addWorkflowAsPublic (URI workflowUri) throws WorkflowAlreadyExistsException,
+    		AiravataAPIInvocationException;
 
     /**
      * Updates a given workflow. Only user who added the workflow will be able to update
it.
@@ -242,7 +242,7 @@ public interface WorkflowManager {
      * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
      */
     public void addWorkflow (String workflowAsString) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException;
+            WorkflowAlreadyExistsException;
 
     /**
      * Updates a given workflow. Only user who added the workflow will be able to update
it.
@@ -258,8 +258,8 @@ public interface WorkflowManager {
      * @param workflow The new workflow to add.
      * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
      */
-    public void addWorkflow (Workflow workflow) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException;
+    public void addWorkflow (Workflow workflow) throws WorkflowAlreadyExistsException,
+    		AiravataAPIInvocationException;
 
     /**
      * Updates a given workflow. Only user who added the workflow will be able to update
it.
@@ -275,8 +275,8 @@ public interface WorkflowManager {
      * @param workflowUri New workflow file as a URI.
      * @throws AiravataAPIInvocationException If an error occurred while adding a new workflow.
      */
-    public void addWorkflow (URI workflowUri) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException;
+    public void addWorkflow (URI workflowUri) throws WorkflowAlreadyExistsException,
+			AiravataAPIInvocationException;
 
     /**
      * Updates a given workflow. Only user who added the workflow will be able to update
it.

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=1485717&r1=1485716&r2=1485717&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 May 23 14:07:30 2013
@@ -30,7 +30,7 @@ import java.util.Map;
 import org.apache.airavata.client.AiravataClient;
 import org.apache.airavata.client.api.WorkflowManager;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.api.exception.DescriptorAlreadyExistsException;
+import org.apache.airavata.client.api.exception.WorkflowAlreadyExistsException;
 import org.apache.airavata.common.exception.AiravataConfigurationException;
 import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.registry.api.exception.RegistryException;
@@ -62,7 +62,7 @@ public class WorkflowManagerImpl impleme
 
     @Override
     public void addOwnerWorkflow (String workflowAsString, String owner)
-            throws AiravataAPIInvocationException, DescriptorAlreadyExistsException {
+            throws AiravataAPIInvocationException, WorkflowAlreadyExistsException {
          addWorkflow(getWorkflowFromString(workflowAsString), workflowAsString, owner);
     }
 
@@ -74,7 +74,7 @@ public class WorkflowManagerImpl impleme
 
     @Override
     public void addOwnerWorkflow (URI workflowPath, String owner)
-            throws AiravataAPIInvocationException, DescriptorAlreadyExistsException {
+            throws AiravataAPIInvocationException, WorkflowAlreadyExistsException {
         Workflow workflow = getWorkflowFromURI(workflowPath);
         addWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
     }
@@ -94,7 +94,7 @@ public class WorkflowManagerImpl impleme
 
     @Override
     public void addOwnerWorkflow (Workflow workflow, String owner) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException {
+            WorkflowAlreadyExistsException {
         addWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
     }
 
@@ -104,11 +104,11 @@ public class WorkflowManagerImpl impleme
     }
 
     private void addWorkflow(Workflow workflow, String workflowAsString, String owner)
-            throws AiravataAPIInvocationException, DescriptorAlreadyExistsException {
+            throws WorkflowAlreadyExistsException, AiravataAPIInvocationException {
         try {
             getClient().getRegistryClient().addWorkflow(workflow.getName(), workflowAsString);
         } catch (UserWorkflowAlreadyExistsException e) {
-            throw new DescriptorAlreadyExistsException("Workflow " +
+            throw new WorkflowAlreadyExistsException("Workflow " +
                     workflow.getName()
                     + " already exists in the system.", e);
         } catch (RegistryException e) {
@@ -242,7 +242,7 @@ public class WorkflowManagerImpl impleme
 	}
 
     @Override
-    public void addWorkflow (String workflowAsString) throws DescriptorAlreadyExistsException,
+    public void addWorkflow (String workflowAsString) throws WorkflowAlreadyExistsException,
             AiravataAPIInvocationException {
         addOwnerWorkflow(workflowAsString, getCurrentUser());
     }
@@ -260,7 +260,7 @@ public class WorkflowManagerImpl impleme
 
     @Override
     public void addWorkflowAsPublic (String workflowAsString) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException {
+            WorkflowAlreadyExistsException {
         addOwnerWorkflow (workflowAsString, null);
     }
 
@@ -271,7 +271,7 @@ public class WorkflowManagerImpl impleme
 
     @Override
     public void addWorkflowAsPublic (URI workflowPath) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException {
+            WorkflowAlreadyExistsException {
         addOwnerWorkflow (getWorkflowFromURI(workflowPath), null);
     }
 
@@ -288,7 +288,7 @@ public class WorkflowManagerImpl impleme
 
     @Override
     public void addWorkflow (Workflow workflow) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException{
+            WorkflowAlreadyExistsException{
         addOwnerWorkflow(workflow, getCurrentUser());
     }
 
@@ -299,7 +299,7 @@ public class WorkflowManagerImpl impleme
 
     @Override
     public void addWorkflow (URI workflowPath) throws AiravataAPIInvocationException,
-            DescriptorAlreadyExistsException {
+            WorkflowAlreadyExistsException {
         addOwnerWorkflow(getWorkflowFromURI(workflowPath), getCurrentUser());
     }
 

Modified: airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowInput.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowInput.java?rev=1485717&r1=1485716&r2=1485717&view=diff
==============================================================================
--- airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowInput.java
(original)
+++ airavata/trunk/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowInput.java
Thu May 23 14:07:30 2013
@@ -68,8 +68,14 @@ public class WorkflowInput {
 		return value;
 	}
 	
+	private void validateData(Object data) throws InvalidDataFormatException{
+		if (data!=null){
+			//TODO validate against type
+		}
+	}
+	
 	public void setValue(Object value) throws InvalidDataFormatException {
-		//TODO validate against type
+		validateData(value);
 		this.value = value;
 	}
 



Mime
View raw message