airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1408798 [3/7] - in /airavata/trunk/modules/airavata-rest-services: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/airavata/ src/main/java/org/apache/airavata/services/ src/main/java/o...
Date Tue, 13 Nov 2012 15:52:19 GMT
Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ExperimentList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,21 @@
+package org.apache.airavata.services.registry.rest.resourcemappings;
+
+import org.apache.airavata.registry.api.AiravataExperiment;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ExperimentList {
+    private AiravataExperiment[] experiments = new AiravataExperiment[]{};
+
+    public ExperimentList() {
+    }
+
+    public AiravataExperiment[] getExperiments() {
+        return experiments;
+    }
+
+    public void setExperiments(AiravataExperiment[] experiments) {
+        this.experiments = experiments;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptionList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptionList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptionList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptionList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.resourcemappings;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class HostDescriptionList {
+    private HostDescriptor[] hostDescriptions = new HostDescriptor[]{};
+
+    public HostDescriptor[] getHostDescriptions() {
+        return hostDescriptions;
+    }
+
+    public void setHostDescriptions(HostDescriptor[] hostDescriptions) {
+        this.hostDescriptions = hostDescriptions;
+    }
+
+
+
+
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/HostDescriptor.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,101 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+@XmlRootElement(name = "host")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class HostDescriptor {
+
+    private String hostname;
+    private String hostAddress;
+
+    private List<String> hostType = new ArrayList<String>();
+    private List<String> gridFTPEndPoint = new ArrayList<String>();
+    private List<String> globusGateKeeperEndPoint = new ArrayList<String>();
+    private List<String> imageID = new ArrayList<String>();
+    private List<String> instanceID = new ArrayList<String>();
+
+    public String getHostname() {
+        return hostname;
+    }
+
+    public void setHostname(String hostname) {
+        this.hostname = hostname;
+    }
+
+    public String getHostAddress() {
+        return hostAddress;
+    }
+
+    public void setHostAddress(String hostAddress) {
+        this.hostAddress = hostAddress;
+    }
+
+    public List<String> getHostType() {
+        return hostType;
+    }
+
+    public void setHostType(List<String> hostType) {
+        this.hostType = hostType;
+    }
+
+    public List<String> getGridFTPEndPoint() {
+        return gridFTPEndPoint;
+    }
+
+    public void setGridFTPEndPoint(List<String> gridFTPEndPoint) {
+        this.gridFTPEndPoint = gridFTPEndPoint;
+    }
+
+    public List<String> getGlobusGateKeeperEndPoint() {
+        return globusGateKeeperEndPoint;
+    }
+
+    public void setGlobusGateKeeperEndPoint(List<String> globusGateKeeperEndPoint) {
+        this.globusGateKeeperEndPoint = globusGateKeeperEndPoint;
+    }
+
+    public List<String> getImageID() {
+        return imageID;
+    }
+
+    public void setImageID(List<String> imageID) {
+        this.imageID = imageID;
+    }
+
+    public List<String> getInstanceID() {
+        return instanceID;
+    }
+
+    public void setInstanceID(List<String> instanceID) {
+        this.instanceID = instanceID;
+    }
+
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/PublishWorkflowNamesList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/PublishWorkflowNamesList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/PublishWorkflowNamesList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/PublishWorkflowNamesList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,40 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class PublishWorkflowNamesList {
+    private List<String> publishWorkflowNames = new ArrayList<String>();
+
+    public PublishWorkflowNamesList() {
+    }
+
+    public List<String> getPublishWorkflowNames() {
+        return publishWorkflowNames;
+    }
+
+    public void setPublishWorkflowNames(List<String> publishWorkflowNames) {
+        this.publishWorkflowNames = publishWorkflowNames;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceDescriptionList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceDescriptionList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceDescriptionList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceDescriptionList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,16 @@
+package org.apache.airavata.services.registry.rest.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ServiceDescriptionList {
+    private ServiceDescriptor[] serviceDescriptions = new ServiceDescriptor[]{};
+
+    public ServiceDescriptor[] getServiceDescriptions() {
+        return serviceDescriptions;
+    }
+
+    public void setServiceDescriptions(ServiceDescriptor[] serviceDescriptions) {
+        this.serviceDescriptions = serviceDescriptions;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceDescriptor.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceDescriptor.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceDescriptor.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceDescriptor.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "service")
+public class ServiceDescriptor {
+
+    private String serviceName;
+    private String description;
+    private List<ServiceParameters> inputParams = new ArrayList<ServiceParameters>();
+    private List<ServiceParameters> outputParams = new ArrayList<ServiceParameters>();
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    public List<ServiceParameters> getInputParams() {
+        return inputParams;
+    }
+
+    public void setInputParams(List<ServiceParameters> inputParams) {
+        this.inputParams = inputParams;
+    }
+
+    public List<ServiceParameters> getOutputParams() {
+        return outputParams;
+    }
+
+    public void setOutputParams(List<ServiceParameters> outputParams) {
+        this.outputParams = outputParams;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceParameters.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceParameters.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceParameters.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/ServiceParameters.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,42 @@
+package org.apache.airavata.services.registry.rest.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+@XmlRootElement
+public class ServiceParameters {
+
+    // whether string or other type
+	String type;
+	String name;
+
+    //whether it is input or output
+	String dataType;
+	String description;
+
+	public String getType() {
+		return type;
+	}
+	public void setType(String type) {
+		this.type = type;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getDataType() {
+		return dataType;
+	}
+	public void setDataType(String dataType) {
+		this.dataType = dataType;
+	}
+	public String getDescription() {
+		return description;
+	}
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/URLList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/URLList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/URLList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/URLList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,38 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class URLList {
+    private String[] uris = new String[]{};
+
+    public String[] getUris() {
+        return uris;
+    }
+
+    public void setUris(String[] uris) {
+        this.uris = uris;
+    }
+
+
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/Workflow.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/Workflow.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/Workflow.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/Workflow.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,49 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class Workflow {
+    private String workflowName;
+    private String workflowGraph;
+
+    public Workflow() {
+    }
+
+    public String getWorkflowName() {
+        return workflowName;
+    }
+
+    public String getWorkflowGraph() {
+        return workflowGraph;
+    }
+
+    public void setWorkflowName(String workflowName) {
+        this.workflowName = workflowName;
+    }
+
+    public void setWorkflowGraph(String workflowGraph) {
+        this.workflowGraph = workflowGraph;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowInstancesList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowInstancesList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowInstancesList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowInstancesList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,18 @@
+package org.apache.airavata.services.registry.rest.resourcemappings;
+
+import org.apache.airavata.registry.api.workflow.WorkflowInstance;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkflowInstancesList {
+    WorkflowInstance[] workflowInstances = new WorkflowInstance[]{};
+
+    public WorkflowInstance[] getWorkflowInstances() {
+        return workflowInstances;
+    }
+
+    public void setWorkflowInstances(WorkflowInstance[] workflowInstances) {
+        this.workflowInstances = workflowInstances;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.resourcemappings;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement
+public class WorkflowList {
+    private List<Workflow> workflowList = new ArrayList<Workflow>();
+
+    public WorkflowList() {
+    }
+
+    public List<Workflow> getWorkflowList() {
+        return workflowList;
+    }
+
+    public void setWorkflowList(List<Workflow> workflowList) {
+        this.workflowList = workflowList;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowNodeIODataList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowNodeIODataList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowNodeIODataList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkflowNodeIODataList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,20 @@
+package org.apache.airavata.services.registry.rest.resourcemappings;
+
+
+
+import org.apache.airavata.registry.api.workflow.WorkflowNodeIOData;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkflowNodeIODataList {
+    WorkflowNodeIOData[] workflowNodeIOData = new WorkflowNodeIOData[]{};
+
+    public WorkflowNodeIOData[] getWorkflowNodeIOData() {
+        return workflowNodeIOData;
+    }
+
+    public void setWorkflowNodeIOData(WorkflowNodeIOData[] workflowNodeIOData) {
+        this.workflowNodeIOData = workflowNodeIOData;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkspaceProjectList.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkspaceProjectList.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkspaceProjectList.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resourcemappings/WorkspaceProjectList.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,22 @@
+package org.apache.airavata.services.registry.rest.resourcemappings;
+
+
+import org.apache.airavata.registry.api.WorkspaceProject;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class WorkspaceProjectList {
+    private WorkspaceProject[] workspaceProjects = new WorkspaceProject[]{};
+
+    public WorkspaceProjectList() {
+    }
+
+    public WorkspaceProject[] getWorkspaceProjects() {
+        return workspaceProjects;
+    }
+
+    public void setWorkspaceProjects(WorkspaceProject[] workspaceProjects) {
+        this.workspaceProjects = workspaceProjects;
+    }
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/ApplicationRegistration.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/ApplicationRegistration.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/ApplicationRegistration.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/ApplicationRegistration.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,102 @@
+package org.apache.airavata.services.registry.rest.resources;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.airavata.registry.api.AiravataRegistry2;
+import org.apache.airavata.services.registry.rest.resourcemappings.ApplicationDescriptor;
+import org.apache.airavata.services.registry.rest.resourcemappings.ServiceDescriptor;
+import org.apache.airavata.services.registry.rest.resourcemappings.ServiceParameters;
+
+@Path("/api/application")
+public class ApplicationRegistration {
+
+    protected static AiravataRegistry2 airavataRegistry;
+
+    @Context
+    ServletContext context;
+
+    public ApplicationRegistration() {
+//        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+    }
+    // Sample JSON is : {"applicationName":"Testing","cpuCount":"12","maxMemory":"0","maxWallTime":"0","minMemory":"0","nodeCount":"0","processorsPerNode":"0"}
+	@POST
+    @Path("save")
+    @Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
+    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+    public Response addServiceDescriptor(ApplicationDescriptor application){
+        try{
+        	application.getName();
+        	Response.ResponseBuilder builder = Response.status(Response.Status.ACCEPTED);
+            return builder.build();
+        } catch (Exception e) {
+        	throw new WebApplicationException(e,Response.Status.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+	@GET
+    @Path("get")
+    @Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
+    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+    public ApplicationDescriptor getServiceDescriptor(String applicationName){
+        try{
+        	ApplicationDescriptor application = new ApplicationDescriptor();
+        	application.setName(applicationName);
+        	ServiceDescriptor descriptor = new ServiceDescriptor();
+
+        	ServiceParameters parameters = new ServiceParameters();
+        	parameters.setName("myinput");
+        	parameters.setDataType("input");
+        	parameters.setDescription("my input");
+        	parameters.setType("String");
+
+        	ServiceParameters parameters1 = new ServiceParameters();
+        	parameters1.setName("myinput");
+        	parameters1.setDataType("input");
+        	parameters1.setDescription("my input");
+        	parameters1.setType("String");
+
+        	List<ServiceParameters> inputlist = new ArrayList<ServiceParameters>();
+        	inputlist.add(parameters);
+        	inputlist.add(parameters1);
+
+        	ServiceParameters parameters2 = new ServiceParameters();
+        	parameters2.setName("myoutput");
+        	parameters2.setDataType("output");
+        	parameters2.setDescription("my output");
+        	parameters2.setType("String");
+
+        	ServiceParameters parameters3 = new ServiceParameters();
+        	parameters3.setName("myoutput");
+        	parameters3.setDataType("output");
+        	parameters3.setDescription("my output");
+        	parameters3.setType("String");
+
+        	List<ServiceParameters> outputlist = new ArrayList<ServiceParameters>();
+        	outputlist.add(parameters2);
+        	outputlist.add(parameters3);
+
+        	descriptor.setInputParams(inputlist);
+        	descriptor.setOutputParams(outputlist);
+
+        	application.setName("service1");
+        	application.setHostdescName("localhost");
+            return application;
+        } catch (Exception e) {
+        	throw new WebApplicationException(e,Response.Status.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+
+}

Added: airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/ConfigurationRegistryResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/ConfigurationRegistryResource.java?rev=1408798&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/ConfigurationRegistryResource.java (added)
+++ airavata/trunk/modules/airavata-rest-services/src/main/java/org/apache/airavata/services/registry/rest/resources/ConfigurationRegistryResource.java Tue Nov 13 15:52:16 2012
@@ -0,0 +1,669 @@
+/*
+ *
+ * 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.resources;
+
+import org.apache.airavata.registry.api.AiravataRegistry2;
+import org.apache.airavata.services.registry.rest.resourcemappings.ConfigurationList;
+import org.apache.airavata.services.registry.rest.resourcemappings.URLList;
+import org.apache.airavata.services.registry.rest.utils.ResourcePathConstants;
+import org.apache.airavata.services.registry.rest.utils.RestServicesConstants;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.*;
+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.Date;
+import java.util.List;
+
+/**
+ * This class is a REST interface to all the methods related to Configuration which are exposed by
+ * Airavata Registry API
+ */
+@Path(ResourcePathConstants.ConfigResourcePathConstants.CONFIGURATION_REGISTRY_RESOURCE)
+public class ConfigurationRegistryResource {
+    private AiravataRegistry2 airavataRegistry;
+
+    @Context
+    ServletContext context;
+
+    /**
+     * ---------------------------------Configuration Registry----------------------------------*
+     */
+
+    /**
+     * This method will return the configuration value corrosponding to given config key
+     * @param key configuration key
+     * @return HTTP Response
+     */
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.GET_CONFIGURATION)
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response getConfiguration(@QueryParam("key") String key) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            Object configuration = airavataRegistry.getConfiguration(key);
+            if (configuration != null) {
+                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+                builder.entity(configuration);
+                return builder.build();
+            } else {
+                Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
+                builder.entity("Configuration does not exist...");
+                return builder.build();
+            }
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+
+    }
+
+    /**
+     * This method will return configuration list for given configuration key
+     * @param key configuration key
+     * @return HTTP response
+     */
+    @GET
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.GET_CONFIGURATION_LIST)
+    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+    public Response getConfigurationList(@QueryParam("key") String key) {
+        try {
+            airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+            List<Object> configurationList = airavataRegistry.getConfigurationList(key);
+            ConfigurationList list = new ConfigurationList();
+            Object[] configValList = new Object[configurationList.size()];
+            for (int i = 0; i < configurationList.size(); i++) {
+                configValList[i] = configurationList.get(i);
+            }
+            list.setConfigValList(configValList);
+            if (configurationList.size() != 0) {
+                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+                builder.entity(list);
+                return builder.build();
+            } else {
+                Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
+                builder.entity("No configuration available with given config key...");
+                return builder.build();
+            }
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+
+    /**
+     * This method will add a configuration with given config key, config value and expiration date
+     * @param key configuration key
+     * @param value configuration value
+     * @param date configuration expire data
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.SAVE_CONFIGURATION)
+    @Produces(MediaType.TEXT_PLAIN)
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
+    public Response setConfiguration(@FormParam("key") String key,
+                                     @FormParam("value") String value,
+                                     @FormParam("date") String date) {
+        try {
+            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date formattedDate = dateFormat.parse(date);
+            airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+            airavataRegistry.setConfiguration(key, value, formattedDate);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Configuration saved successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will update the configuration according to the given config value and expire
+     * date
+     * @param key config key
+     * @param value config value
+     * @param date  expiration date
+     * @return  HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.UPDATE_CONFIGURATION)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response addConfiguration(@FormParam("key") String key,
+                                     @FormParam("value") String value,
+                                     @FormParam("date") String date) {
+        try {
+            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date formattedDate = dateFormat.parse(date);
+            airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+            airavataRegistry.addConfiguration(key, value, formattedDate);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Configuration updated successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will delete all configuration of the given config key
+     * @param key configuration key
+     * @return HTTP response
+     */
+    @DELETE
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_ALL_CONFIGURATION)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response removeAllConfiguration(@QueryParam("key") String key) {
+        try {
+            airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+            airavataRegistry.removeAllConfiguration(key);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("All configurations with given config key removed successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will delete the configuration with the given config key and config value
+     * @param key configuration key
+     * @param value configuration value
+     * @return HTTP response
+     */
+    @DELETE
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_CONFIGURATION)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response removeConfiguration(@QueryParam("key") String key, @QueryParam("value") String value) {
+        try {
+            airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+            airavataRegistry.removeConfiguration(key, value);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Configuration removed successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will retrieve all the GFac URIs
+     * @return  HTTP response
+     */
+    @GET
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.GET_GFAC_URI_LIST)
+    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+    public Response getGFacURIs() {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            List<URI> uris = airavataRegistry.getGFacURIs();
+            URLList list = new URLList();
+            String[] urs = new String[uris.size()];
+            for (int i = 0; i < uris.size(); i++) {
+                urs[i] = uris.get(i).toString();
+            }
+            list.setUris(urs);
+            if (urs.length != 0) {
+                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+                builder.entity(list);
+                return builder.build();
+            } else {
+                Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
+                builder.entity("No GFac URIs available...");
+                return builder.build();
+            }
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will retrieve all the workflow interpreter URIs
+     * @return HTTP response
+     */
+    @GET
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.GET_WFINTERPRETER_URI_LIST)
+    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+    public Response getWorkflowInterpreterURIs() {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            List<URI> uris = airavataRegistry.getWorkflowInterpreterURIs();
+            URLList list = new URLList();
+            String[] urs = new String[uris.size()];
+            for (int i = 0; i < uris.size(); i++) {
+                urs[i] = uris.get(i).toString();
+            }
+            list.setUris(urs);
+            if (urs.length != 0) {
+                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+                builder.entity(list);
+                return builder.build();
+            } else {
+                Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
+                builder.entity("No Workflow Interpreter URIs available...");
+                return builder.build();
+            }
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will retrieve eventing URI
+     * @return HTTP response
+     */
+    @GET
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.GET_EVENTING_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response getEventingServiceURI() {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            URI eventingServiceURI = airavataRegistry.getEventingServiceURI();
+            if (eventingServiceURI != null) {
+                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+                builder.entity(eventingServiceURI.toString());
+                return builder.build();
+            } else {
+                Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
+                builder.entity("No eventing URI available...");
+                return builder.build();
+            }
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will retrieve messagebox URI
+     * @return HTTP response
+     */
+    @GET
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.GET_MESSAGE_BOX_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response getMessageBoxURI() {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            URI eventingServiceURI = airavataRegistry.getMessageBoxURI();
+            if (eventingServiceURI != null) {
+                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+                builder.entity(eventingServiceURI.toString());
+                return builder.build();
+            } else {
+                Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
+                builder.entity("No message box URI available...");
+                return builder.build();
+            }
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will add new GFac URI
+     * @param uri gfac URI
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.ADD_GFAC_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response addGFacURI(@FormParam("uri") String uri) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            URI gfacURI = new URI(uri);
+            airavataRegistry.addGFacURI(gfacURI);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("GFac URI added successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will add new workflow interpreter URI
+     * @param uri workflow interpreter URI
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.ADD_WFINTERPRETER_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response addWorkflowInterpreterURI(@FormParam("uri") String uri) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            URI interpreterURI = new URI(uri);
+            airavataRegistry.addWorkflowInterpreterURI(interpreterURI);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Workflow interpreter URI added successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will set a new eventing URI
+     * @param uri eventing URI
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.ADD_EVENTING_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response setEventingURI(@FormParam("uri") String uri) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            URI eventingURI = new URI(uri);
+            airavataRegistry.setEventingURI(eventingURI);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Eventing URI set successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will set message box URI
+     * @param uri message box URI
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.ADD_MESSAGE_BOX_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response setMessageBoxURI(@FormParam("uri") String uri) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            URI msgBoxURI = new URI(uri);
+            airavataRegistry.setMessageBoxURI(msgBoxURI);
+            Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
+            builder.entity("MessageBox URI set successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will update GFac URI expiring date
+     * @param uri GFac URI
+     * @param date Expiration date
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.ADD_GFAC_URI_DATE)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response addGFacURIByDate(@FormParam("uri") String uri, @FormParam("date") String date) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date formattedDate = dateFormat.parse(date);
+            URI gfacURI = new URI(uri);
+            airavataRegistry.addGFacURI(gfacURI, formattedDate);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("GFac URI added successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will update workflow interpreter URI expiration date
+     * @param uri workflow interpreter URI
+     * @param date workflow interpreter expiration date
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.ADD_WFINTERPRETER_URI_DATE)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response addWorkflowInterpreterURI(@FormParam("uri") String uri, @FormParam("date") String date) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date formattedDate = dateFormat.parse(date);
+            URI interpreterURI = new URI(uri);
+            airavataRegistry.addWorkflowInterpreterURI(interpreterURI, formattedDate);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Workflow interpreter URI added successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will update Eventing URI expiration date
+     * @param uri eventing URI
+     * @param date eventing URI expiration date
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.ADD_EVENTING_URI_DATE)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response setEventingURIByDate(@FormParam("uri") String uri, @FormParam("date") String date) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date formattedDate = dateFormat.parse(date);
+            URI eventingURI = new URI(uri);
+            airavataRegistry.setEventingURI(eventingURI, formattedDate);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Eventing URI added successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     *  This method will update expiration date of Message box URI
+     * @param uri message box URI
+     * @param date message box expiration date
+     * @return HTTP response
+     */
+    @POST
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.ADD_MSG_BOX_URI_DATE)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response setMessageBoxURIByDate(@FormParam("uri") String uri, @FormParam("date") String date) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date formattedDate = dateFormat.parse(date);
+            URI msgBoxURI = new URI(uri);
+            airavataRegistry.setMessageBoxURI(msgBoxURI, formattedDate);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Message box URI retrieved successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will remove GFac URI
+     * @param uri GFac URI
+     * @return HTTP response
+     */
+    @DELETE
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_GFAC_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response removeGFacURI(@QueryParam("uri") String uri) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            URI gfacURI = new URI(uri);
+            airavataRegistry.removeGFacURI(gfacURI);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("GFac URI deleted successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will remove all the GFac URIs
+     * @return HTTP response
+     */
+    @DELETE
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_ALL_GFAC_URIS)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response removeAllGFacURI() {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            airavataRegistry.removeAllGFacURI();
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("All GFac URIs deleted successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will remove workflow interpreter URI
+     * @param uri workflow interpreter URI
+     * @return HTTP response
+     */
+    @DELETE
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_WFINTERPRETER_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response removeWorkflowInterpreterURI(@QueryParam("uri") String uri) {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            URI intURI = new URI(uri);
+            airavataRegistry.removeWorkflowInterpreterURI(intURI);
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Workflow Interpreter URI deleted successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will remove all the workflow interpreter URIs
+     * @return HTTP response
+     */
+    @DELETE
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_ALL_WFINTERPRETER_URIS)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response removeAllWorkflowInterpreterURI() {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            airavataRegistry.removeAllWorkflowInterpreterURI();
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("All workflow interpreter URIs deleted successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will remove eventing URI
+     * @return HTTP response
+     */
+    @DELETE
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_EVENTING_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response unsetEventingURI() {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            airavataRegistry.unsetEventingURI();
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("Eventing URI deleted successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+    /**
+     * This method will remove message box URI
+     * @return HTTP response
+     */
+    @DELETE
+    @Path(ResourcePathConstants.ConfigResourcePathConstants.DELETE_MSG_BOX_URI)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response unsetMessageBoxURI() {
+        airavataRegistry = (AiravataRegistry2) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY);
+        try {
+            airavataRegistry.unsetMessageBoxURI();
+            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+            builder.entity("MessageBox URI deleted successfully...");
+            return builder.build();
+        } catch (Exception e) {
+            Response.ResponseBuilder builder = Response.status(Response.Status.INTERNAL_SERVER_ERROR);
+            builder.entity(e.getMessage());
+            return builder.build();
+        }
+    }
+
+}



Mime
View raw message