Author: heshan
Date: Fri Oct 12 14:12:41 2012
New Revision: 1397573

URL: http://svn.apache.org/viewvc?rev=1397573&view=rev
Log:
Updating the jsps to use new Airavata API.

Modified:
    
airavata/sandbox/client-api-demo/src/main/java/org/sample/airavata/api/SampleUtil.java
    airavata/sandbox/client-api-demo/src/main/webapp/execute_app_result.jsp
    airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_list.jsp
    airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_result.jsp
    airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_run.jsp
    airavata/sandbox/client-api-demo/src/main/webapp/monitor_experiment.jsp

Modified: 
airavata/sandbox/client-api-demo/src/main/java/org/sample/airavata/api/SampleUtil.java
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/java/org/sample/airavata/api/SampleUtil.java?rev=1397573&r1=1397572&r2=1397573&view=diff
==============================================================================
--- 
airavata/sandbox/client-api-demo/src/main/java/org/sample/airavata/api/SampleUtil.java
 (original)
+++ 
airavata/sandbox/client-api-demo/src/main/java/org/sample/airavata/api/SampleUtil.java
 Fri Oct 12 14:12:41 2012
@@ -3,14 +3,10 @@ package org.sample.airavata.api;
 import org.apache.airavata.client.AiravataClient;
 import org.apache.airavata.client.AiravataClientUtils;
 import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.common.registry.api.exception.RegistryException;
 
-import javax.jcr.RepositoryException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/execute_app_result.jsp
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/execute_app_result.jsp?rev=1397573&r1=1397572&r2=1397573&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/execute_app_result.jsp 
(original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/execute_app_result.jsp Fri 
Oct 12 14:12:41 2012
@@ -48,7 +48,7 @@
 //                  TODO alert(e)
             }
 
-            out.print("Job submitted");
+            System.out.println("Job submitted");
 
 
         %>

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_list.jsp
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_list.jsp?rev=1397573&r1=1397572&r2=1397573&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_list.jsp 
(original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_list.jsp 
Fri Oct 12 14:12:41 2012
@@ -20,15 +20,7 @@
 
         <br>
         <%
-            InputStream stream = 
application.getResourceAsStream("/deployment.properties");
-            Properties props = new Properties();
-            props.load(stream);
-
-            username = props.getProperty("jcr.username");
-            password = props.getProperty("jcr.password");
-            registryURL = props.getProperty("jcr.url");
-
-            AiravataAPI airavataAPI = SampleUtil.getAiravataAPI(username, 
password, registryURL);
+            AiravataAPI airavataAPI = SampleUtil.getAiravataAPI();
             List<Workflow> workflows = null;
             try {
                 workflows = airavataAPI.getWorkflowManager().getWorkflows();

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_result.jsp
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_result.jsp?rev=1397573&r1=1397572&r2=1397573&view=diff
==============================================================================
--- 
airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_result.jsp 
(original)
+++ 
airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_result.jsp 
Fri Oct 12 14:12:41 2012
@@ -19,10 +19,10 @@
 
         <br>
         <%
-            String  username = request.getParameter("userName");
-            String password = request.getParameter("password");
-            String registryURL = request.getParameter("registryURL");
-            AiravataAPI airavataAPI = SampleUtil.getAiravataAPI(username, 
password, registryURL);
+//            String  username = request.getParameter("userName");
+//            String password = request.getParameter("password");
+//            String registryURL = request.getParameter("registryURL");
+            AiravataAPI airavataAPI = SampleUtil.getAiravataAPI();
 
             String workflowName = request.getParameter("workflowName");
             String arguments = request.getParameter("arguments");
@@ -69,7 +69,7 @@
 //                  TODO alert(e)
             }
             System.out.println("The result is : " + result);
-            out.println("Result : " + result);
+            System.out.println("Result : " + result);
 
         %>
 

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_run.jsp
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_run.jsp?rev=1397573&r1=1397572&r2=1397573&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_run.jsp 
(original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/execute_workflow_run.jsp 
Fri Oct 12 14:12:41 2012
@@ -19,16 +19,7 @@
     <%
         workflowName = request.getParameter("workflowName");
 
-        InputStream stream = 
application.getResourceAsStream("/deployment.properties");
-        Properties props = new Properties();
-        props.load(stream);
-
-        username = props.getProperty("jcr.username");
-        password = props.getProperty("jcr.password");
-        registryURL = props.getProperty("jcr.url");
-
-        AiravataAPI airavataAPI = SampleUtil.getAiravataAPI(username, 
password, registryURL);
-
+        AiravataAPI airavataAPI = SampleUtil.getAiravataAPI();
         List<WorkflowInput> workflowInputs = null;
         try {
             workflowInputs = 
airavataAPI.getWorkflowManager().getWorkflow(workflowName).getWorkflowInputs();

Modified: 
airavata/sandbox/client-api-demo/src/main/webapp/monitor_experiment.jsp
URL: 
http://svn.apache.org/viewvc/airavata/sandbox/client-api-demo/src/main/webapp/monitor_experiment.jsp?rev=1397573&r1=1397572&r2=1397573&view=diff
==============================================================================
--- airavata/sandbox/client-api-demo/src/main/webapp/monitor_experiment.jsp 
(original)
+++ airavata/sandbox/client-api-demo/src/main/webapp/monitor_experiment.jsp Fri 
Oct 12 14:12:41 2012
@@ -20,15 +20,7 @@
 
         <br>
         <%
-            InputStream stream = 
application.getResourceAsStream("/deployment.properties");
-            Properties props = new Properties();
-            props.load(stream);
-
-            username = props.getProperty("jcr.username");
-            password = props.getProperty("jcr.password");
-            registryURL = props.getProperty("jcr.url");
-
-            AiravataAPI airavataAPI = SampleUtil.getAiravataAPI(username, 
password, registryURL);
+            AiravataAPI airavataAPI = SampleUtil.getAiravataAPI();
             ProvenanceManager provenanceManager = 
airavataAPI.getProvenanceManager();
             List<String> experimentsIDs = null;
             try {


Reply via email to