airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hes...@apache.org
Subject svn commit: r1403501 - in /airavata/sandbox/airavata-registry-rest: pom.xml src/main/java/org/apache/airavata/services/registry/rest/utils/RegistryListener.java src/main/java/org/apache/airavata/services/registry/rest/utils/RestServicesConstants.java
Date Mon, 29 Oct 2012 20:55:59 GMT
Author: heshan
Date: Mon Oct 29 20:55:59 2012
New Revision: 1403501

URL: http://svn.apache.org/viewvc?rev=1403501&view=rev
Log:
Setting AiravataApi to the servelet context. 

Modified:
    airavata/sandbox/airavata-registry-rest/pom.xml
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RegistryListener.java
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RestServicesConstants.java

Modified: airavata/sandbox/airavata-registry-rest/pom.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/pom.xml?rev=1403501&r1=1403500&r2=1403501&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/pom.xml (original)
+++ airavata/sandbox/airavata-registry-rest/pom.xml Mon Oct 29 20:55:59 2012
@@ -128,6 +128,11 @@
             <version>${airavata.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-api</artifactId>
+            <version>${airavata.version}</version>
+        </dependency>
+        <dependency>
 			<groupId>org.apache.jackrabbit</groupId>
 			<artifactId>jackrabbit-jcr-rmi</artifactId>
 			<version>2.2.7</version>

Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RegistryListener.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RegistryListener.java?rev=1403501&r1=1403500&r2=1403501&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RegistryListener.java
(original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RegistryListener.java
Mon Oct 29 20:55:59 2012
@@ -5,6 +5,10 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.AiravataUser;
 import org.apache.airavata.registry.api.Gateway;
 
+import org.apache.airavata.client.AiravataClient;
+import org.apache.airavata.client.AiravataClientUtils;
+import org.apache.airavata.client.api.AiravataAPI;
+
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
@@ -32,11 +36,13 @@ public class RegistryListener implements
             Gateway gateway =  new Gateway(gatewayID);
             AiravataUser airavataUser = new AiravataUser(registryUser) ;
 
-            airavataRegistry = AiravataRegistryFactory.
-                    getRegistry(gateway, airavataUser);
+            airavataRegistry = AiravataRegistryFactory.getRegistry(gateway, airavataUser);
             servletContext.setAttribute(RestServicesConstants.AIRAVATA_REGISTRY, airavataRegistry);
             servletContext.setAttribute(RestServicesConstants.GATEWAY, gateway);
             servletContext.setAttribute(RestServicesConstants.REGISTRY_USER, airavataUser);
+
+            AiravataAPI airavataAPI = AiravataClientUtils.getAPI(url.getPath());
+            servletContext.setAttribute(RestServicesConstants.AIRAVATA_API, airavataAPI);
         } catch (Exception e) {
             e.printStackTrace();
         }

Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RestServicesConstants.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RestServicesConstants.java?rev=1403501&r1=1403500&r2=1403501&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RestServicesConstants.java
(original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RestServicesConstants.java
Mon Oct 29 20:55:59 2012
@@ -7,4 +7,5 @@ public class RestServicesConstants {
     public static final String REGISTRY_USERNAME = "registry.user";
     public static final String REGISTRY_USER = "airavata.user";
     public static final String AIRAVATA_REGISTRY = "airavataRegistry";
+    public static final String AIRAVATA_API = "airavataAPI";
 }



Mime
View raw message