You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2012/10/18 23:29:32 UTC
svn commit: r1399867 - in /airavata/sandbox/airavata-registry-rest/src/main:
java/org/apache/airavata/services/registry/rest/resources/
java/org/apache/airavata/services/registry/rest/utils/ resources/
Author: chathuri
Date: Thu Oct 18 21:29:32 2012
New Revision: 1399867
URL: http://svn.apache.org/viewvc?rev=1399867&view=rev
Log:
adding airavata-server.properties and fixing other issues
Added:
airavata/sandbox/airavata-registry-rest/src/main/resources/airavata-server.properties
- copied, changed from r1399713, airavata/trunk/modules/distribution/src/main/resources/conf/airavata-server.properties
Removed:
airavata/sandbox/airavata-registry-rest/src/main/resources/repository.properties
Modified:
airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java
airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/utils/RegistryListener.java
Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java?rev=1399867&r1=1399866&r2=1399867&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java (original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resources/RegistryResource.java Thu Oct 18 21:29:32 2012
@@ -1,6 +1,6 @@
package org.apache.airavata.services.registry.rest.resources;
-import org.apache.airavata.common.registry.api.exception.RegistryException;
+import org.apache.airavata.registry.api.exception.RegistryException;
import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
import org.apache.airavata.commons.gfac.type.HostDescription;
import org.apache.airavata.commons.gfac.type.ServiceDescription;
@@ -22,6 +22,9 @@ import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.net.URI;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -113,13 +116,16 @@ import java.util.Map;
@POST
@Path("save/configuration")
- @Produces("text/plain")
+ @Produces(MediaType.TEXT_PLAIN)
+ @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Response setConfiguration(@FormParam("key") String key,
@FormParam("value") String value,
- @FormParam("date") Date date) {
+ @FormParam("date") String date) {
try{
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ Date formattedDate = dateFormat.parse(date);
airavataRegistry = (AiravataRegistry2) context.getAttribute(AIRAVATA_CONTEXT);
- airavataRegistry.setConfiguration(key, value, date);
+ airavataRegistry.setConfiguration(key, value, formattedDate);
Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
return builder.build();
}catch (Exception e){
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=1399867&r1=1399866&r2=1399867&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 Thu Oct 18 21:29:32 2012
@@ -25,7 +25,7 @@ public class RegistryListener implements
// map.put("org.apache.jackrabbit.repository.uri", url.toString());
- airavataRegistry = AiravataRegistryFactory.getRegistry(new Gateway("default"), new AiravataUser("admin"));
+ airavataRegistry = AiravataRegistryFactory.getRegistry(new Gateway("gateway1"), new AiravataUser("admin"));
servletContext.setAttribute("airavataRegistry", airavataRegistry);
}catch (Exception e) {
e.printStackTrace();
Copied: airavata/sandbox/airavata-registry-rest/src/main/resources/airavata-server.properties (from r1399713, airavata/trunk/modules/distribution/src/main/resources/conf/airavata-server.properties)
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/resources/airavata-server.properties?p2=airavata/sandbox/airavata-registry-rest/src/main/resources/airavata-server.properties&p1=airavata/trunk/modules/distribution/src/main/resources/conf/airavata-server.properties&r1=1399713&r2=1399867&rev=1399867&view=diff
==============================================================================
--- airavata/trunk/modules/distribution/src/main/resources/conf/airavata-server.properties (original)
+++ airavata/sandbox/airavata-registry-rest/src/main/resources/airavata-server.properties Thu Oct 18 21:29:32 2012
@@ -52,12 +52,12 @@ registry.jdbc.password=airavata
start.derby.server.mode=true
#for mysql
-#registry.jdbc.driver=com.mysql.jdbc.Driver
-#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
+registry.jdbc.driver=com.mysql.jdbc.Driver
+registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
#for derby
-registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+#registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
###########################################################################
# Airavata Workflow Interpreter Configurations