Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26FC9D492 for ; Tue, 13 Nov 2012 15:19:24 +0000 (UTC) Received: (qmail 2520 invoked by uid 500); 13 Nov 2012 15:19:24 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 2450 invoked by uid 500); 13 Nov 2012 15:19:23 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 2436 invoked by uid 99); 13 Nov 2012 15:19:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 15:19:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 15:19:15 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BF7082388900 for ; Tue, 13 Nov 2012 15:18:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@airavata.apache.org From: chathuri@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121113151853.BF7082388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 hostDescriptors = descriptorResourceClient.getHostDescriptors(); + List 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 configurationValueList = new ArrayList(); 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 hostType = new ArrayList(); - @XmlTransient private List gridFTPEndPoint = new ArrayList(); - @XmlTransient private List globusGateKeeperEndPoint = new ArrayList(); - @XmlTransient private List imageID = new ArrayList(); - @XmlTransient private List instanceID = new ArrayList(); - 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 hostType) { - if (hostType != null && hostType.isEmpty()){ - hostTypeVal = hostType.get(0); - } this.hostType = hostType; } @@ -85,10 +71,6 @@ public class HostDescriptor { } public void setGridFTPEndPoint(List gridFTPEndPoint) { - if (gridFTPEndPoint != null && !gridFTPEndPoint.isEmpty()) { - gridFTPEndPointVal = gridFTPEndPoint.get(0); - } - this.gridFTPEndPoint = gridFTPEndPoint; } @@ -97,10 +79,6 @@ public class HostDescriptor { } public void setGlobusGateKeeperEndPoint(List globusGateKeeperEndPoint) { - if(globusGateKeeperEndPoint != null && !globusGateKeeperEndPoint.isEmpty()){ - gridFTPEndPointVal = globusGateKeeperEndPoint.get(0); - } - this.globusGateKeeperEndPoint = globusGateKeeperEndPoint; } @@ -109,10 +87,6 @@ public class HostDescriptor { } public void setImageID(List imageID) { - if(imageID != null && !imageID.isEmpty()){ - imageIDVal = imageID.get(0); - } - this.imageID = imageID; } @@ -121,49 +95,7 @@ public class HostDescriptor { } public void setInstanceID(List 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 @@ com.sun.jersey.spi.container.servlet.ServletContainer com.sun.jersey.config.property.packages - org.apache.airavata.services.registry.rest + org.apache.airavata.services.registry.rest;org.codehaus.jackson.jaxrs