airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1408777 - in /airavata/sandbox/airavata-registry-rest/src/main: java/org/apache/airavata/services/registry/rest/ java/org/apache/airavata/services/registry/rest/client/ java/org/apache/airavata/services/registry/rest/resourcemappings/ weba...
Date Tue, 13 Nov 2012 15:18:53 GMT
Author: chathuri
Date: Tue Nov 13 15:18:52 2012
New Revision: 1408777

URL: http://svn.apache.org/viewvc?rev=1408777&view=rev
Log:
adding jackson json mapping property

Modified:
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/Test.java
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/DescriptorResourceClient.java
    airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java
    airavata/sandbox/airavata-registry-rest/src/main/webapp/WEB-INF/web.xml

Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/Test.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/Test.java?rev=1408777&r1=1408776&r2=1408777&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/Test.java
(original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/Test.java
Tue Nov 13 15:18:52 2012
@@ -1,23 +1,23 @@
 /*
- *
- * 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.
- *
- */
+*
+* 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.services.registry.rest;
 
@@ -135,7 +135,7 @@ public class Test {
 //        descriptorResourceClient.addHostDescriptor(descriptor);
 
 //        HostDescription localHost = descriptorResourceClient.getHostDescriptor("purdue.teragrid.org");
-//        List<HostDescription> hostDescriptors = descriptorResourceClient.getHostDescriptors();
+        List<HostDescription> hostDescriptors = descriptorResourceClient.getHostDescriptors();
 //        System.out.println(localHost.getType().getHostName());
 //        System.out.println(localHost.getType().getHostAddress());
 

Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java?rev=1408777&r1=1408776&r2=1408777&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java
(original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/ConfigurationResourceClient.java
Tue Nov 13 15:18:52 2012
@@ -94,9 +94,7 @@ public class ConfigurationResourceClient
         List<Object> configurationValueList = new ArrayList<Object>();
         Object[] configValList = configurationList.getConfigValList();
         for(Object configVal : configValList){
-            String[] strings = configVal.toString().split("=");
-            String configurationValue = strings[2].substring(0, strings[2].length() - 1);
-            configurationValueList.add(configurationValue);
+            configurationValueList.add(configVal);
         }
 
         return configurationValueList;

Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/DescriptorResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/DescriptorResourceClient.java?rev=1408777&r1=1408776&r2=1408777&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/DescriptorResourceClient.java
(original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/client/DescriptorResourceClient.java
Tue Nov 13 15:18:52 2012
@@ -62,9 +62,6 @@ public class DescriptorResourceClient {
         ClientConfig config = new DefaultClientConfig();
         config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING,
                 Boolean.TRUE);
-        //config.getFeatures().put(JSONConfiguration.)
-        config.getClasses().add(JacksonJsonProvider.class);
-        //JSONConfiguration build = JSONConfiguration.natural().build();
         Client client = Client.create(config);
         WebResource baseWebResource = client.resource(getBaseURI());
         webResource = baseWebResource.path(ResourcePathConstants.DecResourcePathConstants.DESC_RESOURCE_PATH);

Modified: airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java?rev=1408777&r1=1408776&r2=1408777&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java
(original)
+++ airavata/sandbox/airavata-registry-rest/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java
Tue Nov 13 15:18:52 2012
@@ -36,22 +36,11 @@ public class HostDescriptor {
     private String hostname;
     private String hostAddress;
 
-    @XmlTransient
     private List<String> hostType = new ArrayList<String>();
-    @XmlTransient
     private List<String> gridFTPEndPoint = new ArrayList<String>();
-    @XmlTransient
     private List<String> globusGateKeeperEndPoint = new ArrayList<String>();
-    @XmlTransient
     private List<String> imageID = new ArrayList<String>();
-    @XmlTransient
     private List<String> instanceID = new ArrayList<String>();
-    private String hostTypeVal;
-    private String gridFTPEndPointVal;
-    private String globusGateKeeperEndPointVal;
-    private String imageIDVal;
-    private String instanceIDVal;
-
 
     public String getHostname() {
         return hostname;
@@ -74,9 +63,6 @@ public class HostDescriptor {
     }
 
     public void setHostType(List<String> hostType) {
-        if (hostType != null && hostType.isEmpty()){
-            hostTypeVal = hostType.get(0);
-        }
         this.hostType = hostType;
     }
 
@@ -85,10 +71,6 @@ public class HostDescriptor {
     }
 
     public void setGridFTPEndPoint(List<String> gridFTPEndPoint) {
-        if (gridFTPEndPoint != null && !gridFTPEndPoint.isEmpty()) {
-            gridFTPEndPointVal = gridFTPEndPoint.get(0);
-        }
-
         this.gridFTPEndPoint = gridFTPEndPoint;
     }
 
@@ -97,10 +79,6 @@ public class HostDescriptor {
     }
 
     public void setGlobusGateKeeperEndPoint(List<String> globusGateKeeperEndPoint)
{
-        if(globusGateKeeperEndPoint != null && !globusGateKeeperEndPoint.isEmpty()){
-            gridFTPEndPointVal = globusGateKeeperEndPoint.get(0);
-        }
-
         this.globusGateKeeperEndPoint = globusGateKeeperEndPoint;
     }
 
@@ -109,10 +87,6 @@ public class HostDescriptor {
     }
 
     public void setImageID(List<String> imageID) {
-        if(imageID != null && !imageID.isEmpty()){
-            imageIDVal = imageID.get(0);
-        }
-
         this.imageID = imageID;
     }
 
@@ -121,49 +95,7 @@ public class HostDescriptor {
     }
 
     public void setInstanceID(List<String> instanceID) {
-        if(instanceID != null && !instanceID.isEmpty()){
-            instanceIDVal = instanceID.get(0);
-        }
         this.instanceID = instanceID;
     }
 
-    public void setHostTypeVal(String hostTypeVal) {
-        this.hostTypeVal = hostTypeVal;
-    }
-
-    public void setGridFTPEndPointVal(String gridFTPEndPointVal) {
-        this.gridFTPEndPointVal = gridFTPEndPointVal;
-    }
-
-    public void setGlobusGateKeeperEndPointVal(String globusGateKeeperEndPointVal) {
-        this.globusGateKeeperEndPointVal = globusGateKeeperEndPointVal;
-    }
-
-    public void setImageIDVal(String imageIDVal) {
-        this.imageIDVal = imageIDVal;
-    }
-
-    public void setInstanceIDVal(String instanceIDVal) {
-        this.instanceIDVal = instanceIDVal;
-    }
-
-    public String getHostTypeVal() {
-        return hostTypeVal;
-    }
-
-    public String getGridFTPEndPointVal() {
-        return gridFTPEndPointVal;
-    }
-
-    public String getGlobusGateKeeperEndPointVal() {
-        return globusGateKeeperEndPointVal;
-    }
-
-    public String getImageIDVal() {
-        return imageIDVal;
-    }
-
-    public String getInstanceIDVal() {
-        return instanceIDVal;
-    }
 }

Modified: airavata/sandbox/airavata-registry-rest/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/airavata/sandbox/airavata-registry-rest/src/main/webapp/WEB-INF/web.xml?rev=1408777&r1=1408776&r2=1408777&view=diff
==============================================================================
--- airavata/sandbox/airavata-registry-rest/src/main/webapp/WEB-INF/web.xml (original)
+++ airavata/sandbox/airavata-registry-rest/src/main/webapp/WEB-INF/web.xml Tue Nov 13 15:18:52
2012
@@ -14,7 +14,7 @@
         <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
         <init-param>
             <param-name>com.sun.jersey.config.property.packages</param-name>
-            <param-value>org.apache.airavata.services.registry.rest</param-value>
+            <param-value>org.apache.airavata.services.registry.rest;org.codehaus.jackson.jaxrs</param-value>
         </init-param>
         <!--init-param>
             <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>



Mime
View raw message