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 2014/08/22 21:01:30 UTC

[1/9] retiring previous registry API - AIRAVATA-1234

Repository: airavata
Updated Branches:
  refs/heads/master 208e9f4d0 -> f72637f21


http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java
deleted file mode 100644
index 9a93339..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentExecutionError.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ExperimentExecutionError extends ExecutionError {
-	private String experimentId;
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentMetadata.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentMetadata.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentMetadata.java
deleted file mode 100644
index faa57f8..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentMetadata.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-public class ExperimentMetadata {
-	private String experimentId;
-	private String metadata;
-	
-	public ExperimentMetadata(String experimentId, String metadata) {
-		setExperimentId(experimentId);
-		setMetadata(metadata);
-	}
-
-	public String getMetadata() {
-		return metadata;
-	}
-
-	public void setMetadata(String metadata) {
-		this.metadata = metadata;
-	}
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentName.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentName.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentName.java
deleted file mode 100644
index 0e8d9d7..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentName.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-public class ExperimentName {
-	private String experimentId;
-	private String instanceName;
-	
-	public ExperimentName(String experimentId, String instanceName) {
-		setExperimentId(experimentId);
-		setInstanceName(instanceName);
-	}
-
-	public String getInstanceName() {
-		return instanceName;
-	}
-
-	public void setInstanceName(String instanceName) {
-		this.instanceName = instanceName;
-	}
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentUser.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentUser.java
deleted file mode 100644
index 64371d3..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentUser.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-public class ExperimentUser {
-	private String experimentId;
-	private String user;
-	
-	public ExperimentUser(String experimentId, String user) {
-		setExperimentId(experimentId);
-		setUser(user);
-	}
-
-	public String getUser() {
-		return user;
-	}
-
-	public void setUser(String user) {
-		this.user = user;
-	}
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java
deleted file mode 100644
index 0f0315c..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/InputData.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-public class InputData extends WorkflowInstanceNodePortData {
-	public InputData() {
-		super();
-	}
-    public InputData(WorkflowInstanceNode workflowInstanceNode, String portName, String portValue) {
-		super(workflowInstanceNode, portName, portValue);
-	}
-	public InputData(WorkflowInstanceNode workflowInstanceNode, String data) {
-		super(workflowInstanceNode, data);
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java
deleted file mode 100644
index 3cf7464..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionData.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.airavata.common.utils.StringUtil;
-import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class NodeExecutionData {
-	private WorkflowInstanceNode workflowInstanceNode;
-	private List<InputData> inputData;
-	private List<OutputData> outputData;
-	private String input;
-	private String output;
-    private NodeExecutionStatus status;
-    private WorkflowNodeType.WorkflowNode type;
-    private String experimentId;
-    private String workflowExecutionId;
-    private String nodeId;
-
-    public NodeExecutionData() {
-    }
-
-    /**
-     * deprecated Use <code>NodeExecutionData(String experimentId, String workflowExecutionId, String nodeId)</code> instead
-     * @param workflowInstanceNode
-     */
-    public NodeExecutionData(WorkflowInstanceNode workflowInstanceNode) {
-		this(workflowInstanceNode.getWorkflowInstance().getExperimentId(),workflowInstanceNode.getWorkflowInstance().getWorkflowExecutionId(),workflowInstanceNode.getNodeId());
-		setWorkflowInstanceNode(workflowInstanceNode);
-	}
-    
-    public NodeExecutionData(String experimentId, String workflowExecutionId, String nodeId) {
-		this.experimentId=experimentId;
-		this.workflowExecutionId=workflowExecutionId;
-		this.nodeId=nodeId;
-	}
-
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getId()
-	 */
-	public String getId(){
-    	return nodeId;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getExperimentId()
-	 */
-	public String getExperimentId(){
-    	return experimentId;
-    }
-    
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getWorkflowExecutionId()
-	 */
-	public String getWorkflowExecutionId(){
-    	return workflowExecutionId;
-    }
-    
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getWorkflowInstanceNode()
-	 */
-	public WorkflowInstanceNode getWorkflowInstanceNode() {
-		return workflowInstanceNode;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setWorkflowInstanceNode(org.apache.airavata.registry.api.workflow.WorkflowInstanceNode)
-	 */
-	public void setWorkflowInstanceNode(WorkflowInstanceNode workflowInstanceNode) {
-		this.workflowInstanceNode = workflowInstanceNode;
-	}
-
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getStatus()
-	 */
-	public NodeExecutionStatus getStatus() {
-        return status;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setStatus(org.apache.airavata.registry.api.workflow.NodeExecutionStatus)
-	 */
-	public void setStatus(NodeExecutionStatus status) {
-        this.status = status;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setStatus(org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State, java.util.Date)
-	 */
-	public void setStatus(WorkflowExecutionStatus.State status, Date date) {
-        setStatus(new NodeExecutionStatus(this.workflowInstanceNode, status, date));
-
-    }
-
-	/* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getInputData()
-	 */
-	public List<InputData> getInputData() {
-		if (inputData==null){
-			inputData=new ArrayList<InputData>();
-			List<NameValue> data = getIOParameterData(getInput());
-			for (NameValue nameValue : data) {
-				inputData.add(new InputData(getWorkflowInstanceNode(), nameValue.name, nameValue.value));
-			}
-		}
-		return inputData;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getOutputData()
-	 */
-	public List<OutputData> getOutputData() {
-		if (outputData==null){
-			outputData=new ArrayList<OutputData>();
-			List<NameValue> data = getIOParameterData(getOutput());
-			for (NameValue nameValue : data) {
-				outputData.add(new OutputData(getWorkflowInstanceNode(), nameValue.name, nameValue.value));
-			}
-		}
-		return outputData;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setInputData(java.util.List)
-	 */
-	public void setInputData(List<InputData> inputData) {
-		this.inputData = inputData;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setOutputData(java.util.List)
-	 */
-	public void setOutputData(List<OutputData> outputData) {
-		this.outputData = outputData;
-	}
-
-	public String getInput() {
-		return input;
-	}
-
-	public void setInput(String input) {
-		this.input = input;
-	}
-
-	public String getOutput() {
-		return output;
-	}
-
-	public void setOutput(String output) {
-		this.output = output;
-	}
-
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#getType()
-	 */
-	public WorkflowNodeType.WorkflowNode getType() {
-        return type;
-    }
-
-    /* (non-Javadoc)
-	 * @see org.apache.airavata.registry.api.workflow.INodeExecutionData#setType(org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode)
-	 */
-	public void setType(WorkflowNodeType.WorkflowNode type) {
-        this.type = type;
-    }
-
-	public State getState() {
-		return status.getExecutionStatus();
-	}
-
-	public Date getStatusUpdateTime() {
-		return status.getStatusUpdateTime();
-	}
-	
-
-    private static class NameValue{
-		String name;
-		String value;
-		public NameValue(String name, String value) {
-			this.name=name;
-			this.value=value;
-		}
-	}
-	
-	private static List<NameValue> getIOParameterData(String data){
-		List<NameValue> parameters=new ArrayList<NameValue>();
-		if (data!=null && !data.trim().equals("")) {
-			String[] pairs = StringUtil.getElementsFromString(data);
-			for (String paras : pairs) {
-				String name=paras.trim();
-				String value="";
-				int i = name.indexOf("=");
-				//if the paras has a value as well
-				if (i!=-1){
-					value=name.substring(i+1);
-					name=name.substring(0,i);
-					parameters.add(new NameValue(name,StringUtil.quoteString(value)));
-				}else{
-					parameters.get(parameters.size()-1).value=parameters.get(parameters.size()-1).value+","+StringUtil.quoteString(name);
-				}
-				
-			}
-		}
-		return parameters;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java
deleted file mode 100644
index fe24407..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionError.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class NodeExecutionError extends ExecutionError {
-	private String experimentId;
-	private String workflowInstanceId;
-	private String nodeId;
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-	public String getWorkflowInstanceId() {
-		return workflowInstanceId;
-	}
-
-	public void setWorkflowInstanceId(String workflowInstanceId) {
-		this.workflowInstanceId = workflowInstanceId;
-	}
-
-	public String getNodeId() {
-		return nodeId;
-	}
-
-	public void setNodeId(String nodeId) {
-		this.nodeId = nodeId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionStatus.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionStatus.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionStatus.java
deleted file mode 100644
index d8f8e90..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/NodeExecutionStatus.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import java.util.Calendar;
-import java.util.Date;
-
-import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class NodeExecutionStatus {
-    private State executionStatus;
-    private Date statusUpdateTime = null;
-    private WorkflowInstanceNode workflowInstanceNode;
-
-    public NodeExecutionStatus() {
-    }
-
-    public State getExecutionStatus() {
-        return executionStatus;
-    }
-
-    public void setExecutionStatus(State executionStatus) {
-        this.executionStatus = executionStatus;
-    }
-
-    public Date getStatusUpdateTime() {
-        return statusUpdateTime;
-    }
-
-    public void setStatusUpdateTime(Date statusUpdateTime) {
-        this.statusUpdateTime = statusUpdateTime;
-    }
-
-    public NodeExecutionStatus(WorkflowInstanceNode workflowInstanceNode, State executionStatus) {
-        this(workflowInstanceNode, executionStatus, null);
-    }
-
-    public NodeExecutionStatus(WorkflowInstanceNode workflowInstanceNode, State executionStatus, Date statusUpdateTime) {
-        statusUpdateTime = statusUpdateTime == null ? Calendar.getInstance().getTime() : statusUpdateTime;
-        setWorkflowInstanceNode(workflowInstanceNode);
-        setExecutionStatus(executionStatus);
-        setStatusUpdateTime(statusUpdateTime);
-    }
-
-	public WorkflowInstanceNode getWorkflowInstanceNode() {
-		return workflowInstanceNode;
-	}
-
-	public void setWorkflowInstanceNode(WorkflowInstanceNode workflowInstanceNode) {
-		this.workflowInstanceNode = workflowInstanceNode;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java
deleted file mode 100644
index 61743fa..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/OutputData.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-public class OutputData extends WorkflowInstanceNodePortData {
-	public OutputData() {
-		super();
-	}
-    public OutputData(WorkflowInstanceNode workflowInstanceNode, String portName, String portValue) {
-		super(workflowInstanceNode, portName, portValue);
-	}
-	public OutputData(WorkflowInstanceNode workflowInstanceNode, String data) {
-		super(workflowInstanceNode, data);
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java
deleted file mode 100644
index a4ce24e..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecution.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class WorkflowExecution {
-	private String experimentId;
-	private String workflowExecutionId;
-	private String templateName;
-
-    public WorkflowExecution() {
-    }
-
-    public WorkflowExecution(String experimentId,String instanceId) {
-		setExperimentId(experimentId);
-		setWorkflowExecutionId(instanceId);
-	}
-
-    public WorkflowExecution(String experimentId, String workflowInstanceId, String templateName) {
-        this.experimentId = experimentId;
-        this.workflowExecutionId = workflowInstanceId;
-        this.templateName = templateName;
-    }
-
-    public String getWorkflowExecutionId() {
-		return workflowExecutionId;
-	}
-
-	public void setWorkflowExecutionId(String workflowExecutionId) {
-		this.workflowExecutionId = workflowExecutionId;
-	}
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-	public String getTemplateName() {
-		return templateName;
-	}
-
-	public void setTemplateName(String templateName) {
-		this.templateName = templateName;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java
deleted file mode 100644
index 5db469e..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionData.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.airavata.registry.api.workflow;/*
- *
- * 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.
- *
- */
-
-import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
-import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
-import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode;
-
-import javax.jws.WebService;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import java.util.Date;
-import java.util.List;
-
-@WebService
-@XmlSeeAlso(WorkflowExecutionDataImpl.class)
-public interface WorkflowExecutionData {
-	/**
-	 * Get workflow execution id
-	 * @return
-	 */
-	public String getId();
-	
-    /**
-     * Retrieve all node data in this workflow execution
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public List<NodeExecutionData> getNodeDataList() throws ExperimentLazyLoadedException;
-    
-    /**
-     * Retrieve all node data of the type <code>type</code>
-     * @param type
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public List<NodeExecutionData> getNodeDataList(WorkflowNode type)throws ExperimentLazyLoadedException;
-    
-    /**
-     * Retrieve the node data with the given node Id
-     * @param nodeId
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public NodeExecutionData getNodeData(String nodeId) throws ExperimentLazyLoadedException;
-
-    /**
-     * Add node data to the workflow execution
-     * @param nodeData
-     * @throws ExperimentLazyLoadedException
-     */
-    public void addNodeData(NodeExecutionData...nodeData) throws ExperimentLazyLoadedException;
-    
-    /**
-     * Get id of the experiment which this workflow execution belongs to 
-     * @return
-     */
-    public String getExperimentId();
-    
-    /**
-     * Get the workflow template name corresponding to this workflow execution
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public String getTemplateName() throws ExperimentLazyLoadedException;
-    
-    /**
-     * Get current state of the execution of this workflow
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public WorkflowExecutionStatus.State getState() throws ExperimentLazyLoadedException;
-    
-    /**
-     * Get current state updated time
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public Date getStatusUpdateTime() throws ExperimentLazyLoadedException;
-    
-    /**
-     * Retrieve inputs to the workflow execution
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public List<InputData> getWorkflowInputs () throws ExperimentLazyLoadedException;
-    
-    /**
-     * Retrieve outputs to the workflow execution
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public List<OutputData> getWorkflowOutputs ()throws ExperimentLazyLoadedException;
-
-    @Deprecated
-    public WorkflowExecution getWorkflowExecution() throws ExperimentLazyLoadedException;
-    @Deprecated
-    public ExperimentData getExperimentData() throws ExperimentLazyLoadedException;
-    @Deprecated
-    public void setExperimentData(ExperimentDataImpl experimentData) throws ExperimentLazyLoadedException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java
deleted file mode 100644
index 62d47c4..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionError.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class WorkflowExecutionError extends ExecutionError {
-	private String experimentId;
-	private String workflowInstanceId;
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-	public String getWorkflowInstanceId() {
-		return workflowInstanceId;
-	}
-
-	public void setWorkflowInstanceId(String workflowInstanceId) {
-		this.workflowInstanceId = workflowInstanceId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java
deleted file mode 100644
index 935a048..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.Calendar;
-import java.util.Date;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class WorkflowExecutionStatus {
-
-    public WorkflowExecutionStatus() {
-    }
-
-    public WorkflowExecutionStatus(String experimentID, String workflowInstanceID) {
-        workflowInstance.setExperimentId(experimentID);
-        workflowInstance.setWorkflowExecutionId(workflowInstanceID);
-    }
-
-    public enum State {
-        STARTED {
-            public String toString() {
-                return "STARTED";
-            }
-        },
-        RUNNING {
-            public String toString() {
-                return "RUNNING";
-            }
-        },
-        FAILED {
-            public String toString() {
-                return "FAILED";
-            }
-        },
-        PAUSED {
-            public String toString() {
-                return "PAUSED";
-            }
-        },
-        FINISHED {
-            public String toString() {
-                return "FINISHED";
-            }
-        },
-        PENDING {
-            public String toString() {
-                return "PENDING";
-            }
-        },
-        ACTIVE {
-            public String toString() {
-                return "ACTIVE";
-            }
-        },
-        DONE {
-            public String toString() {
-                return "DONE";
-            }
-        },
-        UNKNOWN {
-            public String toString() {
-                return "UNKNOWN";
-            }
-        }
-    }
-
-    private State executionStatus=State.UNKNOWN;
-    private Date statusUpdateTime = null;
-    private WorkflowExecution workflowInstance;
-
-    public State getExecutionStatus() {
-        return executionStatus;
-    }
-
-    public void setExecutionStatus(State executionStatus) {
-        this.executionStatus = executionStatus;
-    }
-
-    public Date getStatusUpdateTime() {
-        return statusUpdateTime;
-    }
-
-    public void setStatusUpdateTime(Date statusUpdateTime) {
-        this.statusUpdateTime = statusUpdateTime;
-    }
-
-    public WorkflowExecutionStatus(WorkflowExecution workflowInstance, State executionStatus) {
-        this(workflowInstance, executionStatus, null);
-    }
-
-    public WorkflowExecutionStatus(WorkflowExecution workflowInstance, State executionStatus, Date statusUpdateTime) {
-        statusUpdateTime = statusUpdateTime == null ? Calendar.getInstance().getTime() : statusUpdateTime;
-        setWorkflowInstance(workflowInstance);
-        setExecutionStatus(executionStatus);
-        setStatusUpdateTime(statusUpdateTime);
-    }
-
-    public WorkflowExecution getWorkflowInstance() {
-        return workflowInstance;
-    }
-
-    public void setWorkflowInstance(WorkflowExecution workflowInstance) {
-        this.workflowInstance = workflowInstance;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowIOData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowIOData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowIOData.java
deleted file mode 100644
index 4267dc6..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowIOData.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class WorkflowIOData {
-	private String value; 
-    private String nodeId;
-    
-    public WorkflowIOData() {
-	}
-    
-	public WorkflowIOData(String nodeId,String value) {
-		setValue(value);
-		setNodeId(nodeId);
-	}
-
-	public String getValue() {
-		return value;
-	}
-
-	public void setValue(String value) {
-		this.value = value;
-	}
-
-	public String getNodeId() {
-		return nodeId;
-	}
-
-	public void setNodeId(String nodeId) {
-		this.nodeId = nodeId;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java
deleted file mode 100644
index 46d0f0d..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNode.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class WorkflowInstanceNode{
-	private WorkflowExecution workflowInstance;
-	private String nodeId;
-    private String originalNodeID;
-    private int executionIndex;
-
-    public WorkflowInstanceNode() {
-    }
-
-    public WorkflowInstanceNode(WorkflowExecution workflowInstance, String nodeId) {
-		setWorkflowInstance(workflowInstance);
-		setNodeId(nodeId);
-	}
-
-	public WorkflowExecution getWorkflowInstance() {
-		return workflowInstance;
-	}
-
-	public void setWorkflowInstance(WorkflowExecution workflowInstance) {
-		this.workflowInstance = workflowInstance;
-	}
-
-	public String getNodeId() {
-		return nodeId;
-	}
-
-	public void setNodeId(String nodeId) {
-		this.nodeId = nodeId;
-	}
-
-    public String getOriginalNodeID() {
-        return originalNodeID;
-    }
-
-    public int getExecutionIndex() {
-        return executionIndex;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java
deleted file mode 100644
index c602642..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowInstanceNodePortData.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class WorkflowInstanceNodePortData {
-	private WorkflowInstanceNode workflowInstanceNode;
-	private String name;
-	private String value;
-
-    public WorkflowInstanceNodePortData() {
-    }
-
-    public WorkflowInstanceNodePortData(WorkflowInstanceNode workflowInstanceNode, String portName, String portValue) {
-		setWorkflowInstanceNode(workflowInstanceNode);
-		setName(portName);
-		setValue(portValue);
-	}
-	
-	public WorkflowInstanceNodePortData(WorkflowInstanceNode workflowInstanceNode, String data) {
-		setWorkflowInstanceNode(workflowInstanceNode);
-		setValue(data);
-	}
-
-	public WorkflowInstanceNode getWorkflowInstanceNode() {
-		return workflowInstanceNode;
-	}
-
-	public void setWorkflowInstanceNode(WorkflowInstanceNode workflowInstanceNode) {
-		this.workflowInstanceNode = workflowInstanceNode;
-	}
-
-	public String getValue() {
-		return value;
-	}
-
-	public void setValue(String value) {
-		this.value = value;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-	
-	public String getId(){
-		return getName();
-	}
-	
-
-    public String getExperimentId(){
-    	return getWorkflowInstanceNode().getWorkflowInstance().getExperimentId();
-    }
-    
-    public String getWorkflowInstanceId(){
-    	return getWorkflowInstanceNode().getWorkflowInstance().getWorkflowExecutionId();
-    }
-    
-    public String getWorkflowInstanceNodeId(){
-    	return getWorkflowInstanceNode().getNodeId();
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java
deleted file mode 100644
index d9d1c30..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeGramData.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class WorkflowNodeGramData {
-    String NodeID;
-    String rsl;
-    String invokedHost;
-    String gramJobID;
-    private String workflowInstanceId;
-
-    public WorkflowNodeGramData() {
-    }
-
-    public WorkflowNodeGramData(String workflowInstanceId, String nodeID, String rsl, String invokedHost, String gramJobID) {
-        NodeID = nodeID;
-        this.rsl = rsl;
-        this.invokedHost = invokedHost;
-        this.gramJobID = gramJobID;
-        this.setWorkflowInstanceId(workflowInstanceId);
-    }
-
-    public void setNodeID(String nodeID) {
-        NodeID = nodeID;
-    }
-
-    public void setRsl(String rsl) {
-        this.rsl = rsl;
-    }
-
-    public void setInvokedHost(String invokedHost) {
-        this.invokedHost = invokedHost;
-    }
-
-    public void setGramJobID(String gramJobID) {
-        this.gramJobID = gramJobID;
-    }
-
-    public String getNodeID() {
-        return NodeID;
-    }
-
-    public String getRsl() {
-        return rsl;
-    }
-
-    public String getInvokedHost() {
-        return invokedHost;
-    }
-
-    public String getGramJobID() {
-        return gramJobID;
-    }
-
-	public String getWorkflowInstanceId() {
-		return workflowInstanceId;
-	}
-
-	public void setWorkflowInstanceId(String workflowInstanceId) {
-		this.workflowInstanceId = workflowInstanceId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java
deleted file mode 100644
index 0df6daa..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeIOData.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class WorkflowNodeIOData extends WorkflowIOData {
-	private String experimentId;
-    private String workflowName;
-    private String workflowId;
-    private String workflowInstanceId;
-    private WorkflowNodeType nodeType;
-
-
-    /** when you construct this object it set to STARTED state **/
-    private WorkflowExecutionStatus nodeStatus = new
-            WorkflowExecutionStatus(new WorkflowExecution(experimentId,workflowId,workflowName), WorkflowExecutionStatus.State.STARTED);
-    
-    public WorkflowNodeIOData() {
-	}
-    
-	public WorkflowNodeIOData(String data, String experimentId,String workflowInstanceID, String workflowId,
-            String nodeId,String workflowName) {
-		super(nodeId,data);
-		setExperimentId(experimentId);
-        setWorkflowInstanceId(workflowInstanceID);
-		setWorkflowId(workflowId);
-		setWorkflowName(workflowName);
-	}
-
-	public WorkflowNodeIOData(String data, String experimentId,String workflowInstanceID,
-            String nodeId,String workflowName) {
-		this(data, experimentId, experimentId,workflowInstanceID, nodeId, workflowName);
-	}
-
-    public WorkflowNodeIOData(String experimentId,String workflowInstanceID, String workflowName, String workflowId, WorkflowNodeType nodeType) {
-        this.experimentId = experimentId;
-        this.workflowInstanceId = workflowInstanceID;
-        this.workflowName = workflowName;
-        this.workflowId = workflowId;
-        this.nodeType = nodeType;
-    }
-
-    public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-	public String getWorkflowName() {
-		return workflowName;
-	}
-
-	public void setWorkflowName(String workflowName) {
-		this.workflowName = workflowName;
-	}
-
-	public String getWorkflowId() {
-		return workflowId;
-	}
-
-	public void setWorkflowId(String workflowId) {
-		this.workflowId = workflowId;
-	}
-
-    public String getWorkflowInstanceId() {
-        return workflowInstanceId;
-    }
-
-    public void setWorkflowInstanceId(String workflowInstanceId) {
-        this.workflowInstanceId = workflowInstanceId;
-    }
-
-    public void setNodeType(WorkflowNodeType nodeType) {
-        this.nodeType = nodeType;
-    }
-
-    public WorkflowNodeType getNodeType() {
-        return nodeType;
-    }
-
-    public WorkflowExecutionStatus getNodeStatus() {
-        return nodeStatus;
-    }
-
-    public void setNodeStatus(WorkflowExecutionStatus nodeStatus) {
-        this.nodeStatus = nodeStatus;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeType.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeType.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeType.java
deleted file mode 100644
index 548d506..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowNodeType.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class WorkflowNodeType {
-    public WorkflowNodeType(WorkflowNode nodeType) {
-        this.nodeType = nodeType;
-    }
-
-    public WorkflowNodeType() {
-    }
-
-    public enum WorkflowNode {
-        SERVICENODE {
-            public String toString() {
-                return "SERVICE_NODE";
-            }
-        },
-        CONTROLNODE {
-            public String toString() {
-                return "CONTROL_NODE";
-            }
-        },
-        INPUTNODE {
-            public String toString() {
-                return "INPUT_NODE";
-            }
-        },
-        OUTPUTNODE {
-            public String toString() {
-                return "OUTPUT_NODE";
-            }
-        },
-        UNKNOWN {
-            public String toString() {
-                return "UNKNOWN_NODE";
-            }
-        },
-    }
-
-    private WorkflowNode nodeType;
-
-    public WorkflowNode getNodeType() {
-        return nodeType;
-    }
-
-    public void setNodeType(WorkflowNode nodeType) {
-        this.nodeType = nodeType;
-    }
-
-    public static WorkflowNodeType getType(String type){
-        for(WorkflowNode w:WorkflowNode.values()){
-            if (w.toString().equalsIgnoreCase(type)){
-                return new WorkflowNodeType(w);
-            }
-        }
-        return new WorkflowNodeType(WorkflowNode.UNKNOWN);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java
deleted file mode 100644
index 65543d0..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowRunTimeData.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import java.sql.Timestamp;
-
-public class WorkflowRunTimeData {
-    String experimentID;
-    String workflowInstanceID;
-    String templateID;
-    Timestamp startTime;
-    WorkflowExecutionStatus.State workflowStatus;
-    Timestamp lastUpdateTime;
-
-    public WorkflowRunTimeData(String experimentID, String workflowInstanceID, String templateID,
-                               Timestamp startTime, WorkflowExecutionStatus.State workflowStatus, Timestamp lastUpdateTime) {
-        this.experimentID = experimentID;
-        this.workflowInstanceID = workflowInstanceID;
-        this.templateID = templateID;
-        this.startTime = startTime;
-        this.workflowStatus = workflowStatus;
-        this.lastUpdateTime = lastUpdateTime;
-    }
-
-    public String getExperimentID() {
-        return experimentID;
-    }
-
-    public String getWorkflowInstanceID() {
-        return workflowInstanceID;
-    }
-
-    public String getTemplateID() {
-        return templateID;
-    }
-
-    public Timestamp getStartTime() {
-        return startTime;
-    }
-
-    public WorkflowExecutionStatus.State getWorkflowStatus() {
-        return workflowStatus;
-    }
-
-    public Timestamp getLastUpdateTime() {
-        return lastUpdateTime;
-    }
-
-    public void setExperimentID(String experimentID) {
-        this.experimentID = experimentID;
-    }
-
-    public void setWorkflowInstanceID(String workflowInstanceID) {
-        this.workflowInstanceID = workflowInstanceID;
-    }
-
-    public void setTemplateID(String templateID) {
-        this.templateID = templateID;
-    }
-
-    public void setStartTime(Timestamp startTime) {
-        this.startTime = startTime;
-    }
-
-    public void setWorkflowStatus(WorkflowExecutionStatus.State workflowStatus) {
-        this.workflowStatus = workflowStatus;
-    }
-
-    public void setLastUpdateTime(Timestamp lastUpdateTime) {
-        this.lastUpdateTime = lastUpdateTime;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-cpi/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-cpi/pom.xml b/modules/registry/registry-cpi/pom.xml
index 57b7395..e9c2478 100644
--- a/modules/registry/registry-cpi/pom.xml
+++ b/modules/registry/registry-cpi/pom.xml
@@ -29,6 +29,11 @@
             <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-common-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/utils/RegistrySettings.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/utils/RegistrySettings.java b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/utils/RegistrySettings.java
new file mode 100644
index 0000000..6c7bff0
--- /dev/null
+++ b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/utils/RegistrySettings.java
@@ -0,0 +1,127 @@
+/*
+ *
+ * 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.registry.cpi.utils;
+
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.ApplicationSettings;
+import org.apache.airavata.common.utils.StringUtil;
+import org.apache.airavata.registry.cpi.RegistryException;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+public class RegistrySettings {
+    private static final String REPOSITORY_PROPERTIES = "registry.properties";
+    private static Properties properties = new Properties();
+    private static Exception propertyLoadException;
+    private static final String REGISTRY_ACCESSOR_CLASS = "class.registry.accessor";
+    private static final String SAVE_APPLICATION_JOB_STATUS_HISTORY="enable.application.job.status.history";
+    
+    static{
+    	URL url = RegistrySettings.class.getClassLoader()
+				.getResource(REPOSITORY_PROPERTIES);
+		if (url == null) {
+    		if (AiravataUtils.isServer()){
+    			 url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.SERVER_PROPERTIES);
+                if(url == null){
+                    url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.CLIENT_PROPERTIES);
+                }
+    		}else if (AiravataUtils.isClient()){
+        		url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.CLIENT_PROPERTIES);
+                if(url == null){
+                    url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.SERVER_PROPERTIES);
+                }
+        	}else{
+        		//unknown execution mode... If so, first assume its client, if not server...
+        		url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.CLIENT_PROPERTIES);
+        		if (url==null){
+        			url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.SERVER_PROPERTIES);
+        		}
+        	}
+		}
+        try {
+            properties.load(url.openStream());
+        } catch (Exception e) {
+        	propertyLoadException=e;
+        }
+        System.out.println(url);
+    }
+    
+    private static void validateSuccessfulPropertyFileLoad() throws RegistryException{
+    	if (propertyLoadException!=null){
+    		throw new RegistryException(propertyLoadException);
+    	}
+    }
+    
+    public static String getSetting(String key) throws RegistryException{
+    	String rawValue=null;
+    	if (System.getProperties().containsKey(key)){
+    		rawValue=System.getProperties().getProperty(key);
+    	}else{
+    		validateSuccessfulPropertyFileLoad();
+	    	if (properties.containsKey(key)){
+	    		rawValue=properties.getProperty(key);
+	    	}else{
+	    		return null;		
+	    	}
+    	}
+    	return deriveAbsoluteValueImpl(rawValue);
+//    	throw new UnspecifiedRegistrySettingsException(key);
+    }
+    
+	private static String deriveAbsoluteValueImpl(String property){
+		if (property!=null){
+			Map<Integer, String> containedParameters = StringUtil.getContainedParameters(property);
+			List<String> parametersAlreadyProcessed=new ArrayList<String>();
+			for (String parameter : containedParameters.values()) {
+				if (!parametersAlreadyProcessed.contains(parameter)) {
+					String parameterName = parameter.substring(2,parameter.length() - 1);
+					String parameterValue = getSetting(parameterName,parameter);
+					property = property.replaceAll(Pattern.quote(parameter), parameterValue);
+					parametersAlreadyProcessed.add(parameter);
+				}
+			}
+		}
+		return property;
+	}
+    public static String getSetting(String key, String defaultValue){
+    	try {
+    		return getSetting(key);
+		} catch (RegistryException e) {
+			//we'll ignore this error since a default value is provided
+		}
+		return defaultValue;
+    }
+    
+    public static String getRegistryAccessorClass() throws RegistryException{
+
+        return getSetting(REGISTRY_ACCESSOR_CLASS);
+    }
+    
+    public static boolean isApplicationJobStatusHistoryEnabled(){
+    	return "true".equalsIgnoreCase(getSetting(SAVE_APPLICATION_JOB_STATUS_HISTORY, "false"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/test-suite/pom.xml
----------------------------------------------------------------------
diff --git a/modules/test-suite/pom.xml b/modules/test-suite/pom.xml
index d3a36ed..cb4b3fc 100644
--- a/modules/test-suite/pom.xml
+++ b/modules/test-suite/pom.xml
@@ -59,12 +59,6 @@
             <version>${project.version}</version>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
         <!-- Workflow Tracking -->
         <dependency>
             <groupId>org.apache.airavata</groupId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/workflow-model/workflow-engine/pom.xml
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/pom.xml b/modules/workflow-model/workflow-engine/pom.xml
index 0c138b0..79286c4 100644
--- a/modules/workflow-model/workflow-engine/pom.xml
+++ b/modules/workflow-model/workflow-engine/pom.xml
@@ -236,12 +236,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -255,12 +249,6 @@
             <artifactId>airavata-jpa-registry</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
         <!-- JCR Support -->
         <!-- TODO need clean up -->
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreterConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreterConfiguration.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreterConfiguration.java
index ed963a1..6fa54c6 100644
--- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreterConfiguration.java
+++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreterConfiguration.java
@@ -23,8 +23,6 @@ package org.apache.airavata.workflow.engine.interpretor;
 
 import org.apache.airavata.workflow.model.wf.Workflow;
 
-//import org.apache.airavata.registry.api.AiravataRegistry2;
-
 public class WorkflowInterpreterConfiguration {
 //	public static final int GUI_MODE = 1;
 //	public static final int SERVER_MODE = 2;

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/ws-messenger/messagebox/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/messagebox/pom.xml b/modules/ws-messenger/messagebox/pom.xml
index c1a83e5..7b7da69 100644
--- a/modules/ws-messenger/messagebox/pom.xml
+++ b/modules/ws-messenger/messagebox/pom.xml
@@ -30,11 +30,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/ws-messenger/messagebroker/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ws-messenger/messagebroker/pom.xml b/modules/ws-messenger/messagebroker/pom.xml
index df779a1..b62bded 100644
--- a/modules/ws-messenger/messagebroker/pom.xml
+++ b/modules/ws-messenger/messagebroker/pom.xml
@@ -54,11 +54,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/pom.xml b/modules/xbaya-gui/pom.xml
index 2200150..491d7c8 100644
--- a/modules/xbaya-gui/pom.xml
+++ b/modules/xbaya-gui/pom.xml
@@ -234,11 +234,6 @@
             <artifactId>airavata-jpa-registry</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
 
         <!-- JCR Support -->
         <!-- TODO need clean up -->

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/PasswordCallbackImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/PasswordCallbackImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/PasswordCallbackImpl.java
index da83cb2..b4c9562 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/PasswordCallbackImpl.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/PasswordCallbackImpl.java
@@ -1,39 +1,39 @@
-/*
- *
- * 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.xbaya.registry;
-
-import org.apache.airavata.registry.api.PasswordCallback;
-
-public class PasswordCallbackImpl implements PasswordCallback {
-    private String username;
-    private String password;
-
-    public PasswordCallbackImpl(String username, String password) {
-        this.username = username;
-        this.password = password;
-    }
-
-    @Override
-    public String getPassword(String username) {
-       return password;
-    }
-}
+///*
+// *
+// * 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.xbaya.registry;
+//
+//import org.apache.airavata.registry.api.PasswordCallback;
+//
+//public class PasswordCallbackImpl implements PasswordCallback {
+//    private String username;
+//    private String password;
+//
+//    public PasswordCallbackImpl(String username, String password) {
+//        this.username = username;
+//        this.password = password;
+//    }
+//
+//    @Override
+//    public String getPassword(String username) {
+//       return password;
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f15ce48..69cd5c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -493,12 +493,12 @@
             <modules>
                 <module>modules/configuration</module>
                 <module>airavata-api</module>
+                <module>modules/airavata-client</module>
                 <module>modules/commons</module>
                 <module>modules/gfac</module>
                 <module>modules/workflow-model</module>
                 <module>modules/registry</module>
                 <module>modules/app-catalog</module>
-                <module>modules/airavata-client</module>
                 <module>modules/security</module>
                 <module>modules/credential-store-service</module>
                 <module>modules/orchestrator</module>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/samples/java-client/experiment/pom.xml
----------------------------------------------------------------------
diff --git a/samples/java-client/experiment/pom.xml b/samples/java-client/experiment/pom.xml
index 33346c0..8e2e414 100644
--- a/samples/java-client/experiment/pom.xml
+++ b/samples/java-client/experiment/pom.xml
@@ -58,28 +58,6 @@
             </exclusions>
         </dependency>
         <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
             <groupId>org.codehaus.jackson</groupId>
             <artifactId>jackson-mapper-asl</artifactId>
             <version>1.9.2</version>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/tools/registry-tool/pom.xml
----------------------------------------------------------------------
diff --git a/tools/registry-tool/pom.xml b/tools/registry-tool/pom.xml
index 1b485a3..fa871ba 100644
--- a/tools/registry-tool/pom.xml
+++ b/tools/registry-tool/pom.xml
@@ -23,11 +23,6 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derby</artifactId>
             <version>10.9.1.0</version>


[8/9] retiring previous registry API - AIRAVATA-1234

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
index 6b057ed..c764b63 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
@@ -1,560 +1,798 @@
-/*
- *
- * 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.gfac.core.cpi;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
-
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.MonitorPublisher;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.common.utils.listener.AbstractActivityListener;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.gfac.Constants;
-import org.apache.airavata.gfac.GFacConfiguration;
-import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.Scheduler;
-import org.apache.airavata.gfac.core.context.ApplicationContext;
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.handler.GFacHandler;
-import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
-import org.apache.airavata.gfac.core.handler.GFacHandlerException;
-import org.apache.airavata.gfac.core.handler.ThreadedHandler;
-import org.apache.airavata.gfac.core.monitor.ExperimentIdentity;
-import org.apache.airavata.gfac.core.monitor.JobIdentity;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
-import org.apache.airavata.gfac.core.monitor.TaskIdentity;
-//import org.apache.airavata.api.server.listener.ExperimentStatusChangedEvent;
-import org.apache.airavata.gfac.core.monitor.state.JobStatusChangeRequest;
-import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangeRequest;
-import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangedEvent;
-import org.apache.airavata.gfac.core.notification.events.ExecutionFailEvent;
-import org.apache.airavata.gfac.core.notification.listeners.LoggingListener;
-import org.apache.airavata.gfac.core.notification.listeners.WorkflowTrackingListener;
-import org.apache.airavata.gfac.core.provider.GFacProvider;
-import org.apache.airavata.gfac.core.scheduler.HostScheduler;
-import org.apache.airavata.gfac.core.states.GfacExperimentState;
-import org.apache.airavata.gfac.core.utils.GFacUtils;
-import org.apache.airavata.model.workspace.experiment.DataObjectType;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.TaskState;
-import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.zookeeper.ZooKeeper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.SAXException;
-
-import com.google.common.eventbus.EventBus;
-
-/**
- * This is the GFac CPI class for external usage, this simply have a single method to submit a job to
- * the resource, required data for the job has to be stored in registry prior to invoke this object.
- */
-public class GFacImpl implements GFac {
-    private static final Logger log = LoggerFactory.getLogger(GFacImpl.class);
-    public static final String ERROR_SENT = "ErrorSent";
-
-    private Registry registry;
-
-    private AiravataAPI airavataAPI;
-
-    private AiravataRegistry2 airavataRegistry2;
-
-    private ZooKeeper zk;
-    
-    private static List<ThreadedHandler> daemonHandlers;
-
-    private File gfacConfigFile;
-
-    private List<AbstractActivityListener> activityListeners;
-
-    private static MonitorPublisher monitorPublisher;
-
-    /**
-     * Constructor for GFac
-     *
-     * @param registry
-     * @param airavataAPI
-     * @param airavataRegistry2
-     */
-    public GFacImpl(Registry registry, AiravataAPI airavataAPI, AiravataRegistry2 airavataRegistry2) {
-        this.registry = registry;
-        this.airavataAPI = airavataAPI;
-        this.airavataRegistry2 = airavataRegistry2;
-        daemonHandlers = new ArrayList<ThreadedHandler>();
-        activityListeners = new ArrayList<AbstractActivityListener>();
-        monitorPublisher = new MonitorPublisher(new EventBus());     // This is a EventBus common for gfac
-        startStatusUpdators();
-        startDaemonHandlers();
-    }
-
-    private void startStatusUpdators() {
-        try {
-            String[] listenerClassList = ServerSettings.getActivityListeners();
-            for (String listenerClass : listenerClassList) {
-                Class<? extends AbstractActivityListener> aClass = Class.forName(listenerClass).asSubclass(AbstractActivityListener.class);
-                AbstractActivityListener abstractActivityListener = aClass.newInstance();
-                activityListeners.add(abstractActivityListener);
-                abstractActivityListener.setup(getMonitorPublisher(), registry);
-                log.info("Registering listener: " + listenerClass);
-                getMonitorPublisher().registerListener(abstractActivityListener);
-            }
-        }catch (ClassNotFoundException e) {
-            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-        } catch (InstantiationException e) {
-            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-        } catch (IllegalAccessException e) {
-            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-        } catch (ApplicationSettingsException e){
-            log.error("Error loading the listener classes configured in airavata-server.properties",e);
-        }
-    }
-    private void startDaemonHandlers()  {
-        List<GFacHandlerConfig> daemonHandlerConfig = null;
-        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        gfacConfigFile = new File(resource.getPath());
-        try {
-            daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
-        } catch (ParserConfigurationException e) {
-            log.error("Error parsing gfac-config.xml, double check the xml configuration",e);
-        } catch (IOException e) {
-            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-        } catch (SAXException e) {
-            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-        } catch (XPathExpressionException e) {
-            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
-        }
-
-        for(GFacHandlerConfig handlerConfig:daemonHandlerConfig){
-            String className = handlerConfig.getClassName();
-            try {
-                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
-                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
-                threadedHandler.initProperties(handlerConfig.getProperties());
-                daemonHandlers.add(threadedHandler);
-            }catch (ClassNotFoundException e){
-                log.error("Error initializing the handler: " + className);
-                log.error(className + " class has to implement " + ThreadedHandler.class);
-            } catch (InstantiationException e) {
-                log.error("Error initializing the handler: " + className);
-                log.error(className + " class has to implement " + ThreadedHandler.class);
-            } catch (IllegalAccessException e) {
-                log.error("Error initializing the handler: " + className);
-                log.error(className + " class has to implement " + ThreadedHandler.class);
-            } catch (GFacHandlerException e) {
-                log.error("Error initializing the handler " + className);
-            } catch (GFacException e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-            }
-        }
-        for(ThreadedHandler tHandler:daemonHandlers){
-            (new Thread(tHandler)).start();
-        }
-    }
-
-    /**
-     * This can be used to submit jobs for testing purposes just by filling parameters by hand (JobExecutionContext)
-     */
-    public GFacImpl() {
-        daemonHandlers = new ArrayList<ThreadedHandler>();
-        startDaemonHandlers();
-    }
-
-    /**
-     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
-     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
-     *
-     * @param experimentID
-     * @return
-     * @throws GFacException
-     */
-    public boolean submitJob(String experimentID,String taskID, String gatewayID) throws GFacException {
-        JobExecutionContext jobExecutionContext = null;
-        try {
-            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
-            return submitJob(jobExecutionContext);
-        } catch (Exception e) {
-            log.error("Error inovoking the job with experiment ID: " + experimentID);
-            throw new GFacException(e);
-        }
-    }
-
-    private JobExecutionContext createJEC(String experimentID, String taskID, String gatewayID) throws Exception {
-        JobExecutionContext jobExecutionContext;
-        TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID);
-
-        // this is wear our new model and old model is mapping (so serviceName in ExperimentData and service name in ServiceDescriptor
-        // has to be same.
-
-        // 1. Get the Task from the task ID and construct the Job object and save it in to registry
-        // 2. Add another property to jobExecutionContext and read them inside the provider and use it.
-        String serviceName = taskData.getApplicationId();
-        if (serviceName == null) {
-            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
-        }
-       
-        ServiceDescription serviceDescription = airavataRegistry2.getServiceDescriptor(serviceName);
-        if (serviceDescription == null ) {
-            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
-        }
-        String hostName;
-        HostDescription hostDescription = null;
-        if(taskData.getTaskScheduling().getResourceHostId() != null){
-            hostName = taskData.getTaskScheduling().getResourceHostId();
-            hostDescription = airavataRegistry2.getHostDescriptor(hostName);
-        }else{
-        	  List<HostDescription> registeredHosts = new ArrayList<HostDescription>();
-              Map<String, ApplicationDescription> applicationDescriptors = airavataRegistry2.getApplicationDescriptors(serviceName);
-              for (String hostDescName : applicationDescriptors.keySet()) {
-                  registeredHosts.add(airavataRegistry2.getHostDescriptor(hostDescName));
-              }
-              Class<? extends HostScheduler> aClass = Class.forName(ServerSettings.getHostScheduler()).asSubclass(HostScheduler.class);
-             HostScheduler hostScheduler = aClass.newInstance();
-             //TODO cleanup
-            hostDescription = registeredHosts.get(0);//hostScheduler.schedule(registeredHosts);
-        	hostName = hostDescription.getType().getHostName();
-        }
-        if(hostDescription == null){
-        	throw new GFacException("Error executing the job as the host is not registered " + hostName);	
-        }
-        ApplicationDescription applicationDescription = airavataRegistry2.getApplicationDescriptors(serviceName, hostName);
-        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        Properties configurationProperties = ServerSettings.getProperties();
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), airavataAPI, configurationProperties);
-
-
-        // start constructing jobexecutioncontext
-        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serviceName);
-
-        // setting experiment/task/workflownode related information
-        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
-        jobExecutionContext.setExperiment(experiment);
-        jobExecutionContext.setExperimentID(experimentID);
-        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
-        jobExecutionContext.setTaskData(taskData);
-
-        // setting the registry
-        jobExecutionContext.setRegistry(registry);
-
-        ApplicationContext applicationContext = new ApplicationContext();
-        applicationContext.setApplicationDeploymentDescription(applicationDescription);
-        applicationContext.setHostDescription(hostDescription);
-        applicationContext.setServiceDescription(serviceDescription);
-        jobExecutionContext.setApplicationContext(applicationContext);
-
-        List<DataObjectType> experimentInputs = taskData.getApplicationInputs();
-        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInMessageContext(experimentInputs,
-                serviceDescription.getType().getInputParametersArray())));
-
-        List<DataObjectType> outputData = taskData.getApplicationOutputs();
-        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getInMessageContext(outputData,
-                serviceDescription.getType().getOutputParametersArray())));
-
-        jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
-        jobExecutionContext.setGfac(this);
-        return jobExecutionContext;
-    }
-
-    private boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException {
-        // We need to check whether this job is submitted as a part of a large workflow. If yes,
-        // we need to setup workflow tracking listerner.
-        String workflowInstanceID = null;
-        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
-            // This mean we need to register workflow tracking listener.
-            //todo implement WorkflowTrackingListener properly
-            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
-        }
-        // Register log event listener. This is required in all scenarios.
-        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-        schedule(jobExecutionContext);
-        return true;
-    }
-
-
-    public boolean cancel(String experimentID, String taskID, String gatewayID) throws GFacException {
-        JobExecutionContext jobExecutionContext = null;
-        try {
-            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
-            return cancel(jobExecutionContext);
-        } catch (Exception e) {
-            log.error("Error inovoking the job with experiment ID: " + experimentID);
-            throw new GFacException(e);
-        }
-    }
-
-    private boolean cancel(JobExecutionContext jobExecutionContext) throws GFacException {
-        // We need to check whether this job is submitted as a part of a large workflow. If yes,
-        // we need to setup workflow tracking listerner.
-        String workflowInstanceID = null;
-        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
-            // This mean we need to register workflow tracking listener.
-            //todo implement WorkflowTrackingListener properly
-            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
-        }
-        // Register log event listener. This is required in all scenarios.
-        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-        try {
-            Scheduler.schedule(jobExecutionContext);
-            GFacProvider provider = jobExecutionContext.getProvider();
-            if (provider != null) {
-                initProvider(provider, jobExecutionContext);
-                cancelProvider(provider, jobExecutionContext);
-                disposeProvider(provider, jobExecutionContext);
-            }
-        }catch (Exception e) {
-            try {
-                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
-                        new JobIdentity(jobExecutionContext.getExperimentID(),
-                                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                                jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
-            } catch (NullPointerException e1) {
-                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
-                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-                // Updating status if job id is not set
-//				monitorPublisher
-//						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
-                // Updating the task status if there's any task associated
-                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
-                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
-
-            }
-            jobExecutionContext.setProperty(ERROR_SENT, "true");
-            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-            throw new GFacException(e.getMessage(), e);
-        }
-        return true;
-    }
-
-    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
-        // Scheduler will decide the execution flow of handlers and provider which handles
-        // the job.
-        String experimentID = jobExecutionContext.getExperimentID();
-        try {
-            Scheduler.schedule(jobExecutionContext);
-
-            // Executing in handlers in the order as they have configured in GFac configuration
-            invokeInFlowHandlers(jobExecutionContext);
-//            if (experimentID != null){
-//                registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
+///*
+// *
+// * 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.gfac.core.cpi;
+//
+//import java.io.File;
+//import java.io.IOException;
+//import java.net.URL;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.Map;
+//import java.util.Properties;
+//
+//import javax.xml.parsers.ParserConfigurationException;
+//import javax.xml.xpath.XPathExpressionException;
+//
+//import org.apache.airavata.client.api.AiravataAPI;
+//import org.apache.airavata.common.exception.ApplicationSettingsException;
+//import org.apache.airavata.common.utils.MonitorPublisher;
+//import org.apache.airavata.common.utils.ServerSettings;
+//import org.apache.airavata.common.utils.listener.AbstractActivityListener;
+//import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+//import org.apache.airavata.commons.gfac.type.HostDescription;
+//import org.apache.airavata.commons.gfac.type.ServiceDescription;
+//import org.apache.airavata.gfac.Constants;
+//import org.apache.airavata.gfac.GFacConfiguration;
+//import org.apache.airavata.gfac.GFacException;
+//import org.apache.airavata.gfac.Scheduler;
+//import org.apache.airavata.gfac.core.context.ApplicationContext;
+//import org.apache.airavata.gfac.core.context.JobExecutionContext;
+//import org.apache.airavata.gfac.core.context.MessageContext;
+//import org.apache.airavata.gfac.core.handler.GFacHandler;
+//import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
+//import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+//import org.apache.airavata.gfac.core.handler.ThreadedHandler;
+//import org.apache.airavata.gfac.core.monitor.ExperimentIdentity;
+//import org.apache.airavata.gfac.core.monitor.JobIdentity;
+//import org.apache.airavata.gfac.core.monitor.MonitorID;
+//import org.apache.airavata.gfac.core.monitor.TaskIdentity;
+////import org.apache.airavata.api.server.listener.ExperimentStatusChangedEvent;
+//import org.apache.airavata.gfac.core.monitor.state.JobStatusChangeRequest;
+//import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangeRequest;
+//import org.apache.airavata.gfac.core.monitor.state.TaskStatusChangedEvent;
+//import org.apache.airavata.gfac.core.notification.events.ExecutionFailEvent;
+//import org.apache.airavata.gfac.core.notification.listeners.LoggingListener;
+//import org.apache.airavata.gfac.core.notification.listeners.WorkflowTrackingListener;
+//import org.apache.airavata.gfac.core.provider.GFacProvider;
+//import org.apache.airavata.gfac.core.scheduler.HostScheduler;
+//import org.apache.airavata.gfac.core.states.GfacExperimentState;
+//import org.apache.airavata.gfac.core.utils.GFacUtils;
+//import org.apache.airavata.model.workspace.experiment.DataObjectType;
+//import org.apache.airavata.model.workspace.experiment.Experiment;
+//import org.apache.airavata.model.workspace.experiment.ExperimentState;
+//import org.apache.airavata.model.workspace.experiment.JobState;
+//import org.apache.airavata.model.workspace.experiment.TaskDetails;
+//import org.apache.airavata.model.workspace.experiment.TaskState;
+//import org.apache.airavata.registry.api.AiravataRegistry2;
+//import org.apache.airavata.registry.cpi.Registry;
+//import org.apache.airavata.registry.cpi.RegistryModelType;
+//import org.apache.zookeeper.ZooKeeper;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.xml.sax.SAXException;
+//
+//import com.google.common.eventbus.EventBus;
+//
+///**
+// * This is the GFac CPI class for external usage, this simply have a single method to submit a job to
+// * the resource, required data for the job has to be stored in registry prior to invoke this object.
+// */
+//public class GFacImpl implements GFac {
+//    private static final Logger log = LoggerFactory.getLogger(GFacImpl.class);
+//    public static final String ERROR_SENT = "ErrorSent";
+//
+//    private Registry registry;
+//
+//    private AiravataAPI airavataAPI;
+//
+//    private AiravataRegistry2 airavataRegistry2;
+//
+//    private ZooKeeper zk;
+//
+//    private static List<ThreadedHandler> daemonHandlers;
+//
+//    private File gfacConfigFile;
+//
+//    private List<AbstractActivityListener> activityListeners;
+//
+//    private static MonitorPublisher monitorPublisher;
+//
+//    /**
+//     * Constructor for GFac
+//     *
+//     * @param registry
+//     * @param airavataAPI
+//     * @param airavataRegistry2
+//     */
+//    public GFacImpl(Registry registry, AiravataAPI airavataAPI, AiravataRegistry2 airavataRegistry2) {
+//        this.registry = registry;
+//        this.airavataAPI = airavataAPI;
+//        this.airavataRegistry2 = airavataRegistry2;
+//        daemonHandlers = new ArrayList<ThreadedHandler>();
+//        activityListeners = new ArrayList<AbstractActivityListener>();
+//        monitorPublisher = new MonitorPublisher(new EventBus());     // This is a EventBus common for gfac
+//        startStatusUpdators();
+//        startDaemonHandlers();
+//    }
+//
+//    private void startStatusUpdators() {
+//        try {
+//            String[] listenerClassList = ServerSettings.getActivityListeners();
+//            for (String listenerClass : listenerClassList) {
+//                Class<? extends AbstractActivityListener> aClass = Class.forName(listenerClass).asSubclass(AbstractActivityListener.class);
+//                AbstractActivityListener abstractActivityListener = aClass.newInstance();
+//                activityListeners.add(abstractActivityListener);
+//                abstractActivityListener.setup(getMonitorPublisher(), registry);
+//                log.info("Registering listener: " + listenerClass);
+//                getMonitorPublisher().registerListener(abstractActivityListener);
 //            }
-
-            // After executing the in handlers provider instance should be set to job execution context.
-            // We get the provider instance and execute it.
-            GFacProvider provider = jobExecutionContext.getProvider();
-            if (provider != null) {
-                initProvider(provider, jobExecutionContext);
-                executeProvider(provider, jobExecutionContext);
-                disposeProvider(provider, jobExecutionContext);
-            }
-            if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
-                invokeOutFlowHandlers(jobExecutionContext);
-            }
-        } catch (Exception e) {
-            try {
-                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
-                        new JobIdentity(jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
-            } catch (NullPointerException e1) {
-                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
-                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-                // Updating status if job id is not set
-//				monitorPublisher
-//						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
-				// Updating the task status if there's any task associated
-				monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
-						.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
-
-            }
-            jobExecutionContext.setProperty(ERROR_SENT, "true");
-            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-            throw new GFacException(e.getMessage(), e);
-        }
-    }
-
-    private void initProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-            provider.initialize(jobExecutionContext);
-        } catch (Exception e) {
-            throw new GFacException("Error while initializing provider " + provider.getClass().getName() + ".", e);
-        }
-    }
-
-    private void executeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-             provider.execute(jobExecutionContext);
-        } catch (Exception e) {
-            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
-        }
-    }
-    private void cancelProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-            provider.cancelJob(jobExecutionContext);
-        } catch (Exception e) {
-            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
-        }
-    }
-
-    private void disposeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
-        try {
-            provider.dispose(jobExecutionContext);
-        } catch (Exception e) {
-            throw new GFacException("Error while invoking provider " + provider.getClass().getName() + " dispose method.", e);
-        }
-    }
-
-    private void registerWorkflowTrackingListener(String workflowInstanceID, JobExecutionContext jobExecutionContext) {
-        String workflowNodeID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_NODE_ID);
-        String topic = (String) jobExecutionContext.getProperty(Constants.PROP_TOPIC);
-        String brokerUrl = (String) jobExecutionContext.getProperty(Constants.PROP_BROKER_URL);
-        jobExecutionContext.getNotificationService().registerListener(
-                new WorkflowTrackingListener(workflowInstanceID, workflowNodeID, brokerUrl, topic));
-
-    }
-
-    private void invokeInFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
-        for (GFacHandlerConfig handlerClassName : handlers) {
-            Class<? extends GFacHandler> handlerClass;
-            GFacHandler handler;
-            try {
-                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-                handler = handlerClass.newInstance();
-                handler.initProperties(handlerClassName.getProperties());
-            } catch (ClassNotFoundException e) {
-                throw new GFacException("Cannot load handler class " + handlerClassName, e);
-            } catch (InstantiationException e) {
-                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-            } catch (IllegalAccessException e) {
-                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-            }
-            try {
-                handler.invoke(jobExecutionContext);
-            } catch (GFacHandlerException e) {
-                throw new GFacException("Error Executing a InFlow Handler", e.getCause());
-            }
-        }
-    }
-
-    public void reInvokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        this.invokeOutFlowHandlers(jobExecutionContext);
-    }
-
-    public void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
-        GFacConfiguration gFacConfiguration = jobExecutionContext.getGFacConfiguration();
-        List<GFacHandlerConfig> handlers = null;
-        if(gFacConfiguration != null){
-         handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
-        }else {
-            try {
-                jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
-            } catch (Exception e) {
-                log.error("Error constructing job execution context during outhandler invocation");
-                throw new GFacException(e);
-            }
-            schedule(jobExecutionContext);
-        }
-        for (GFacHandlerConfig handlerClassName : handlers) {
-            Class<? extends GFacHandler> handlerClass;
-            GFacHandler handler;
-            try {
-                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
-                handler = handlerClass.newInstance();
-                handler.initProperties(handlerClassName.getProperties());
-            } catch (ClassNotFoundException e) {
-                log.error(e.getMessage());
-                throw new GFacException("Cannot load handler class " + handlerClassName, e);
-            } catch (InstantiationException e) {
-                log.error(e.getMessage());
-                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-            } catch (IllegalAccessException e) {
-                log.error(e.getMessage());
-                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
-            }
-            try {
-                handler.invoke(jobExecutionContext);
-            } catch (Exception e) {
-                // TODO: Better error reporting.
-                throw new GFacException("Error Executing a OutFlow Handler", e);
-            }
-        }
-
-        monitorPublisher.publish(GfacExperimentState.COMPLETED);
-        // At this point all the execution is finished so we update the task and experiment statuses.
-        // Handler authors does not have to worry about updating experiment or task statuses.
-//        monitorPublisher.publish(new
-//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
-//                ExperimentState.COMPLETED));
-        // Updating the task status if there's any task associated
-        monitorPublisher.publish(new TaskStatusChangeRequest(
-                new TaskIdentity(jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getTaskData().getTaskID()), TaskState.COMPLETED
-        ));
-    }
-
-
-    public AiravataAPI getAiravataAPI() {
-        return airavataAPI;
-    }
-
-    public AiravataRegistry2 getAiravataRegistry2() {
-        return airavataRegistry2;
-    }
-
-    public static List<ThreadedHandler> getDaemonHandlers() {
-        return daemonHandlers;
-    }
-
-    public static String getErrorSent() {
-        return ERROR_SENT;
-    }
-
-    public File getGfacConfigFile() {
-        return gfacConfigFile;
-    }
-
-    public static MonitorPublisher getMonitorPublisher() {
-        return monitorPublisher;
-    }
-
-    public Registry getRegistry() {
-        return registry;
-    }
-}
+//        }catch (ClassNotFoundException e) {
+//            log.error("Error loading the listener classes configured in airavata-server.properties",e);
+//        } catch (InstantiationException e) {
+//            log.error("Error loading the listener classes configured in airavata-server.properties",e);
+//        } catch (IllegalAccessException e) {
+//            log.error("Error loading the listener classes configured in airavata-server.properties",e);
+//        } catch (ApplicationSettingsException e){
+//            log.error("Error loading the listener classes configured in airavata-server.properties",e);
+//        }
+//    }
+//    private void startDaemonHandlers()  {
+//        List<GFacHandlerConfig> daemonHandlerConfig = null;
+//        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        gfacConfigFile = new File(resource.getPath());
+//        try {
+//            daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
+//        } catch (ParserConfigurationException e) {
+//            log.error("Error parsing gfac-config.xml, double check the xml configuration",e);
+//        } catch (IOException e) {
+//            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
+//        } catch (SAXException e) {
+//            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
+//        } catch (XPathExpressionException e) {
+//            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
+//        }
+//
+//        for(GFacHandlerConfig handlerConfig:daemonHandlerConfig){
+//            String className = handlerConfig.getClassName();
+//            try {
+//                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
+//                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
+//                threadedHandler.initProperties(handlerConfig.getProperties());
+//                daemonHandlers.add(threadedHandler);
+//            }catch (ClassNotFoundException e){
+//                log.error("Error initializing the handler: " + className);
+//                log.error(className + " class has to implement " + ThreadedHandler.class);
+//            } catch (InstantiationException e) {
+//                log.error("Error initializing the handler: " + className);
+//                log.error(className + " class has to implement " + ThreadedHandler.class);
+//            } catch (IllegalAccessException e) {
+//                log.error("Error initializing the handler: " + className);
+//                log.error(className + " class has to implement " + ThreadedHandler.class);
+//            } catch (GFacHandlerException e) {
+//                log.error("Error initializing the handler " + className);
+//            } catch (GFacException e) {
+//                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//            }
+//        }
+//        for(ThreadedHandler tHandler:daemonHandlers){
+//            (new Thread(tHandler)).start();
+//        }
+//    }
+//
+//    /**
+//     * This can be used to submit jobs for testing purposes just by filling parameters by hand (JobExecutionContext)
+//     */
+//    public GFacImpl() {
+//        daemonHandlers = new ArrayList<ThreadedHandler>();
+//        startDaemonHandlers();
+//    }
+//
+//    /**
+//     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
+//     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
+//     *
+//     * @param experimentID
+//     * @return
+//     * @throws GFacException
+//     */
+//    public boolean submitJob(String experimentID,String taskID, String gatewayID) throws GFacException {
+//        JobExecutionContext jobExecutionContext = null;
+//        try {
+//            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
+//            return submitJob(jobExecutionContext);
+//        } catch (Exception e) {
+//            log.error("Error inovoking the job with experiment ID: " + experimentID);
+//            throw new GFacException(e);
+//        }
+//    }
+//
+//    private JobExecutionContext createJEC(String experimentID, String taskID, String gatewayID) throws Exception {
+//        JobExecutionContext jobExecutionContext;
+//        TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID);
+//
+//        // this is wear our new model and old model is mapping (so serviceName in ExperimentData and service name in ServiceDescriptor
+//        // has to be same.
+//
+//        // 1. Get the Task from the task ID and construct the Job object and save it in to registry
+//        // 2. Add another property to jobExecutionContext and read them inside the provider and use it.
+//        String serviceName = taskData.getApplicationId();
+//        if (serviceName == null) {
+//            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
+//        }
+//
+//        ServiceDescription serviceDescription = airavataRegistry2.getServiceDescriptor(serviceName);
+//        if (serviceDescription == null ) {
+//            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
+//        }
+//        String hostName;
+//        HostDescription hostDescription = null;
+//        if(taskData.getTaskScheduling().getResourceHostId() != null){
+//            hostName = taskData.getTaskScheduling().getResourceHostId();
+//            hostDescription = airavataRegistry2.getHostDescriptor(hostName);
+//        }else{
+//        	  List<HostDescription> registeredHosts = new ArrayList<HostDescription>();
+//              Map<String, ApplicationDescription> applicationDescriptors = airavataRegistry2.getApplicationDescriptors(serviceName);
+//              for (String hostDescName : applicationDescriptors.keySet()) {
+//                  registeredHosts.add(airavataRegistry2.getHostDescriptor(hostDescName));
+//              }
+//              Class<? extends HostScheduler> aClass = Class.forName(ServerSettings.getHostScheduler()).asSubclass(HostScheduler.class);
+//             HostScheduler hostScheduler = aClass.newInstance();
+//             //TODO cleanup
+//            hostDescription = registeredHosts.get(0);//hostScheduler.schedule(registeredHosts);
+//        	hostName = hostDescription.getType().getHostName();
+//        }
+//        if(hostDescription == null){
+//        	throw new GFacException("Error executing the job as the host is not registered " + hostName);
+//        }
+//        ApplicationDescription applicationDescription = airavataRegistry2.getApplicationDescriptors(serviceName, hostName);
+//        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+//        Properties configurationProperties = ServerSettings.getProperties();
+//        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), airavataAPI, configurationProperties);
+//
+//
+//        // start constructing jobexecutioncontext
+//        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serviceName);
+//
+//        // setting experiment/task/workflownode related information
+//        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
+//        jobExecutionContext.setExperiment(experiment);
+//        jobExecutionContext.setExperimentID(experimentID);
+//        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
+//        jobExecutionContext.setTaskData(taskData);
+//
+//        // setting the registry
+//        jobExecutionContext.setRegistry(registry);
+//
+//        ApplicationContext applicationContext = new ApplicationContext();
+//        applicationContext.setApplicationDeploymentDescription(applicationDescription);
+//        applicationContext.setHostDescription(hostDescription);
+//        applicationContext.setServiceDescription(serviceDescription);
+//        jobExecutionContext.setApplicationContext(applicationContext);
+//
+//        List<DataObjectType> experimentInputs = taskData.getApplicationInputs();
+//        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInMessageContext(experimentInputs,
+//                serviceDescription.getType().getInputParametersArray())));
+//
+//        List<DataObjectType> outputData = taskData.getApplicationOutputs();
+//        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getInMessageContext(outputData,
+//                serviceDescription.getType().getOutputParametersArray())));
+//
+//        jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
+//        jobExecutionContext.setGfac(this);
+//        return jobExecutionContext;
+//    }
+//
+//    private boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException {
+//        // We need to check whether this job is submitted as a part of a large workflow. If yes,
+//        // we need to setup workflow tracking listerner.
+//        String workflowInstanceID = null;
+//        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
+//            // This mean we need to register workflow tracking listener.
+//            //todo implement WorkflowTrackingListener properly
+//            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
+//        }
+//        // Register log event listener. This is required in all scenarios.
+//        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
+//        schedule(jobExecutionContext);
+//        return true;
+//    }
+//
+//
+//    public boolean cancel(String experimentID, String taskID, String gatewayID) throws GFacException {
+//        JobExecutionContext jobExecutionContext = null;
+//        try {
+//            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
+//            return cancel(jobExecutionContext);
+//        } catch (Exception e) {
+//            log.error("Error inovoking the job with experiment ID: " + experimentID);
+//            throw new GFacException(e);
+//        }
+//    }
+//
+//    private boolean cancel(JobExecutionContext jobExecutionContext) throws GFacException {
+//        // We need to check whether this job is submitted as a part of a large workflow. If yes,
+//        // we need to setup workflow tracking listerner.
+//        String workflowInstanceID = null;
+//        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
+//            // This mean we need to register workflow tracking listener.
+//            //todo implement WorkflowTrackingListener properly
+//            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
+//        }
+//        // Register log event listener. This is required in all scenarios.
+//        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
+//        try {
+//            Scheduler.schedule(jobExecutionContext);
+//            GFacProvider provider = jobExecutionContext.getProvider();
+//            if (provider != null) {
+//                initProvider(provider, jobExecutionContext);
+//                cancelProvider(provider, jobExecutionContext);
+//                disposeProvider(provider, jobExecutionContext);
+//            }
+//        }catch (Exception e) {
+//            try {
+//                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
+//                        new JobIdentity(jobExecutionContext.getExperimentID(),
+//                                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+//                                jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
+//            } catch (NullPointerException e1) {
+//                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
+//                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
+//                // Updating status if job id is not set
+////				monitorPublisher
+////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
+//                // Updating the task status if there's any task associated
+//                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
+//                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
+//
+//            }
+//            jobExecutionContext.setProperty(ERROR_SENT, "true");
+//            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
+//            throw new GFacException(e.getMessage(), e);
+//        }
+//        return true;
+//    }
+//
+//    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
+//        // Scheduler will decide the execution flow of handlers and provider which handles
+//        // the job.
+//        String experimentID = jobExecutionContext.getExperimentID();
+//        try {
+//            Scheduler.schedule(jobExecutionContext);
+//
+//            // Executing in handlers in the order as they have configured in GFac configuration
+//            invokeInFlowHandlers(jobExecutionContext);
+////            if (experimentID != null){
+////                registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
+////            }
+////        }catch (ClassNotFoundException e) {
+////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
+////        } catch (InstantiationException e) {
+////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
+////        } catch (IllegalAccessException e) {
+////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
+////        } catch (ApplicationSettingsException e){
+////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
+////        }
+////    }
+////    private void startDaemonHandlers()  {
+////        List<GFacHandlerConfig> daemonHandlerConfig = null;
+////        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+////        gfacConfigFile = new File(resource.getPath());
+////        try {
+////            daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
+////        } catch (ParserConfigurationException e) {
+////            log.error("Error parsing gfac-config.xml, double check the xml configuration",e);
+////        } catch (IOException e) {
+////            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
+////        } catch (SAXException e) {
+////            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
+////        } catch (XPathExpressionException e) {
+////            log.error("Error parsing gfac-config.xml, double check the xml configuration", e);
+////        }
+////
+////        for(GFacHandlerConfig handlerConfig:daemonHandlerConfig){
+////            String className = handlerConfig.getClassName();
+////            try {
+////                Class<?> aClass = Class.forName(className).asSubclass(ThreadedHandler.class);
+////                ThreadedHandler threadedHandler = (ThreadedHandler) aClass.newInstance();
+////                threadedHandler.initProperties(handlerConfig.getProperties());
+////                daemonHandlers.add(threadedHandler);
+////            }catch (ClassNotFoundException e){
+////                log.error("Error initializing the handler: " + className);
+////                log.error(className + " class has to implement " + ThreadedHandler.class);
+////            } catch (InstantiationException e) {
+////                log.error("Error initializing the handler: " + className);
+////                log.error(className + " class has to implement " + ThreadedHandler.class);
+////            } catch (IllegalAccessException e) {
+////                log.error("Error initializing the handler: " + className);
+////                log.error(className + " class has to implement " + ThreadedHandler.class);
+////            } catch (GFacHandlerException e) {
+////                log.error("Error initializing the handler " + className);
+////            } catch (GFacException e) {
+////                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+////            }
+////        }
+////        for(ThreadedHandler tHandler:daemonHandlers){
+////            (new Thread(tHandler)).start();
+////        }
+////    }
+////
+////    /**
+////     * This can be used to submit jobs for testing purposes just by filling parameters by hand (JobExecutionContext)
+////     */
+////    public GFacImpl() {
+////        daemonHandlers = new ArrayList<ThreadedHandler>();
+////        startDaemonHandlers();
+////    }
+////
+////    /**
+////     * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers
+////     * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry
+////     *
+////     * @param experimentID
+////     * @return
+////     * @throws GFacException
+////     */
+////    public boolean submitJob(String experimentID,String taskID, String gatewayID) throws GFacException {
+////        JobExecutionContext jobExecutionContext = null;
+////        try {
+////            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
+////            return submitJob(jobExecutionContext);
+////        } catch (Exception e) {
+////            log.error("Error inovoking the job with experiment ID: " + experimentID);
+////            throw new GFacException(e);
+////        }
+////    }
+////
+////    private JobExecutionContext createJEC(String experimentID, String taskID, String gatewayID) throws Exception {
+////        JobExecutionContext jobExecutionContext;
+////        TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID);
+////
+////        // this is wear our new model and old model is mapping (so serviceName in ExperimentData and service name in ServiceDescriptor
+////        // has to be same.
+////
+////        // 1. Get the Task from the task ID and construct the Job object and save it in to registry
+////        // 2. Add another property to jobExecutionContext and read them inside the provider and use it.
+////        String serviceName = taskData.getApplicationId();
+////        if (serviceName == null) {
+////            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
+////        }
+////
+////        ServiceDescription serviceDescription = airavataRegistry2.getServiceDescriptor(serviceName);
+////        if (serviceDescription == null ) {
+////            throw new GFacException("Error executing the job because there is not Application Name in this Experiment:  " + serviceName );
+////        }
+////        String hostName;
+////        HostDescription hostDescription = null;
+////        if(taskData.getTaskScheduling().getResourceHostId() != null){
+////            hostName = taskData.getTaskScheduling().getResourceHostId();
+////            hostDescription = airavataRegistry2.getHostDescriptor(hostName);
+////        }else{
+////        	  List<HostDescription> registeredHosts = new ArrayList<HostDescription>();
+////              Map<String, ApplicationDescription> applicationDescriptors = airavataRegistry2.getApplicationDescriptors(serviceName);
+////              for (String hostDescName : applicationDescriptors.keySet()) {
+////                  registeredHosts.add(airavataRegistry2.getHostDescriptor(hostDescName));
+////              }
+////              Class<? extends HostScheduler> aClass = Class.forName(ServerSettings.getHostScheduler()).asSubclass(HostScheduler.class);
+////             HostScheduler hostScheduler = aClass.newInstance();
+////             //TODO cleanup
+////            hostDescription = registeredHosts.get(0);//hostScheduler.schedule(registeredHosts);
+////        	hostName = hostDescription.getType().getHostName();
+////        }
+////        if(hostDescription == null){
+////        	throw new GFacException("Error executing the job as the host is not registered " + hostName);
+////        }
+////        ApplicationDescription applicationDescription = airavataRegistry2.getApplicationDescriptors(serviceName, hostName);
+////        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+////        Properties configurationProperties = ServerSettings.getProperties();
+////        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), airavataAPI, configurationProperties);
+////
+////
+////        // start constructing jobexecutioncontext
+////        jobExecutionContext = new JobExecutionContext(gFacConfiguration, serviceName);
+////
+////        // setting experiment/task/workflownode related information
+////        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
+////        jobExecutionContext.setExperiment(experiment);
+////        jobExecutionContext.setExperimentID(experimentID);
+////        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
+////        jobExecutionContext.setTaskData(taskData);
+////
+////        // setting the registry
+////        jobExecutionContext.setRegistry(registry);
+////
+////        ApplicationContext applicationContext = new ApplicationContext();
+////        applicationContext.setApplicationDeploymentDescription(applicationDescription);
+////        applicationContext.setHostDescription(hostDescription);
+////        applicationContext.setServiceDescription(serviceDescription);
+////        jobExecutionContext.setApplicationContext(applicationContext);
+////
+////        List<DataObjectType> experimentInputs = taskData.getApplicationInputs();
+////        jobExecutionContext.setInMessageContext(new MessageContext(GFacUtils.getInMessageContext(experimentInputs,
+////                serviceDescription.getType().getInputParametersArray())));
+////
+////        List<DataObjectType> outputData = taskData.getApplicationOutputs();
+////        jobExecutionContext.setOutMessageContext(new MessageContext(GFacUtils.getInMessageContext(outputData,
+////                serviceDescription.getType().getOutputParametersArray())));
+////
+////        jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
+////        jobExecutionContext.setGfac(this);
+////        return jobExecutionContext;
+////    }
+////
+////    private boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException {
+////        // We need to check whether this job is submitted as a part of a large workflow. If yes,
+////        // we need to setup workflow tracking listerner.
+////        String workflowInstanceID = null;
+////        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
+////            // This mean we need to register workflow tracking listener.
+////            //todo implement WorkflowTrackingListener properly
+////            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
+////        }
+////        // Register log event listener. This is required in all scenarios.
+////        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
+////        schedule(jobExecutionContext);
+////        return true;
+////    }
+////
+////
+////    public boolean cancel(String experimentID, String taskID, String gatewayID) throws GFacException {
+////        JobExecutionContext jobExecutionContext = null;
+////        try {
+////            jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
+////            return cancel(jobExecutionContext);
+////        } catch (Exception e) {
+////            log.error("Error inovoking the job with experiment ID: " + experimentID);
+////            throw new GFacException(e);
+////        }
+////    }
+////
+////    private boolean cancel(JobExecutionContext jobExecutionContext) throws GFacException {
+////        // We need to check whether this job is submitted as a part of a large workflow. If yes,
+////        // we need to setup workflow tracking listerner.
+////        String workflowInstanceID = null;
+////        if ((workflowInstanceID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_INSTANCE_ID)) != null) {
+////            // This mean we need to register workflow tracking listener.
+////            //todo implement WorkflowTrackingListener properly
+////            registerWorkflowTrackingListener(workflowInstanceID, jobExecutionContext);
+////        }
+////        // Register log event listener. This is required in all scenarios.
+////        jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
+////        try {
+////            Scheduler.schedule(jobExecutionContext);
+////            GFacProvider provider = jobExecutionContext.getProvider();
+////            if (provider != null) {
+////                initProvider(provider, jobExecutionContext);
+////                cancelProvider(provider, jobExecutionContext);
+////                disposeProvider(provider, jobExecutionContext);
+////            }
+////        }catch (Exception e) {
+////            try {
+////                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
+////                        new JobIdentity(jobExecutionContext.getExperimentID(),
+////                                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+////                                jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
+////            } catch (NullPointerException e1) {
+////                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
+////                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
+////                // Updating status if job id is not set
+//////				monitorPublisher
+//////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
+////                // Updating the task status if there's any task associated
+////                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
+////                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
+////
+////            }
+////            jobExecutionContext.setProperty(ERROR_SENT, "true");
+////            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
+////            throw new GFacException(e.getMessage(), e);
+////        }
+////        return true;
+////    }
+////
+////    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
+////        // Scheduler will decide the execution flow of handlers and provider which handles
+////        // the job.
+////        String experimentID = jobExecutionContext.getExperimentID();
+////        try {
+////            Scheduler.schedule(jobExecutionContext);
+////
+////            // Executing in handlers in the order as they have configured in GFac configuration
+////            invokeInFlowHandlers(jobExecutionContext);
+//////            if (experimentID != null){
+//////                registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
+//////            }
+////
+////            // After executing the in handlers provider instance should be set to job execution context.
+////            // We get the provider instance and execute it.
+////            GFacProvider provider = jobExecutionContext.getProvider();
+////            if (provider != null) {
+////                initProvider(provider, jobExecutionContext);
+////                executeProvider(provider, jobExecutionContext);
+////                disposeProvider(provider, jobExecutionContext);
+////            }
+////            if (GFacUtils.isSynchronousMode(jobExecutionContext)) {
+////                invokeOutFlowHandlers(jobExecutionContext);
+////            }
+////        } catch (Exception e) {
+////            try {
+////                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
+////                        new JobIdentity(jobExecutionContext.getExperimentID(),
+////                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+////                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
+////            } catch (NullPointerException e1) {
+////                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
+////                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
+////                // Updating status if job id is not set
+//////				monitorPublisher
+//////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
+////				// Updating the task status if there's any task associated
+////				monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
+////						.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
+////
+////            }
+////            jobExecutionContext.setProperty(ERROR_SENT, "true");
+////            jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
+////            throw new GFacException(e.getMessage(), e);
+////        }
+////    }
+////
+////    private void initProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
+////        try {
+////            provider.initialize(jobExecutionContext);
+////        } catch (Exception e) {
+////            throw new GFacException("Error while initializing provider " + provider.getClass().getName() + ".", e);
+////        }
+////    }
+////
+////    private void executeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
+////        try {
+////             provider.execute(jobExecutionContext);
+////        } catch (Exception e) {
+////            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
+////        }
+////    }
+////    private void cancelProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
+////        try {
+////            provider.cancelJob(jobExecutionContext);
+////        } catch (Exception e) {
+////            throw new GFacException("Error while executing provider " + provider.getClass().getName() + " functionality.", e);
+////        }
+////    }
+////
+////    private void disposeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext) throws GFacException {
+////        try {
+////            provider.dispose(jobExecutionContext);
+////        } catch (Exception e) {
+////            throw new GFacException("Error while invoking provider " + provider.getClass().getName() + " dispose method.", e);
+////        }
+////    }
+////
+////    private void registerWorkflowTrackingListener(String workflowInstanceID, JobExecutionContext jobExecutionContext) {
+////        String workflowNodeID = (String) jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_NODE_ID);
+////        String topic = (String) jobExecutionContext.getProperty(Constants.PROP_TOPIC);
+////        String brokerUrl = (String) jobExecutionContext.getProperty(Constants.PROP_BROKER_URL);
+////        jobExecutionContext.getNotificationService().registerListener(
+////                new WorkflowTrackingListener(workflowInstanceID, workflowNodeID, brokerUrl, topic));
+////
+////    }
+////
+////    private void invokeInFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
+////        List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getInHandlers();
+////        for (GFacHandlerConfig handlerClassName : handlers) {
+////            Class<? extends GFacHandler> handlerClass;
+////            GFacHandler handler;
+////            try {
+////                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
+////                handler = handlerClass.newInstance();
+////                handler.initProperties(handlerClassName.getProperties());
+////            } catch (ClassNotFoundException e) {
+////                throw new GFacException("Cannot load handler class " + handlerClassName, e);
+////            } catch (InstantiationException e) {
+////                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+////            } catch (IllegalAccessException e) {
+////                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+////            }
+////            try {
+////                handler.invoke(jobExecutionContext);
+////            } catch (GFacHandlerException e) {
+////                throw new GFacException("Error Executing a InFlow Handler", e.getCause());
+////            }
+////        }
+////    }
+////
+////    public void reInvokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
+////        this.invokeOutFlowHandlers(jobExecutionContext);
+////    }
+////
+////    public void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
+////        GFacConfiguration gFacConfiguration = jobExecutionContext.getGFacConfiguration();
+////        List<GFacHandlerConfig> handlers = null;
+////        if(gFacConfiguration != null){
+////         handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
+////        }else {
+////            try {
+////                jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
+////                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+////            } catch (Exception e) {
+////                log.error("Error constructing job execution context during outhandler invocation");
+////                throw new GFacException(e);
+////            }
+////            schedule(jobExecutionContext);
+////        }
+////        for (GFacHandlerConfig handlerClassName : handlers) {
+////            Class<? extends GFacHandler> handlerClass;
+////            GFacHandler handler;
+////            try {
+////                handlerClass = Class.forName(handlerClassName.getClassName().trim()).asSubclass(GFacHandler.class);
+////                handler = handlerClass.newInstance();
+////                handler.initProperties(handlerClassName.getProperties());
+////            } catch (ClassNotFoundException e) {
+////                log.error(e.getMessage());
+////                throw new GFacException("Cannot load handler class " + handlerClassName, e);
+////            } catch (InstantiationException e) {
+////                log.error(e.getMessage());
+////                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+////            } catch (IllegalAccessException e) {
+////                log.error(e.getMessage());
+////                throw new GFacException("Cannot instantiate handler class " + handlerClassName, e);
+////            }
+////            try {
+////                handler.invoke(jobExecutionContext);
+////            } catch (Exception e) {
+////                // TODO: Better error reporting.
+////                throw new GFacException("Error Executing a OutFlow Handler", e);
+////            }
+////        }
+////
+////        monitorPublisher.publish(GfacExperimentState.COMPLETED);
+////        // At this point all the execution is finished so we update the task and experiment statuses.
+////        // Handler authors does not have to worry about updating experiment or task statuses.
+//////        monitorPublisher.publish(new
+//////                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
+//////                ExperimentState.COMPLETED));
+////        // Updating the task status if there's any task associated
+////        monitorPublisher.publish(new TaskStatusChangeRequest(
+////                new TaskIdentity(jobExecutionContext.getExperimentID(),
+////                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+////                        jobExecutionContext.getTaskData().getTaskID()), TaskState.COMPLETED
+////        ));
+////    }
+////
+////
+////    public AiravataAPI getAiravataAPI() {
+////        return airavataAPI;
+////    }
+////
+////    public AiravataRegistry2 getAiravataRegistry2() {
+////        return airavataRegistry2;
+////    }
+////
+////    public static List<ThreadedHandler> getDaemonHandlers() {
+////        return daemonHandlers;
+////    }
+////
+////    public static String getErrorSent() {
+////        return ERROR_SENT;
+////    }
+////
+////    public File getGfacConfigFile() {
+////        return gfacConfigFile;
+////    }
+////
+////    public static MonitorPublisher getMonitorPublisher() {
+////        return monitorPublisher;
+////    }
+////
+////    public Registry getRegistry() {
+////        return registry;
+////    }
+////}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
index b0383c0..f4f5d7c 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
@@ -22,7 +22,7 @@ package org.apache.airavata.gfac.core.handler;
 
 import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.registry.cpi.RegistryException;
@@ -33,7 +33,7 @@ public abstract class AbstractHandler implements GFacHandler {
     protected MonitorPublisher publisher = null;
 
     protected AbstractHandler() {
-        publisher = GFacImpl.getMonitorPublisher();   // This will not be null because this will be initialize in GFacIml
+        publisher = BetterGfacImpl.getMonitorPublisher();   // This will not be null because this will be initialize in GFacIml
     }
 
     public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java
index 423b5d9..0a72826 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractRecoverableHandler.java
@@ -22,7 +22,7 @@ package org.apache.airavata.gfac.core.handler;
 
 import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
@@ -38,7 +38,7 @@ public abstract class AbstractRecoverableHandler implements GFacRecoverableHandl
     protected MonitorPublisher publisher = null;
 
     protected AbstractRecoverableHandler() {
-        publisher = GFacImpl.getMonitorPublisher();   // This will not be null because this will be initialize in GFacIml
+        publisher = BetterGfacImpl.getMonitorPublisher();   // This will not be null because this will be initialize in GFacIml
     }
 
     public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
index 74b8d89..7bb8cd2 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AppDescriptorCheckHandler.java
@@ -20,17 +20,12 @@
 */
 package org.apache.airavata.gfac.core.handler;
 
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.states.GfacPluginState;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
index 5dbb9d3..3282b5a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractProvider.java
@@ -25,7 +25,6 @@ import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobStatus;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
@@ -45,7 +44,7 @@ public abstract class AbstractProvider implements GFacProvider{
     protected MonitorPublisher monitorPublisher;
 
     protected AbstractProvider() {                                            //todo this has to be fixed
-        this.monitorPublisher = GFacImpl.getMonitorPublisher();
+        this.monitorPublisher = BetterGfacImpl.getMonitorPublisher();
         if(this.monitorPublisher == null){
             this.monitorPublisher = BetterGfacImpl.getMonitorPublisher();
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java
index daed08e..c6a105e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/AbstractRecoverableProvider.java
@@ -24,7 +24,6 @@ import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobStatus;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
@@ -44,7 +43,7 @@ public abstract class AbstractRecoverableProvider implements GFacRecoverableProv
     protected MonitorPublisher monitorPublisher;
 
     protected AbstractRecoverableProvider() {                                            //todo this has to be fixed
-        this.monitorPublisher = GFacImpl.getMonitorPublisher();
+        this.monitorPublisher = BetterGfacImpl.getMonitorPublisher();
         if (this.monitorPublisher == null) {
             this.monitorPublisher = BetterGfacImpl.getMonitorPublisher();
         }


[6/9] retiring previous registry API - AIRAVATA-1234

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowSamplesCaseIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowSamplesCaseIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowSamplesCaseIT.java
index 963f46d..98f3fb3 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowSamplesCaseIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowSamplesCaseIT.java
@@ -22,18 +22,7 @@
 package org.apache.airavata.integration;
 
 import junit.framework.Assert;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.ExperimentAdvanceOptions;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.api.exception.WorkflowAlreadyExistsException;
 import org.apache.airavata.common.utils.StringUtil;
-import org.apache.airavata.registry.api.PasswordCallback;
-import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
-import org.apache.airavata.registry.api.workflow.ExperimentData;
-import org.apache.airavata.registry.api.workflow.InputData;
-import org.apache.airavata.registry.api.workflow.NodeExecutionData;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode;
 import org.apache.airavata.workflow.model.component.ComponentException;
 import org.apache.airavata.workflow.model.graph.GraphException;
 import org.apache.airavata.workflow.model.wf.Workflow;
@@ -41,11 +30,8 @@ import org.apache.airavata.workflow.model.wf.WorkflowInput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
 
 import java.io.IOException;
-import java.net.URI;
-import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -59,10 +45,10 @@ public class WorkflowSamplesCaseIT extends WorkflowIntegrationTestBase {
 //        setUpEnvironment();
     }
 
-    @BeforeTest
-    public void setUp() throws Exception {
-        this.airavataAPI = getAiravataAPI();
-    }
+//    @BeforeTest
+//    public void setUp() throws Exception {
+//        this.airavataAPI = getAiravataAPI();
+//    }
 
 //    @Test(groups = {"workflowSamplesGroup"}/*, dependsOnGroups = { "forEachGroup" }*/)
 //    public void testWorkflowSamples() throws Exception {
@@ -75,70 +61,70 @@ public class WorkflowSamplesCaseIT extends WorkflowIntegrationTestBase {
 //		executeExperiment("target/samples/workflows/ComplexForEach.xwf", Arrays.asList("1,2","3,4","5,6","7,8","9,10","11,12","13,14","15,16"), Arrays.asList("2027025","10321920"));
 //    }
 
-    private void executeExperiment(String workflowFilePath,
-                                   List<String> inputs, Object outputs) throws GraphException,
-            ComponentException, IOException, WorkflowAlreadyExistsException,
-            AiravataAPIInvocationException, Exception {
-        log("Saving workflow ...");
-
-        Workflow workflow = new Workflow(getWorkflowComposeContent(workflowFilePath));
-        if (!airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName())) {
-            airavataAPI.getWorkflowManager().addWorkflow(workflow);
-        }
-        Assert.assertTrue(airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName()));
-
-        log("Workflow setting up completed ...");
-
-        runWorkFlow(workflow, inputs, outputs);
-    }
-
-    protected void runWorkFlow(Workflow workflow, List<String> inputValues, Object outputValue) throws Exception {
-        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
-        String workflowName = workflow.getName();
-        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
-                workflowName, getUserName(), null);
-
-        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options);
-
-        Assert.assertNotNull(experimentId);
-
-        log.info("Run workflow completed ....");
-
-        airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);
-        verifyOutput(experimentId, outputValue);
-    }
-
-    protected void verifyOutput(String experimentId, Object outputVerifyingString) throws Exception {
-        log.info("Experiment ID Returned : " + experimentId);
-
-        ExperimentData experimentData = airavataAPI.getProvenanceManager().getExperimentData(experimentId);
-
-        log.info("Verifying output ...");
-
-        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
-
-        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
-
-        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
-            List<NodeExecutionData> nodeDataList = data.getNodeDataList(WorkflowNode.OUTPUTNODE);
-            Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
-            for (NodeExecutionData nodeData : nodeDataList) {
-                for (InputData inputData : nodeData.getInputData()) {
-                    if (outputVerifyingString instanceof List) {
-                        @SuppressWarnings("unchecked")
-                        List<String> outputs = (List<String>) outputVerifyingString;
-                        String[] outputValues = StringUtil.getElementsFromString(inputData.getValue());
-                        Assert.assertEquals(outputs.size(), outputValues.length);
-                        for (int i = 0; i < outputValues.length; i++) {
-                            Assert.assertEquals(outputs.get(i), outputValues[i]);
-                        }
-                    } else {
-                        Assert.assertEquals(outputVerifyingString.toString(), inputData.getValue());
-                    }
-
-                }
-            }
-        }
-    }
+//    private void executeExperiment(String workflowFilePath,
+//                                   List<String> inputs, Object outputs) throws GraphException,
+//            ComponentException, IOException, WorkflowAlreadyExistsException,
+//            AiravataAPIInvocationException, Exception {
+//        log("Saving workflow ...");
+//
+//        Workflow workflow = new Workflow(getWorkflowComposeContent(workflowFilePath));
+//        if (!airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName())) {
+//            airavataAPI.getWorkflowManager().addWorkflow(workflow);
+//        }
+//        Assert.assertTrue(airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName()));
+//
+//        log("Workflow setting up completed ...");
+//
+//        runWorkFlow(workflow, inputs, outputs);
+//    }
+//
+//    protected void runWorkFlow(Workflow workflow, List<String> inputValues, Object outputValue) throws Exception {
+//        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
+//        String workflowName = workflow.getName();
+//        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
+//                workflowName, getUserName(), null);
+//
+//        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options);
+//
+//        Assert.assertNotNull(experimentId);
+//
+//        log.info("Run workflow completed ....");
+//
+//        airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);
+//        verifyOutput(experimentId, outputValue);
+//    }
+//
+//    protected void verifyOutput(String experimentId, Object outputVerifyingString) throws Exception {
+//        log.info("Experiment ID Returned : " + experimentId);
+//
+//        ExperimentData experimentData = airavataAPI.getProvenanceManager().getExperimentData(experimentId);
+//
+//        log.info("Verifying output ...");
+//
+//        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
+//
+//        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
+//
+//        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
+//            List<NodeExecutionData> nodeDataList = data.getNodeDataList(WorkflowNode.OUTPUTNODE);
+//            Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
+//            for (NodeExecutionData nodeData : nodeDataList) {
+//                for (InputData inputData : nodeData.getInputData()) {
+//                    if (outputVerifyingString instanceof List) {
+//                        @SuppressWarnings("unchecked")
+//                        List<String> outputs = (List<String>) outputVerifyingString;
+//                        String[] outputValues = StringUtil.getElementsFromString(inputData.getValue());
+//                        Assert.assertEquals(outputs.size(), outputValues.length);
+//                        for (int i = 0; i < outputValues.length; i++) {
+//                            Assert.assertEquals(outputs.get(i), outputValues[i]);
+//                        }
+//                    } else {
+//                        Assert.assertEquals(outputVerifyingString.toString(), inputData.getValue());
+//                    }
+//
+//                }
+//            }
+//        }
+//    }
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 58ea326..1f5160f 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -21,23 +21,11 @@
 
 package org.apache.airavata.orchestrator.server;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
 import org.airavata.appcatalog.cpi.AppCatalog;
 import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.airavata.appcatalog.cpi.ComputeResource;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.aiaravata.application.catalog.data.resources.AbstractResource;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.Constants;
@@ -51,8 +39,8 @@ import org.apache.airavata.model.error.LaunchValidationException;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
 import org.apache.airavata.orchestrator.cpi.OrchestratorService;
-import org.apache.airavata.orchestrator.cpi.orchestrator_cpi_serviceConstants;
 import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
+import org.apache.airavata.orchestrator.cpi.orchestrator_cpi_serviceConstants;
 import org.apache.airavata.orchestrator.util.OrchestratorRecoveryHandler;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
 import org.apache.airavata.registry.cpi.Registry;
@@ -61,16 +49,15 @@ import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.TaskDetailConstants;
 import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.WorkflowNodeConstants;
 import org.apache.thrift.TException;
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.WatchedEvent;
-import org.apache.zookeeper.Watcher;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.*;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
 public class OrchestratorServerHandler implements OrchestratorService.Iface,
 		Watcher {
 	private static Logger log = LoggerFactory
@@ -84,7 +71,6 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
 
 	private static Integer mutex = new Integer(-1);
 
-	private AiravataAPI airavataAPI;
 	private String airavataUserName;
 	private String gatewayName;
 
@@ -397,18 +383,6 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
 		this.gatewayName = gatewayName;
 	}
 
-	private AiravataAPI getAiravataAPI() {
-		if (airavataAPI == null) {
-			try {
-				airavataAPI = AiravataAPIFactory.getAPI(getGatewayName(),
-						getAiravataUserName());
-			} catch (AiravataAPIInvocationException e) {
-				log.error("Unable to create Airavata API", e);
-			}
-		}
-		return airavataAPI;
-	}
-
 	@Override
 	public boolean launchTask(String taskId, String airavataCredStoreToken) throws TException {
 		try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
index 26eab03..72d912b 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
@@ -21,15 +21,18 @@
 
 package org.apache.airavata.orchestrator.client;
 
+import org.apache.airavata.api.Airavata;
+import org.apache.airavata.api.client.AiravataClientFactory;
 import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.client.tools.DocumentCreator;
+import org.apache.airavata.client.tools.DocumentCreatorNew;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.airavata.orchestrator.client.util.Initialize;
 import org.apache.airavata.orchestrator.cpi.OrchestratorService;
 import org.apache.airavata.orchestrator.server.OrchestratorServer;
@@ -39,7 +42,7 @@ import org.apache.zookeeper.server.ServerCnxnFactory;
 import org.junit.Test;
 
 public class OrchestratorClientFactoryTest {
-    private DocumentCreator documentCreator;
+    private DocumentCreatorNew documentCreator;
     private OrchestratorService.Client orchestratorClient;
     private Registry registry;
     private int NUM_CONCURRENT_REQUESTS = 1;
@@ -59,13 +62,12 @@ public class OrchestratorClientFactoryTest {
             service = (new OrchestratorServer());
             service.start();
             registry = RegistryFactory.getDefaultRegistry();
+            documentCreator = new DocumentCreatorNew(getAiravataClient());
+            documentCreator.createLocalHostDocs();
         } catch (Exception e) {
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
         }
         AiravataUtils.setExecutionAsServer();
-        documentCreator = new DocumentCreator(getAiravataAPI());
-        documentCreator.createLocalHostDocs();
-
         try {
             service.stop();
         } catch (Exception e) {
@@ -74,18 +76,14 @@ public class OrchestratorClientFactoryTest {
 
     }
 
-    private AiravataAPI getAiravataAPI() {
-        AiravataAPI airavataAPI = null;
+    private Airavata.Client getAiravataClient() {
+        Airavata.Client client = null;
             try {
-                String systemUserName = ServerSettings.getDefaultUser();
-                String gateway = ServerSettings.getDefaultUserGateway();
-                airavataAPI = AiravataAPIFactory.getAPI(gateway, systemUserName);
-            } catch (ApplicationSettingsException e) {
-                e.printStackTrace();
-            } catch (AiravataAPIInvocationException e) {
+                client = AiravataClientFactory.createAiravataClient("localhost", 8930);
+            } catch (AiravataClientConnectException e) {
                 e.printStackTrace();
             }
-        return airavataAPI;
+        return client;
     }
 
     private void storeDescriptors() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
index 8301ac7..6f61543 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
@@ -23,9 +23,8 @@ package org.apache.airavata.orchestrator.client.util;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-import org.apache.airavata.registry.api.util.RegistrySettings;
 import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.utils.RegistrySettings;
 import org.apache.derby.drda.NetworkServerControl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -101,7 +100,7 @@ public class Initialize {
             jdbcUser = RegistrySettings.getSetting("registry.jdbc.user");
             jdbcPassword = RegistrySettings.getSetting("registry.jdbc.password");
             jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (RegistrySettingsException e) {
+        } catch (RegistryException e) {
             logger.error("Unable to read properties" , e);
         }
 
@@ -157,8 +156,6 @@ public class Initialize {
             resource.setWorker(workerResource);
             resource.save();
 
-        } catch (RegistrySettingsException e) {
-            logger.error("Unable to read properties", e);
         } catch (RegistryException e) {
             logger.error("Error while saving data to registry", e);
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/pom.xml b/modules/orchestrator/orchestrator-core/pom.xml
index 9b17aad..61a7efc 100644
--- a/modules/orchestrator/orchestrator-core/pom.xml
+++ b/modules/orchestrator/orchestrator-core/pom.xml
@@ -31,11 +31,6 @@ the License. -->
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-registry-cpi</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -61,6 +56,11 @@ the License. -->
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-service</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java
index b0cbe07..07b5beb 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java
@@ -20,8 +20,6 @@
 */
 package org.apache.airavata.orchestrator.core;
 
-import org.apache.airavata.client.api.AiravataAPI;
-
 import java.net.URL;
 import java.util.List;
 
@@ -41,8 +39,6 @@ public class OrchestratorConfiguration {
 
     private boolean startSubmitter = false;
 
-    private AiravataAPI airavataAPI;
-
     private URL brokerURL;
 
     private boolean embeddedMode;
@@ -108,14 +104,6 @@ public class OrchestratorConfiguration {
         this.startSubmitter = startSubmitter;
     }
 
-    public AiravataAPI getAiravataAPI() {
-        return airavataAPI;
-    }
-
-    public void setAiravataAPI(AiravataAPI airavataAPI) {
-        this.airavataAPI = airavataAPI;
-    }
-
     public String getHangedJobSubmitterClass() {
         return hangedJobSubmitterClass;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
index be3acda..605b0a2 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
@@ -25,7 +25,6 @@ import java.util.List;
 
 import org.apache.airavata.orchestrator.core.OrchestratorConfiguration;
 import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
-import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.zookeeper.ZooKeeper;
 
@@ -37,8 +36,6 @@ public class OrchestratorContext {
 
     private OrchestratorConfiguration orchestratorConfiguration;
 
-    private AiravataRegistry2 registry;
-
     private Registry newRegistry;
 
     private ZooKeeper zk;
@@ -66,14 +63,6 @@ public class OrchestratorContext {
         this.orchestratorConfiguration = orchestratorConfiguration;
     }
 
-    public AiravataRegistry2 getRegistry() {
-        return registry;
-    }
-
-    public void setRegistry(AiravataRegistry2 registry) {
-        this.registry = registry;
-    }
-
     public Registry getNewRegistry() {
         return newRegistry;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
index cde0135..9bbb0b6 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
@@ -21,10 +21,12 @@
 package org.apache.airavata.orchestrator.core.impl;
 
 
+import com.google.common.eventbus.EventBus;
 import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.cpi.GFac;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
 import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
@@ -47,7 +49,7 @@ public class GFACEmbeddedJobSubmitter implements JobSubmitter {
 
     public void initialize(OrchestratorContext orchestratorContext) throws OrchestratorException {
         this.orchestratorContext = orchestratorContext;
-        gfac = new GFacImpl(orchestratorContext.getNewRegistry(), null, orchestratorContext.getRegistry());
+        gfac = new BetterGfacImpl(orchestratorContext.getNewRegistry(), null, new MonitorPublisher(new EventBus()));
     }
 
     public GFACInstance selectGFACInstance() throws OrchestratorException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
index 6c9acec..a052d06 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
@@ -29,8 +29,6 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.core.cpi.GFac;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.gfac.cpi.GfacService;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
index 2a8b27b..8a2d574 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
@@ -34,8 +34,6 @@ import org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter;
 import org.apache.airavata.orchestrator.core.job.JobSubmitter;
 import org.apache.airavata.orchestrator.cpi.Orchestrator;
 import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
-import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.registry.api.exception.RegException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,16 +57,15 @@ public class OrchestratorUtils {
         return orchestratorConfiguration;
     }
 
-    public static HostDescription getHostDescription(Orchestrator orchestrator, TaskDetails taskDetails)throws OrchestratorException {
-        JobSubmitter jobSubmitter = ((SimpleOrchestratorImpl) orchestrator).getJobSubmitter();
-        AiravataRegistry2 registry = ((GFACEmbeddedJobSubmitter) jobSubmitter).getOrchestratorContext().getRegistry();
-        ComputationalResourceScheduling taskScheduling = taskDetails.getTaskScheduling();
-        String resourceHostId = taskScheduling.getResourceHostId();
-        try {
-            return registry.getHostDescriptor(resourceHostId);
-        } catch (RegException e) {
-            throw new OrchestratorException(e);
-        }
-    }
-
+//    public static HostDescription getHostDescription(Orchestrator orchestrator, TaskDetails taskDetails)throws OrchestratorException {
+//        JobSubmitter jobSubmitter = ((SimpleOrchestratorImpl) orchestrator).getJobSubmitter();
+//        AiravataRegistry2 registry = ((GFACEmbeddedJobSubmitter) jobSubmitter).getOrchestratorContext().getRegistry();
+//        ComputationalResourceScheduling taskScheduling = taskDetails.getTaskScheduling();
+//        String resourceHostId = taskScheduling.getResourceHostId();
+//        try {
+//            return registry.getHostDescriptor(resourceHostId);
+//        } catch (RegException e) {
+//            throw new OrchestratorException(e);
+//        }
+//    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
index b86ec3b..6ee8290 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
@@ -20,42 +20,22 @@
 */
 package org.apache.airavata.orchestrator.cpi.impl;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.common.exception.AiravataConfigurationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.orchestrator.core.OrchestratorConfiguration;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
-import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
-import org.apache.airavata.orchestrator.core.utils.OrchestratorConstants;
 import org.apache.airavata.orchestrator.core.utils.OrchestratorUtils;
 import org.apache.airavata.orchestrator.cpi.Orchestrator;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryImpl;
-import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.registry.api.AiravataRegistryFactory;
-import org.apache.airavata.registry.api.AiravataUser;
-import org.apache.airavata.registry.api.Gateway;
-import org.apache.airavata.registry.api.exception.RegException;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+
 public abstract class AbstractOrchestrator implements Orchestrator {
 	private final static Logger logger = LoggerFactory.getLogger(AbstractOrchestrator.class);
-	protected AiravataRegistry2 airavataRegistry;
-	protected AiravataAPI airavataAPI;
 	protected OrchestratorContext orchestratorContext;
 	protected OrchestratorConfiguration orchestratorConfiguration;
 
@@ -93,42 +73,34 @@ public abstract class AbstractOrchestrator implements Orchestrator {
         	orchestratorConfiguration = OrchestratorUtils.loadOrchestratorConfiguration();
             setGatewayProperties();
             /* initializing the Orchestratorcontext object */
-            airavataRegistry = AiravataRegistryFactory.getRegistry(new Gateway(getGatewayName()), new AiravataUser(getAiravataUserName()));
+//            airavataRegistry = AiravataRegistryFactory.getRegistry(new Gateway(getGatewayName()), new AiravataUser(getAiravataUserName()));
             // todo move this code to gfac service mode Jobsubmitter,
             // todo this is ugly, SHOULD fix these isEmbedded mode code from Orchestrator
-            if (!orchestratorConfiguration.isEmbeddedMode()) {
-                Map<String, Integer> gfacNodeList = airavataRegistry.getGFACNodeList();
-                if (gfacNodeList.size() == 0) {
-                    String error = "No GFAC instances available in the system, Can't initialize Orchestrator";
-                    logger.error(error);
-                    throw new OrchestratorException(error);
-                }
-                Set<String> uriList = gfacNodeList.keySet();
-                Iterator<String> iterator = uriList.iterator();
-                // todo consume these data to
-                List<GFACInstance> gfacInstanceList = new ArrayList<GFACInstance>();
-                while (iterator.hasNext()) {
-                    String uri = iterator.next();
-                    Integer integer = gfacNodeList.get(uri);
-                    gfacInstanceList.add(new GFACInstance(uri, integer));
-                }
-            }
+//            if (!orchestratorConfiguration.isEmbeddedMode()) {
+//                Map<String, Integer> gfacNodeList = airavataRegistry.getGFACNodeList();
+//                if (gfacNodeList.size() == 0) {
+//                    String error = "No GFAC instances available in the system, Can't initialize Orchestrator";
+//                    logger.error(error);
+//                    throw new OrchestratorException(error);
+//                }
+//                Set<String> uriList = gfacNodeList.keySet();
+//                Iterator<String> iterator = uriList.iterator();
+//                // todo consume these data to
+//                List<GFACInstance> gfacInstanceList = new ArrayList<GFACInstance>();
+//                while (iterator.hasNext()) {
+//                    String uri = iterator.next();
+//                    Integer integer = gfacNodeList.get(uri);
+//                    gfacInstanceList.add(new GFACInstance(uri, integer));
+//                }
+//            }
             orchestratorContext = new OrchestratorContext();
             orchestratorContext.setOrchestratorConfiguration(orchestratorConfiguration);
-            orchestratorConfiguration.setAiravataAPI(getAiravataAPI());
-            orchestratorContext.setRegistry(airavataRegistry);
+//            orchestratorConfiguration.setAiravataAPI(getAiravataAPI());
+//            orchestratorContext.setRegistry(airavataRegistry);
 
             /* initializing registry cpi */
             orchestratorContext.setNewRegistry(new RegistryImpl());
-        } catch (RegException e) {
-            logger.error("Failed to initializing Orchestrator");
-            OrchestratorException orchestratorException = new OrchestratorException(e);
-            throw orchestratorException;
-        } catch (AiravataConfigurationException e) {
-            logger.error("Failed to initializing Orchestrator");
-            OrchestratorException orchestratorException = new OrchestratorException(e);
-            throw orchestratorException;
-        } catch (IOException e) {
+        }  catch (IOException e) {
             logger.error("Failed to initializing Orchestrator - Error parsing configuration files");
             OrchestratorException orchestratorException = new OrchestratorException(e);
             throw orchestratorException;
@@ -152,20 +124,16 @@ public abstract class AbstractOrchestrator implements Orchestrator {
         }
     }
 
-   private AiravataAPI getAiravataAPI() {
-       if (airavataAPI == null) {
-           try {
-               airavataAPI = AiravataAPIFactory.getAPI(getGatewayName(), getAiravataUserName());
-           }  catch (AiravataAPIInvocationException e) {
-               logger.error("Unable to create Airavata API", e);
-           }
-       }
-       return airavataAPI;
-   }
-
-    public AiravataRegistry2 getAiravataRegistry() {
-        return airavataRegistry;
-    }
+//   private AiravataAPI getAiravataAPI() {
+//       if (airavataAPI == null) {
+//           try {
+//               airavataAPI = AiravataAPIFactory.getAPI(getGatewayName(), getAiravataUserName());
+//           }  catch (AiravataAPIInvocationException e) {
+//               logger.error("Unable to create Airavata API", e);
+//           }
+//       }
+//       return airavataAPI;
+//   }
 
     public OrchestratorContext getOrchestratorContext() {
         return orchestratorContext;

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index 0f43190..0a2b5a3 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -20,12 +20,6 @@
 */
 package org.apache.airavata.orchestrator.cpi.impl;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-
-import javax.naming.OperationNotSupportedException;
-
 import org.apache.airavata.model.error.LaunchValidationException;
 import org.apache.airavata.model.error.ValidationResults;
 import org.apache.airavata.model.error.ValidatorResult;
@@ -40,6 +34,10 @@ import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+
 public class SimpleOrchestratorImpl extends AbstractOrchestrator{
     private final static Logger logger = LoggerFactory.getLogger(SimpleOrchestratorImpl.class);
     private ExecutorService executor;

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
index e281851..cbfb573 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
@@ -21,15 +21,16 @@
 package org.apache.airavata.orchestrator.core;
 
 
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.DocumentCreator;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.api.Airavata;
+import org.apache.airavata.api.client.AiravataClientFactory;
+import org.apache.airavata.client.tools.DocumentCreatorNew;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.airavata.orchestrator.core.util.Initialize;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
+import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
+import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
 
 public class BaseOrchestratorTest {
 
@@ -37,7 +38,7 @@ public class BaseOrchestratorTest {
     private WorkerResource workerResource;
     private UserResource userResource;
     private Initialize initialize;
-    private DocumentCreator documentCreator;
+    private DocumentCreatorNew documentCreator;
 
     public void setUp() throws Exception {
         initialize = new Initialize("registry-derby.sql");
@@ -48,10 +49,9 @@ public class BaseOrchestratorTest {
         userResource.setUserName(ServerSettings.getDefaultUser());
         userResource.setPassword(ServerSettings.getDefaultUser());
 
-        documentCreator = new DocumentCreator(getAiravataAPI());
+        documentCreator = new DocumentCreatorNew(getAiravataClient());
         documentCreator.createLocalHostDocs();
-        documentCreator.createGramDocs();
-        documentCreator.createPBSDocsForOGCE();
+        documentCreator.createPBSDocsForOGCE_Echo();
     }
 
     public void tearDown() throws Exception {
@@ -70,25 +70,21 @@ public class BaseOrchestratorTest {
         return userResource;
     }
 
-    private AiravataAPI getAiravataAPI() {
-        AiravataAPI airavataAPI = null;
+    private Airavata.Client getAiravataClient() {
+        Airavata.Client client = null;
         try {
-            String systemUserName = ServerSettings.getSystemUser();
-            String gateway = ServerSettings.getSystemUserGateway();
-            airavataAPI = AiravataAPIFactory.getAPI(gateway, systemUserName);
-        } catch (ApplicationSettingsException e) {
-            e.printStackTrace();
-        } catch (AiravataAPIInvocationException e) {
+            client = AiravataClientFactory.createAiravataClient("localhost", 8930);
+        } catch (AiravataClientConnectException e) {
             e.printStackTrace();
         }
-        return airavataAPI;
+        return client;
     }
 
-    public DocumentCreator getDocumentCreator() {
+    public DocumentCreatorNew getDocumentCreator() {
         return documentCreator;
     }
 
-    public void setDocumentCreator(DocumentCreator documentCreator) {
+    public void setDocumentCreator(DocumentCreatorNew documentCreator) {
         this.documentCreator = documentCreator;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
index 0ddd814..eee0001 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
@@ -20,27 +20,6 @@
 */
 package org.apache.airavata.orchestrator.core;
 
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.model.util.ExperimentModelUtil;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.orchestrator.cpi.Orchestrator;
-import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.ParentDataType;
-import org.apache.airavata.registry.cpi.Registry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-
 public class NewOrchestratorTest extends BaseOrchestratorTest {
 //    private static final Logger log = LoggerFactory.getLogger(NewOrchestratorTest.class);
 //

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
index fe71df5..2823cdf 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
@@ -23,9 +23,8 @@ package org.apache.airavata.orchestrator.core.util;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-import org.apache.airavata.registry.api.util.RegistrySettings;
 import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.utils.RegistrySettings;
 import org.apache.derby.drda.NetworkServerControl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -101,7 +100,7 @@ public class Initialize {
             jdbcUser = RegistrySettings.getSetting("registry.jdbc.user");
             jdbcPassword = RegistrySettings.getSetting("registry.jdbc.password");
             jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (RegistrySettingsException e) {
+        } catch (RegistryException e) {
             logger.error("Unable to read properties" , e);
         }
 
@@ -157,10 +156,8 @@ public class Initialize {
             resource.setWorker(workerResource);
             resource.save();
 
-        } catch (RegistrySettingsException e) {
-            logger.error("Unable to read properties", e);
         } catch (RegistryException e) {
-            logger.error("Error while saving data to registry", e);
+            logger.error("Unable to read properties", e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/airavata-jpa-registry/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/pom.xml b/modules/registry/airavata-jpa-registry/pom.xml
index 483b31a..8fc0e48 100644
--- a/modules/registry/airavata-jpa-registry/pom.xml
+++ b/modules/registry/airavata-jpa-registry/pom.xml
@@ -61,11 +61,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-credential-store</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAResourceAccessor.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAResourceAccessor.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAResourceAccessor.java
deleted file mode 100644
index 5f0b597..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAResourceAccessor.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * 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.persistance.registry.jpa;
-
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
-import org.apache.airavata.registry.api.AiravataRegistry2;
-
-public class JPAResourceAccessor {
-	private AiravataRegistry2 registry=null;
-	private ResourceUtils resourceUtils = new ResourceUtils();
-
-	public JPAResourceAccessor(AiravataRegistry2 registry) {
-		this.registry=registry;
-	}
-	
-	public GatewayResource getGateway(){
-        GatewayResource gatewayResource = new GatewayResource();
-        gatewayResource.setGatewayName(this.registry.getGateway().getGatewayName());
-		return gatewayResource;
-	}
-	
-	public ResourceUtils root(){
-		return resourceUtils;
-	}
-	
-	public WorkerResource getWorker(){
-        return new WorkerResource(registry.getUser().getUserName(), getGateway());
-	}
-}


[3/9] retiring previous registry API - AIRAVATA-1234

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
deleted file mode 100644
index 6148399..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProvenanceRegistry.java
+++ /dev/null
@@ -1,528 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.airavata.registry.api.exception.RegException;
-import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
-import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-
-public interface ProvenanceRegistry extends AiravataSubRegistry{
-
-	/*------------------------------------------- Experiment data ---------------------------------------------*/
-	
-	/**
-     * Returns true if the experiment exists 
-     * @param experimentId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public boolean isExperimentExists(String experimentId) throws RegException;
-	
-	public boolean isExperimentExists(String experimentId, boolean createIfNotPresent) throws RegException;
-	
-    /**
-     * Save the username of the user who runs this experiment 
-     * @param experimentId
-     * @param user
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public void updateExperimentExecutionUser(String experimentId, String user) throws RegException;
-    
-    /**
-     * Retrieve the user who is runing the experiment
-     * @param experimentId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public String getExperimentExecutionUser(String experimentId) throws RegException;
-
-    /**
-     * check whether the experiment name exists
-     * @param experimentName
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public boolean isExperimentNameExist(String experimentName) throws RegException;
-    /**
-     * Get the name of the workflow intance
-     * @param experimentId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public String getExperimentName(String experimentId) throws RegException;
-    
-    /**
-     * Save a name for this workflow execution
-     * @param experimentId
-     * @param experimentName
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public void updateExperimentName(String experimentId,String experimentName)throws RegException;
-    
-	/**
-     * Return the metadata information saved for the experiment
-     * @param experimentId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public String getExperimentMetadata(String experimentId) throws RegException;
-    
-    /**
-     * Save the metadata for the experiment
-     * @param experimentId
-     * @param metadata
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void updateExperimentMetadata(String experimentId, String metadata) throws RegException;
-    
-    /**
-     * Return the template name of the workflow that this intance was created from
-     * @param workflowInstanceId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public String getWorkflowExecutionTemplateName(String workflowInstanceId) throws RegException;
-    
-    /**
-     * Save the template name of the workflow that this intance was created from
-     * @param workflowInstanceId
-     * @param templateName
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void setWorkflowInstanceTemplateName(String workflowInstanceId, String templateName) throws RegException;
-    
-    public List<WorkflowExecution> getExperimentWorkflowInstances(String experimentId) throws RegException;
-    
-    /*-------------------------------------- Experiment Workflow instance node data ----------------------------------------*/
-
-    public boolean isWorkflowInstanceExists(String instanceId) throws RegException;
-    
-    public boolean isWorkflowInstanceExists(String instanceId, boolean createIfNotPresent) throws RegException;
-    
-    /**
-     * Save a status for this workflow execution with the current time at the moment
-     * @param instanceId
-     * @param status - contains the status
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public void updateWorkflowInstanceStatus(String instanceId,State status)throws RegException;
-
-    /**
-     * Save a status for this workflow execution
-     * @param status - contains the status
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public void updateWorkflowInstanceStatus(WorkflowExecutionStatus status)throws RegException;
-
-	
-    /**
-     * Return the status of the execution
-     * @param instanceId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public WorkflowExecutionStatus getWorkflowInstanceStatus(String instanceId)throws RegException;
-
-    /**
-	 * Save the input data of a node in the workflow instance of an experiment
-	 * @param node
-     * @param data
-	 * @return true if successfully saved
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	public void updateWorkflowNodeInput(WorkflowInstanceNode node, String data) throws RegException;
-
-    /**
-     * Save the output data of a node in the workflow instance of an experiment
-     * @param node
-     * @return true if successfully saved
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public void updateWorkflowNodeOutput(WorkflowInstanceNode node, String data)throws RegException;
-    
-    /**
-     * Return a list of data passed as input for service node which regex matched nodeId, workflow template id & experiment id 
-     * @param experimentIdRegEx
-     * @param workflowNameRegEx - this is the workflowName or workflow template Id of an experiment
-     * @param nodeNameRegEx - nodeId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public List<WorkflowNodeIOData> searchWorkflowInstanceNodeInput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegException;
-
-	/**
-     * Return a list of data returned as output from service node which regex matched nodeId, workflow template id & experiment id 
-     * @param experimentIdRegEx
-     * @param workflowNameRegEx - this is the workflowName or workflow template Id of an experiment
-     * @param nodeNameRegEx - nodeId
-	 * @return
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	public List<WorkflowNodeIOData> searchWorkflowInstanceNodeOutput(String experimentIdRegEx, String workflowNameRegEx, String nodeNameRegEx)throws RegException;
-	
-	public List<WorkflowNodeIOData> getWorkflowInstanceNodeInput(String workflowInstanceId, String nodeType)throws RegException;
-	
-	public List<WorkflowNodeIOData> getWorkflowInstanceNodeOutput(String workflowInstanceId, String nodeType)throws RegException;
-
-    /**
-     * Saves the results of output nodes in a workflow
-     * @deprecated 
-     * @param experimentId - also the workflow id
-     * @param outputNodeName
-     * @param output
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public void saveWorkflowExecutionOutput(String experimentId,String outputNodeName,String output) throws RegException;
-    
-    /**
-     * Saves the results of output nodes in a workflow
-     * @deprecated
-     * @param experimentId - also the workflow id
-     * @param data
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public void saveWorkflowExecutionOutput(String experimentId, WorkflowIOData data) throws RegException;
-
-    /**
-     * Get the output results of a output node of an experiment
-     * @deprecated
-     * @param experimentId - also the workflow id
-     * @param outputNodeName
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public WorkflowIOData getWorkflowExecutionOutput(String experimentId,String outputNodeName) throws RegException;
-    
-    /**
-     * Get the list of output node results of an experiment 
-     * @deprecated
-     * @param experimentId - also the workflow id
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public List<WorkflowIOData> getWorkflowExecutionOutput(String experimentId) throws RegException;
-
-    /**
-     * Get the names of the output nodes of a workflow instance run
-     * @deprecated
-     * @param exeperimentId - also the workflow id
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public String[] getWorkflowExecutionOutputNames(String exeperimentId) throws RegException;
-
-	/*---------------------------------------  Retrieving Experiment ------------------------------------------*/
-    /**
-     * Return workflow execution object fully populated with data currently avaialble for that experiment
-     * @param experimentId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public ExperimentData getExperiment(String experimentId) throws RegException;
-	
-	public ExperimentData getExperimentMetaInformation(String experimentId)throws RegException;
-	
-	public List<ExperimentData> getAllExperimentMetaInformation(String user)throws RegException;
-	
-	/**
-	 * Retrieve experiments which their names match the regular expression experimentNameRegex
-	 * @param user
-	 * @param experimentNameRegex
-	 * @return
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	public List<ExperimentData> searchExperiments(String user, String experimentNameRegex)throws RegException;
-    
-    /**
-     * Return experiment ids of experiments launched by the given user
-     * @param user - a regex user id
-     * @return - experiment id list
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	public List<String> getExperimentIdByUser(String user) throws RegException;
-
-	/**
-	 * Return experiments launched by the given user
-	 * @param user
-	 * @return experiment object list each populated by current data of that experiment
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-    public List<ExperimentData> getExperimentByUser(String user) throws RegException;
-    
-	public List<ExperimentData> getExperiments(HashMap<String, String> params) throws RegException;
-    
-    /**
-     * Return the pageNo set of experiments launched by the given user if grouped in to pages of size pageSize
-     * @param user
-     * @param pageSize
-     * @param pageNo
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ExperimentData> getExperimentByUser(String user, int pageSize, int pageNo) throws RegException;
-
-    /**
-     * This will update the workflowStatus for given experimentID,workflowInstanceID combination.
-     * @param workflowStatusNode
-     * @return
-     */
-    public void updateWorkflowNodeStatus(NodeExecutionStatus workflowStatusNode)throws RegException;
-
-    public void updateWorkflowNodeStatus(String workflowInstanceId, String nodeId, State status)throws RegException;
-    
-    public void updateWorkflowNodeStatus(WorkflowInstanceNode workflowNode, State status)throws RegException;
-
-    public NodeExecutionStatus getWorkflowNodeStatus(WorkflowInstanceNode workflowNode)throws RegException;
-    
-    public Date getWorkflowNodeStartTime(WorkflowInstanceNode workflowNode)throws RegException;
-    
-    public Date getWorkflowStartTime(WorkflowExecution workflowInstance)throws RegException;
-    
-    /**
-     * @deprecated - Will be removed from 0.9 release onwards. Use {@see #addApplicationJob #updateApplicationJob(ApplicationJob) etc.} functions instead.
-     * This will store the gram specific data in to repository, this can be called before submitting the workflow in to Grid
-     * @param workflowNodeGramData
-     * @return
-     */
-    public void updateWorkflowNodeGramData(WorkflowNodeGramData workflowNodeGramData)throws RegException;
-    
-    public WorkflowExecutionData getWorkflowInstanceData(String workflowInstanceId)throws RegException;
-    
-    public boolean isWorkflowInstanceNodePresent(String workflowInstanceId, String nodeId)throws RegException;
-    
-    public boolean isWorkflowInstanceNodePresent(String workflowInstanceId, String nodeId, boolean createIfNotPresent)throws RegException;
-    
-    public NodeExecutionData getWorkflowInstanceNodeData(String workflowInstanceId, String nodeId)throws RegException;
-
-    public void addWorkflowInstance(String experimentId, String workflowInstanceId, String templateName) throws RegException;
-    
-    public void updateWorkflowNodeType(WorkflowInstanceNode node, WorkflowNodeType type) throws RegException;
-    
-    public void addWorkflowInstanceNode(String workflowInstance, String nodeId) throws RegException;
-    
-    
-	/*---------------------------------------  Errors in experiment executions ------------------------------------------*/
-
-    /**
-     * Return errors defined at the experiment level 
-     * @param experimentId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ExperimentExecutionError> getExperimentExecutionErrors(String experimentId) throws RegException;
-    
-    /**
-     * Return errors defined at the workflow level 
-     * @param experimentId
-     * @param workflowInstanceId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<WorkflowExecutionError> getWorkflowExecutionErrors(String experimentId, String workflowInstanceId) throws RegException;
-
-    /**
-     * Return errors defined at the node level 
-     * @param experimentId
-     * @param workflowInstanceId
-     * @param nodeId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<NodeExecutionError> getNodeExecutionErrors(String experimentId, String workflowInstanceId, String nodeId) throws RegException;
-    
-    /**
-     * Return errors defined for a Application job 
-     * @param experimentId
-     * @param workflowInstanceId
-     * @param nodeId
-     * @param jobId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ApplicationJobExecutionError> getApplicationJobErrors(String experimentId, String workflowInstanceId, String nodeId, String jobId) throws RegException;
-
-    /**
-     * Return errors defined for a Application job 
-     * @param jobId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ApplicationJobExecutionError> getApplicationJobErrors(String jobId) throws RegException;
-
-    /**
-     * Return errors filtered by the parameters
-     * @param experimentId 
-     * @param workflowInstanceId
-     * @param nodeId
-     * @param jobId
-     * @param filterBy - what type of source types the results should contain
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ExecutionError> getExecutionErrors(String experimentId, String workflowInstanceId, String nodeId, String jobId, ExecutionErrors.Source...filterBy) throws RegException;
-    /**
-     * Adds an experiment execution error 
-     * @param error
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public int addExperimentError(ExperimentExecutionError error) throws RegException;
-    
-    /**
-     * Adds an workflow execution error 
-     * @param error
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public int addWorkflowExecutionError(WorkflowExecutionError error) throws RegException;
-    
-    /**
-     * Adds an node execution error 
-     * @param error
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public int addNodeExecutionError(NodeExecutionError error) throws RegException;
-
-    /**
-     * Adds an Application job execution error 
-     * @param error
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public int addApplicationJobExecutionError(ApplicationJobExecutionError error) throws RegException;
-    
-    
-	/*---------------------------------------  Managing Data for Application Jobs ------------------------------------------*/
-
-    /**
-     * Returns <code>true</code> if a Application job data is existing in the registry
-     * @param jobId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public boolean isApplicationJobExists(String jobId) throws RegException;
-    
-    /**
-     * Adding data related to a new Application job submission
-     * @param job - the <code>jobId</code> cannot be <code>null</code>.
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void addApplicationJob(ApplicationJob job) throws RegException;
-    
-    /**
-     * update data related to a existing Application job record in the registry
-     * @param job - the <code>jobId</code> cannot be <code>null</code> and should already exist in registry
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void updateApplicationJob(ApplicationJob job) throws RegException;
-    
-    /**
-     * Update the status of the job
-     * @param jobId
-     * @param status
-     * @param statusUpdateTime
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void updateApplicationJobStatus(String jobId, ApplicationJobStatus status, Date statusUpdateTime) throws RegException;
-   
-    /**
-     * Update the job data. GFacProvider implementation should decide the job data. Typically it'll 
-     * be a serialization of the submitted job query (eg: rsl for a GRAM job) 
-     * @param jobId
-     * @param jobdata
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void updateApplicationJobData(String jobId, String jobdata) throws RegException;
-    
-    /**
-     * Update the time of job submission or job started executing
-     * @param jobId
-     * @param submitted
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void updateApplicationJobSubmittedTime(String jobId, Date submitted) throws RegException;
-    
-    /**
-     * Update the time of current job status is valid.
-     * @param jobId
-     * @param statusUpdateTime
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void updateApplicationJobStatusUpdateTime(String jobId, Date statusUpdateTime) throws RegException;
-    
-    /**
-     * Custom data field for users
-     * @param jobId
-     * @param metadata
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public void updateApplicationJobMetadata(String jobId, String metadata) throws RegException;
-    
-    /**
-     * Retrieve the Application Job for the given job id
-     * @param jobId
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public ApplicationJob getApplicationJob(String jobId) throws RegException;
-    
-    /**
-     * Retrieve a list of Application jobs executed for the given descriptors
-     * @param serviceDescriptionId - should be <code>null</code> if user does not care what service description the job corresponds to
-     * @param hostDescriptionId - should be <code>null</code> if user does not care what host description the job corresponds to
-     * @param applicationDescriptionId - should be <code>null</code> if user does not care what application description the job corresponds to
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ApplicationJob> getApplicationJobsForDescriptors(String serviceDescriptionId, String hostDescriptionId, String applicationDescriptionId) throws RegException;
-    
-    /**
-     * Retrieve a list of Application jobs executed for the given experiment credentials
-     * @param experimentId - should be <code>null</code> if user does not care what experiment the job corresponds to
-     * @param workflowExecutionId -  - should be <code>null</code> if user does not care what workflow execution the job corresponds to
-     * @param nodeId  - should be <code>null</code> if user does not care what node id the job corresponds to
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ApplicationJob> getApplicationJobs(String experimentId, String workflowExecutionId, String nodeId) throws RegException;
-    
-    /**
-     * Retrieve the list all the status updates for an application job.
-     * @param jobId - Application job id
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ApplicationJobStatusData> getApplicationJobStatusHistory(String jobId) throws RegException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/PublishedWorkflowRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/PublishedWorkflowRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/PublishedWorkflowRegistry.java
deleted file mode 100644
index 153ccdd..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/PublishedWorkflowRegistry.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.airavata.registry.api.exception.RegException;
-import org.apache.airavata.registry.api.exception.gateway.PublishedWorkflowAlreadyExistsException;
-import org.apache.airavata.registry.api.exception.gateway.PublishedWorkflowDoesNotExistsException;
-import org.apache.airavata.registry.api.exception.worker.UserWorkflowDoesNotExistsException;
-
-
-public interface PublishedWorkflowRegistry extends AiravataSubRegistry {
-	
-	public boolean isPublishedWorkflowExists(String workflowName) throws RegException;
-	public void publishWorkflow(String workflowName, String publishWorkflowName) throws PublishedWorkflowAlreadyExistsException, UserWorkflowDoesNotExistsException, RegException;
-	public void publishWorkflow(String workflowName) throws PublishedWorkflowAlreadyExistsException, UserWorkflowDoesNotExistsException, RegException;
-	
-	public String getPublishedWorkflowGraphXML(String workflowName) throws PublishedWorkflowDoesNotExistsException, RegException;
-	public List<String> getPublishedWorkflowNames() throws RegException;
-	public Map<String,String> getPublishedWorkflows() throws RegException;
-	public ResourceMetadata getPublishedWorkflowMetadata(String workflowName) throws RegException;
-	
-	public void removePublishedWorkflow(String workflowName)throws PublishedWorkflowDoesNotExistsException, RegException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ResourceMetadata.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ResourceMetadata.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ResourceMetadata.java
deleted file mode 100644
index 75c2e84..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ResourceMetadata.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.Date;
-
-public class ResourceMetadata {
-	
-	/**
-	 * Note: not all the following properties will be available for
-	 * a resource
-	 */
-	
-	private AiravataUser createdUser;
-	private AiravataUser lastUpdatedUser;
-	
-	private Date createdDate;
-	private Date lastUpdatedDate;
-	private String revision;
-	
-	public AiravataUser getCreatedUser() {
-		return createdUser;
-	}
-	public void setCreatedUser(AiravataUser createdUser) {
-		this.createdUser = createdUser;
-	}
-	public AiravataUser getLastUpdatedUser() {
-		return lastUpdatedUser;
-	}
-	public void setLastUpdatedUser(AiravataUser lastUpdatedUser) {
-		this.lastUpdatedUser = lastUpdatedUser;
-	}
-	public Date getCreatedDate() {
-		return createdDate;
-	}
-	public void setCreatedDate(Date createdDate) {
-		this.createdDate = createdDate;
-	}
-	public Date getLastUpdatedDate() {
-		return lastUpdatedDate;
-	}
-	public void setLastUpdatedDate(Date lastUpdatedDate) {
-		this.lastUpdatedDate = lastUpdatedDate;
-	}
-	public String getRevision() {
-		return revision;
-	}
-	public void setRevision(String revision) {
-		this.revision = revision;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/UserRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/UserRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/UserRegistry.java
deleted file mode 100644
index 1747458..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/UserRegistry.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.List;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public interface UserRegistry extends AiravataSubRegistry{
-
-		
-	/**
-	 * Retrieve all the users in the registry
-	 * @return a list of airavata users from the registry
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	
-	public List<AiravataUser> getUsers() throws RegException;
-    
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/UserWorkflowRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/UserWorkflowRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/UserWorkflowRegistry.java
deleted file mode 100644
index 6274125..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/UserWorkflowRegistry.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.Map;
-
-import org.apache.airavata.registry.api.exception.RegException;
-import org.apache.airavata.registry.api.exception.worker.UserWorkflowAlreadyExistsException;
-import org.apache.airavata.registry.api.exception.worker.UserWorkflowDoesNotExistsException;
-
-
-public interface UserWorkflowRegistry extends AiravataSubRegistry {
-	
-	public boolean isWorkflowExists(String workflowName) throws RegException;
-	public void addWorkflow(String workflowName, String workflowGraphXml) throws UserWorkflowAlreadyExistsException, RegException;
-	public void updateWorkflow(String workflowName, String workflowGraphXml) throws UserWorkflowDoesNotExistsException, RegException;
-	
-	public String getWorkflowGraphXML(String workflowName) throws UserWorkflowDoesNotExistsException, RegException;
-	public Map<String,String> getWorkflows() throws RegException;
-	
-	public ResourceMetadata getWorkflowMetadata(String workflowName) throws RegException;
-	
-	public void removeWorkflow(String workflowName) throws UserWorkflowDoesNotExistsException, RegException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/WorkspaceProject.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/WorkspaceProject.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/WorkspaceProject.java
deleted file mode 100644
index f804dfe..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/WorkspaceProject.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-import javax.xml.bind.annotation.*;
-
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class WorkspaceProject{
-	private String projectName;
-    private Gateway gateway;
-    private AiravataUser airavataUser;
-
-    @XmlTransient
-    private ProjectsRegistry projectsRegistry;
-
-    public WorkspaceProject() {
-    }
-
-    public WorkspaceProject(String projectName, ProjectsRegistry registry) {
-		setProjectName(projectName);
-		setProjectsRegistry(registry);
-        setGateway(registry.getGateway());
-        setAiravataUser(registry.getAiravataUser());
-	}
-	
-	public String getProjectName() {
-		return projectName;
-	}
-
-	public void setProjectName(String projectName) {
-		this.projectName = projectName;
-	}
-
-	public ProjectsRegistry getProjectsRegistry() {
-		return projectsRegistry;
-	}
-
-	public void setProjectsRegistry(ProjectsRegistry projectsRegistry) {
-		this.projectsRegistry = projectsRegistry;
-	}
-	
-	public void createExperiment(AiravataExperiment experiment) throws RegException {
-		getProjectsRegistry().addExperiment(getProjectName(), experiment);
-	}
-	
-	public List<AiravataExperiment> getExperiments() throws RegException {
-		return getProjectsRegistry().getExperiments(getProjectName());
-	}
-	
-	public List<AiravataExperiment> getExperiments(Date from, Date to) throws RegException {
-		return getProjectsRegistry().getExperiments(getProjectName(),from, to);
-	}
-
-    public Gateway getGateway() {
-        return gateway;
-    }
-
-    public AiravataUser getAiravataUser() {
-        return airavataUser;
-    }
-
-    public void setGateway(Gateway gateway) {
-        this.gateway = gateway;
-    }
-
-    public void setAiravataUser(AiravataUser airavataUser) {
-        this.airavataUser = airavataUser;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/AiravataRegUninitializedException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/AiravataRegUninitializedException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/AiravataRegUninitializedException.java
deleted file mode 100644
index e6e44a9..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/AiravataRegUninitializedException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class AiravataRegUninitializedException extends RegException {
-
-	public AiravataRegUninitializedException(String message, Throwable e) {
-		super(message, e);
-	}
-
-	private static final long serialVersionUID = -6873054164386608256L;
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/DeploymentDescriptionRetrieveException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/DeploymentDescriptionRetrieveException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/DeploymentDescriptionRetrieveException.java
deleted file mode 100644
index 3787a12..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/DeploymentDescriptionRetrieveException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class DeploymentDescriptionRetrieveException extends RegException {
-    private final static String ERROR_MESSAGE = "Error occured while attempting to retrieve existing deployment descriptions";
-    /**
-	 * 
-	 */
-    private static final long serialVersionUID = -2849422320139467602L;
-
-    public DeploymentDescriptionRetrieveException(Exception e) {
-        super(ERROR_MESSAGE,e);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/GatewayNotRegisteredException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/GatewayNotRegisteredException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/GatewayNotRegisteredException.java
deleted file mode 100644
index e0750b0..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/GatewayNotRegisteredException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class GatewayNotRegisteredException extends RegException {
-
-	private static final long serialVersionUID = -139586125325993500L;
-
-	public GatewayNotRegisteredException(String gatewayName) {
-		super("The gateway id '"+gatewayName+"' is not registered within Airavata");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/HostDescriptionRetrieveException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/HostDescriptionRetrieveException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/HostDescriptionRetrieveException.java
deleted file mode 100644
index f03fd03..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/HostDescriptionRetrieveException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class HostDescriptionRetrieveException extends RegException {
-    private final static String ERROR_MESSAGE = "Error occured while attempting to retrieve existing hosts";
-
-    private static final long serialVersionUID = -2849422320139467602L;
-
-    public HostDescriptionRetrieveException(Exception e) {
-        super(ERROR_MESSAGE, e);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAPIVersionIncompatibleException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAPIVersionIncompatibleException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAPIVersionIncompatibleException.java
deleted file mode 100644
index 3eac400..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAPIVersionIncompatibleException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class RegAPIVersionIncompatibleException extends RegException {
-
-    private static final long serialVersionUID = -2679914107485739141L;
-
-    public RegAPIVersionIncompatibleException() {
-        this("Incompatible versions with Airavata registry and Airavata API");
-    }
-
-    public RegAPIVersionIncompatibleException(String message) {
-        this(message,null);
-    }
-
-    public RegAPIVersionIncompatibleException(String message, Exception e){
-        super(message, e);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorInstantiateException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorInstantiateException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorInstantiateException.java
deleted file mode 100644
index 2214734..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorInstantiateException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class RegAccessorInstantiateException extends RegException {
-
-	private static final long serialVersionUID = -2679914107485739140L;
-	
-	public RegAccessorInstantiateException(String className, Exception e){
-		super("There was an exception instantiating the Registry accessor class '"+className+"'!!!", e);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorInvalidException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorInvalidException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorInvalidException.java
deleted file mode 100644
index 0c85b42..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorInvalidException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class RegAccessorInvalidException extends RegException {
-
-	private static final long serialVersionUID = -2679914107485739140L;
-	
-	public RegAccessorInvalidException(String className){
-		super("Registry accessor '"+className+"' is not valid!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorNotFoundException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorNotFoundException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorNotFoundException.java
deleted file mode 100644
index daad74b..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorNotFoundException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class RegAccessorNotFoundException extends RegException {
-
-	private static final long serialVersionUID = -2679914107485739140L;
-	
-	public RegAccessorNotFoundException(String className, Exception e){
-		super("Registry accessor class '"+className+"'  was not found in classpath!!!", e);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorUndefinedException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorUndefinedException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorUndefinedException.java
deleted file mode 100644
index 90ef70d..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegAccessorUndefinedException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class RegAccessorUndefinedException extends RegException {
-
-	private static final long serialVersionUID = -2679914107485739140L;
-
-	public RegAccessorUndefinedException() {
-		this("A registry accessor was not defined in the registry settings");
-	}
-	
-	public RegAccessorUndefinedException(String message) {
-		this(message,null);
-	}
-	
-	public RegAccessorUndefinedException(String message, Exception e){
-		super(message, e);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegException.java
deleted file mode 100644
index c71abdc..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class RegException extends Exception {
-	
-    private static final long serialVersionUID = -2849422320139467602L;
-
-    public RegException(Throwable e) {
-        super(e);
-    }
-    
-    public RegException(String message) {
-        super(message, null);
-    }
-    
-    public RegException(String message, Throwable e) {
-        super(message, e);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegistrySettingsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegistrySettingsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegistrySettingsException.java
deleted file mode 100644
index eb07258..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegistrySettingsException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-
-public class RegistrySettingsException extends ApplicationSettingsException {
-
-	private static final long serialVersionUID = -4901850535475160411L;
-
-	public RegistrySettingsException(String message) {
-		super(message);
-	}
-	
-	public RegistrySettingsException(String message, Throwable e) {
-		super(message, e);
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegistrySettingsLoadException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegistrySettingsLoadException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegistrySettingsLoadException.java
deleted file mode 100644
index f4db4d3..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/RegistrySettingsLoadException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class RegistrySettingsLoadException extends RegistrySettingsException {
-
-	private static final long serialVersionUID = -5102090895499711299L;
-	public RegistrySettingsLoadException(String message) {
-		super(message);
-	}
-	
-	public RegistrySettingsLoadException(Throwable e) {
-		this(e.getMessage(),e);
-	}
-	
-	public RegistrySettingsLoadException(String message, Throwable e) {
-		super(message,e);
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/ServiceDescriptionRetrieveException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/ServiceDescriptionRetrieveException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/ServiceDescriptionRetrieveException.java
deleted file mode 100644
index d05e60a..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/ServiceDescriptionRetrieveException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class ServiceDescriptionRetrieveException extends RegException {
-    private final static String ERROR_MESSAGE = "Error occured while attempting to retrieve existing service descriptions";
-    /**
-	 * 
-	 */
-    private static final long serialVersionUID = -2849422320139467602L;
-
-    public ServiceDescriptionRetrieveException(Exception e) {
-        super(ERROR_MESSAGE, e);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnimplementedRegOperationException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnimplementedRegOperationException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnimplementedRegOperationException.java
deleted file mode 100644
index e6a71f9..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnimplementedRegOperationException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class UnimplementedRegOperationException extends RegException {
-
-	private static final long serialVersionUID = 8565882892195989548L;
-
-	public UnimplementedRegOperationException() {
-		super("This operation is not implemented!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnknownRegConnectionDataException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnknownRegConnectionDataException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnknownRegConnectionDataException.java
deleted file mode 100644
index a71e085..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnknownRegConnectionDataException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class UnknownRegConnectionDataException extends RegException {
-
-	private static final long serialVersionUID = -6483101227925383562L;
-
-	public UnknownRegConnectionDataException(String message) {
-		super(message);
-	}
-	
-	public UnknownRegConnectionDataException(String message, Throwable e) {
-		super(message, e);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnspecifiedRegistrySettingsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnspecifiedRegistrySettingsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnspecifiedRegistrySettingsException.java
deleted file mode 100644
index dc82651..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/UnspecifiedRegistrySettingsException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * 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.registry.api.exception;
-
-public class UnspecifiedRegistrySettingsException extends RegistrySettingsException {
-
-	private static final long serialVersionUID = -1159027432434546003L;
-	public UnspecifiedRegistrySettingsException(String key) {
-		super("The '"+key+"' is not configured in Registry settings!!!");
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/DescriptorAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/DescriptorAlreadyExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/DescriptorAlreadyExistsException.java
deleted file mode 100644
index 268c1fd..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/DescriptorAlreadyExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.gateway;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class DescriptorAlreadyExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public DescriptorAlreadyExistsException(String descriptorName) {
-		super("The Descriptor "+descriptorName+" already exists!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/DescriptorDoesNotExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/DescriptorDoesNotExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/DescriptorDoesNotExistsException.java
deleted file mode 100644
index dc77a3b..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/DescriptorDoesNotExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.gateway;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class DescriptorDoesNotExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public DescriptorDoesNotExistsException(String descriptorName) {
-		super("The Descriptor "+descriptorName+" does not exists!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/InsufficientDataException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/InsufficientDataException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/InsufficientDataException.java
deleted file mode 100644
index e495e42..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/InsufficientDataException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.gateway;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class InsufficientDataException extends RegException {
-
-    private static final long serialVersionUID = 7706410845538952164L;
-
-    public InsufficientDataException(String message) {
-        super(message);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/MalformedDescriptorException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/MalformedDescriptorException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/MalformedDescriptorException.java
deleted file mode 100644
index 232ae9e..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/MalformedDescriptorException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.gateway;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class MalformedDescriptorException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public MalformedDescriptorException(String descriptorName, Throwable e) {
-		super("Error in generating the descriptor for "+descriptorName+"!!!", e);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/PublishedWorkflowAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/PublishedWorkflowAlreadyExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/PublishedWorkflowAlreadyExistsException.java
deleted file mode 100644
index a0c935d..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/PublishedWorkflowAlreadyExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.gateway;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class PublishedWorkflowAlreadyExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public PublishedWorkflowAlreadyExistsException(String workflowTemplateName) {
-		super("The workflow "+workflowTemplateName+" is already published!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/PublishedWorkflowDoesNotExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/PublishedWorkflowDoesNotExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/PublishedWorkflowDoesNotExistsException.java
deleted file mode 100644
index 2f32209..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/gateway/PublishedWorkflowDoesNotExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.gateway;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class PublishedWorkflowDoesNotExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public PublishedWorkflowDoesNotExistsException(String workflowTemplateName) {
-		super("There is no workflow named "+workflowTemplateName+" published!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ApplicationJobAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ApplicationJobAlreadyExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ApplicationJobAlreadyExistsException.java
deleted file mode 100644
index 7662200..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ApplicationJobAlreadyExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class ApplicationJobAlreadyExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public ApplicationJobAlreadyExistsException(String jobId) {
-		super("A Application job from the ID '"+jobId+"' is already present in the registry!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ApplicationJobDoesNotExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ApplicationJobDoesNotExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ApplicationJobDoesNotExistsException.java
deleted file mode 100644
index 349d119..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ApplicationJobDoesNotExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class ApplicationJobDoesNotExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public ApplicationJobDoesNotExistsException(String jobId) {
-		super("There is no Application job corresponding to ID '"+jobId+"' present in the registry!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentAlreadyExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentAlreadyExistsException.java
deleted file mode 100644
index 0be0e74..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentAlreadyExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class ExperimentAlreadyExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public ExperimentAlreadyExistsException(String experimentId) {
-		super("The experiment "+experimentId+" already added to the registry!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentDoesNotExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentDoesNotExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentDoesNotExistsException.java
deleted file mode 100644
index 09d2d05..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentDoesNotExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class ExperimentDoesNotExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public ExperimentDoesNotExistsException(String experimentId) {
-		super("The experiment "+experimentId+" is not present in the registry!!!");
-	}
-
-}


[4/9] retiring previous registry API - AIRAVATA-1234

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AiravataRegistryConnectionDataProviderImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AiravataRegistryConnectionDataProviderImpl.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AiravataRegistryConnectionDataProviderImpl.java
deleted file mode 100644
index 8cff3cb..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AiravataRegistryConnectionDataProviderImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * 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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.registry.api.AiravataRegistryConnectionDataProvider;
-import org.apache.airavata.registry.api.AiravataUser;
-import org.apache.airavata.registry.api.Gateway;
-import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-import org.apache.airavata.registry.api.util.RegistrySettings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AiravataRegistryConnectionDataProviderImpl implements AiravataRegistryConnectionDataProvider {
-
-    private final static Logger logger = LoggerFactory.getLogger(AiravataRegistryConnectionDataProviderImpl.class);
-
-    public void setIdentity(Gateway gateway, AiravataUser use) {
-    }
-
-    public Object getValue(String key) throws RegistrySettingsException {
-        return RegistrySettings.getSetting(key);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
deleted file mode 100644
index 477b1c2..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentDataRetriever.java
+++ /dev/null
@@ -1,543 +0,0 @@
-/*
- *
- * 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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
-import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
-import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
-import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.*;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.Date;
-
-
-public class ExperimentDataRetriever {
-    private static final Logger logger = LoggerFactory.getLogger(ExperimentDataRetriever.class);
-
-    public ExperimentData getExperiment(String experimentId){
-        String connectionURL =  Utils.getJDBCURL();
-        Connection connection = null;
-        ResultSet rs = null;
-        Statement statement;
-        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
-        ExperimentData experimentData = null;
-        try {
-            Class.forName(Utils.getJDBCDriver()).newInstance();
-            connection = DriverManager.getConnection(connectionURL, Utils.getJDBCUser(), Utils.getJDBCPassword());
-            statement = connection.createStatement();
-            String queryString = "SELECT e.EXPERIMENT_ID, e.EXPERIMENT_NAME, e.EXECUTION_USER, e.DESCRIPTION, " +
-                    "wd.WORKFLOW_INSTANCE_ID, wd.TEMPLATE_NAME, wd.STATUS, wd.START_TIME," +
-                    "wd.LAST_UPDATE_TIME, nd.NODE_ID, nd.INPUTS, nd.OUTPUTS, " +
-                    "e.PROJECT_NAME, e.SUBMITTED_DATE, nd.NODE_TYPE, nd.STATUS," +
-                    "nd.START_TIME, nd.LAST_UPDATE_TIME " +
-                    "FROM EXPERIMENT_METADATA e " +
-                    "LEFT JOIN WORKFLOW_DATA wd " +
-                    "ON e.EXPERIMENT_ID = wd.EXPERIMENT_ID " +
-                    "LEFT JOIN NODE_DATA nd " +
-                    "ON wd.WORKFLOW_INSTANCE_ID = nd.WORKFLOW_INSTANCE_ID " +
-                    "WHERE e.EXPERIMENT_ID ='" + experimentId + "'";
-
-
-            rs = statement.executeQuery(queryString);
-            if (rs != null){
-                while (rs.next()) {
-                    if(experimentData == null){
-                        experimentData = new ExperimentDataImpl();
-                        experimentData.setExperimentId(rs.getString(1));
-                        experimentData.setExperimentName(rs.getString(2));
-                        experimentData.setUser(rs.getString(3));
-//                        experimentData.setMetadata(rs.getString(4));
-                        experimentData.setTopic(rs.getString(1));
-                    }
-                    fillWorkflowInstanceData(experimentData, rs, experimentWorkflowInstances);
-                }
-            }
-            if(rs != null){
-                rs.close();
-            }
-            statement.close();
-            connection.close();
-        } catch (InstantiationException e) {
-            logger.error(e.getMessage(), e);
-        } catch (IllegalAccessException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e){
-            logger.error(e.getMessage());
-        }catch (ParseException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ExperimentLazyLoadedException e) {
-            logger.error(e.getMessage());
-        }
-        return experimentData;
-    }
-
-    private void fillWorkflowInstanceData (ExperimentData experimentData,
-                                                           ResultSet rs,
-                                                           List<WorkflowExecution> workflowInstances) throws SQLException, ExperimentLazyLoadedException, ParseException {
-        WorkflowExecutionDataImpl workflowInstanceData = (WorkflowExecutionDataImpl)experimentData.getWorkflowExecutionData(rs.getString(5));
-        if (workflowInstanceData == null){
-            WorkflowExecution workflowInstance = new WorkflowExecution(experimentData.getExperimentId(), rs.getString(5));
-            workflowInstance.setTemplateName(rs.getString(6));
-            workflowInstance.setExperimentId(rs.getString(1));
-            workflowInstance.setWorkflowExecutionId(rs.getString(5));
-            workflowInstances.add(workflowInstance);
-            Date lastUpdateDate = getTime(rs.getString(9));
-            String wdStatus = rs.getString(7);
-            WorkflowExecutionStatus workflowExecutionStatus = new WorkflowExecutionStatus(workflowInstance,
-                    createExecutionStatus(wdStatus),lastUpdateDate);
-            workflowInstanceData = new WorkflowExecutionDataImpl(null,
-                    workflowInstance, workflowExecutionStatus, null);
-            ExperimentDataImpl expData = (ExperimentDataImpl) experimentData;
-            workflowInstanceData.setExperimentData(expData);
-            // Set the last updated workflow's status and time as the experiment's status
-            if(expData.getExecutionStatus()!=null) {
-            	if(expData.getExecutionStatus().getStatusUpdateTime().compareTo(workflowExecutionStatus.getStatusUpdateTime())<0) {
-            		expData.setExecutionStatus(workflowExecutionStatus);
-                }
-            } else {
-            	expData.setExecutionStatus(workflowExecutionStatus);
-            }
-            experimentData.getWorkflowExecutionDataList().add(workflowInstanceData);
-        }
-        WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(workflowInstanceData.getWorkflowExecution(), rs.getString(10));
-        NodeExecutionData workflowInstanceNodeData = new NodeExecutionData(workflowInstanceNode);
-
-        String inputData = getStringValue(11, rs);
-        String outputData = getStringValue(12, rs);
-
-        workflowInstanceNodeData.setInput(inputData);
-        workflowInstanceNodeData.setOutput(outputData);
-        workflowInstanceNodeData.setStatus(createExecutionStatus(rs.getString(16)), getTime(rs.getString(18)));
-        workflowInstanceNodeData.setType(WorkflowNodeType.getType(rs.getString(15)).getNodeType());
-        workflowInstanceData.getNodeDataList().add(workflowInstanceNodeData);
-    }
-
-    private State createExecutionStatus (String status){
-       return status == null ? State.UNKNOWN : State.valueOf(status);
-    }
-
-    private String getStringValue (int parameterNumber,  ResultSet rs) throws SQLException {
-        Blob input = rs.getBlob(parameterNumber);
-        if (input != null){
-            byte[] inputBytes = input.getBytes(1, (int) input.length());
-            String inputData = new String(inputBytes);
-            return inputData;
-        }
-        return null;
-
-    }
-
-    private Date getTime (String date) throws ParseException {
-        if (date != null){
-            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-            return dateFormat.parse(date);
-        }
-        return null;
-
-    }
-
-    public List<String> getExperimentIdByUser(String user){
-        List<String> result=new ArrayList<String>();
-        String connectionURL =  Utils.getJDBCURL();
-        Connection connection = null;
-        ResultSet rs = null;
-        Statement statement = null;
-        try {
-            String jdbcDriver =  Utils.getJDBCDriver();
-            Class.forName(jdbcDriver).newInstance();
-            connection = DriverManager.getConnection(connectionURL, Utils.getJDBCUser(), Utils.getJDBCPassword());
-            statement = connection.createStatement();
-
-            // FIXME : pass user ID as a regular expression
-            String queryString = "SELECT e.EXPERIMENT_ID FROM EXPERIMENT_METADATA e " +
-                    "WHERE e.EXECUTION_USER ='" + user + "'";
-            rs = statement.executeQuery(queryString);
-            if(rs != null){
-                while (rs.next()) {
-                    result.add(rs.getString(1));
-                }
-            }
-            if(rs != null){
-                rs.close();
-            }
-            statement.close();
-            connection.close();
-        } catch (InstantiationException e) {
-            logger.error(e.getMessage(), e);
-        } catch (IllegalAccessException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e){
-            logger.error(e.getMessage(), e);
-        }
-
-        return result;
-
-    }
-
-    public String getExperimentName(String experimentId){
-        String connectionURL =  Utils.getJDBCURL();
-        Connection connection;
-        Statement statement;
-        ResultSet rs;
-        try {
-            Class.forName(Utils.getJDBCDriver()).newInstance();
-            connection = DriverManager.getConnection(connectionURL, Utils.getJDBCUser(), Utils.getJDBCPassword());
-            statement =  connection.createStatement();
-            String queryString = "SELECT e.name FROM EXPERIMENT_METADATA e " +
-                    "WHERE e.EXPERIMENT_ID='" + experimentId + "'";
-            rs = statement.executeQuery(queryString);
-            if(rs != null){
-                while (rs.next()) {
-                    return rs.getString(1);
-                }
-            }
-            if(rs != null){
-                rs.close();
-            }
-
-            statement.close();
-            connection.close();
-        } catch (InstantiationException e) {
-            logger.error(e.getMessage(), e);
-        } catch (IllegalAccessException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e){
-            logger.error(e.getMessage(), e);
-        }
-        return null;
-    }
-
-    public List<ExperimentData> getExperiments(String user) {
-        String connectionURL = Utils.getJDBCURL();
-        Connection connection = null;
-        ResultSet rs = null;
-        Statement statement;
-        Map<String, ExperimentData> experimentDataMap = new HashMap<String, ExperimentData>();
-        List<ExperimentData> experimentDataList = new ArrayList<ExperimentData>();
-        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
-
-        try {
-            Class.forName(Utils.getJDBCDriver()).newInstance();
-            connection = DriverManager.getConnection(connectionURL, Utils.getJDBCUser(),
-                    Utils.getJDBCPassword());
-            statement = connection.createStatement();
-            String queryString = "SELECT e.EXPERIMENT_ID, e.EXPERIMENT_NAME, e.EXECUTION_USER, e.DESCRIPTION, " +
-                    "wd.WORKFLOW_INSTANCE_ID, wd.TEMPLATE_NAME, wd.STATUS, wd.START_TIME," +
-                    "wd.LAST_UPDATE_TIME, nd.NODE_ID, nd.INPUTS, nd.OUTPUTS, " +
-                    "e.PROJECT_NAME, e.SUBMITTED_DATE, nd.NODE_TYPE, nd.STATUS, " +
-                    "nd.START_TIME, nd.LAST_UPDATE_TIME " +
-                    "FROM EXPERIMENT_METADATA e " +
-                    "LEFT JOIN WORKFLOW_DATA wd " +
-                    "ON e.EXPERIMENT_ID = wd.EXPERIMENT_ID " +
-                    "LEFT JOIN NODE_DATA nd " +
-                    "ON wd.WORKFLOW_INSTANCE_ID = nd.WORKFLOW_INSTANCE_ID " +
-                    "WHERE e.EXECUTION_USER='" + user + "'";
-
-            rs = statement.executeQuery(queryString);
-            if (rs != null) {
-                while (rs.next()) {
-                    ExperimentData experimentData = null;
-                    if (experimentDataMap.containsKey(rs.getString(1))) {
-                        experimentData = experimentDataMap.get(rs.getString(1));
-                    }else{
-                        experimentData = new ExperimentDataImpl();
-                        experimentData.setExperimentId(rs.getString(1));
-                        experimentData.setExperimentName(rs.getString(2));
-                        experimentData.setUser(rs.getString(3));
-//                        experimentData.setMetadata(rs.getString(4));
-                        experimentData.setTopic(rs.getString(1));
-                        experimentDataMap.put(experimentData.getExperimentId(),experimentData);
-                        experimentDataList.add(experimentData);
-                    }
-                    fillWorkflowInstanceData(experimentData, rs, experimentWorkflowInstances);
-                }
-            }
-            if (rs != null) {
-                rs.close();
-            }
-            statement.close();
-            connection.close();
-        } catch (InstantiationException e) {
-            logger.error(e.getMessage(), e);
-        } catch (IllegalAccessException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ExperimentLazyLoadedException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ParseException e) {
-            logger.error(e.getMessage(), e);
-        }
-       return experimentDataList;
-
-    }
-    
-    public List<ExperimentData> getExperiments(HashMap<String, String> params) {
-    	String connectionURL = Utils.getJDBCURL();
-        Connection connection = null;
-        ResultSet rs = null;
-        Statement statement;
-        Map<String, ExperimentData> experimentDataMap = new HashMap<String, ExperimentData>();
-        List<ExperimentData> experimentDataList = new ArrayList<ExperimentData>();
-        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
-
-        try {
-            Class.forName(Utils.getJDBCDriver()).newInstance();
-            connection = DriverManager.getConnection(connectionURL, Utils.getJDBCUser(),
-                    Utils.getJDBCPassword());
-            statement = connection.createStatement();
-            String queryString = "SELECT e.EXPERIMENT_ID, e.EXPERIMENT_NAME, e.EXECUTION_USER, e.DESCRIPTION, " +
-                    "wd.WORKFLOW_INSTANCE_ID, wd.TEMPLATE_NAME, wd.STATUS, wd.START_TIME," +
-                    "wd.LAST_UPDATE_TIME, nd.NODE_ID, nd.INPUTS, nd.OUTPUTS, " +
-                    "e.PROJECT_NAME, e.SUBMITTED_DATE, nd.NODE_TYPE, nd.STATUS, " +
-                    "nd.START_TIME, nd.LAST_UPDATE_TIME " +
-                    "FROM EXPERIMENT_METADATA e " +
-                    "LEFT JOIN WORKFLOW_DATA wd " +
-                    "ON e.EXPERIMENT_ID = wd.EXPERIMENT_ID " +
-                    "LEFT JOIN NODE_DATA nd " +
-                    "ON wd.WORKFLOW_INSTANCE_ID = nd.WORKFLOW_INSTANCE_ID ";
-            
-            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-            if(params.keySet().size()>0) {
-            	queryString += "WHERE ";
-            	String username = params.get("username");
-            	String from = params.get("fromDate");
-            	String to = params.get("toDate");
-            	
-            	if(username!=null && !username.isEmpty()) {
-            		queryString += "ed.username='" + username + "'";
-            		if((from!=null && !from.isEmpty()) || (to!=null && !to.isEmpty())) {
-            			queryString += " AND ";
-            		}
-            	}
-            	if(from!=null && !from.isEmpty()) {
-            		Date fromDate = dateFormat.parse(from);
-            		Timestamp fromTime = new Timestamp(fromDate.getTime());
-            		queryString += "e.submitted_date>='" + fromTime + "'";
-            		if(to!=null && !to.equals("")) {
-            			queryString += " AND ";
-            		}
-            	}
-            	if(to!=null && !to.isEmpty()) {
-            		Date toDate = dateFormat.parse(to);
-            		Timestamp toTime = new Timestamp(toDate.getTime());
-            		queryString += "e.submitted_date<='" + toTime + "'";
-            	}
-            }
-            rs = statement.executeQuery(queryString);
-            if (rs != null) {
-                while (rs.next()) {
-                    ExperimentData experimentData = null;
-                    if (experimentDataMap.containsKey(rs.getString(1))) {
-                        experimentData = experimentDataMap.get(rs.getString(1));
-                    }else{
-                        experimentData = new ExperimentDataImpl();
-                        experimentData.setExperimentId(rs.getString(1));
-                        experimentData.setExperimentName(rs.getString(2));
-                        experimentData.setUser(rs.getString(3));
-//                        experimentData.setMetadata(rs.getString(4));
-                        experimentData.setTopic(rs.getString(1));
-                        experimentDataMap.put(experimentData.getExperimentId(),experimentData);
-                        experimentDataList.add(experimentData);
-                    }
-                    fillWorkflowInstanceData(experimentData, rs, experimentWorkflowInstances);
-                }
-            }
-            if (rs != null) {
-                rs.close();
-            }
-            statement.close();
-            connection.close();
-        } catch (InstantiationException e) {
-            logger.error(e.getMessage(), e);
-        } catch (IllegalAccessException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ExperimentLazyLoadedException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ParseException e) {
-            logger.error(e.getMessage(), e);
-        }
-       return experimentDataList;
-	}
-
-
-    public ExperimentData getExperimentMetaInformation(String experimentId){
-        String connectionURL =  Utils.getJDBCURL();
-        Connection connection = null;
-        ResultSet rs = null;
-        Statement statement;
-        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
-        ExperimentData experimentData = null;
-        try {
-            Class.forName(Utils.getJDBCDriver()).newInstance();
-            connection = DriverManager.getConnection(connectionURL, Utils.getJDBCUser(), Utils.getJDBCPassword());
-            statement = connection.createStatement();
-            String queryString = "SELECT e.EXPERIMENT_ID, e.EXPERIMENT_NAME, e.EXECUTION_USER, " +
-                    "e.PROJECT_NAME, e.SUBMITTED_DATE, wd.WORKFLOW_INSTANCE_ID " +
-                    "FROM EXPERIMENT_METADATA e " +
-                    "LEFT JOIN WORKFLOW_DATA wd " +
-                    "ON e.EXPERIMENT_ID = wd.EXPERIMENT_ID " +
-                    "WHERE e.EXPERIMENT_ID ='" + experimentId + "'";
-
-            rs = statement.executeQuery(queryString);
-            if (rs != null){
-                while (rs.next()) {
-                    experimentData = new ExperimentDataImpl(true);
-                    experimentData.setExperimentId(rs.getString(1));
-                    experimentData.setExperimentName(rs.getString(2));
-                    experimentData.setUser(rs.getString(3));
-//                    experimentData.setMetadata(rs.getString(4));
-                    experimentData.setTopic(rs.getString(1));
-
-                    WorkflowExecution workflowInstance = new WorkflowExecution(experimentId, rs.getString(6));
-                    workflowInstance.setTemplateName(rs.getString(6));
-                    workflowInstance.setExperimentId(rs.getString(1));
-                    workflowInstance.setWorkflowExecutionId(rs.getString(6));
-                    experimentWorkflowInstances.add(workflowInstance);
-                }
-            }
-            if(rs != null){
-                rs.close();
-            }
-            statement.close();
-            connection.close();
-        } catch (InstantiationException e) {
-            logger.error(e.getMessage(), e);
-        } catch (IllegalAccessException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e){
-            logger.error(e.getMessage(), e);
-        }
-        return experimentData;
-    }
-
-    public boolean isExperimentNameExist(String experimentName){
-        String connectionURL =  Utils.getJDBCURL();
-        Connection connection = null;
-        ResultSet rs = null;
-        Statement statement;
-        try{
-            Class.forName(Utils.getJDBCDriver()).newInstance();
-            connection = DriverManager.getConnection(connectionURL, Utils.getJDBCUser(), Utils.getJDBCPassword());
-            statement = connection.createStatement();
-            String queryString = "SELECT EXPERIMENT_NAME FROM EXPERIMENT_METADATA WHERE EXPERIMENT_NAME='" + experimentName + "'";
-            rs = statement.executeQuery(queryString);
-            if(rs != null){
-                while (rs.next()) {
-                    return true;
-                }
-            }
-            if(rs != null){
-                rs.close();
-            }
-            statement.close();
-            connection.close();
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e) {
-            logger.error(e.getMessage(), e);
-        } catch (InstantiationException e) {
-            logger.error(e.getMessage(), e);
-        } catch (IllegalAccessException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-        return false;
-    }
-
-    public List<ExperimentData> getAllExperimentMetaInformation(String user){
-        String connectionURL =  Utils.getJDBCURL();
-        Connection connection = null;
-        ResultSet rs = null;
-        Statement statement;
-        List<ExperimentData> experimentDataList = new ArrayList<ExperimentData>();
-        List<WorkflowExecution> experimentWorkflowInstances = new ArrayList<WorkflowExecution>();
-        ExperimentData experimentData = null;
-        try {
-            Class.forName(Utils.getJDBCDriver()).newInstance();
-            connection = DriverManager.getConnection(connectionURL, Utils.getJDBCUser(), Utils.getJDBCPassword());
-            statement = connection.createStatement();
-            //FIXME : pass user ID as a regular expression
-            String queryString = "SELECT e.EXPERIMENT_ID, e.EXPERIMENT_NAME, e.EXECUTION_USER,  " +
-                    "e.PROJECT_NAME, e.SUBMITTED_DATE " +
-                    "FROM EXPERIMENT_METADATA e " +
-                    "WHERE e.EXECUTION_USER ='" + user + "'" +
-                    " ORDER BY e.SUBMITTED_DATE ASC";
-
-            rs = statement.executeQuery(queryString);
-            if (rs != null){
-                while (rs.next()) {
-                    experimentData = new ExperimentDataImpl(true);
-                    experimentData.setExperimentId(rs.getString(1));
-                    experimentData.setExperimentName(rs.getString(2));
-                    experimentData.setUser(rs.getString(3));
-//                    experimentData.setMetadata(rs.getString(4));
-                    experimentData.setTopic(rs.getString(1));
-
-                    WorkflowExecution workflowInstance = new WorkflowExecution(rs.getString(1), rs.getString(5));
-                    workflowInstance.setTemplateName(rs.getString(6));
-                    workflowInstance.setExperimentId(rs.getString(1));
-                    workflowInstance.setWorkflowExecutionId(rs.getString(5));
-                    experimentWorkflowInstances.add(workflowInstance);
-                    experimentDataList.add(experimentData);
-                }
-            }
-            if(rs != null){
-                rs.close();
-            }
-            statement.close();
-            connection.close();
-        } catch (InstantiationException e) {
-            logger.error(e.getMessage(), e);
-        } catch (IllegalAccessException e) {
-            logger.error(e.getMessage(), e);
-        } catch (ClassNotFoundException e) {
-            logger.error(e.getMessage(), e);
-        } catch (SQLException e){
-            logger.error(e.getMessage(), e);
-        }
-        return experimentDataList;
-    }
-
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
index 0bf96f8..fb056b9 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
@@ -28,8 +28,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.Users;
-import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-import org.apache.airavata.registry.api.util.RegistrySettings;
+import org.apache.airavata.registry.cpi.utils.RegistrySettings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.airavata.registry.cpi.RegistryException;
@@ -124,7 +123,7 @@ public class UserResource extends AbstractResource {
                             RegistrySettings.getSetting("default.registry.password.hash.method")));
                 } catch (NoSuchAlgorithmException e) {
                     throw new RuntimeException("Error hashing default admin password. Invalid hash algorithm.", e);
-                } catch (RegistrySettingsException e) {
+                } catch (RegistryException e) {
                     throw new RuntimeException("Error reading hash algorithm from configurations", e);
                 }
             }
@@ -135,7 +134,7 @@ public class UserResource extends AbstractResource {
                                 RegistrySettings.getSetting("default.registry.password.hash.method")));
                     } catch (NoSuchAlgorithmException e) {
                         throw new RuntimeException("Error hashing default admin password. Invalid hash algorithm.", e);
-                    } catch (RegistrySettingsException e) {
+                    } catch (RegistryException e) {
                         throw new RuntimeException("Error reading hash algorithm from configurations", e);
                     }
                 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java
index eb4eaa2..1c4ff8b 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java
@@ -26,7 +26,7 @@ import org.apache.airavata.persistance.registry.jpa.resources.ProjectResource;
 import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
 import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
 import org.apache.airavata.persistance.registry.jpa.util.Initialize;
-import org.apache.airavata.registry.api.util.RegistrySettings;
+import org.apache.airavata.registry.cpi.utils.RegistrySettings;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java
index 3d1014b..d795f4a 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java
@@ -27,9 +27,8 @@ import org.apache.airavata.persistance.registry.jpa.resources.ProjectResource;
 import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
 import org.apache.airavata.persistance.registry.jpa.resources.Utils;
 import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
-import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-import org.apache.airavata.registry.api.util.RegistrySettings;
 import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.utils.RegistrySettings;
 import org.apache.derby.drda.NetworkServerControl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -105,7 +104,7 @@ public class Initialize {
             jdbcUser = RegistrySettings.getSetting("registry.jdbc.user");
             jdbcPassword = RegistrySettings.getSetting("registry.jdbc.password");
             jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (RegistrySettingsException e) {
+        } catch (RegistryException e) {
             logger.error("Unable to read properties" , e);
         }
 
@@ -166,10 +165,8 @@ public class Initialize {
             projectResource.save();
         
           
-        } catch (RegistrySettingsException e) {
-            logger.error("Unable to read properties", e);
         } catch (RegistryException e) {
-            logger.error("Error while saving data", e);
+            logger.error("Unable to read properties", e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/pom.xml b/modules/registry/pom.xml
index 482d51a..2d4e0b2 100644
--- a/modules/registry/pom.xml
+++ b/modules/registry/pom.xml
@@ -30,7 +30,6 @@
                 <activeByDefault>true</activeByDefault>
             </activation>
             <modules>
-                <module>registry-api</module>
                 <module>registry-cpi</module>
                 <module>airavata-jpa-registry</module>
                 <!--<module>jpa-gen</module>-->

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/pom.xml b/modules/registry/registry-api/pom.xml
deleted file mode 100644
index bd1d5d1..0000000
--- a/modules/registry/registry-api/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <parent>
-        <groupId>org.apache.airavata</groupId>
-        <artifactId>registry</artifactId>
-        <version>0.14-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>airavata-registry-api</artifactId>
-    <packaging>jar</packaging>
-    <name>Airavata Registry API</name>
-    <url>http://airavata.apache.org/</url>
-
-    <dependencies>
-        <!--dependency>
-            <groupId>javax.jcr</groupId>
-            <artifactId>jcr</artifactId>
-            <version>${jcr.version}</version>
-        </dependency-->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-schema-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-common-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-workflow-execution-context</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!--dependency>
-			<groupId>org.json</groupId>
-			<artifactId>json</artifactId>
-			<version>20090211</version>
-		</dependency-->
-        <!-- Test -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>jcl-over-slf4j</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-log4j12</artifactId>
-			<scope>test</scope>
-		</dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-mapper-asl</artifactId>
-            <version>1.9.2</version>
-        </dependency>
-
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataExperiment.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataExperiment.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataExperiment.java
deleted file mode 100644
index 3abf504..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataExperiment.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.Date;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class AiravataExperiment {
-	private String experimentId;
-	private Date submittedDate;
-	private AiravataUser user;
-//    @XmlAnyElement
-	private WorkspaceProject project;
-	private Gateway gateway;
-
-    public AiravataExperiment() {
-    }
-
-    public String getExperimentId() {
-		return experimentId;
-	}
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-	public Date getSubmittedDate() {
-		return submittedDate;
-	}
-	public void setSubmittedDate(Date submittedDate) {
-		this.submittedDate = submittedDate;
-	}
-	public AiravataUser getUser() {
-		return user;
-	}
-	public void setUser(AiravataUser user) {
-		this.user = user;
-	}
-	public Gateway getGateway() {
-		return gateway;
-	}
-	public void setGateway(Gateway gateway) {
-		this.gateway = gateway;
-	}
-	public WorkspaceProject getProject() {
-		return project;
-	}
-	public void setProject(WorkspaceProject project) {
-		this.project = project;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java
deleted file mode 100644
index e93da37..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-import java.net.URI;
-import java.util.Observable;
-
-
-public abstract class AiravataRegistry2 extends Observable implements DescriptorRegistry, ProjectsRegistry, PublishedWorkflowRegistry, UserWorkflowRegistry, ConfigurationRegistry, ProvenanceRegistry,OrchestratorRegistry, UserRegistry, CredentialRegistry{
-	private Gateway gateway;
-	private AiravataUser user;
-	
-	protected static final int SERVICE_TTL=180;
-	
-	protected void preInitialize(URI connectionURI, Gateway gateway, AiravataUser user, PasswordCallback callback) {
-		setConnectionURI(connectionURI);
-		setGateway(gateway);
-		setUser(user);
-		setCallback(callback);
-	}
-	
-	/**
-	 * Initialize the Airavata Registry
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	protected abstract void initialize() throws RegException;
-	
-	public Gateway getGateway() {
-		return gateway;
-	}
-
-	public void setGateway(Gateway gateway) {
-		this.gateway = gateway;
-	}
-
-	public AiravataUser getUser() {
-		return user;
-	}
-
-	public void setUser(AiravataUser user) {
-		this.user = user;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryConnectionDataProvider.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryConnectionDataProvider.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryConnectionDataProvider.java
deleted file mode 100644
index 0a2f643..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryConnectionDataProvider.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-
-public interface AiravataRegistryConnectionDataProvider {
-	public void setIdentity(Gateway gateway, AiravataUser use);
-	public Object getValue(String key) throws RegistrySettingsException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java
deleted file mode 100644
index e875898..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import org.apache.airavata.common.exception.AiravataConfigurationException;
-import org.apache.airavata.registry.api.exception.*;
-import org.apache.airavata.registry.api.util.RegistrySettings;
-
-import java.net.URI;
-
-public class AiravataRegistryFactory {
-
-	private static final String REGISTRY_ACCESSOR_CLASS = "class.registry.accessor";
-	private static AiravataRegistryConnectionDataProvider dataProvider;
-
-	/***
-	 * Return a registry accessor object capable of handling all data in the
-	 * registry
-	 * @param gateway
-	 * @param user
-	 * @return
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorNotFoundException
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorUndefinedException
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorInstantiateException
-	 * @throws AiravataConfigurationException
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorInvalidException
-	 */
-	public static AiravataRegistry2 getRegistry(Gateway gateway,
-			AiravataUser user) throws RegException,
-            RegAccessorUndefinedException,
-            RegAccessorInstantiateException,
-            AiravataConfigurationException, RegAccessorInvalidException {
-		return getRegistry(null, gateway, user, null);
-	}
-	
-	/***
-	 * Return a registry accessor object capable of handling all data in the
-	 * registry
-	 * @param connectionURI
-	 * @param gateway
-	 * @param user
-	 * @param callback
-	 * @return
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorNotFoundException
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorUndefinedException
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorInstantiateException
-	 * @throws AiravataConfigurationException
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorInvalidException
-	 */
-	public static AiravataRegistry2 getRegistry(URI connectionURI, Gateway gateway,
-			AiravataUser user, PasswordCallback callback) throws RegException,
-            RegAccessorUndefinedException,
-            RegAccessorInstantiateException,
-            AiravataConfigurationException, RegAccessorInvalidException {
-		Object registryObj = getRegistryClass(REGISTRY_ACCESSOR_CLASS);
-		if (registryObj instanceof AiravataRegistry2) {
-			AiravataRegistry2 registry = (AiravataRegistry2) registryObj;
-			registry.preInitialize(connectionURI, gateway, user, callback);
-			registry.initialize();
-			return registry;
-		}
-		throw new RegAccessorInvalidException(registryObj.getClass().getName());
-	}
-
-	/***
-	 * Given the key in the registry settings file it will
-	 * attempt to instantiate a class from the value of the property
-	 *
-	 * @param registryClassKey
-	 * @return
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorNotFoundException
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorUndefinedException
-	 * @throws org.apache.airavata.registry.api.exception.RegAccessorInstantiateException
-	 * @throws AiravataConfigurationException
-	 */
-	public static Object getRegistryClass(String registryClassKey)
-			throws RegAccessorNotFoundException,
-            RegAccessorUndefinedException,
-            RegAccessorInstantiateException,
-			AiravataConfigurationException {
-
-        try {
-            String regAccessorClass = RegistrySettings.getSetting(registryClassKey);
-            if (regAccessorClass == null) {
-                throw new RegAccessorUndefinedException();
-            } else {
-                try {
-                    Class<?> classInstance = AiravataRegistryFactory.class
-                            .getClassLoader().loadClass(
-                                    regAccessorClass);
-                    return classInstance.newInstance();
-                } catch (ClassNotFoundException e) {
-                    throw new RegAccessorNotFoundException(
-                            regAccessorClass, e);
-                } catch (InstantiationException e) {
-                    throw new RegAccessorInstantiateException(
-                            regAccessorClass, e);
-                } catch (IllegalAccessException e) {
-                    throw new RegAccessorInstantiateException(
-                            regAccessorClass, e);
-                }
-            }
-        } catch (RegistrySettingsException e) {
-            throw new AiravataConfigurationException(
-                    "Error reading the configuration file", e);
-        }
-    }
-
-	public static void registerRegistryConnectionDataProvider(AiravataRegistryConnectionDataProvider provider){
-		dataProvider=provider;
-	}
-
-	public static void unregisterRegistryConnectionDataProvider(){
-		dataProvider=null;
-	}
-
-	public static AiravataRegistryConnectionDataProvider getRegistryConnectionDataProvider(){
-		return dataProvider;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataSubRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataSubRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataSubRegistry.java
deleted file mode 100644
index 645823f..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataSubRegistry.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.net.URI;
-
-import org.apache.airavata.common.utils.Version;
-
-public interface AiravataSubRegistry {
-
-    /**
-     * Determines whether this registry is active. If true the registry is ready to do the
-     * transaction
-     * @return
-     */
-    public abstract boolean isActive();
-
-    /**
-     * Set airavata registry instrance
-     * @param registry instance of <code>AiravataRegistry2</code>
-     */
-    public abstract void setAiravataRegistry(AiravataRegistry2 registry);
-
-    /**
-     * Set airavata user
-     * @param user current airavata registry user
-     */
-    public abstract void setAiravataUser(AiravataUser user);
-
-    /**
-     * Set gateway of the airavata system
-     * @param gateway airavata gateway
-     */
-    public abstract void setGateway(Gateway gateway);
-
-    /**
-     * Set connection url for the registry
-     * @param connectionURI connection url for the database
-     */
-    public void setConnectionURI(URI connectionURI);
-
-    /**
-     * Set custom <code>PasswordCallback</code> implementation class
-     * @param callback instance of PasswordCallback implementation
-     */
-    public void setCallback(PasswordCallback callback);
-
-    /**
-     * Retrieve the gateway of the airavata system
-     * @return gateway
-     */
-    public abstract Gateway getGateway();
-
-    /**
-     * Retrieve the current registry user of the system
-     * @return current registry user
-     */
-    public abstract AiravataUser getAiravataUser();
-
-	/**
-	 * Return the version of the Registry API
-	 * @return version
-	 */
-	public Version getVersion();
-
-    /**
-     * Retrieve connection URI for the database
-     * @return database connection URI
-     */
-    public URI getConnectionURI();
-
-    /**
-     * Retrieve PasswordCallback implementation class
-     * @return PasswordCallback impl
-     */
-    public PasswordCallback getCallback();
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataUser.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataUser.java
deleted file mode 100644
index 5bbc79c..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataUser.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class AiravataUser {
-	private String userName;
-
-    public AiravataUser() {
-    }
-
-    public AiravataUser(String userName) {
-		setUserName(userName);
-	}
-	
-	public String getUserName() {
-		return userName;
-	}
-
-	public void setUserName(String userName) {
-		this.userName = userName;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ConfigurationRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ConfigurationRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ConfigurationRegistry.java
deleted file mode 100644
index 1c1987e..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ConfigurationRegistry.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public interface ConfigurationRegistry extends AiravataSubRegistry {
-	public Object getConfiguration(String key) throws RegException;
-	public List<Object> getConfigurationList(String key) throws RegException;
-	public void setConfiguration(String key, String value, Date expire) throws RegException;
-	public void addConfiguration(String key, String value, Date expire) throws RegException;
-	public void removeAllConfiguration(String key) throws RegException;
-	public void removeConfiguration(String key, String value) throws RegException;
-	
-	public List<URI> getGFacURIs() throws RegException;
-	public List<URI> getWorkflowInterpreterURIs() throws RegException;
-	public URI getEventingServiceURI() throws RegException;
-	public URI getMessageBoxURI() throws RegException;
-	
-	public void addGFacURI(URI uri) throws RegException;
-	public void addWorkflowInterpreterURI(URI uri) throws RegException;
-	public void setEventingURI(URI uri) throws RegException;
-	public void setMessageBoxURI(URI uri) throws RegException;
-
-	public void addGFacURI(URI uri, Date expire) throws RegException;
-	public void addWorkflowInterpreterURI(URI uri, Date expire) throws RegException;
-	public void setEventingURI(URI uri, Date expire) throws RegException;
-	public void setMessageBoxURI(URI uri, Date expire) throws RegException;
-	
-	public void removeGFacURI(URI uri) throws RegException;
-	public void removeAllGFacURI() throws RegException;
-	public void removeWorkflowInterpreterURI(URI uri) throws RegException;
-	public void removeAllWorkflowInterpreterURI() throws RegException;
-	public void unsetEventingURI() throws RegException;
-	public void unsetMessageBoxURI() throws RegException;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/CredentialRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/CredentialRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/CredentialRegistry.java
deleted file mode 100644
index 041c9ad..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/CredentialRegistry.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public interface CredentialRegistry extends AiravataSubRegistry{
-
-		
-	/**
-	 * Checks whether a credential exists in the credential store for given gateway and token
-	 * @param String gatewayId
-	 * @param String tokenId
-	 * @return a boolean (true is credential exists, false if not)
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	
-	public boolean isCredentialExist(String gatewayId, String tokenId) throws RegException;
-	
-	/**
-	 * Get the public key for a credential in the credential store for given gateway and token
-	 * @param String gatewayId
-	 * @param String tokenId
-	 * @return String The public key of the credential
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	public String getCredentialPublicKey(String gatewayId, String tokenId) throws RegException;
-	
-	/**
-	 * Creates a new SSH credential for given gateway and token, encrypts it with a randomly 
-	 * generated password and stores it in the credential store 
-	 * @param String gatewayId
-	 * @param String tokenId
-	 * @return String The public key of the credential
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	public String createCredential(String gatewayId, String tokenId) throws RegException;
-	
-	/**
-	 * Creates a new SSH credential for given gateway and token, encrypts it with the given password 
-	 * and stores it in the credential store
-	 * @param String gatewayId
-	 * @param String tokenId
-	 * @param String username
-	 * @return String The public key of the credential
-	 * @throws org.apache.airavata.registry.api.exception.RegException
-	 */
-	public String createCredential(String gatewayId, String tokenId, String username) throws RegException;
-    
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java
deleted file mode 100644
index fa0ed54..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/DataRegistry.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.List;
-
-import org.apache.airavata.registry.api.exception.RegException;
-import org.apache.airavata.commons.gfac.type.ActualParameter;
-
-public interface DataRegistry {
-
-    /**
-     * Save output from workflow execution.
-     * 
-     * @param workflowId
-     * @param parameters
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public String saveOutput(String workflowId, List<ActualParameter> parameters) throws RegException;
-
-    /**
-     * Load output from workflow execution.
-     * 
-     * @param workflowId
-     * @return List of parameters
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    public List<ActualParameter> loadOutput(String workflowId) throws RegException;
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/DescriptorRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/DescriptorRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/DescriptorRegistry.java
deleted file mode 100644
index 92bf424..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/DescriptorRegistry.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.registry.api.exception.RegException;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException;
-import org.apache.airavata.registry.api.exception.gateway.DescriptorDoesNotExistsException;
-import org.apache.airavata.registry.api.exception.gateway.MalformedDescriptorException;
-
-public interface DescriptorRegistry extends AiravataSubRegistry {
-	
-	/*Note
-	 * Name changes of the descriptors should not be allowed
-	 */
-	
-	//---------Host Descriptor data------------
-	public boolean isHostDescriptorExists(String descriptorName)throws RegException;
-	public void addHostDescriptor(HostDescription descriptor) throws DescriptorAlreadyExistsException, RegException;
-	public void updateHostDescriptor(HostDescription descriptor)throws DescriptorDoesNotExistsException, RegException;
-	public HostDescription getHostDescriptor(String hostName)throws DescriptorDoesNotExistsException,MalformedDescriptorException, RegException;
-	public void removeHostDescriptor(String hostName)throws DescriptorDoesNotExistsException, RegException;
-	public List<HostDescription> getHostDescriptors()throws MalformedDescriptorException, RegException;
-	public ResourceMetadata getHostDescriptorMetadata(String hostName)throws DescriptorDoesNotExistsException, RegException;
-
-	//---------Service Descriptor data------------
-	public boolean isServiceDescriptorExists(String descriptorName)throws RegException;
-	public void addServiceDescriptor(ServiceDescription descriptor)throws DescriptorAlreadyExistsException, RegException;
-	public void updateServiceDescriptor(ServiceDescription descriptor)throws DescriptorDoesNotExistsException, RegException;
-	public ServiceDescription getServiceDescriptor(String serviceName)throws DescriptorDoesNotExistsException,MalformedDescriptorException, RegException;
-	public void removeServiceDescriptor(String serviceName)throws DescriptorDoesNotExistsException, RegException;
-	public List<ServiceDescription> getServiceDescriptors()throws MalformedDescriptorException, RegException;
-	public ResourceMetadata getServiceDescriptorMetadata(String serviceName)throws DescriptorDoesNotExistsException, RegException;
-	
-	//---------Application Descriptor data------------
-	public boolean isApplicationDescriptorExists(String serviceName, String hostName, String descriptorName)throws RegException;
-	public void addApplicationDescriptor(ServiceDescription serviceDescription, HostDescription hostDescriptor, ApplicationDescription descriptor)throws DescriptorAlreadyExistsException, RegException;
-	public void addApplicationDescriptor(String serviceName, String hostName, ApplicationDescription descriptor)throws DescriptorAlreadyExistsException, RegException;
-	public void udpateApplicationDescriptor(ServiceDescription serviceDescription, HostDescription hostDescriptor, ApplicationDescription descriptor)throws DescriptorDoesNotExistsException, RegException;
-	public void updateApplicationDescriptor(String serviceName, String hostName, ApplicationDescription descriptor)throws DescriptorDoesNotExistsException, RegException;
-	public ApplicationDescription getApplicationDescriptor(String serviceName, String hostname, String applicationName)throws DescriptorDoesNotExistsException, MalformedDescriptorException, RegException;
-	public ApplicationDescription getApplicationDescriptors(String serviceName, String hostname)throws MalformedDescriptorException, RegException;
-	public Map<String,ApplicationDescription> getApplicationDescriptors(String serviceName)throws MalformedDescriptorException, RegException;
-	//public Map<String,ApplicationDescription> getApplicationDescriptorsFromHostName(String hostName)throws MalformedDescriptorException, RegistryException;
-	public Map<String[],ApplicationDescription> getApplicationDescriptors()throws MalformedDescriptorException, RegException;
-	public void removeApplicationDescriptor(String serviceName, String hostName, String applicationName)throws DescriptorDoesNotExistsException, RegException;
-	public ResourceMetadata getApplicationDescriptorMetadata(String serviceName, String hostName, String applicationName)throws DescriptorDoesNotExistsException, RegException;
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java
deleted file mode 100644
index f385c7e..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ExecutionErrors.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-public class ExecutionErrors {
-	public static enum Source{
-		ALL,
-		EXPERIMENT,
-		WORKFLOW,
-		NODE,
-		APPLICATION
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/Gateway.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/Gateway.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/Gateway.java
deleted file mode 100644
index 8640410..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/Gateway.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class Gateway {
-	private String gatewayName = "default";
-
-    public Gateway() {
-    }
-
-    public Gateway(String gatewayName) {
-		setGatewayName(gatewayName);
-	}
-	
-	public String getGatewayName() {
-		return gatewayName;
-	}
-
-	public void setGatewayName(String gatewayName) {
-		this.gatewayName = gatewayName;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java
deleted file mode 100644
index 2d65a22..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import org.apache.airavata.common.utils.AiravataJobState;
-import org.apache.airavata.registry.api.exception.RegException;
-
-import java.util.List;
-import java.util.Map;
-
-public interface OrchestratorRegistry extends AiravataSubRegistry {
-
-
-    /**
-     * this return information about GFAC instances running in the system.
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    Map<String, Integer> getGFACNodeList() throws RegException;
-
-    /**
-     * This is the method to use to add a GFAC Node to registry,
-     * during embedded mode it should add a single gfac node
-     * @param uri
-     * @param nodeID
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    boolean addGFACNode(String uri, int nodeID)throws RegException;
-
-
-    /**
-     * This can be used to change the status to any valid status
-     * @param experimentID
-     * @param state
-     * @param gfacEPR
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    boolean changeStatus(String experimentID,AiravataJobState.State state, String gfacEPR)throws RegException;
-    
-    /**
-     * This can be used to change the status to any valid status
-     * @param experimentID
-     * @param state
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    boolean changeStatus(String experimentID,AiravataJobState.State state)throws RegException;
-
-
-    /**
-     * This method can be used to seek the status of a given experiment
-     * @param experimentID
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    AiravataJobState getState(String experimentID)throws RegException;
-
-    /**
-     * This returns all the jobs with the given state
-     * @param state give any state user wants to retrieve all the experiment IDs
-     * @return
-     * @throws RuntimeException
-     */
-    List<String> getAllJobsWithState(AiravataJobState state) throws RuntimeException;
-
-    /**
-     * This will return list of experimentID of jobs which are in
-     * ACCEPTED state
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    List<String> getAllAcceptedJobs()throws RegException;
-
-
-    /**
-     * This will return all the hanged jobs, the logic to determine
-     * whether job is hanged or not is depend on the implementation
-     * @return
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    List<String> getAllHangedJobs()throws RegException;
-
-    /**
-     * return the number of jobs hanged, it not normal that jobs are hanged
-     * all the time, so users can use this method before try to retrieve
-     * list of hanged jobs
-     * @return  number of hanged jobs
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    int getHangedJobCount()throws RegException;
-
-    /**
-     * reset hanged jobs based on previous state
-     * @param experimentID
-     * @return true if operation is successful
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-    boolean resetHangedJob(String experimentID)throws RegException;
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/PasswordCallback.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/PasswordCallback.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/PasswordCallback.java
deleted file mode 100644
index 1b2d8aa..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/PasswordCallback.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.apache.airavata.registry.api;/*
- *
- * 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.
- *
- */
-
-public interface PasswordCallback {
-
-    public String getPassword (String username);
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProjectsRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProjectsRegistry.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProjectsRegistry.java
deleted file mode 100644
index ffe905e..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/ProjectsRegistry.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * 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.registry.api;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.airavata.registry.api.exception.RegException;
-import org.apache.airavata.registry.api.exception.worker.ExperimentDoesNotExistsException;
-import org.apache.airavata.registry.api.exception.worker.WorkspaceProjectAlreadyExistsException;
-import org.apache.airavata.registry.api.exception.worker.WorkspaceProjectDoesNotExistsException;
-
-public interface ProjectsRegistry extends AiravataSubRegistry {
-	
-	//------------Project management
-	public boolean isWorkspaceProjectExists(String projectName) throws RegException;
-	public boolean isWorkspaceProjectExists(String projectName, boolean createIfNotExists) throws RegException;
-	public void addWorkspaceProject(WorkspaceProject project) throws WorkspaceProjectAlreadyExistsException, RegException;
-	public void updateWorkspaceProject(WorkspaceProject project) throws WorkspaceProjectDoesNotExistsException, RegException;
-	public void deleteWorkspaceProject(String projectName) throws WorkspaceProjectDoesNotExistsException, RegException;
-	public WorkspaceProject getWorkspaceProject(String projectName) throws WorkspaceProjectDoesNotExistsException, RegException;
-	public List<WorkspaceProject> getWorkspaceProjects() throws RegException;
-	
-	//------------Experiment management
-	public void addExperiment(String projectName, AiravataExperiment experiment) throws WorkspaceProjectDoesNotExistsException, ExperimentDoesNotExistsException, RegException;
-	public void removeExperiment(String experimentId) throws ExperimentDoesNotExistsException;
-	public List<AiravataExperiment> getExperiments() throws RegException;
-	public List<AiravataExperiment> getExperiments(String projectName)throws RegException;
-	public List<AiravataExperiment> getExperiments(Date from, Date to)throws RegException;
-	public List<AiravataExperiment> getExperiments(String projectName, Date from, Date to) throws RegException;
-}


[9/9] git commit: retiring previous registry API - AIRAVATA-1234

Posted by ch...@apache.org.
retiring previous registry API - AIRAVATA-1234


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f72637f2
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f72637f2
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f72637f2

Branch: refs/heads/master
Commit: f72637f211f5defca1bd7bee22fb3633c9f84808
Parents: 208e9f4
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Aug 22 14:54:47 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Aug 22 14:54:47 2014 -0400

----------------------------------------------------------------------
 .../java-client-samples/pom.xml                 |   17 +-
 .../client/samples/CreateLaunchExperiment.java  |   34 +-
 .../samples/CreateLaunchExperimentUS3.java      |   80 +-
 .../samples/TestCreateLaunchExperiment.java     |   54 +-
 .../airavata/client/AiravataAPIFactory.java     |    5 +-
 .../apache/airavata/client/AiravataClient.java  |   82 +-
 .../client/tools/DocumentCreatorNew.java        |   34 +-
 .../client/airavata/AiravataClientTest.java     |   16 +-
 .../main/resources/airavata-client.properties   |    2 +-
 .../main/resources/airavata-server.properties   |    2 +-
 modules/distribution/client/java/pom.xml        |   10 -
 .../java/src/main/assembly/bin-assembly.xml     |    2 -
 modules/distribution/server/pom.xml             |   10 -
 .../server/src/main/assembly/bin-assembly.xml   |    2 -
 modules/gfac/airavata-gfac-service/pom.xml      |   25 +
 .../airavata/gfac/server/GfacServerHandler.java |   27 +-
 .../airavata/gfac/client/util/Initialize.java   |    9 +-
 .../gfac/bes/provider/impl/BESProvider.java     |   88 +-
 modules/gfac/gfac-core/pom.xml                  |   10 -
 .../apache/airavata/gfac/GFacConfiguration.java |   16 +-
 .../org/apache/airavata/gfac/Scheduler.java     |   10 -
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |   34 +-
 .../apache/airavata/gfac/core/cpi/GFacImpl.java | 1356 +++++----
 .../gfac/core/handler/AbstractHandler.java      |    4 +-
 .../handler/AbstractRecoverableHandler.java     |    4 +-
 .../core/handler/AppDescriptorCheckHandler.java |    5 -
 .../gfac/core/provider/AbstractProvider.java    |    3 +-
 .../provider/AbstractRecoverableProvider.java   |    3 +-
 .../airavata/gfac/core/utils/GFacUtils.java     |  303 +-
 .../apache/airavata/job/GFacConfigXmlTest.java  |   10 +-
 modules/gfac/gfac-ec2/pom.xml                   |    5 -
 .../apache/airavata/gfac/ec2/EC2Provider.java   |   18 +-
 .../airavata/gfac/ec2/EC2ProviderTest.java      |    6 +-
 .../impl/GramProviderTestWithMyProxyAuth.java   |    6 +-
 .../gsissh/provider/impl/GSISSHProvider.java    |    5 +-
 .../impl/GSISSHProviderTestWithMyProxyAuth.java |    6 +-
 .../gfac/services/impl/LocalProviderTest.java   |    2 +-
 modules/gfac/gfac-monitor/pom.xml               |   10 -
 .../handlers/GridPullMonitorHandler.java        |    5 +-
 .../handlers/GridPushMonitorHandler.java        |    4 +-
 .../gfac/ssh/provider/impl/SSHProvider.java     |    3 +-
 .../services/impl/BigRed2TestWithSSHAuth.java   |    6 +-
 .../impl/SSHProviderTestWithSSHAuth.java        |    6 +-
 .../integration/AbstractIntegrationTest.java    |   11 -
 .../apache/airavata/integration/BaseCaseIT.java |   96 +-
 .../airavata/integration/DataRetrievalIT.java   |   24 +-
 .../airavata/integration/ForEachCaseIT.java     |  114 +-
 .../integration/PasswordCallbackImpl.java       |   78 +-
 .../WorkflowIntegrationTestBase.java            |  314 +-
 .../integration/WorkflowSamplesCaseIT.java      |  152 +-
 .../server/OrchestratorServerHandler.java       |   38 +-
 .../client/OrchestratorClientFactoryTest.java   |   26 +-
 .../orchestrator/client/util/Initialize.java    |    7 +-
 modules/orchestrator/orchestrator-core/pom.xml  |   10 +-
 .../core/OrchestratorConfiguration.java         |   12 -
 .../core/context/OrchestratorContext.java       |   11 -
 .../core/impl/GFACEmbeddedJobSubmitter.java     |    6 +-
 .../core/impl/GFACServiceJobSubmitter.java      |    2 -
 .../core/utils/OrchestratorUtils.java           |   25 +-
 .../cpi/impl/AbstractOrchestrator.java          |   98 +-
 .../cpi/impl/SimpleOrchestratorImpl.java        |   10 +-
 .../orchestrator/core/BaseOrchestratorTest.java |   38 +-
 .../orchestrator/core/NewOrchestratorTest.java  |   21 -
 .../orchestrator/core/util/Initialize.java      |    9 +-
 modules/registry/airavata-jpa-registry/pom.xml  |    5 -
 .../registry/jpa/JPAResourceAccessor.java       |   49 -
 .../registry/jpa/impl/AiravataJPARegistry.java  | 2838 ------------------
 ...avataRegistryConnectionDataProviderImpl.java |   42 -
 .../jpa/resources/ExperimentDataRetriever.java  |  543 ----
 .../registry/jpa/resources/UserResource.java    |    7 +-
 .../registry/jpa/AbstractResourceTest.java      |    2 +-
 .../registry/jpa/util/Initialize.java           |    9 +-
 modules/registry/pom.xml                        |    1 -
 modules/registry/registry-api/pom.xml           |   80 -
 .../registry/api/AiravataExperiment.java        |   73 -
 .../registry/api/AiravataRegistry2.java         |   65 -
 .../AiravataRegistryConnectionDataProvider.java |   29 -
 .../registry/api/AiravataRegistryFactory.java   |  140 -
 .../registry/api/AiravataSubRegistry.java       |   97 -
 .../airavata/registry/api/AiravataUser.java     |   48 -
 .../registry/api/ConfigurationRegistry.java     |   59 -
 .../registry/api/CredentialRegistry.java        |   69 -
 .../airavata/registry/api/DataRegistry.java     |   50 -
 .../registry/api/DescriptorRegistry.java        |   74 -
 .../airavata/registry/api/ExecutionErrors.java  |   33 -
 .../apache/airavata/registry/api/Gateway.java   |   47 -
 .../registry/api/OrchestratorRegistry.java      |  120 -
 .../airavata/registry/api/PasswordCallback.java |   25 -
 .../airavata/registry/api/ProjectsRegistry.java |   50 -
 .../registry/api/ProvenanceRegistry.java        |  528 ----
 .../registry/api/PublishedWorkflowRegistry.java |   45 -
 .../airavata/registry/api/ResourceMetadata.java |   70 -
 .../airavata/registry/api/UserRegistry.java     |   39 -
 .../registry/api/UserWorkflowRegistry.java      |   43 -
 .../airavata/registry/api/WorkspaceProject.java |   95 -
 .../AiravataRegUninitializedException.java      |   32 -
 .../DeploymentDescriptionRetrieveException.java |   35 -
 .../GatewayNotRegisteredException.java          |   32 -
 .../HostDescriptionRetrieveException.java       |   33 -
 .../RegAPIVersionIncompatibleException.java     |   39 -
 .../RegAccessorInstantiateException.java        |   32 -
 .../exception/RegAccessorInvalidException.java  |   32 -
 .../exception/RegAccessorNotFoundException.java |   32 -
 .../RegAccessorUndefinedException.java          |   40 -
 .../registry/api/exception/RegException.java    |   39 -
 .../exception/RegistrySettingsException.java    |   37 -
 .../RegistrySettingsLoadException.java          |   38 -
 .../ServiceDescriptionRetrieveException.java    |   35 -
 .../UnimplementedRegOperationException.java     |   32 -
 .../UnknownRegConnectionDataException.java      |   36 -
 .../UnspecifiedRegistrySettingsException.java   |   30 -
 .../DescriptorAlreadyExistsException.java       |   34 -
 .../DescriptorDoesNotExistsException.java       |   34 -
 .../gateway/InsufficientDataException.java      |   34 -
 .../gateway/MalformedDescriptorException.java   |   34 -
 ...PublishedWorkflowAlreadyExistsException.java |   34 -
 ...PublishedWorkflowDoesNotExistsException.java |   34 -
 .../ApplicationJobAlreadyExistsException.java   |   34 -
 .../ApplicationJobDoesNotExistsException.java   |   34 -
 .../ExperimentAlreadyExistsException.java       |   34 -
 .../ExperimentDoesNotExistsException.java       |   34 -
 .../worker/ExperimentLazyLoadedException.java   |   34 -
 .../InvalidApplicationJobIDException.java       |   34 -
 .../UserWorkflowAlreadyExistsException.java     |   34 -
 .../UserWorkflowDoesNotExistsException.java     |   34 -
 .../WorkflowInstanceAlreadyExistsException.java |   34 -
 .../WorkflowInstanceDoesNotExistsException.java |   34 -
 ...kflowInstanceNodeAlreadyExistsException.java |   34 -
 ...kflowInstanceNodeDoesNotExistsException.java |   34 -
 .../WorkspaceProjectAlreadyExistsException.java |   34 -
 .../WorkspaceProjectDoesNotExistsException.java |   34 -
 .../registry/api/impl/ExperimentDataImpl.java   |  221 --
 .../api/impl/WorkflowExecutionDataImpl.java     |  182 --
 .../api/orchestrator/OrchestratorData.java      |  113 -
 .../orchestrator/impl/OrchestratorDataImpl.java |  112 -
 .../registry/api/util/RegistryConstants.java    |   36 -
 .../registry/api/util/RegistrySettings.java     |  127 -
 .../registry/api/util/RegistryUtils.java        |  124 -
 .../registry/api/util/WebServiceUtil.java       |  202 --
 .../registry/api/workflow/ApplicationJob.java   |  295 --
 .../workflow/ApplicationJobExecutionError.java  |   67 -
 .../api/workflow/ApplicationJobStatusData.java  |   63 -
 .../registry/api/workflow/ExecutionError.java   |  103 -
 .../registry/api/workflow/ExperimentData.java   |  123 -
 .../api/workflow/ExperimentExecutionError.java  |   40 -
 .../api/workflow/ExperimentMetadata.java        |   49 -
 .../registry/api/workflow/ExperimentName.java   |   49 -
 .../registry/api/workflow/ExperimentUser.java   |   48 -
 .../registry/api/workflow/InputData.java        |   34 -
 .../api/workflow/NodeExecutionData.java         |  236 --
 .../api/workflow/NodeExecutionError.java        |   58 -
 .../api/workflow/NodeExecutionStatus.java       |   78 -
 .../registry/api/workflow/OutputData.java       |   34 -
 .../api/workflow/WorkflowExecution.java         |   69 -
 .../api/workflow/WorkflowExecutionData.java     |  118 -
 .../api/workflow/WorkflowExecutionError.java    |   49 -
 .../api/workflow/WorkflowExecutionStatus.java   |  128 -
 .../registry/api/workflow/WorkflowIOData.java   |   58 -
 .../api/workflow/WorkflowInstanceNode.java      |   67 -
 .../workflow/WorkflowInstanceNodePortData.java  |   89 -
 .../api/workflow/WorkflowNodeGramData.java      |   83 -
 .../api/workflow/WorkflowNodeIOData.java        |  114 -
 .../registry/api/workflow/WorkflowNodeType.java |   84 -
 .../api/workflow/WorkflowRunTimeData.java       |   90 -
 modules/registry/registry-cpi/pom.xml           |    5 +
 .../registry/cpi/utils/RegistrySettings.java    |  127 +
 modules/test-suite/pom.xml                      |    6 -
 modules/workflow-model/workflow-engine/pom.xml  |   12 -
 .../WorkflowInterpreterConfiguration.java       |    2 -
 modules/ws-messenger/messagebox/pom.xml         |    5 -
 modules/ws-messenger/messagebroker/pom.xml      |    5 -
 modules/xbaya-gui/pom.xml                       |    5 -
 .../xbaya/registry/PasswordCallbackImpl.java    |   78 +-
 pom.xml                                         |    2 +-
 samples/java-client/experiment/pom.xml          |   22 -
 tools/registry-tool/pom.xml                     |    5 -
 176 files changed, 1838 insertions(+), 11829 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/airavata-api/airavata-client-sdks/java-client-samples/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/pom.xml b/airavata-api/airavata-client-sdks/java-client-samples/pom.xml
index d51d9f5..a475b29 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/pom.xml
+++ b/airavata-api/airavata-client-sdks/java-client-samples/pom.xml
@@ -8,7 +8,8 @@
     ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
     the License. -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
 
@@ -25,7 +26,7 @@
     <url>http://airavata.apache.org/</url>
 
     <dependencies>
-    
+
         <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-data-models</artifactId>
@@ -43,11 +44,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-schema-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -76,11 +72,16 @@
             <artifactId>mysql-connector-java</artifactId>
             <version>${mysql.connector.version}</version>
         </dependency>
-	<dependency>
+        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-client-configuration</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 8cfe59b..7c03ce0 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -21,37 +21,23 @@
 
 package org.apache.airavata.client.samples;
 
-import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.airavata.model.error.*;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ClientSettings;
-import org.apache.airavata.model.util.ProjectModelUtil;
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.DocumentCreator;
 import org.apache.airavata.client.tools.DocumentCreatorNew;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.error.*;
 import org.apache.airavata.model.util.ExperimentModelUtil;
-import org.apache.airavata.persistance.registry.jpa.model.ErrorDetail;
-import org.apache.airavata.schemas.gfac.InputParameterType;
-import org.apache.airavata.schemas.gfac.OutputParameterType;
-import org.apache.airavata.schemas.gfac.ParameterType;
-import org.apache.airavata.workflow.model.component.system.StreamSourceComponent;
+import org.apache.airavata.model.util.ProjectModelUtil;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.xmlsoap.schemas.soap.encoding.*;
 
-import java.lang.String;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
-import java.util.Set;
 
 public class CreateLaunchExperiment {
 
@@ -64,8 +50,8 @@ public class CreateLaunchExperiment {
     private static Airavata.Client client;
     private static String localHostAppId = "localhost_3b5962d3-5e7e-4a97-9d1f-25c5ec436ba5,SimpleEcho0_44c34394-ca27-4fa9-bb2d-87f95a02352a";
     private static String sshHostAppId;
-    private static String pbsEchoAppId = "trestles.sdsc.edu_03b34af0-f55d-4cb3-9bce-abba35d8b30d,SimpleEcho2_e8ca0bb2-d985-4775-884b-a27b29a33251";
-    private static String pbsWRFAppId = "trestles.sdsc.edu_42adfdf7-d7bc-474a-8905-6624817b22ef,WRF_24f50b3c-4f1e-4358-bb10-c6838b12e231";
+    private static String pbsEchoAppId = "trestles.sdsc.edu_b67c9b6a-3940-4ba1-ac67-4f5c42e60fb8,SimpleEcho2_4c9e76f3-eab0-4ccb-8630-b53f22646ebd";
+    private static String pbsWRFAppId = "trestles.sdsc.edu_c033c9b4-601e-4cd7-ac98-d7de33df0557,WRF_f1726a18-9aec-4077-91c2-93877df01972";
     private static String slurmAppId = "stampede.tacc.xsede.org_b2ef59cb-f626-4767-9ca0-601f94c42ba4,SimpleEcho3_b81c2559-a088-42a3-84ce-40119d874918";
     private static String sgeAppId;
     private static String br2EchoAppId = "bigred2_9c1e6be8-f7d8-4494-98f2-bf508790e8c6,SimpleEchoBR_149fd613-98e2-46e7-ac7c-4d393349469e";
@@ -253,17 +239,17 @@ public class CreateLaunchExperiment {
             DataObjectType input = new DataObjectType();
             input.setKey("WRF_Namelist");
             input.setType(DataType.URI);
-            input.setValue("/Users/lahirugunathilake/Downloads/wrf_sample_inputs/namelist.input");
+            input.setValue("/Users/chathuri/Downloads/wrf_sample_inputs/namelist.input");
 
             DataObjectType input1 = new DataObjectType();
             input1.setKey("WRF_Input_File");
             input1.setType(DataType.URI);
-            input1.setValue("/Users/lahirugunathilake/Downloads/wrf_sample_inputs/wrfinput_d01");
+            input1.setValue("/Users/chathuri/Downloads/wrf_sample_inputs/wrfinput_d01");
 
             DataObjectType input2 = new DataObjectType();
             input2.setKey("WRF_Boundary_File");
             input2.setType(DataType.URI);
-            input2.setValue("/Users/lahirugunathilake/Downloads/wrf_sample_inputs/wrfbdy_d01");
+            input2.setValue("/Users/chathuri/Downloads/wrf_sample_inputs/wrfbdy_d01");
 
             exInputs.add(input);
             exInputs.add(input1);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
index b8aebc8..43d21f5 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
@@ -19,24 +19,13 @@
 
 package org.apache.airavata.client.samples;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
+import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.error.AiravataClientException;
 import org.apache.airavata.model.error.AiravataSystemException;
 import org.apache.airavata.model.error.ExperimentNotFoundException;
 import org.apache.airavata.model.error.InvalidRequestException;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.UltrascanDocumentCreator;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.ClientSettings;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;
@@ -45,6 +34,11 @@ import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 public class CreateLaunchExperimentUS3 {
 	
 	 //FIXME: Read from a config file
@@ -112,37 +106,37 @@ public class CreateLaunchExperimentUS3 {
             e.printStackTrace();
         }
     }
-    public static void addDescriptors() throws AiravataAPIInvocationException,ApplicationSettingsException  {
-        try {
-            UltrascanDocumentCreator documentCreator = new UltrascanDocumentCreator(getAiravataAPI());
-            documentCreator.createMPIPBSDocsTrestles();
-            documentCreator.createEchoPBSDocsforTestles();
-            documentCreator.createEchoSlurmDocsofStampede();
-            documentCreator.createMPISLURMDocsStampede();
-        } catch (AiravataAPIInvocationException e) {
-            logger.error("Unable to create airavata API", e.getMessage());
-            throw new AiravataAPIInvocationException(e);
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to create airavata API", e.getMessage());
-            throw new ApplicationSettingsException(e.getMessage());
-        }
-    }
-
-    private static AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException, ApplicationSettingsException {
-        AiravataAPI airavataAPI;
-        try {
-            String sysUser = ClientSettings.getSetting(DEFAULT_USER);
-            String gateway = ClientSettings.getSetting(DEFAULT_GATEWAY);
-            airavataAPI = AiravataAPIFactory.getAPI(gateway, sysUser);
-        } catch (AiravataAPIInvocationException e) {
-            logger.error("Unable to create airavata API", e.getMessage());
-            throw new AiravataAPIInvocationException(e);
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to create airavata API", e.getMessage());
-            throw new ApplicationSettingsException(e.getMessage());
-        }
-        return airavataAPI;
-    }
+//    public static void addDescriptors() throws AiravataAPIInvocationException,ApplicationSettingsException  {
+//        try {
+//            UltrascanDocumentCreator documentCreator = new UltrascanDocumentCreator(getAiravataAPI());
+//            documentCreator.createMPIPBSDocsTrestles();
+//            documentCreator.createEchoPBSDocsforTestles();
+//            documentCreator.createEchoSlurmDocsofStampede();
+//            documentCreator.createMPISLURMDocsStampede();
+//        } catch (AiravataAPIInvocationException e) {
+//            logger.error("Unable to create airavata API", e.getMessage());
+//            throw new AiravataAPIInvocationException(e);
+//        } catch (ApplicationSettingsException e) {
+//            logger.error("Unable to create airavata API", e.getMessage());
+//            throw new ApplicationSettingsException(e.getMessage());
+//        }
+//    }
+
+//    private static AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException, ApplicationSettingsException {
+//        AiravataAPI airavataAPI;
+//        try {
+//            String sysUser = ClientSettings.getSetting(DEFAULT_USER);
+//            String gateway = ClientSettings.getSetting(DEFAULT_GATEWAY);
+//            airavataAPI = AiravataAPIFactory.getAPI(gateway, sysUser);
+//        } catch (AiravataAPIInvocationException e) {
+//            logger.error("Unable to create airavata API", e.getMessage());
+//            throw new AiravataAPIInvocationException(e);
+//        } catch (ApplicationSettingsException e) {
+//            logger.error("Unable to create airavata API", e.getMessage());
+//            throw new ApplicationSettingsException(e.getMessage());
+//        }
+//        return airavataAPI;
+//    }
 
     public static String createExperimentForTrestles(Airavata.Client client) throws TException  {
         try{

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java
index a90ed43..63c473c 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java
@@ -23,31 +23,19 @@ package org.apache.airavata.client.samples;
 
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.DocumentCreator;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.ClientSettings;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.error.*;
-import org.apache.airavata.model.util.ExperimentModelUtil;
-import org.apache.airavata.model.util.ProjectModelUtil;
-import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.error.AiravataSystemException;
+import org.apache.airavata.model.error.InvalidRequestException;
 import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.workflow.model.component.system.SystemComponent;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.sql.Timestamp;
-import java.text.Format;
-import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.Calendar;
+import java.util.List;
+import java.util.Map;
 
 public class TestCreateLaunchExperiment {
 
@@ -105,21 +93,21 @@ public class TestCreateLaunchExperiment {
         }
     }
 
-    private static AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException, ApplicationSettingsException {
-        AiravataAPI airavataAPI;
-        try {
-            String sysUser = ClientSettings.getSetting(DEFAULT_USER);
-            String gateway = ClientSettings.getSetting(DEFAULT_GATEWAY);
-            airavataAPI = AiravataAPIFactory.getAPI(gateway, sysUser);
-        } catch (AiravataAPIInvocationException e) {
-            logger.error("Unable to create airavata API", e.getMessage());
-            throw new AiravataAPIInvocationException(e);
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to create airavata API", e.getMessage());
-            throw new ApplicationSettingsException(e.getMessage());
-        }
-        return airavataAPI;
-    }
+//    private static AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException, ApplicationSettingsException {
+//        AiravataAPI airavataAPI;
+//        try {
+//            String sysUser = ClientSettings.getSetting(DEFAULT_USER);
+//            String gateway = ClientSettings.getSetting(DEFAULT_GATEWAY);
+//            airavataAPI = AiravataAPIFactory.getAPI(gateway, sysUser);
+//        } catch (AiravataAPIInvocationException e) {
+//            logger.error("Unable to create airavata API", e.getMessage());
+//            throw new AiravataAPIInvocationException(e);
+//        } catch (ApplicationSettingsException e) {
+//            logger.error("Unable to create airavata API", e.getMessage());
+//            throw new ApplicationSettingsException(e.getMessage());
+//        }
+//        return airavataAPI;
+//    }
 
     public static List<Experiment> getExperimentsForUser (Airavata.Client client, String user){
         try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
index 62305d9..606301c 100644
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
+++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataAPIFactory.java
@@ -19,14 +19,13 @@
 
 package org.apache.airavata.client;
 
-import java.net.URI;
-
 import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.impl.PasswordCallBackImpl;
 import org.apache.airavata.common.utils.SecurityUtil;
 import org.apache.airavata.registry.api.PasswordCallback;
 
+import java.net.URI;
+
 public class AiravataAPIFactory {
 	
 	public static AiravataAPI getAPI(String gateway, String username, String alternativeUser) throws AiravataAPIInvocationException{

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
index d516918..6ee3480 100644
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
+++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
@@ -112,31 +112,31 @@ public class AiravataClient extends Observable implements AiravataAPI {
 		if (registryUrl != null) {
 			config.put(AiravataClient.REGISTRY, registryUrl.toString());
 		}
-		AiravataRegistry2 registryObject = getRegistry(registryUrl, gateway,
-				username, new PasswordCallBackImpl(username, password));
-		if (registryObject != null) {
-			URI uri = registryObject.getEventingServiceURI();
-			config.put(
-					AiravataClient.BROKER,
-					uri == null ? "http://localhost:8080/airavata-server/services/EventingService"
-							: uri.toString());
-			uri = registryObject.getMessageBoxURI();
-			config.put(
-					AiravataClient.MSGBOX,
-					uri == null ? "http://localhost:8080/airavata-server/services/MsgBoxService"
-							: uri.toString());
-			List<URI> URLList = registryObject.getWorkflowInterpreterURIs();
-			config.put(
-					AiravataClient.WORKFLOWSERVICEURL,
-					URLList == null || URLList.size() == 0 ? "http://localhost:8080/airavata-server/services/WorkflowInterpretor?wsdl"
-							: URLList.get(0).toString());
-			List<URI> urlList = registryObject.getGFacURIs();
-			config.put(
-					AiravataClient.GFAC,
-					urlList == null || urlList.size() == 0 ? "http://localhost:8080/airavata-server/services/GFacService"
-							: urlList.get(0).toString());
-			config.put(AiravataClient.WITHLISTENER, "true");
-		}
+//		AiravataRegistry2 registryObject = getRegistry(registryUrl, gateway,
+//				username, new PasswordCallBackImpl(username, password));
+//		if (registryObject != null) {
+//			URI uri = registryObject.getEventingServiceURI();
+//			config.put(
+//					AiravataClient.BROKER,
+//					uri == null ? "http://localhost:8080/airavata-server/services/EventingService"
+//							: uri.toString());
+//			uri = registryObject.getMessageBoxURI();
+//			config.put(
+//					AiravataClient.MSGBOX,
+//					uri == null ? "http://localhost:8080/airavata-server/services/MsgBoxService"
+//							: uri.toString());
+//			List<URI> URLList = registryObject.getWorkflowInterpreterURIs();
+//			config.put(
+//					AiravataClient.WORKFLOWSERVICEURL,
+//					URLList == null || URLList.size() == 0 ? "http://localhost:8080/airavata-server/services/WorkflowInterpretor?wsdl"
+//							: URLList.get(0).toString());
+//			List<URI> urlList = registryObject.getGFacURIs();
+//			config.put(
+//					AiravataClient.GFAC,
+//					urlList == null || urlList.size() == 0 ? "http://localhost:8080/airavata-server/services/GFacService"
+//							: urlList.get(0).toString());
+//			config.put(AiravataClient.WITHLISTENER, "true");
+//		}
 		return config;
 	}
 
@@ -146,34 +146,6 @@ public class AiravataClient extends Observable implements AiravataAPI {
 //        if (AiravataUtils.isServer()) {
 //            waitTillRegistryServiceStarts();
 //        }
-
-        try {
-			if (!configCreated) {
-				configuration = createConfig(getRegitryURI(), getGateway(), getCurrentUser(),
-						getPassword());
-				configCreated = true;
-			}
-			updateClientConfiguration(configuration);
-
-			// TODO: At some point this should contain the current user the
-			// airavata
-			// client is
-			// logged in to the Airavata system
-			setCurrentUser(getClientConfiguration().getJcrUsername());
-		} catch (Exception e) {
-			throw new AiravataAPIInvocationException(
-					"Error while initializing the Airavata API", e);
-		}
-	}
-
-    private void waitTillRegistryServiceStarts() throws AiravataAPIInvocationException{
-
-        synchronized (API_VERSION) {
-            if (!registryServiceStarted) {
-                waitForRegistryServiceToStart(getRegistryWebServiceWSDLUrl());
-                registryServiceStarted = true;
-            }
-        }
     }
 
     private String getRegistryWebServiceWSDLUrl() throws AiravataAPIInvocationException {
@@ -354,7 +326,7 @@ public class AiravataClient extends Observable implements AiravataAPI {
         }
 		return executionManager;
 	}
-	
+
 	@Override
 	public CredentialStoreManager getCredentialStoreManager() {
 		if(credentialStoreManagerImpl == null)
@@ -417,7 +389,7 @@ public class AiravataClient extends Observable implements AiravataAPI {
 	public void setGateway(String gateway) {
 		this.gateway = gateway;
 	}
-	
+
 	public static void main(String[] args) throws Exception {
 		AiravataAPI api = AiravataAPIFactory.getAPI(new URI("http://localhost:8080/airavata/services/registry"), "default", "admin", new PasswordCallBackImpl("admin", "admin"));
 		ExperimentAdvanceOptions options = api.getExecutionManager().createExperimentAdvanceOptions();

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
index f686847..1cf6a3c 100644
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
+++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java
@@ -20,52 +20,26 @@
 */
 package org.apache.airavata.client.tools;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
 import org.airavata.appcatalog.cpi.AppCatalog;
 import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.api.Airavata;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.utils.ClientSettings;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelismType;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
-import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
-import org.apache.airavata.model.appcatalog.computeresource.LOCALDataMovement;
-import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
-import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
-import org.apache.airavata.model.appcatalog.computeresource.SCPDataMovement;
-import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
-import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.*;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
 import org.apache.airavata.model.error.AiravataClientException;
 import org.apache.airavata.model.error.AiravataSystemException;
 import org.apache.airavata.model.error.InvalidRequestException;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-import org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType;
-import org.apache.airavata.schemas.gfac.InputParameterType;
-import org.apache.airavata.schemas.gfac.JobTypeType;
-import org.apache.airavata.schemas.gfac.OutputParameterType;
-import org.apache.airavata.schemas.gfac.SSHHostType;
-import org.apache.airavata.schemas.gfac.StringParameterType;
 import org.apache.thrift.TException;
 
+import java.io.File;
+import java.util.*;
+
 public class DocumentCreatorNew {
 
     private AppCatalog appcatalog = null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java b/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
index 802c56b..617cb8f 100644
--- a/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
+++ b/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
@@ -93,14 +93,14 @@ public class AiravataClientTest {
     }
 
     //@Test
-    public void testRegistryServiceInvocation() throws Exception {
-        org.apache.airavata.registry.stub.RegistryServiceStub stub =
-                new org.apache.airavata.registry.stub.RegistryServiceStub("http://localhost:8080/axis2/services/RegistryService?wsdl");
-        boolean registryServiceStarted = stub.isRegistryServiceStarted().getIsRegistryServiceStartedResponse().
-                getReturn();
-
-        System.out.println(registryServiceStarted);
-    }
+//    public void testRegistryServiceInvocation() throws Exception {
+//        org.apache.airavata.registry.stub.RegistryServiceStub stub =
+//                new org.apache.airavata.registry.stub.RegistryServiceStub("http://localhost:8080/axis2/services/RegistryService?wsdl");
+//        boolean registryServiceStarted = stub.isRegistryServiceStarted().getIsRegistryServiceStartedResponse().
+//                getReturn();
+//
+//        System.out.println(registryServiceStarted);
+//    }
 
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/configuration/client/src/main/resources/airavata-client.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/client/src/main/resources/airavata-client.properties b/modules/configuration/client/src/main/resources/airavata-client.properties
index a673565..9575517 100644
--- a/modules/configuration/client/src/main/resources/airavata-client.properties
+++ b/modules/configuration/client/src/main/resources/airavata-client.properties
@@ -27,7 +27,7 @@
 
 ###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
 
-class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
 #class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
 
 ###---------------------REGISTRY API IMPLEMENTATION - CUSTOM SETTINGS----------------------###

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 589c3d1..44d25c0 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -150,7 +150,7 @@ host.scheduler=org.apache.airavata.gfac.core.scheduler.impl.SimpleHostScheduler
 
 ###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
 
-class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
+#class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
 #class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
 
 ###########################################################################

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/distribution/client/java/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/pom.xml b/modules/distribution/client/java/pom.xml
index e3b8fac..d36492c 100644
--- a/modules/distribution/client/java/pom.xml
+++ b/modules/distribution/client/java/pom.xml
@@ -229,11 +229,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-schema-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -272,11 +267,6 @@
             <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <!--dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-message-monitor</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/distribution/client/java/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/src/main/assembly/bin-assembly.xml b/modules/distribution/client/java/src/main/assembly/bin-assembly.xml
index 9497ba8..f89438d 100644
--- a/modules/distribution/client/java/src/main/assembly/bin-assembly.xml
+++ b/modules/distribution/client/java/src/main/assembly/bin-assembly.xml
@@ -103,7 +103,6 @@
                 <!--<include>amazon:MapReduce.Service.Client</include> -->
                 <include>net.java.dev.jets3t:jets3t</include>
 		<include>org.apache.airavata:airavata-orchestrator-core:jar</include>
-		<include>org.apache.airavata:airavata-registry-api:jar</include>
 		<include>org.apache.airavata:airavata-gfac-schema-utils:jar</include>
 		<include>org.apache.airavata:airavata-common-utils:jar</include>
 		<include>org.apache.airavata:airavata-workflow-execution-context:jar</include>
@@ -113,7 +112,6 @@
 		<include>org.apache.airavata:airavata-api-stubs:jar</include>
 		<include>org.apache.airavata:airavata-credential-store:jar</include>
 		<include>org.apache.airavata:airavata-gfac-core:jar</include>
-		<include>org.apache.airavata:airavata-client-api:jar</include>
 		<include>commons-cli:commons-cli:jar</include>
 		<!--include>org.apache.airavata:airavata-message-monitor:jar</include>
 		<include>org.apache.airavata:airavata-workflow-model-core:jar</include>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/distribution/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml
index 8138baa..2ddd510 100644
--- a/modules/distribution/server/pom.xml
+++ b/modules/distribution/server/pom.xml
@@ -274,11 +274,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-schema-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -354,11 +349,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-message-monitor</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/distribution/server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/assembly/bin-assembly.xml b/modules/distribution/server/src/main/assembly/bin-assembly.xml
index e84d7b9..bec5b12 100644
--- a/modules/distribution/server/src/main/assembly/bin-assembly.xml
+++ b/modules/distribution/server/src/main/assembly/bin-assembly.xml
@@ -198,7 +198,6 @@
                 <include>org.apache.airavata:airavata-common-utils:jar</include>
                 <include>org.apache.airavata:airavata-orchestrator-service:jar</include>
                 <include>org.apache.airavata:airavata-orchestrator-core:jar</include>
-                <include>org.apache.airavata:airavata-registry-api:jar</include>
                 <include>org.apache.airavata:airavata-gfac-schema-utils:jar</include>
                 <include>org.apache.airavata:airavata-workflow-execution-context:jar</include>
                 <include>org.apache.airavata:airavata-registry-cpi:jar</include>
@@ -216,7 +215,6 @@
                 <include>org.apache.airavata:airavata-gfac-hadoop:jar</include>
                 <include>org.apache.airavata:airavata-gfac-bes:jar</include>
                 <include>org.apache.airavata:airavata-gfac-gram:jar</include>
-                <include>org.apache.airavata:airavata-client-api:jar</include>
                 <include>org.apache.airavata:airavata-message-monitor:jar</include>
                 <include>org.apache.airavata:airavata-workflow-model-core:jar</include>
                 <include>org.apache.airavata:airavata-messenger-commons:jar</include>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/airavata-gfac-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/pom.xml b/modules/gfac/airavata-gfac-service/pom.xml
index 4387115..ca12b41 100644
--- a/modules/gfac/airavata-gfac-service/pom.xml
+++ b/modules/gfac/airavata-gfac-service/pom.xml
@@ -37,6 +37,26 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-common-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-cpi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-jpa-registry</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -45,6 +65,11 @@
             <artifactId>airavata-model-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-api-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 	    <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-server-configuration</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index 0ec7e67..6573e19 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -20,10 +20,7 @@
 */
 package org.apache.airavata.gfac.server;
 
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.airavata.common.exception.AiravataConfigurationException;
+import com.google.common.eventbus.EventBus;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.Constants;
@@ -35,23 +32,15 @@ import org.apache.airavata.gfac.core.cpi.GFac;
 import org.apache.airavata.gfac.cpi.GfacService;
 import org.apache.airavata.gfac.cpi.gfac_cpi_serviceConstants;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.api.AiravataRegistryFactory;
-import org.apache.airavata.registry.api.AiravataUser;
-import org.apache.airavata.registry.api.Gateway;
-import org.apache.airavata.registry.api.exception.RegException;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.thrift.TException;
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.WatchedEvent;
-import org.apache.zookeeper.Watcher;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.*;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.eventbus.EventBus;
+import java.io.File;
+import java.io.IOException;
 
 
 public class GfacServerHandler implements GfacService.Iface, Watcher{
@@ -252,12 +241,8 @@ public class GfacServerHandler implements GfacService.Iface, Watcher{
 
     private GFac getGfac()throws TException{
         try {
-            return new BetterGfacImpl(registry, null,
-                                AiravataRegistryFactory.getRegistry(new Gateway(getGatewayName()),
-                                        new AiravataUser(getAiravataUserName())),zk,publisher);
-        } catch (RegException e) {
-            throw new TException("Error initializing gfac instance",e);
-        } catch (AiravataConfigurationException e) {
+            return new BetterGfacImpl(registry,zk,publisher);
+        } catch (Exception e) {
             throw new TException("Error initializing gfac instance",e);
         }
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java b/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
index 0046204..12c0c56 100644
--- a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
+++ b/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
@@ -23,9 +23,8 @@ package org.apache.airavata.gfac.client.util;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-import org.apache.airavata.registry.api.util.RegistrySettings;
 import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.utils.RegistrySettings;
 import org.apache.derby.drda.NetworkServerControl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -101,7 +100,7 @@ public class Initialize {
             jdbcUser = RegistrySettings.getSetting("registry.jdbc.user");
             jdbcPassword = RegistrySettings.getSetting("registry.jdbc.password");
             jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (RegistrySettingsException e) {
+        } catch (RegistryException e) {
             logger.error("Unable to read properties" , e);
         }
 
@@ -157,10 +156,8 @@ public class Initialize {
             resource.setWorker(workerResource);
             resource.save();
 
-        } catch (RegistrySettingsException e) {
-            logger.error("Unable to read properties", e);
         } catch (RegistryException e) {
-            logger.error("Error while saving data to registry", e);
+            logger.error("Unable to read properties", e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
index 22e823d..207e076 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
@@ -20,43 +20,31 @@
 */
 package org.apache.airavata.gfac.bes.provider.impl;
 
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.security.InvalidKeyException;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-
-import javax.security.auth.x500.X500Principal;
-
+import de.fzj.unicore.bes.client.FactoryClient;
+import de.fzj.unicore.bes.faults.UnknownActivityIdentifierFault;
+import de.fzj.unicore.uas.client.StorageClient;
+import de.fzj.unicore.wsrflite.xmlbeans.WSUtilities;
+import eu.emi.security.authn.x509.helpers.CertificateHelpers;
+import eu.emi.security.authn.x509.helpers.proxy.X509v3CertificateBuilder;
+import eu.emi.security.authn.x509.impl.CertificateUtils;
+import eu.emi.security.authn.x509.impl.CertificateUtils.Encoding;
+import eu.emi.security.authn.x509.impl.DirectoryCertChainValidator;
+import eu.emi.security.authn.x509.impl.KeyAndCertCredential;
+import eu.emi.security.authn.x509.impl.X500NameUtils;
+import eu.unicore.util.httpclient.DefaultClientConfiguration;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.bes.security.GSISecurityContext;
+import org.apache.airavata.gfac.bes.utils.DataTransferrer;
+import org.apache.airavata.gfac.bes.utils.JSDLGenerator;
+import org.apache.airavata.gfac.bes.utils.StorageCreator;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.notification.events.StatusChangeEvent;
 import org.apache.airavata.gfac.core.notification.events.UnicoreJobIDEvent;
 import org.apache.airavata.gfac.core.provider.AbstractProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
-import org.apache.airavata.gfac.bes.utils.DataTransferrer;
-import org.apache.airavata.gfac.bes.utils.JSDLGenerator;
-import org.apache.airavata.gfac.bes.utils.StorageCreator;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.registry.api.workflow.ApplicationJob;
-import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
 import org.apache.airavata.schemas.gfac.UnicoreHostType;
 import org.apache.xmlbeans.XmlCursor;
 import org.bouncycastle.asn1.ASN1InputStream;
@@ -64,31 +52,25 @@ import org.bouncycastle.asn1.x500.X500Name;
 import org.bouncycastle.asn1.x500.style.BCStyle;
 import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
 import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
-import org.ggf.schemas.bes.x2006.x08.besFactory.ActivityStateEnumeration;
+import org.ggf.schemas.bes.x2006.x08.besFactory.*;
 import org.ggf.schemas.bes.x2006.x08.besFactory.ActivityStateEnumeration.Enum;
-import org.ggf.schemas.bes.x2006.x08.besFactory.ActivityStatusType;
-import org.ggf.schemas.bes.x2006.x08.besFactory.CreateActivityDocument;
-import org.ggf.schemas.bes.x2006.x08.besFactory.CreateActivityResponseDocument;
-import org.ggf.schemas.bes.x2006.x08.besFactory.GetActivityStatusesDocument;
-import org.ggf.schemas.bes.x2006.x08.besFactory.GetActivityStatusesResponseDocument;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionDocument;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3.x2005.x08.addressing.EndpointReferenceType;
 
-import de.fzj.unicore.bes.client.FactoryClient;
-import de.fzj.unicore.bes.faults.UnknownActivityIdentifierFault;
-import de.fzj.unicore.uas.client.StorageClient;
-import de.fzj.unicore.wsrflite.xmlbeans.WSUtilities;
-import eu.emi.security.authn.x509.helpers.CertificateHelpers;
-import eu.emi.security.authn.x509.helpers.proxy.X509v3CertificateBuilder;
-import eu.emi.security.authn.x509.impl.CertificateUtils;
-import eu.emi.security.authn.x509.impl.CertificateUtils.Encoding;
-import eu.emi.security.authn.x509.impl.DirectoryCertChainValidator;
-import eu.emi.security.authn.x509.impl.KeyAndCertCredential;
-import eu.emi.security.authn.x509.impl.X500NameUtils;
-import eu.unicore.util.httpclient.DefaultClientConfiguration;
+import javax.security.auth.x500.X500Principal;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.security.InvalidKeyException;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.PrivateKey;
+import java.security.cert.X509Certificate;
+import java.util.*;
 
 
 
@@ -321,14 +303,14 @@ public class BESProvider extends AbstractProvider {
 
     private void saveApplicationJob(JobExecutionContext jobExecutionContext, JobDefinitionType jobDefinition,
                                     String metadata) {
-        ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
-        appJob.setJobId(jobId);
-        appJob.setJobData(jobDefinition.toString());
-        appJob.setSubmittedTime(Calendar.getInstance().getTime());
-        appJob.setStatus(ApplicationJobStatus.SUBMITTED);
-        appJob.setStatusUpdateTime(appJob.getSubmittedTime());
-        appJob.setMetadata(metadata);
-        GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
+//        ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
+//        appJob.setJobId(jobId);
+//        appJob.setJobData(jobDefinition.toString());
+//        appJob.setSubmittedTime(Calendar.getInstance().getTime());
+//        appJob.setStatus(ApplicationJobStatus.SUBMITTED);
+//        appJob.setStatusUpdateTime(appJob.getSubmittedTime());
+//        appJob.setMetadata(metadata);
+//        GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
     }
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/pom.xml b/modules/gfac/gfac-core/pom.xml
index f0a73f6..9ed07bf 100644
--- a/modules/gfac/gfac-core/pom.xml
+++ b/modules/gfac/gfac-core/pom.xml
@@ -32,21 +32,11 @@
         <!-- GFAC schemas -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-workflow-execution-context</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-registry-cpi</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java
index f664bcc..901efda 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/GFacConfiguration.java
@@ -34,7 +34,6 @@ import javax.xml.xpath.XPathExpression;
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
 
-import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
 import org.apache.airavata.gfac.core.provider.GFacProviderConfig;
 import org.slf4j.Logger;
@@ -46,7 +45,7 @@ public class GFacConfiguration {
     public static final Logger log = LoggerFactory.getLogger(GFacConfiguration.class);
 
 
-    private AiravataAPI airavataAPI;
+//    private AiravataAPI airavataAPI;
 
     private static Document handlerDoc;
     // Keep list of full qualified class names of GFac handlers which should invoked before
@@ -59,13 +58,12 @@ public class GFacConfiguration {
 
     public ExecutionMode executionMode = ExecutionMode.SYNCHRONOUS; // default execution mode is SYNCHRONOUS
 
-    public GFacConfiguration(AiravataAPI airavataAPI) {
-        this.airavataAPI = airavataAPI;
+    public GFacConfiguration() {
     }
 
-    public AiravataAPI getAiravataAPI() {
-        return airavataAPI;
-    }
+//    public AiravataAPI getAiravataAPI() {
+//        return airavataAPI;
+//    }
 
 
     public List<GFacHandlerConfig> getInHandlers() {
@@ -156,11 +154,11 @@ public class GFacConfiguration {
      * @return GFacConfiguration object.
      */
     //FIXME
-    public static GFacConfiguration create(File configFile, AiravataAPI airavataAPI, Properties configurationProperties) throws ParserConfigurationException, IOException, SAXException, XPathExpressionException {
+    public static GFacConfiguration create(File configFile,  Properties configurationProperties) throws ParserConfigurationException, IOException, SAXException, XPathExpressionException {
         DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
         handlerDoc = docBuilder.parse(configFile);
-        return new GFacConfiguration(airavataAPI);
+        return new GFacConfiguration();
     }
 
     private static String xpathGetText(Document doc, String expression) throws XPathExpressionException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
index 54ca221..1b8efe0 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
@@ -33,8 +33,6 @@ import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.xpath.XPathExpressionException;
 
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
@@ -178,14 +176,6 @@ public class Scheduler {
 
         return ExecutionMode.fromString(executionMode);
     }
-    public static HostDescription pickaHost(AiravataAPI api, String serviceName) throws AiravataAPIInvocationException {
-        List<HostDescription> registeredHosts = new ArrayList<HostDescription>();
-        Map<String, ApplicationDescription> applicationDescriptors = api.getApplicationManager().getApplicationDescriptors(serviceName);
-        for (String hostDescName : applicationDescriptors.keySet()) {
-            registeredHosts.add(api.getApplicationManager().getHostDescription(hostDescName));
-        }
-        return scheduleHost(registeredHosts);
-    }
 
     private static HostDescription scheduleHost(List<HostDescription> registeredHosts) {
         //todo implement an algorithm to pick a host among different hosts, ideally this could be configurable in an xml

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index c4229be..fe498ab 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -32,7 +32,6 @@ import javax.xml.xpath.XPathExpressionException;
 
 import org.airavata.appcatalog.cpi.AppCatalog;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
-import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.MonitorPublisher;
@@ -82,7 +81,6 @@ import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
 import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
@@ -109,14 +107,14 @@ import org.xml.sax.SAXException;
  * the resource, required data for the job has to be stored in registry prior to invoke this object.
  */
 public class BetterGfacImpl implements GFac,Watcher {
-    private static final Logger log = LoggerFactory.getLogger(GFacImpl.class);
+    private static final Logger log = LoggerFactory.getLogger(BetterGfacImpl.class);
     public static final String ERROR_SENT = "ErrorSent";
 
     private Registry registry;
 
-    private AiravataAPI airavataAPI;
+//    private AiravataAPI airavataAPI;
 
-    private AiravataRegistry2 airavataRegistry2;
+//    private AiravataRegistry2 airavataRegistry2;
 
     private ZooKeeper zk;                       // we are not storing zk instance in to jobExecution context
 
@@ -136,15 +134,13 @@ public class BetterGfacImpl implements GFac,Watcher {
      * Constructor for GFac
      *
      * @param registry
-     * @param airavataAPI
-     * @param airavataRegistry2
      * @param zooKeeper
      */
-    public BetterGfacImpl(Registry registry, AiravataAPI airavataAPI, AiravataRegistry2 airavataRegistry2, ZooKeeper zooKeeper,
+    public BetterGfacImpl(Registry registry, ZooKeeper zooKeeper,
                           MonitorPublisher publisher) {
         this.registry = registry;
-        this.airavataAPI = airavataAPI;
-        this.airavataRegistry2 = airavataRegistry2;
+//        this.airavataAPI = airavataAPI;
+//        this.airavataRegistry2 = airavataRegistry2;
         monitorPublisher = publisher;     // This is a EventBus common for gfac
         this.zk = zooKeeper;
     }
@@ -173,7 +169,7 @@ public class BetterGfacImpl implements GFac,Watcher {
 
     public static void startDaemonHandlers() {
         List<GFacHandlerConfig> daemonHandlerConfig = null;
-        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+        URL resource = BetterGfacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         gfacConfigFile = new File(resource.getPath());
         try {
             daemonHandlerConfig = GFacConfiguration.getDaemonHandlers(gfacConfigFile);
@@ -447,9 +443,9 @@ public class BetterGfacImpl implements GFac,Watcher {
             log.warn("Missing gateway resource profile for gateway id '" + gatewayID + "'.");
         }
 
-        URL resource = GFacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
+        URL resource = BetterGfacImpl.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         Properties configurationProperties = ServerSettings.getProperties();
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), airavataAPI, configurationProperties);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), configurationProperties);
 
         // start constructing jobexecutioncontext
         jobExecutionContext = new JobExecutionContext(gFacConfiguration, applicationInterfaceId);
@@ -1128,13 +1124,13 @@ public class BetterGfacImpl implements GFac,Watcher {
         BetterGfacImpl.monitorPublisher = monitorPublisher;
     }
 
-    public AiravataAPI getAiravataAPI() {
-        return airavataAPI;
-    }
+//    public AiravataAPI getAiravataAPI() {
+//        return airavataAPI;
+//    }
 
-    public AiravataRegistry2 getAiravataRegistry2() {
-        return airavataRegistry2;
-    }
+//    public AiravataRegistry2 getAiravataRegistry2() {
+//        return airavataRegistry2;
+//    }
 
     public static List<ThreadedHandler> getDaemonHandlers() {
         return daemonHandlers;


[5/9] retiring previous registry API - AIRAVATA-1234

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
deleted file mode 100644
index a45a2da..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
+++ /dev/null
@@ -1,2838 +0,0 @@
-/*
- *
- * 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.persistance.registry.jpa.impl;
-
-import org.apache.airavata.common.exception.AiravataConfigurationException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataJobState;
-import org.apache.airavata.common.utils.DBUtil;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.common.utils.Version;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
-import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredentialGenerator;
-import org.apache.airavata.credential.store.store.CredentialReader;
-import org.apache.airavata.credential.store.store.CredentialStoreException;
-import org.apache.airavata.credential.store.store.CredentialWriter;
-import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
-import org.apache.airavata.credential.store.store.impl.SSHCredentialWriter;
-import org.apache.airavata.persistance.registry.jpa.JPAResourceAccessor;
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.registry.api.*;
-import org.apache.airavata.registry.api.ExecutionErrors.Source;
-import org.apache.airavata.registry.api.exception.*;
-import org.apache.airavata.registry.api.exception.gateway.*;
-import org.apache.airavata.registry.api.exception.worker.*;
-import org.apache.airavata.registry.api.util.RegistryConstants;
-import org.apache.airavata.registry.api.util.RegistrySettings;
-import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
-import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.xmlbeans.XmlException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.sql.Timestamp;
-import java.util.*;
-import java.util.regex.Pattern;
-
-//import org.apache.airavata.persistance.registry.jpa.resources.ExecutionErrorResource;
-//import org.apache.airavata.persistance.registry.jpa.resources.ExperimentDataResource;
-//import org.apache.airavata.persistance.registry.jpa.resources.ExperimentMetadataResource;
-//import org.apache.airavata.persistance.registry.jpa.resources.ExperimentResource;
-//import org.apache.airavata.persistance.registry.jpa.resources.GFacJobDataResource;
-//import org.apache.airavata.persistance.registry.jpa.resources.GFacJobStatusResource;
-//import org.apache.airavata.persistance.registry.jpa.resources.NodeDataResource;
-//import org.apache.airavata.persistance.registry.jpa.resources.OrchestratorDataResource;
-
-public class AiravataJPARegistry extends AiravataRegistry2{
-    private final static Logger logger = LoggerFactory.getLogger(AiravataJPARegistry.class);
-    private static Map<String, String[]> compatibleVersionMap;
-    private static int CONNECT_FAIL_WAIT_TIME=1000;
-    private static int MAX_TRIES=15;
-    private static final String DEFAULT_PROJECT_NAME = "default";
-    private static final Version API_VERSION=new Version("Airavata Registry API",0,12,null,null,null);
-
-    private JPAResourceAccessor jpa;
-    private boolean active=false;
-    private URI registryConnectionURI;
-    private ConfigurationRegistry configurationRegistry;
-    private DescriptorRegistry descriptorRegistry;
-    private ProjectsRegistry projectsRegistry;
-    private ProvenanceRegistry provenanceRegistry;
-    private UserWorkflowRegistry userWorkflowRegistry;
-    private PublishedWorkflowRegistry publishedWorkflowRegistry;
-    private UserRegistry userRegistry;
-    private PasswordCallback callback;
-    private CredentialReader credentialReader;
-    private CredentialWriter credentialWriter;
-    private SSHCredentialGenerator credentialGenerator;
-    
-    @Override
-    protected void initialize() throws RegException {
-    	jpa = new JPAResourceAccessor(this);
-    	//TODO check if the db connections are proper & accessible & the relevant db/tables are
-    	//present
-    	active=true;
-    	
-        initializeCustomRegistries();
-        String apiVersion = getVersion().toString();
-        String registryVersion = null;
-        int tries=0;
-        while(!ServerSettings.isStopAllThreads()){
-			try {
-				tries++;
-				registryVersion = getConfiguration("registry.version").toString();
-				if (System.getProperty("registry.initialize.state")==null){
-					//lets wait a few seconds for the initialization to complete
-					Thread.sleep(CONNECT_FAIL_WAIT_TIME*5);	
-				} else {
-					while(System.getProperty("registry.initialize.state").equals("0")){
-						Thread.sleep(CONNECT_FAIL_WAIT_TIME);
-					}
-				}
-				break;
-			} catch (Exception e) {
-				ResourceUtils.reset();
-				if (tries<MAX_TRIES){
-					try {
-						Thread.sleep(CONNECT_FAIL_WAIT_TIME);
-					} catch (InterruptedException e1) {
-						e1.printStackTrace();
-					}
-				}else{
-					throw new AiravataRegUninitializedException("Airavata Registry has not yet initialized properly!!!", e);
-				}
-			}
-        }
-        String[] list = compatibleVersionMap.get(apiVersion);
-        if (list == null || (!Arrays.asList(list).contains(registryVersion))){
-            throw new RegAPIVersionIncompatibleException("Incompatible registry versions. Please check whether you updated the API and Registry " +
-                    "versions.");
-        }
-        try {
-            if (!ResourceUtils.isGatewayExist(getGateway().getGatewayName())){
-                throw new GatewayNotRegisteredException(getGateway().getGatewayName());
-            }
-        } catch (RegistryException e) {
-            e.printStackTrace();
-        }
-
-    }
-
-    static {
-        compatibleVersionMap = new HashMap<String, String[]>();
-        compatibleVersionMap.put("0.6", new String[]{"0.6"});
-        compatibleVersionMap.put("0.7", new String[]{"0.6", "0.7"});
-        compatibleVersionMap.put("0.8", new String[]{"0.8"});
-        compatibleVersionMap.put("0.9", new String[]{"0.9","0.8"});
-        compatibleVersionMap.put("0.10", new String[]{"0.10","0.9", "0.8"});
-        compatibleVersionMap.put("0.11", new String[]{"0.11","0.10","0.9", "0.8"});
-        compatibleVersionMap.put("0.12", new String[]{"0.12"});
-    }
-
-    /**
-     * Initialize the custom registries defined in the registry settings
-     * @throws org.apache.airavata.registry.api.exception.RegException
-     */
-	private void initializeCustomRegistries() throws RegException {
-		// retrieving user defined registry classes from registry settings
-        try {
-            configurationRegistry = (ConfigurationRegistry)getClassInstance(ConfigurationRegistry.class,RegistryConstants.CONFIGURATION_REGISTRY_ACCESSOR_CLASS);
-            descriptorRegistry = (DescriptorRegistry)getClassInstance(ConfigurationRegistry.class,RegistryConstants.DESCRIPTOR_REGISTRY_ACCESSOR_CLASS);
-            projectsRegistry = (ProjectsRegistry)getClassInstance(ConfigurationRegistry.class,RegistryConstants.PROJECT_REGISTRY_ACCESSOR_CLASS);
-            provenanceRegistry = (ProvenanceRegistry)getClassInstance(ConfigurationRegistry.class,RegistryConstants.PROVENANCE_REGISTRY_ACCESSOR_CLASS);
-            userWorkflowRegistry = (UserWorkflowRegistry)getClassInstance(ConfigurationRegistry.class,RegistryConstants.USER_WF_REGISTRY_ACCESSOR_CLASS);
-            publishedWorkflowRegistry = (PublishedWorkflowRegistry)getClassInstance(ConfigurationRegistry.class,RegistryConstants.PUBLISHED_WF_REGISTRY_ACCESSOR_CLASS);
-            userRegistry = (UserRegistry)getClassInstance(ConfigurationRegistry.class,RegistryConstants.USER_REGISTRY_ACCESSOR_CLASS);
-        } catch (AiravataConfigurationException e) {
-            throw new RegException("An error occured when attempting to determine any custom implementations of the registries!!!", e);
-        }
-	}
-
-    private <T extends AiravataSubRegistry> Object getClassInstance(Class<T> c, String registryAccessorKey) throws AiravataConfigurationException{
-		try {
-			T registryClass = c.cast(AiravataRegistryFactory.getRegistryClass(registryAccessorKey));
-			registryClass.setAiravataRegistry(this);
-			return registryClass;
-		} catch (ClassCastException e){
-			logger.error("The class defined for accessor type "+registryAccessorKey+" MUST be an extention of the interface "+c.getName(),e);
-		} catch (RegAccessorNotFoundException e) {
-			logger.error("Error in loading class for registry accessor "+registryAccessorKey,e);
-		} catch (RegAccessorUndefinedException e) {
-			// happens when user has not defined an accessor for the registry accessor key
-			// thus ignore error
-		} catch (RegAccessorInstantiateException e) {
-			logger.error("Error in instantiating instance from class for registry accessor "+registryAccessorKey,e);
-		}
-		return null;
-    }
-
-	@Override
-	public boolean isActive() {
-		return active;
-	}
-
-    /**---------------------------------Configuration Registry----------------------------------**/
-
-    public Object getConfiguration(String key) throws RegException {
-		ConfigurationResource configuration = ResourceUtils.getConfiguration(key);
-		return configuration==null? null: configuration.getConfigVal();
-    }
-    // Not sure about this.. need some description
-    public List<Object> getConfigurationList(String key) throws RegException {
-        if (configurationRegistry != null){
-            return configurationRegistry.getConfigurationList(key);
-        } else {
-            List<Object> values = new ArrayList<Object>();
-            List<ConfigurationResource> configurations = ResourceUtils.getConfigurations(key);
-            for (ConfigurationResource configurationResource : configurations) {
-                values.add(configurationResource.getConfigVal());
-            }
-            return values;
-        }
-
-    }
-
-    public void setConfiguration(String key, String value, Date expire) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.setConfiguration(key, value, expire);
-        } else {
-            try {
-                ConfigurationResource config;
-                if (ResourceUtils.isConfigurationExist(key)) {
-                    config = ResourceUtils.getConfiguration(key);
-                } else {
-                    config = ResourceUtils.createConfiguration(key);
-                }
-                config.setConfigVal(value);
-                config.setExpireDate(new Timestamp(expire.getTime()));
-                config.save();
-            } catch (RegistryException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public void addConfiguration(String key, String value, Date expire) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.addConfiguration(key, value, expire);
-        } else {
-            try {
-                ConfigurationResource config = ResourceUtils.createConfiguration(key);
-                config.setConfigVal(value);
-                config.setExpireDate(new Timestamp(expire.getTime()));
-                config.save();
-            } catch (RegistryException e) {
-                e.printStackTrace();
-            }
-        }
-
-
-    }
-
-    public void removeAllConfiguration(String key) throws RegException {
-        if (configurationRegistry  != null){
-            configurationRegistry.removeAllConfiguration(key);
-        } else {
-            try {
-                ResourceUtils.removeConfiguration(key);
-            } catch (RegistryException e) {
-                e.printStackTrace();
-            }
-        }
-
-    }
-
-    public void removeConfiguration(String key, String value) throws RegException {
-        if (configurationRegistry != null){
-            configurationRegistry.removeConfiguration(key, value);
-        } else {
-            try {
-                ResourceUtils.removeConfiguration(key, value);
-            } catch (RegistryException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    private static final String GFAC_URL="gfac.url";
-    private static final String INTERPRETER_URL="interpreter.url";
-    private static final String MESSAGE_BOX_URL="messagebox.url";
-    private static final String EVENTING_URL="eventing.url";
-
-    public List<URI> getGFacURIs() throws RegException {
-        if (configurationRegistry != null) {
-            return configurationRegistry.getGFacURIs();
-        } else {
-            return retrieveURIsFromConfiguration(GFAC_URL);
-        }
-    }
-
-	private List<URI> retrieveURIsFromConfiguration(String urlType) throws RegException {
-		List<URI> urls=new ArrayList<URI>();
-    	List<Object> configurationList = getConfigurationList(urlType);
-    	for (Object o : configurationList) {
-			try {
-				urls.add(new URI(o.toString()));
-			} catch (URISyntaxException e) {
-				e.printStackTrace();
-			}
-		}
-        return urls;
-	}
-
-    public List<URI> getWorkflowInterpreterURIs() throws RegException {
-        if (configurationRegistry != null) {
-            return configurationRegistry.getWorkflowInterpreterURIs();
-        }  else {
-            return retrieveURIsFromConfiguration(INTERPRETER_URL);
-        }
-    }
-
-    public URI getEventingServiceURI() throws RegException {
-        if (configurationRegistry != null) {
-           return configurationRegistry.getEventingServiceURI();
-        }else {
-            List<URI> eventingURLs = retrieveURIsFromConfiguration(EVENTING_URL);
-            return eventingURLs.size()==0? null: eventingURLs.get(0);
-        }
-    }
-
-    public URI getMessageBoxURI() throws RegException {
-        if (configurationRegistry != null) {
-            return configurationRegistry.getMessageBoxURI();
-        }
-    	List<URI> messageboxURLs = retrieveURIsFromConfiguration(MESSAGE_BOX_URL);
-		return messageboxURLs.size()==0? null: messageboxURLs.get(0);
-    }
-
-    public void addGFacURI(URI uri) throws RegException {
-        if (configurationRegistry != null) {
-            addGFacURI(uri);
-        } else {
-            addConfigurationURL(GFAC_URL, uri);
-        }
-    }
-
-	private void addConfigurationURL(String urlType,URI uri) throws RegException {
-		Calendar instance = Calendar.getInstance();
-        instance.add(Calendar.MINUTE, AiravataRegistry2.SERVICE_TTL);
-		Date expire = instance.getTime();
-		addConfigurationURL(urlType, uri, expire);
-	}
-
-	private void addConfigurationURL(String urlType, URI uri, Date expire) throws RegException {
-		addConfiguration(urlType, uri.toString(), expire);
-	}
-
-    public void addWorkflowInterpreterURI(URI uri) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.addWorkflowInterpreterURI(uri);
-        }else {
-            addConfigurationURL(INTERPRETER_URL,uri);
-        }
-    }
-
-    public void setEventingURI(URI uri) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.setEventingURI(uri);
-        } else {
-            addConfigurationURL(EVENTING_URL,uri);
-        }
-    }
-
-    public void setMessageBoxURI(URI uri) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.setMessageBoxURI(uri);
-        } else {
-            addConfigurationURL(MESSAGE_BOX_URL,uri);
-        }
-    }
-
-    public void addGFacURI(URI uri, Date expire) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.addGFacURI(uri, expire);
-        } else {
-            addConfigurationURL(GFAC_URL, uri, expire);
-        }
-    }
-
-    public void addWorkflowInterpreterURI(URI uri, Date expire) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.addWorkflowInterpreterURI(uri, expire);
-        } else {
-            addConfigurationURL(INTERPRETER_URL, uri, expire);
-        }
-    }
-
-    public void setEventingURI(URI uri, Date expire) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.setEventingURI(uri, expire);
-        } else {
-            addConfigurationURL(EVENTING_URL, uri, expire);
-        }
-    }
-
-    public void setMessageBoxURI(URI uri, Date expire) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.setMessageBoxURI(uri, expire);
-        } else {
-    	    addConfigurationURL(MESSAGE_BOX_URL, uri, expire);
-        }
-    }
-
-    public void removeGFacURI(URI uri) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.removeGFacURI(uri);
-        } else {
-            removeConfiguration(GFAC_URL, uri.toString());
-        }
-    }
-
-    public void removeWorkflowInterpreterURI(URI uri) throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.removeWorkflowInterpreterURI(uri);
-        } else {
-            removeConfiguration(INTERPRETER_URL, uri.toString());
-        }
-    }
-
-    public void removeAllGFacURI() throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.removeAllGFacURI();
-        } else {
-            removeAllConfiguration(GFAC_URL);
-        }
-    }
-
-    public void removeAllWorkflowInterpreterURI() throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.removeAllWorkflowInterpreterURI();
-        } else {
-            removeAllConfiguration(INTERPRETER_URL);
-        }
-    }
-
-    public void unsetEventingURI() throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.unsetEventingURI();
-        } else {
-            removeAllConfiguration(EVENTING_URL);
-        }
-
-    }
-
-    public void unsetMessageBoxURI() throws RegException {
-        if (configurationRegistry != null) {
-            configurationRegistry.unsetMessageBoxURI();
-        } else {
-            removeAllConfiguration(MESSAGE_BOX_URL);
-        }
-
-    }
-
-    /**---------------------------------Descriptor Registry----------------------------------**/
-
-    public boolean isHostDescriptorExists(String descriptorName)throws RegException {
-//        if (descriptorRegistry != null){
-//            return descriptorRegistry.isHostDescriptorExists(descriptorName);
-//        }
-//        try {
-//            return jpa.getGateway().isHostDescriptorExists(descriptorName);
-//        } catch (RegistryException e) {
-//            e.printStackTrace();
-//        }
-        return false;
-    }
-    public void addHostDescriptor(HostDescription descriptor) throws RegException {
-//        if (descriptorRegistry != null) {
-//            descriptorRegistry.addHostDescriptor(descriptor);
-//        } else {
-//            try {
-//                GatewayResource gateway = jpa.getGateway();
-//                WorkerResource workerResource = jpa.getWorker();
-//                String hostName = descriptor.getType().getHostName();
-//                if (isHostDescriptorExists(hostName)) {
-//                    throw new DescriptorAlreadyExistsException(hostName);
-//                }
-//                HostDescriptorResource hostDescriptorResource = gateway.createHostDescriptorResource(hostName);
-//                hostDescriptorResource.setUserName(workerResource.getUser());
-//                hostDescriptorResource.setContent(descriptor.toXML());
-//                hostDescriptorResource.save();
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-    }
-
-    public void updateHostDescriptor(HostDescription descriptor) throws RegException {
-//        if (descriptorRegistry != null) {
-//            descriptorRegistry.updateHostDescriptor(descriptor);
-//        } else {
-//            try {
-//                GatewayResource gateway = jpa.getGateway();
-//                String hostName = descriptor.getType().getHostName();
-//                if (!isHostDescriptorExists(hostName)) {
-//                    throw new DescriptorDoesNotExistsException(hostName);
-//                }
-//                HostDescriptorResource hostDescriptorResource = gateway.getHostDescriptorResource(hostName);
-//                hostDescriptorResource.setContent(descriptor.toXML());
-//                hostDescriptorResource.save();
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-    }
-
-    public HostDescription getHostDescriptor(String hostName) throws RegException {
-//        if (descriptorRegistry != null) {
-//            return descriptorRegistry.getHostDescriptor(hostName);
-//        } else {
-//            try {
-//
-//                GatewayResource gateway = jpa.getGateway();
-//                if (!isHostDescriptorExists(hostName)) {
-//                    return null;
-//                }
-//                HostDescriptorResource hostDescriptorResource = gateway.getHostDescriptorResource(hostName);
-//                return createHostDescriptor(hostDescriptorResource);
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-        return null;
-    }
-
-//	private HostDescription createHostDescriptor(
-//			HostDescriptorResource hostDescriptorResource)
-//			throws MalformedDescriptorException {
-//		try {
-//            return HostDescription.fromXML(hostDescriptorResource.getContent());
-//        } catch (XmlException e) {
-//            throw new MalformedDescriptorException(hostDescriptorResource.getHostDescName(),e);
-//        }
-//	}
-
-    public void removeHostDescriptor(String hostName) throws RegException {
-//        if (descriptorRegistry != null) {
-//            descriptorRegistry.removeHostDescriptor(hostName);
-//        } else {
-//            try {
-//                GatewayResource gateway = jpa.getGateway();
-//                if (!isHostDescriptorExists(hostName)) {
-//                    throw new DescriptorDoesNotExistsException(hostName);
-//                }
-//                gateway.removeHostDescriptor(hostName);
-//                //we need to delete the application descriptors bound to this host
-//                Map<String, ApplicationDescription> applicationDescriptors = getApplicationDescriptorsFromHostName(hostName);
-//                for (String serviceName : applicationDescriptors.keySet()) {
-//                    removeApplicationDescriptor(serviceName, hostName, applicationDescriptors.get(serviceName).getType().getApplicationName().getStringValue());
-//                }
-//            } catch (RegistryException e) {
-//                logger.error("Error while removing application descriptors bound to host " + hostName, e);
-//            }
-//        }
-    }
-
-	@Override
-	public List<HostDescription> getHostDescriptors()
-			throws MalformedDescriptorException, RegException {
-//        if (descriptorRegistry != null) {
-//            return descriptorRegistry.getHostDescriptors();
-//        }
-//        try {
-//            GatewayResource gateway = jpa.getGateway();
-//            List<HostDescription> list = new ArrayList<HostDescription>();
-//            List<HostDescriptorResource> hostDescriptorResources = gateway.getHostDescriptorResources();
-//            for (HostDescriptorResource resource : hostDescriptorResources) {
-//                list.add(createHostDescriptor(resource));
-//            }
-//            return list;
-//        } catch (RegistryException e) {
-//            logger.error("Error while getting host descriptors ", e);
-//        }
-        return null;
-    }
-
-    public ResourceMetadata getHostDescriptorMetadata(String hostName) throws RegException {
-    	if (descriptorRegistry != null) {
-            return descriptorRegistry.getHostDescriptorMetadata(hostName);
-        }
-    	//TODO
-        throw new UnimplementedRegOperationException();
-    }
-
-    public boolean isServiceDescriptorExists(String descriptorName)throws RegException {
-//        if (descriptorRegistry != null) {
-//            return descriptorRegistry.isServiceDescriptorExists(descriptorName);
-//        }
-//        try {
-//            return jpa.getGateway().isServiceDescriptorExists(descriptorName);
-//        } catch (RegistryException e) {
-//            e.printStackTrace();
-//        }
-        return false;
-    }
-
-    public void addServiceDescriptor(ServiceDescription descriptor) throws RegException {
-//        if (descriptorRegistry != null) {
-//            descriptorRegistry.addServiceDescriptor(descriptor);
-//        }else {
-//            try {
-//            GatewayResource gateway = jpa.getGateway();
-//            WorkerResource workerResource = jpa.getWorker();
-//            String serviceName = descriptor.getType().getName();
-//            if (isServiceDescriptorExists(serviceName)){
-//                throw new DescriptorAlreadyExistsException(serviceName);
-//            }
-//            ServiceDescriptorResource serviceDescriptorResource = gateway.createServiceDescriptorResource(serviceName);
-//            serviceDescriptorResource.setUserName(workerResource.getUser());
-//            serviceDescriptorResource.setContent(descriptor.toXML());
-//            serviceDescriptorResource.save();
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-    }
-
-    public void updateServiceDescriptor(ServiceDescription descriptor) throws RegException {
-//        if (descriptorRegistry != null) {
-//            descriptorRegistry.updateServiceDescriptor(descriptor);
-//        }else {
-//            try {
-//            GatewayResource gateway = jpa.getGateway();
-//            String serviceName = descriptor.getType().getName();
-//            if (!isServiceDescriptorExists(serviceName)){
-//                throw new DescriptorDoesNotExistsException(serviceName);
-//            }
-//            ServiceDescriptorResource serviceDescriptorResource = gateway.getServiceDescriptorResource(serviceName);
-//            serviceDescriptorResource.setContent(descriptor.toXML());
-//            serviceDescriptorResource.save();
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-    }
-
-    public ServiceDescription getServiceDescriptor(String serviceName) throws RegException, MalformedDescriptorException {
-//        if (descriptorRegistry != null) {
-//            return descriptorRegistry.getServiceDescriptor(serviceName);
-//        } else {
-//            try {
-//                GatewayResource gateway = jpa.getGateway();
-//                if (!gateway.isServiceDescriptorExists(serviceName)) {
-//                    return null;
-//                }
-//                ServiceDescriptorResource serviceDescriptorResource = gateway.getServiceDescriptorResource(serviceName);
-//                return createServiceDescriptor(serviceDescriptorResource);
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-        return null;
-    }
-
-//	private ServiceDescription createServiceDescriptor(
-//			ServiceDescriptorResource serviceDescriptorResource)
-//			throws MalformedDescriptorException {
-//		try {
-//            return ServiceDescription.fromXML(serviceDescriptorResource.getContent());
-//        } catch (XmlException e) {
-//            throw new MalformedDescriptorException(serviceDescriptorResource.getServiceDescName(),e);
-//        }
-//	}
-
-    public void removeServiceDescriptor(String serviceName) throws RegException {
-//        if (descriptorRegistry != null) {
-//            descriptorRegistry.removeServiceDescriptor(serviceName);
-//        } else {
-//            try {
-//                GatewayResource gateway = jpa.getGateway();
-//                if (!isServiceDescriptorExists(serviceName)) {
-//                    throw new DescriptorDoesNotExistsException(serviceName);
-//                }
-//                gateway.removeServiceDescriptor(serviceName);
-//                //we need to delete the application descriptors bound to this service
-//                Map<String, ApplicationDescription> applicationDescriptors = getApplicationDescriptors(serviceName);
-//                for (String hostName : applicationDescriptors.keySet()) {
-//                    removeApplicationDescriptor(serviceName, hostName, applicationDescriptors.get(hostName).getType().getApplicationName().getStringValue());
-//                }
-//            } catch (Exception e) {
-//                logger.error("Error while removing application descriptors bound to service " + serviceName, e);
-//            }
-//        }
-    }
-
-    @Override
-	public List<ServiceDescription> getServiceDescriptors()
-			throws MalformedDescriptorException, RegException {
-        List<ServiceDescription> list=new ArrayList<ServiceDescription>();
-//        if (descriptorRegistry != null) {
-//            return descriptorRegistry.getServiceDescriptors();
-//        }else {
-//            try {
-//            GatewayResource gateway = jpa.getGateway();
-//            List<ServiceDescriptorResource> serviceDescriptorResources = gateway.getServiceDescriptorResources();
-//            for (ServiceDescriptorResource resource : serviceDescriptorResources) {
-//                list.add(createServiceDescriptor(resource));
-//            }
-//            return list;
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-        return list;
-	}
-
-    public ResourceMetadata getServiceDescriptorMetadata(String serviceName) throws RegException {
-        if (descriptorRegistry != null) {
-            return descriptorRegistry.getServiceDescriptorMetadata(serviceName);
-        }else {
-            //TODO
-            throw new UnimplementedRegOperationException();
-        }
-    }
-
-    private String createAppName(String serviceName, String hostName, String applicationName){
-    	return serviceName+"/"+hostName+"/"+applicationName;
-    }
-
-    public boolean isApplicationDescriptorExists(String serviceName,
-                                                 String hostName,
-                                                 String descriptorName)throws RegException {
-//        if (descriptorRegistry != null) {
-//            return descriptorRegistry.isApplicationDescriptorExists(serviceName, hostName, descriptorName);
-//        }else {
-//            try {
-//                return jpa.getGateway().isApplicationDescriptorExists(createAppName(serviceName, hostName, descriptorName));
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-        return false;
-    }
-
-    public void addApplicationDescriptor(ServiceDescription serviceDescription,
-                                         HostDescription hostDescriptor,
-                                         ApplicationDescription descriptor) throws RegException {
-        if (descriptorRegistry != null) {
-            descriptorRegistry.addApplicationDescriptor(serviceDescription, hostDescriptor, descriptor);
-        }else {
-            addApplicationDescriptor(serviceDescription.getType().getName(), hostDescriptor.getType().getHostName(), descriptor);
-        }
-    }
-
-    public void addApplicationDescriptor(String serviceName, String hostName, ApplicationDescription descriptor) throws RegException {
-//        if (descriptorRegistry != null) {
-//            descriptorRegistry.addApplicationDescriptor(serviceName, hostName, descriptor);
-//        } else {
-//            if (serviceName == null || hostName == null) {
-//                throw new InsufficientDataException("Service name or Host name cannot be null");
-//            }
-//            try {
-//
-//                GatewayResource gateway = jpa.getGateway();
-//                WorkerResource workerResource = jpa.getWorker();
-//                String applicationName = descriptor.getType().getApplicationName().getStringValue();
-//                applicationName = createAppName(serviceName, hostName, applicationName);
-//                if (isApplicationDescriptorExists(serviceName, hostName, descriptor.getType().getApplicationName().getStringValue())) {
-//                    throw new DescriptorAlreadyExistsException(applicationName);
-//                }
-//                ApplicationDescriptorResource applicationDescriptorResource = gateway.createApplicationDescriptorResource(applicationName);
-//                applicationDescriptorResource.setUpdatedUser(workerResource.getUser());
-//                applicationDescriptorResource.setServiceDescName(serviceName);
-//                applicationDescriptorResource.setHostDescName(hostName);
-//                applicationDescriptorResource.setContent(descriptor.toXML());
-//                applicationDescriptorResource.save();
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-    }
-
-    public void udpateApplicationDescriptor(ServiceDescription serviceDescription,
-                                            HostDescription hostDescriptor,
-                                            ApplicationDescription descriptor) throws RegException {
-//        if (descriptorRegistry != null){
-//            descriptorRegistry.udpateApplicationDescriptor(serviceDescription,hostDescriptor,descriptor);
-//        } else {
-//            updateApplicationDescriptor(serviceDescription.getType().getName(),hostDescriptor.getType().getHostName(),descriptor);
-//        }
-    }
-
-    public void updateApplicationDescriptor(String serviceName, String hostName, ApplicationDescription descriptor) throws RegException {
-//    	if (descriptorRegistry != null){
-//            descriptorRegistry.updateApplicationDescriptor(serviceName, hostName, descriptor);
-//        } else {
-//            if (serviceName==null || hostName==null){
-//                throw new InsufficientDataException("Service name or Host name cannot be null");
-//            }
-//            try {
-//            GatewayResource gateway = jpa.getGateway();
-//            String applicationName = descriptor.getType().getApplicationName().getStringValue();
-//            applicationName = createAppName(serviceName, hostName, applicationName);
-//            if (!isApplicationDescriptorExists(serviceName,hostName,descriptor.getType().getApplicationName().getStringValue())){
-//                throw new DescriptorDoesNotExistsException(applicationName);
-//            }
-//            ApplicationDescriptorResource serviceDescriptorResource = gateway.getApplicationDescriptorResource(applicationName);
-//            serviceDescriptorResource.setContent(descriptor.toXML());
-//            serviceDescriptorResource.save();
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-    }
-//    private ApplicationDescription createApplicationDescriptor(
-//			ApplicationDescriptorResource applicationDescriptorResource)
-//			throws MalformedDescriptorException {
-//		try {
-//            return ApplicationDescription.fromXML(applicationDescriptorResource.getContent());
-//        } catch (XmlException e) {
-//            throw new MalformedDescriptorException(applicationDescriptorResource.getName(),e);
-//        }
-//	}
-
-    public ApplicationDescription getApplicationDescriptor(String serviceName, String hostname, String applicationName)throws DescriptorDoesNotExistsException, MalformedDescriptorException, RegException {
-//        if (descriptorRegistry != null){
-//            return descriptorRegistry.getApplicationDescriptor(serviceName, hostname, applicationName);
-//        }
-//        if (serviceName==null || hostname==null){
-//    		throw new InsufficientDataException("Service name or Host name cannot be null");
-//    	}
-//    	GatewayResource gateway = jpa.getGateway();
-//		if (!isApplicationDescriptorExists(serviceName,hostname,applicationName)){
-//        	throw new DescriptorDoesNotExistsException(createAppName(serviceName, hostname, applicationName));
-//        }
-//        try {
-//            return createApplicationDescriptor(gateway.getApplicationDescriptorResource(createAppName(serviceName, hostname, applicationName)));
-//        } catch (RegistryException e) {
-//            e.printStackTrace();
-//        }
-        return null;
-    }
-
-    public ApplicationDescription getApplicationDescriptors(String serviceName, String hostname) throws RegException {
-//        if (descriptorRegistry != null) {
-//            return descriptorRegistry.getApplicationDescriptors(serviceName, hostname);
-//        }
-//        try {
-//            GatewayResource gateway = jpa.getGateway();
-//            List<ApplicationDescriptorResource> applicationDescriptorResources = gateway.getApplicationDescriptorResources(serviceName, hostname);
-//            if (applicationDescriptorResources.size() > 0) {
-//                return createApplicationDescriptor(applicationDescriptorResources.get(0));
-//            }
-//        } catch (RegistryException e) {
-//            e.printStackTrace();
-//        }
-        return null;
-    }
-
-    public Map<String, ApplicationDescription> getApplicationDescriptors(String serviceName) throws RegException {
-        Map<String, ApplicationDescription> map = new HashMap<String, ApplicationDescription>();
-//        if (descriptorRegistry != null) {
-//            return descriptorRegistry.getApplicationDescriptors(serviceName);
-//        }
-//        try {
-//            GatewayResource gateway = jpa.getGateway();
-//
-//            List<ApplicationDescriptorResource> applicationDescriptorResources = gateway.getApplicationDescriptorResources(serviceName, null);
-//            for (ApplicationDescriptorResource resource : applicationDescriptorResources) {
-//                map.put(resource.getHostDescName(), createApplicationDescriptor(resource));
-//            }
-//        } catch (RegistryException e) {
-//            e.printStackTrace();
-//        }
-        return map;
-    }
-
-    private Map<String,ApplicationDescription> getApplicationDescriptorsFromHostName(String hostName)throws RegException {
-        Map<String, ApplicationDescription> map=new HashMap<String,ApplicationDescription>();
-//        try {
-//            GatewayResource gateway = jpa.getGateway();
-//            List<ApplicationDescriptorResource> applicationDescriptorResources = gateway.getApplicationDescriptorResources(null, hostName);
-//            for (ApplicationDescriptorResource resource : applicationDescriptorResources) {
-//                map.put(resource.getServiceDescName(),createApplicationDescriptor(resource));
-//            }
-//        } catch (RegistryException e) {
-//            e.printStackTrace();
-//        }
-
-        return map;
-    }
-    
-    public Map<String[],ApplicationDescription> getApplicationDescriptors()throws MalformedDescriptorException, RegException {
-        Map<String[], ApplicationDescription> map=new HashMap<String[],ApplicationDescription>();
-//        if (descriptorRegistry != null){
-//            return descriptorRegistry.getApplicationDescriptors();
-//        }
-//        try {
-//
-//        GatewayResource gateway = jpa.getGateway();
-//
-//		List<ApplicationDescriptorResource> applicationDescriptorResources = gateway.getApplicationDescriptorResources();
-//		for (ApplicationDescriptorResource resource : applicationDescriptorResources) {
-//			map.put(new String[]{resource.getServiceDescName(),resource.getHostDescName()},createApplicationDescriptor(resource));
-//		}
-//		return map;
-//        } catch (RegistryException e) {
-//            e.printStackTrace();
-//        }
-        return map;
-    }
-
-    public void removeApplicationDescriptor(String serviceName, String hostName, String applicationName) throws RegException {
-//        if (descriptorRegistry != null){
-//             descriptorRegistry.removeApplicationDescriptor(serviceName, hostName, applicationName);
-//        } else {
-//            try {
-//            GatewayResource gateway = jpa.getGateway();
-//            String appName = createAppName(serviceName, hostName, applicationName);
-//            if (!isApplicationDescriptorExists(serviceName,hostName,applicationName)){
-//                throw new DescriptorDoesNotExistsException(appName);
-//            }
-//            gateway.removeApplicationDescriptor(appName);
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-
-    }
-
-    public ResourceMetadata getApplicationDescriptorMetadata(String serviceName, String hostName, String applicationName) throws RegException {
-    	if (descriptorRegistry != null) {
-            return descriptorRegistry.getApplicationDescriptorMetadata(serviceName, hostName, applicationName);
-        }
-    	//TODO
-        throw new UnimplementedRegOperationException();
-    }
-
-    /**---------------------------------Project Registry----------------------------------**/
-
-    private String createProjName(String projectName){
-    	return createProjName(getGateway().getGatewayName(),getUser().getUserName(),projectName);
-    }
-
-    private String createProjName(String gatewayName, String userName, String projectName){
-    	return gatewayName+"\n"+userName+"\n"+projectName;
-    }
-
-    private String getProjName(String projectLongName){
-    	String[] s = projectLongName.split("\n");
-    	return s[s.length-1];
-    }
-
-	@Override
-	public boolean isWorkspaceProjectExists(String projectName)
-			throws RegException {
-        if (projectsRegistry != null){
-            return projectsRegistry.isWorkspaceProjectExists(projectName);
-        }
-		return isWorkspaceProjectExists(projectName, false);
-	}
-
-	@Override
-	public boolean isWorkspaceProjectExists(String projectName,
-			boolean createIfNotExists) throws RegException {
-        if (projectsRegistry != null){
-            return projectsRegistry.isWorkspaceProjectExists(projectName, createIfNotExists);
-        }
-        try {
-
-		if (jpa.getWorker().isProjectExists(createProjName(projectName))){
-			return true;
-		}else if (createIfNotExists){
-			addWorkspaceProject(new WorkspaceProject(projectName, this));
-			return isWorkspaceProjectExists(projectName);
-		}else{
-			return false;
-		}
-        } catch (RegistryException e) {
-            e.printStackTrace();
-        }
-        return false;
-    }
-
-    public void addWorkspaceProject(WorkspaceProject project) throws RegException {
-//        if (projectsRegistry != null){
-//            projectsRegistry.addWorkspaceProject(project);
-//        } else {
-//            WorkerResource worker = jpa.getWorker();
-//            if (isWorkspaceProjectExists(project.getProjectName())){
-//                throw new WorkspaceProjectAlreadyExistsException(createProjName(project.getProjectName()));
-//            }
-//            try {
-//            ProjectResource projectResource = worker.createProject(createProjName(project.getProjectName()));
-//            projectResource.save();
-//            } catch (RegistryException e) {
-//                e.printStackTrace();
-//            }
-//        }
-    }
-
-    public void updateWorkspaceProject(WorkspaceProject project) throws RegException {
-//        if (projectsRegistry != null){
-//            projectsRegistry.updateWorkspaceProject(project);
-//        }else {
-//            WorkerResource worker = jpa.getWorker();
-//            if (!isWorkspaceProjectExists(project.getProjectName())){
-//                throw new WorkspaceProjectDoesNotExistsException(createProjName(project.getProjectName()));
-//            }
-//            ProjectResource projectResource = worker.getProject(createProjName(project.getProjectName()));
-//            projectResource.save();
-//        }
-    }
-
-    public void deleteWorkspaceProject(String projectName) throws RegException {
-//        if (projectsRegistry != null){
-//            projectsRegistry.deleteWorkspaceProject(projectName);
-//        }else {
-//            WorkerResource worker = jpa.getWorker();
-//            if (!isWorkspaceProjectExists(projectName)){
-//                throw new WorkspaceProjectDoesNotExistsException(createProjName(projectName));
-//            }
-//            worker.removeProject(createProjName(projectName));
-//        }
-    }
-
-    public WorkspaceProject getWorkspaceProject(String projectName) throws RegException {
-//        if (projectsRegistry != null){
-//            return projectsRegistry.getWorkspaceProject(projectName);
-//        }
-//    	WorkerResource worker = jpa.getWorker();
-//		if (!isWorkspaceProjectExists(projectName)){
-//        	throw new WorkspaceProjectDoesNotExistsException(createProjName(projectName));
-//        }
-//		ProjectResource projectResource = worker.getProject(createProjName(projectName));
-//		return new WorkspaceProject(getProjName(projectResource.getName()), this);
-        return null;
-    }
-
-    public List<WorkspaceProject> getWorkspaceProjects() throws RegException {
-//        if (projectsRegistry != null){
-//            return projectsRegistry.getWorkspaceProjects();
-//        }
-//    	WorkerResource worker = jpa.getWorker();
-//    	List<WorkspaceProject> projects=new ArrayList<WorkspaceProject>();
-//    	List<ProjectResource> projectResouces = worker.getProjects();
-//    	for (ProjectResource resource : projectResouces) {
-//			projects.add(new WorkspaceProject(getProjName(resource.getName()), this));
-//		}
-//    	return projects;
-        return null;
-    }
-
-    public void addExperiment(String projectName, AiravataExperiment experiment) throws RegException {
-//    	if (projectsRegistry != null){
-//            projectsRegistry.addExperiment(projectName, experiment);
-//        }else {
-//            WorkspaceProject workspaceProject = getWorkspaceProject(projectName);
-//            ProjectResource project = jpa.getWorker().getProject(createProjName(workspaceProject.getProjectName()));
-//            String experimentId = experiment.getExperimentId();
-//            if (isExperimentExists(experimentId)){
-//                throw new ExperimentDoesNotExistsException(experimentId);
-//            }
-//            ExperimentMetadataResource experimentResource = project.createExperiment(experimentId);
-//            experimentResource.setExperimentName(experimentId);
-//            experimentResource.setGateway(jpa.getGateway());
-//            experimentResource.setProject(project);
-//            experimentResource.setExecutionUser(jpa.getWorker().getUser());
-//            if (experiment.getSubmittedDate()!=null) {
-//                experimentResource.setSubmittedDate(new Timestamp(experiment.getSubmittedDate().getTime()));
-//            }
-//            experimentResource.save();
-//        }
-    }
-
-    public void removeExperiment(String experimentId) throws ExperimentDoesNotExistsException {
-//        if (projectsRegistry != null){
-//            projectsRegistry.removeExperiment(experimentId);
-//        }else {
-//            WorkerResource worker = jpa.getWorker();
-//            if (!worker.isExperimentExists(experimentId)){
-//                throw new ExperimentDoesNotExistsException(experimentId);
-//            }
-//            worker.removeExperiment(experimentId);
-//        }
-    }
-
-    public List<AiravataExperiment> getExperiments() throws RegException {
-//        if (projectsRegistry != null){
-//            return projectsRegistry.getExperiments();
-//        }
-//        WorkerResource worker = jpa.getWorker();
-//    	List<AiravataExperiment> result=new ArrayList<AiravataExperiment>();
-//    	List<ExperimentMetadataResource> experiments = worker.getExperiments();
-//    	for (ExperimentMetadataResource resource : experiments) {
-//			AiravataExperiment e = createAiravataExperimentObj(resource);
-//			result.add(e);
-//		}
-//        return result;
-        return null;
-    }
-
-//	private AiravataExperiment createAiravataExperimentObj(
-//			ExperimentMetadataResource resource) {
-//		AiravataExperiment e = new AiravataExperiment();
-//		e.setExperimentId(resource.getExpID());
-//		e.setUser(new AiravataUser(resource.getExecutionUser()));
-//		e.setSubmittedDate(new Date(resource.getSubmittedDate().getTime()));
-//		e.setGateway(new Gateway(resource.getGateway().getGatewayName()));
-//		e.setProject(new WorkspaceProject(getProjName(resource.getProject().getName()), this));
-//		return e;
-//	}
-
-    public List<AiravataExperiment> getExperiments(String projectName)throws RegException {
-//        if (projectsRegistry != null){
-//            return projectsRegistry.getExperiments(projectName);
-//        }
-//        ProjectResource project = jpa.getWorker().getProject(createProjName(projectName));
-//    	List<ExperimentMetadataResource> experiments = project.getExperiments();
-//    	List<AiravataExperiment> result=new ArrayList<AiravataExperiment>();
-//    	for (ExperimentMetadataResource resource : experiments) {
-//			AiravataExperiment e = createAiravataExperimentObj(resource);
-//			result.add(e);
-//		}
-//        return result;
-        return null;
-    }
-
-    public List<AiravataExperiment> getExperiments(Date from, Date to)throws RegException {
-//        if (projectsRegistry != null){
-//            return projectsRegistry.getExperiments(from, to);
-//        }
-//        List<AiravataExperiment> experiments = getExperiments();
-//        List<AiravataExperiment> newExperiments = new ArrayList<AiravataExperiment>();
-//        for(AiravataExperiment exp:experiments){
-//            Date submittedDate = exp.getSubmittedDate();
-//            if(submittedDate.after(from) && submittedDate.before(to)) {
-//                newExperiments.add(exp);
-//            }
-//        }
-//        return newExperiments;
-        return null;
-    }
-
-    public List<AiravataExperiment> getExperiments(String projectName, Date from, Date to)throws RegException {
-//        if (projectsRegistry != null){
-//            return projectsRegistry.getExperiments(projectName, from, to);
-//        }
-//        List<AiravataExperiment> experiments = getExperiments(projectName);
-//        List<AiravataExperiment> newExperiments = new ArrayList<AiravataExperiment>();
-//        for (AiravataExperiment exp : experiments) {
-//            Date submittedDate = exp.getSubmittedDate();
-//            if (submittedDate.after(from) && submittedDate.before(to)) {
-//                newExperiments.add(exp);
-//            }
-//        }
-//        return newExperiments;
-        return null;
-    }
-
-    /**---------------------------------Published Workflow Registry----------------------------------**/
-
-	@Override
-	public boolean isPublishedWorkflowExists(String workflowName)
-			throws RegException {
-        if (publishedWorkflowRegistry != null){
-            return publishedWorkflowRegistry.isPublishedWorkflowExists(workflowName);
-        }
-        try {
-            return jpa.getGateway().isPublishedWorkflowExists(workflowName);
-        } catch (RegistryException e) {
-            e.printStackTrace();
-        }
-        return false;
-    }
-
-    public void publishWorkflow(String workflowName, String publishWorkflowName) throws RegException {
-        if (publishedWorkflowRegistry != null){
-            publishedWorkflowRegistry.publishWorkflow(workflowName, publishWorkflowName);
-        } else {
-            try {
-            GatewayResource gateway = jpa.getGateway();
-            String workflowGraphXML = getWorkflowGraphXML(workflowName);
-            if (gateway.isPublishedWorkflowExists(publishWorkflowName)){
-                throw new PublishedWorkflowAlreadyExistsException(publishWorkflowName);
-            }
-            PublishWorkflowResource publishedWorkflow = gateway.createPublishedWorkflow(publishWorkflowName);
-            publishedWorkflow.setCreatedUser(getUser().getUserName());
-            publishedWorkflow.setContent(workflowGraphXML);
-            publishedWorkflow.setPublishedDate(new Timestamp(Calendar.getInstance().getTime().getTime()));
-            publishedWorkflow.save();
-            } catch (RegistryException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public void publishWorkflow(String workflowName) throws RegException {
-        if (publishedWorkflowRegistry != null){
-            publishedWorkflowRegistry.publishWorkflow(workflowName);
-        } else {
-            publishWorkflow(workflowName, workflowName);
-        }
-    }
-
-    public String getPublishedWorkflowGraphXML(String workflowName) throws RegException {
-        if (publishedWorkflowRegistry != null){
-            return publishedWorkflowRegistry.getPublishedWorkflowGraphXML(workflowName);
-        }
-        GatewayResource gateway = jpa.getGateway();
-        if (!isPublishedWorkflowExists(workflowName)){
-        	throw new PublishedWorkflowDoesNotExistsException(workflowName);
-        }
-        try {
-            return gateway.getPublishedWorkflow(workflowName).getContent();
-        } catch (RegistryException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-	public List<String> getPublishedWorkflowNames() throws RegException {
-        List<String> result=new ArrayList<String>();
-        if (publishedWorkflowRegistry != null){
-            return publishedWorkflowRegistry.getPublishedWorkflowNames();
-        }
-		GatewayResource gateway = jpa.getGateway();
-		try {
-    	List<PublishWorkflowResource> publishedWorkflows = gateway.getPublishedWorkflows();
-    	for (PublishWorkflowResource resource : publishedWorkflows) {
-			result.add(resource.getName());
-		}
-        } catch (RegistryException e) {
-            e.printStackTrace();
-        }
-        return result;
-	}
-
-    public Map<String,String> getPublishedWorkflows() throws RegException {
-        Map<String,String> result=new HashMap<String, String>();
-        if (publishedWorkflowRegistry != null){
-            return publishedWorkflowRegistry.getPublishedWorkflows();
-        }
-        try {
-    	GatewayResource gateway = jpa.getGateway();
-
-    	List<PublishWorkflowResource> publishedWorkflows = gateway.getPublishedWorkflows();
-    	for (PublishWorkflowResource resource : publishedWorkflows) {
-			result.put(resource.getName(), resource.getContent());
-		}
-        } catch (RegistryException e) {
-            e.printStackTrace();
-        }
-        return result;
-    }
-
-    public void removePublishedWorkflow(String workflowName) throws RegException {
-        if (publishedWorkflowRegistry != null){
-            publishedWorkflowRegistry.removePublishedWorkflow(workflowName);
-        } else {
-            try {
-            GatewayResource gateway = jpa.getGateway();
-            if (!isPublishedWorkflowExists(workflowName)){
-                throw new PublishedWorkflowDoesNotExistsException(workflowName);
-            }
-            gateway.removePublishedWorkflow(workflowName);
-        } catch (RegistryException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public ResourceMetadata getPublishedWorkflowMetadata(String workflowName) throws RegException {
-        if (publishedWorkflowRegistry != null){
-            return publishedWorkflowRegistry.getPublishedWorkflowMetadata(workflowName);
-        }
-        //TODO
-        throw new UnimplementedRegOperationException();
-    }
-
-    /**---------------------------------User Workflow Registry----------------------------------**/
-
-	@Override
-	public boolean isWorkflowExists(String workflowName)
-			throws RegException {
-        if (userWorkflowRegistry != null){
-           return userWorkflowRegistry.isWorkflowExists(workflowName);
-        }
-        try {
-            return jpa.getWorker().isWorkflowTemplateExists(workflowName);
-        } catch (RegistryException e) {
-            e.printStackTrace();
-        }
-        return false;
-    }
-
-    public void addWorkflow(String workflowName, String workflowGraphXml) throws RegException {
-        if (userWorkflowRegistry != null){
-            userWorkflowRegistry.addWorkflow(workflowName, workflowGraphXml);
-        }else {
-            WorkerResource worker = jpa.getWorker();
-            if (isWorkflowExists(workflowName)){
-                throw new UserWorkflowAlreadyExistsException(workflowName);
-            }
-            try {
-            UserWorkflowResource workflowResource = worker.createWorkflowTemplate(workflowName);
-            workflowResource.setContent(workflowGraphXml);
-            workflowResource.save();
-            } catch (RegistryException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public void updateWorkflow(String workflowName, String workflowGraphXml) throws RegException {
-        if (userWorkflowRegistry != null){
-            userWorkflowRegistry.updateWorkflow(workflowName, workflowGraphXml);
-        }else {
-            WorkerResource worker = jpa.getWorker();
-            if (!isWorkflowExists(workflowName)){
-                throw new UserWorkflowDoesNotExistsException(workflowName);
-            }
-            try {
-				UserWorkflowResource workflowResource = worker.getWorkflowTemplate(workflowName);
-				workflowResource.setContent(workflowGraphXml);
-				workflowResource.save();
-			} catch (RegistryException e) {
-				throw new RegException(e);
-			}
-        }
-    }
-
-    public String getWorkflowGraphXML(String workflowName) throws RegException {
-        if (userWorkflowRegistry != null){
-            return userWorkflowRegistry.getWorkflowGraphXML(workflowName);
-        }
-        WorkerResource worker = jpa.getWorker();
-		if (!isWorkflowExists(workflowName)){
-        	throw new UserWorkflowDoesNotExistsException(workflowName);
-        }
-		try {
-			return worker.getWorkflowTemplate(workflowName).getContent();
-		} catch (RegistryException e) {
-			throw new RegException(e);
-		}
-    }
-
-	@Override
-	public Map<String, String> getWorkflows() throws RegException {
-        try {
-			if (userWorkflowRegistry != null){
-			    return userWorkflowRegistry.getWorkflows();
-			}
-			WorkerResource worker = jpa.getWorker();
-			Map<String, String> workflows=new HashMap<String, String>();
-			List<UserWorkflowResource> workflowTemplates = worker.getWorkflowTemplates();
-			for (UserWorkflowResource resource : workflowTemplates) {
-				workflows.put(resource.getName(), resource.getContent());
-			}
-			return workflows;
-		} catch (RegistryException e) {
-			throw new RegException(e);
-		}
-	}
-
-    public void removeWorkflow(String workflowName) throws RegException {
-        if (userWorkflowRegistry != null){
-            userWorkflowRegistry.removeWorkflow(workflowName);
-        }else {
-            WorkerResource worker = jpa.getWorker();
-            if (!isWorkflowExists(workflowName)){
-                throw new UserWorkflowDoesNotExistsException(workflowName);
-            }
-            try {
-				worker.removeWorkflowTemplate(workflowName);
-			} catch (RegistryException e) {
-				throw new RegException(e);
-			}
-        }
-    }
-
-    public ResourceMetadata getWorkflowMetadata(String workflowName) throws RegException {
-        if (userWorkflowRegistry != null){
-            return userWorkflowRegistry.getWorkflowMetadata(workflowName);
-        }
-    	//TODO
-        throw new UnimplementedRegOperationException();
-    }
-    public void setAiravataRegistry(AiravataRegistry2 registry) {
-        //redundant
-    }
-
-    public void setAiravataUser(AiravataUser user) {
-        setUser(user);
-    }
-
-    @Override
-    public AiravataUser getAiravataUser() {
-        return getUser();
-    }
-
-    /**---------------------------------Provenance Registry----------------------------------**/
-
-	@Override
-	public boolean isExperimentExists(String experimentId, boolean createIfNotPresent)throws RegException {
-//		if (provenanceRegistry != null){
-//             return provenanceRegistry.isExperimentExists(experimentId, createIfNotPresent);
-//        }
-//        if (jpa.getWorker().isExperimentExists(experimentId)){
-//			return true;
-//		}else if (createIfNotPresent){
-//			if (!isWorkspaceProjectExists(DEFAULT_PROJECT_NAME, true)){
-//				throw new WorkspaceProjectDoesNotExistsException(createProjName(DEFAULT_PROJECT_NAME));
-//			}
-//			AiravataExperiment experiment = new AiravataExperiment();
-//			experiment.setExperimentId(experimentId);
-//			experiment.setSubmittedDate(Calendar.getInstance().getTime());
-//			experiment.setGateway(getGateway());
-//			experiment.setUser(getUser());
-//			addExperiment(DEFAULT_PROJECT_NAME, experiment);
-//			return jpa.getWorker().isExperimentExists(experimentId);
-//		}else{
-//			return false;
-//		}
-        return false;
-	}
-
-	@Override
-	public boolean isExperimentExists(String experimentId)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.isExperimentExists(experimentId);
-//        }
-//		return isExperimentExists(experimentId, false);
-        return false;
-	}
-
-	@Override
-	public void updateExperimentExecutionUser(String experimentId,
-			String user) throws RegException {
-//        if (provenanceRegistry != null){
-//            provenanceRegistry.updateExperimentExecutionUser(experimentId, user);
-//        }else {
-//            if (!isExperimentExists(experimentId, true)){
-//                throw new ExperimentDoesNotExistsException(experimentId);
-//            }
-////            ExperimentMetadataResource experiment = jpa.getWorker().getExperiment(experimentId);
-////            experiment.setExecutionUser(user);
-////            experiment.save();
-//        }
-	}
-
-
-	@Override
-	public String getExperimentExecutionUser(String experimentId)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getExperimentExecutionUser(experimentId);
-//        }
-//		if (!isExperimentExists(experimentId)){
-//			throw new ExperimentDoesNotExistsException(experimentId);
-//		}
-//		ExperimentMetadataResource experiment = jpa.getWorker().getExperiment(experimentId);
-//		return experiment.getExecutionUser();
-        return null;
-	}
-
-    @Override
-    public boolean isExperimentNameExist(String experimentName) throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.isExperimentNameExist(experimentName);
-//        }
-//        return (new ExperimentDataRetriever()).isExperimentNameExist(experimentName);
-        return false;
-    }
-
-
-    @Override
-	public String getExperimentName(String experimentId)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getExperimentName(experimentId);
-//        }
-//		if (!isExperimentExists(experimentId)){
-//			throw new ExperimentDoesNotExistsException(experimentId);
-//		}
-//        return (new ExperimentDataRetriever()).getExperimentName(experimentId);
-        return null;
-	}
-
-
-	@Override
-	public void updateExperimentName(String experimentId,
-			String experimentName) throws RegException {
-//        if (provenanceRegistry != null){
-//            provenanceRegistry.updateExperimentName(experimentId, experimentName);
-//        }else {
-//            if (!isExperimentExists(experimentId, true)){
-//                throw new ExperimentDoesNotExistsException(experimentId);
-//            }
-//            ExperimentMetadataResource experiment = jpa.getWorker().getExperiment(experimentId);
-//            experiment.setExperimentName(experimentName);
-//            experiment.save();
-//        }
-	}
-
-
-    // FIXME : Need to replace with new Experiment_Generated_Data
-	@Override
-	public String getExperimentMetadata(String experimentId)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getExperimentMetadata(experimentId);
-//        }
-//		if (!isExperimentExists(experimentId, true)){
-//			throw new ExperimentDoesNotExistsException(experimentId);
-//		}
-//		ExperimentMetadataResource experiment = jpa.getWorker().getExperiment(experimentId);
-//		ExperimentDataResource data = experiment.getData();
-//		if (data.isExperimentMetadataPresent()){
-//			return data.getExperimentMetadata().getMetadata();
-//		}
-		return null;
-	}
-
-
-    // FIXME : Need to replace with new Experiment_Generated_Data
-	@Override
-	public void updateExperimentMetadata(String experimentId, String metadata)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            provenanceRegistry.updateExperimentMetadata(experimentId, metadata);
-//        }else {
-//            if (!isExperimentExists(experimentId, true)){
-//                throw new ExperimentDoesNotExistsException(experimentId);
-//            }
-//            ExperimentResource experiment = jpa.getWorker().getExperiment(experimentId);
-//            ExperimentDataResource data = experiment.getData();
-//            ExperimentMetadataResource experimentMetadata;
-//            if (data.isExperimentMetadataPresent()){
-//                experimentMetadata = data.getExperimentMetadata();
-//                experimentMetadata.setMetadata(metadata);
-//            }else{
-//                experimentMetadata = data.createExperimentMetadata();
-//                experimentMetadata.setMetadata(metadata);
-//            }
-//            experimentMetadata.save();
-//        }
-	}
-
-
-	@Override
-	public String getWorkflowExecutionTemplateName(String workflowInstanceId) throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getWorkflowExecutionTemplateName(workflowInstanceId);
-//        }
-//		if (!isWorkflowInstanceExists(workflowInstanceId, true)){
-//			throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
-//		}
-//		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
-//		return wi.getTemplateName();
-        return null;
-	}
-
-
-	@Override
-	public void setWorkflowInstanceTemplateName(String workflowInstanceId,
-			String templateName) throws RegException {
-//        if (provenanceRegistry != null){
-//            provenanceRegistry.setWorkflowInstanceTemplateName(workflowInstanceId, templateName);
-//        }else {
-//            if (!isWorkflowInstanceExists(workflowInstanceId, true)){
-//                throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
-//            }
-//            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
-//            wi.setTemplateName(templateName);
-//            wi.save();
-//        }
-	}
-
-
-	@Override
-	public List<WorkflowExecution> getExperimentWorkflowInstances(
-			String experimentId) throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getExperimentWorkflowInstances(experimentId);
-//        }
-//		if (!isExperimentExists(experimentId)){
-//			throw new ExperimentDoesNotExistsException(experimentId);
-//		}
-//		ExperimentMetadataResource experiment = jpa.getWorker().getExperiment(experimentId);
-//		List<WorkflowExecution> result=new ArrayList<WorkflowExecution>();
-//		List<WorkflowDataResource> workflowInstances = experiment.getWorkflowInstances();
-//		for (WorkflowDataResource resource : workflowInstances) {
-//			WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
-//			workflowInstance.setTemplateName(resource.getTemplateName());
-//			result.add(workflowInstance);
-//		}
-//		return result;
-        return null;
-	}
-
-
-	@Override
-	public boolean isWorkflowInstanceExists(String instanceId, boolean createIfNotPresent) throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.isWorkflowInstanceExists(instanceId, createIfNotPresent);
-//        }
-//        if (jpa.getWorker().isWorkflowInstancePresent(instanceId)){
-//			return true;
-//		}else if (createIfNotPresent){
-			//we are using the same id for the experiment id for backward compatibility
-			//for up to airavata 0.5
-//			if (!isExperimentExists(instanceId, true)){
-//				throw new ExperimentDoesNotExistsException(instanceId);
-//			}
-//			addWorkflowInstance(instanceId, instanceId, null);
-//			return isWorkflowInstanceExists(instanceId);
-//		}else{
-//			return false;
-//		}
-        return false;
-	}
-
-	@Override
-	public boolean isWorkflowInstanceExists(String instanceId)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.isWorkflowInstanceExists(instanceId);
-//        }
-//        return isWorkflowInstanceExists(instanceId, false);
-        return false;
-	}
-
-
-	@Override
-	public void updateWorkflowInstanceStatus(String instanceId,
-			State status) throws RegException {
-//        if (provenanceRegistry != null){
-//            provenanceRegistry.updateWorkflowInstanceStatus(instanceId, status);
-//        }else {
-//            if (!isWorkflowInstanceExists(instanceId, true)){
-//                throw new WorkflowInstanceDoesNotExistsException(instanceId);
-//            }
-//            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
-//            Timestamp currentTime = new Timestamp(Calendar.getInstance().getTime().getTime());
-//            wi.setStatus(status.toString());
-//            if (status==State.STARTED){
-//                wi.setStartTime(currentTime);
-//            }
-//            wi.setLastUpdatedTime(currentTime);
-//            wi.save();
-//        }
-	}
-
-
-	@Override
-	public void updateWorkflowInstanceStatus(WorkflowExecutionStatus status)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            provenanceRegistry.updateWorkflowInstanceStatus(status);
-//        }else {
-//            if (!isWorkflowInstanceExists(status.getWorkflowInstance().getWorkflowExecutionId(), true)){
-//                throw new WorkflowInstanceDoesNotExistsException(status.getWorkflowInstance().getWorkflowExecutionId());
-//            }
-//            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(status.getWorkflowInstance().getWorkflowExecutionId());
-//            Timestamp currentTime = new Timestamp(status.getStatusUpdateTime().getTime());
-//            if(status.getExecutionStatus() != null){
-//                wi.setStatus(status.getExecutionStatus().toString());
-//            }
-//
-//            if (status.getExecutionStatus()==State.STARTED){
-//                wi.setStartTime(currentTime);
-//            }
-//            wi.setLastUpdatedTime(currentTime);
-//            wi.save();
-//        }
-	}
-
-
-	@Override
-	public WorkflowExecutionStatus getWorkflowInstanceStatus(String instanceId)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getWorkflowInstanceStatus(instanceId);
-//        }
-//        if (!isWorkflowInstanceExists(instanceId, true)){
-//			throw new WorkflowInstanceDoesNotExistsException(instanceId);
-//		}
-//		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(instanceId);
-//		return new WorkflowExecutionStatus(new WorkflowExecution(wi.getExperimentID(),wi.getWorkflowInstanceID()),wi.getStatus()==null?null:State.valueOf(wi.getStatus()),wi.getLastUpdatedTime());
-	    return null;
-    }
-
-
-	@Override
-	public void updateWorkflowNodeInput(WorkflowInstanceNode node, String data)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            provenanceRegistry.updateWorkflowNodeInput(node, data);
-//        }else {
-//            if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(),true)){
-//                throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
-//            }
-//            WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
-//            NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
-//            nodeData.setInputs(data);
-//            nodeData.save();
-//        }
-	}
-
-
-	@Override
-	public void updateWorkflowNodeOutput(WorkflowInstanceNode node, String data) throws RegException {
-//        if (provenanceRegistry != null){
-//            provenanceRegistry.updateWorkflowNodeOutput(node, data);
-//        }else {
-//            try {
-//                if (!isWorkflowInstanceNodePresent(node.getWorkflowInstance().getWorkflowExecutionId(),node.getNodeId(),true)){
-//                    throw new WorkflowInstanceNodeDoesNotExistsException(node.getWorkflowInstance().getWorkflowExecutionId(), node.getNodeId());
-//                }
-//                WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(node.getWorkflowInstance().getWorkflowExecutionId());
-//                NodeDataResource nodeData = wi.getNodeData(node.getNodeId());
-//                nodeData.setOutputs(data);
-//                nodeData.save();
-//            } catch (RegException e) {
-//                e.printStackTrace();
-//                throw e;
-//            }
-//        }
-	}
-
-
-	@Override
-	public List<WorkflowNodeIOData> searchWorkflowInstanceNodeInput(
-			String experimentIdRegEx, String workflowNameRegEx,
-			String nodeNameRegEx) throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.searchWorkflowInstanceNodeInput(experimentIdRegEx, workflowNameRegEx, nodeNameRegEx);
-//        }
-        return null;
-	}
-
-
-	@Override
-	public List<WorkflowNodeIOData> searchWorkflowInstanceNodeOutput(
-			String experimentIdRegEx, String workflowNameRegEx,
-			String nodeNameRegEx) throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.searchWorkflowInstanceNodeOutput(experimentIdRegEx, workflowNameRegEx, nodeNameRegEx);
-        }
-        return null;
-	}
-
-
-	@Override
-	public List<WorkflowNodeIOData> getWorkflowInstanceNodeInput(
-			String workflowInstanceId, String nodeType)
-			throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowInstanceNodeInput(workflowInstanceId, nodeType);
-        }
-        return null;
-	}
-
-
-	@Override
-	public List<WorkflowNodeIOData> getWorkflowInstanceNodeOutput(
-			String workflowInstanceId, String nodeType)
-			throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowInstanceNodeOutput(workflowInstanceId, nodeType);
-        }
-        return null;
-	}
-
-
-	@Deprecated
-	@Override
-	public void saveWorkflowExecutionOutput(String experimentId,
-			String outputNodeName, String output) throws RegException {
-        if (provenanceRegistry != null){
-            provenanceRegistry.saveWorkflowExecutionOutput(experimentId, outputNodeName, output);
-        }
-	}
-
-	@Deprecated
-	@Override
-	public void saveWorkflowExecutionOutput(String experimentId,
-			WorkflowIOData data) throws RegException {
-        if (provenanceRegistry != null){
-            provenanceRegistry.saveWorkflowExecutionOutput(experimentId, data);
-        }
-	}
-
-	@Deprecated
-	@Override
-	public WorkflowIOData getWorkflowExecutionOutput(String experimentId,
-			String outputNodeName) throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowExecutionOutput(experimentId, outputNodeName);
-        }
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-	@Deprecated
-	@Override
-	public List<WorkflowIOData> getWorkflowExecutionOutput(String experimentId)
-			throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowExecutionOutput(experimentId);
-        }
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-	@Deprecated
-	@Override
-	public String[] getWorkflowExecutionOutputNames(String exeperimentId)
-			throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowExecutionOutputNames(exeperimentId);
-        }
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-	@Override
-	public ExperimentData getExperiment(String experimentId)
-			throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getExperiment(experimentId);
-        }
-		if (!isExperimentExists(experimentId)){
-			throw new ExperimentDoesNotExistsException(experimentId);
-		}
-        // FIXME : We dont have the data structure for experiment generated data at the moment
-        return (new ExperimentDataRetriever()).getExperiment(experimentId);
-
-	}
-
-
-	@Override
-	public List<String> getExperimentIdByUser(String user)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getExperimentIdByUser(user);
-//        }
-//        if(user == null){
-//            user = jpa.getWorker().getUser();
-//        }
-//        return (new ExperimentDataRetriever()).getExperimentIdByUser(user);
-        return null;
-	}
-
-
-	@Override
-	public List<ExperimentData> getExperimentByUser(String user)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getExperimentByUser(user);
-//        }
-//        if(user == null){
-//            user = jpa.getWorker().getUser();
-//        }
-//        return (new ExperimentDataRetriever()).getExperiments(user);
-        return null;
-	}
-	
-	@Override
-	public List<ExperimentData> getExperiments(HashMap<String,String> params)
-			throws RegException {
-//        if (provenanceRegistry != null){
-//            return provenanceRegistry.getExperiments(params);
-//        }
-//        return (new ExperimentDataRetriever()).getExperiments(params);
-        return null;
-	}
-
-
-	@Override
-	public List<ExperimentData> getExperimentByUser(String user,
-			int pageSize, int pageNo) throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getExperimentByUser(user, pageSize, pageNo);
-        }
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-	@Override
-	public void updateWorkflowNodeStatus(NodeExecutionStatus workflowStatusNode) throws RegException {
-        if (provenanceRegistry != null){
-            provenanceRegistry.updateWorkflowNodeStatus(workflowStatusNode);
-        }else {
-            WorkflowExecution workflowInstance = workflowStatusNode.getWorkflowInstanceNode().getWorkflowInstance();
-            String nodeId = workflowStatusNode.getWorkflowInstanceNode().getNodeId();
-            if (!isWorkflowInstanceNodePresent(workflowInstance.getWorkflowExecutionId(), nodeId, true)){
-                throw new WorkflowInstanceNodeDoesNotExistsException(workflowInstance.getWorkflowExecutionId(), nodeId);
-            }
-//            NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowExecutionId()).getNodeData(nodeId);
-//            nodeData.setStatus(workflowStatusNode.getExecutionStatus().toString());
-//            Timestamp t = new Timestamp(workflowStatusNode.getStatusUpdateTime().getTime());
-//            if (workflowStatusNode.getExecutionStatus()==State.STARTED){
-//                nodeData.setStartTime(t);
-//            }
-//            nodeData.setLastUpdateTime(t);
-//            nodeData.save();
-            //Each time node status is updated the the time of update for the workflow status is going to be the same
-//            WorkflowExecutionStatus currentWorkflowInstanceStatus = getWorkflowInstanceStatus(workflowInstance.getWorkflowExecutionId());
-//            updateWorkflowInstanceStatus(new WorkflowExecutionStatus(workflowInstance, currentWorkflowInstanceStatus.getExecutionStatus(), t));
-        }
-	}
-
-
-	@Override
-	public void updateWorkflowNodeStatus(String workflowInstanceId,
-			String nodeId, State status) throws RegException {
-        if (provenanceRegistry != null){
-            provenanceRegistry.updateWorkflowNodeStatus(workflowInstanceId, nodeId, status);
-        }else {
-            updateWorkflowNodeStatus(new WorkflowInstanceNode(new WorkflowExecution(workflowInstanceId, workflowInstanceId), nodeId), status);
-        }
-
-	}
-
-
-	@Override
-	public void updateWorkflowNodeStatus(WorkflowInstanceNode workflowNode,
-			State status) throws RegException {
-        if (provenanceRegistry != null){
-            provenanceRegistry.updateWorkflowNodeStatus(workflowNode, status);
-        }else {
-            updateWorkflowNodeStatus(new NodeExecutionStatus(workflowNode, status, Calendar.getInstance().getTime()));
-        }
-	}
-
-
-	@Override
-	public NodeExecutionStatus getWorkflowNodeStatus(
-			WorkflowInstanceNode workflowNode) throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowNodeStatus(workflowNode);
-        }
-        String id = workflowNode.getWorkflowInstance().getWorkflowExecutionId();
-		String nodeId = workflowNode.getNodeId();
-		if (!isWorkflowInstanceNodePresent(id, nodeId)){
-			throw new WorkflowInstanceNodeDoesNotExistsException(id, nodeId);
-		}
-//		WorkflowDataResource workflowInstance = jpa.getWorker().getWorkflowInstance(id);
-//		NodeDataResource nodeData = workflowInstance.getNodeData(nodeId);
-//		return new NodeExecutionStatus(new WorkflowInstanceNode(new WorkflowExecution(workflowInstance.getExperimentID(), workflowInstance.getWorkflowInstanceID()), nodeData.getNodeID()), nodeData.getStatus()==null?null:State.valueOf(nodeData.getStatus()),nodeData.getLastUpdateTime());
-	    return null;
-    }
-
-
-	@Override
-	public Date getWorkflowNodeStartTime(WorkflowInstanceNode workflowNode)
-			throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowNodeStartTime(workflowNode);
-        }
-        String id = workflowNode.getWorkflowInstance().getWorkflowExecutionId();
-		String nodeId = workflowNode.getNodeId();
-		if (!isWorkflowInstanceNodePresent(id, nodeId)){
-			throw new WorkflowInstanceNodeDoesNotExistsException(id, nodeId);
-		}
-//		WorkflowDataResource workflowInstance = jpa.getWorker().getWorkflowInstance(id);
-//		NodeDataResource nodeData = workflowInstance.getNodeData(nodeId);
-//		return nodeData.getStartTime();
-        return null;
-	}
-
-
-	@Override
-	public Date getWorkflowStartTime(WorkflowExecution workflowInstance)
-			throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowStartTime(workflowInstance);
-        }
-        if (!isWorkflowInstanceExists(workflowInstance.getWorkflowExecutionId(),true)){
-			throw new WorkflowInstanceDoesNotExistsException(workflowInstance.getWorkflowExecutionId());
-		}
-//		WorkflowDataResource wi = jpa.getWorker().getWorkflowInstance(workflowInstance.getWorkflowExecutionId());
-//		return wi.getStartTime();
-        return null;
-	}
-
-
-	@Override
-	public void updateWorkflowNodeGramData(
-			WorkflowNodeGramData workflowNodeGramData) throws RegException {
-        if (provenanceRegistry != null){
-            provenanceRegistry.updateWorkflowNodeGramData(workflowNodeGramData);
-        }else {
-        	ApplicationJob job = new ApplicationJob();
-        	job.setJobId(workflowNodeGramData.getGramJobID());
-        	job.setHostDescriptionId(workflowNodeGramData.getInvokedHost());
-        	job.setExperimentId(workflowNodeGramData.getWorkflowInstanceId());
-        	job.setWorkflowExecutionId(workflowNodeGramData.getWorkflowInstanceId());
-        	job.setNodeId(workflowNodeGramData.getNodeID());
-        	job.setJobData(workflowNodeGramData.getRsl());
-        	if (isApplicationJobExists(job.getJobId())){
-        		updateApplicationJob(job);
-        	}else{
-        		addApplicationJob(job);
-        	}
-        }
-	}
-
-
-	@Override
-	public WorkflowExecutionData getWorkflowInstanceData(
-			String workflowInstanceId) throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowInstanceData(workflowInstanceId);
-        }
-        if (!isWorkflowInstanceExists(workflowInstanceId,true)){
-			throw new WorkflowInstanceDoesNotExistsException(workflowInstanceId);
-		}
-		try{
-//            WorkflowDataResource resource = jpa.getWorker().getWorkflowInstance(workflowInstanceId);
-//            WorkflowExecution workflowInstance = new WorkflowExecution(resource.getExperimentID(), resource.getWorkflowInstanceID());
-//            workflowInstance.setTemplateName(resource.getTemplateName());
-//            WorkflowExecutionData workflowInstanceData = new WorkflowExecutionDataImpl(null, workflowInstance, new WorkflowExecutionStatus(workflowInstance, resource.getStatus()==null? null:State.valueOf(resource.getStatus()),resource.getLastUpdatedTime()), null);
-//            List<NodeDataResource> nodeData = resource.getNodeData();
-//            for (NodeDataResource nodeDataResource : nodeData) {
-//                workflowInstanceData.getNodeDataList().add(getWorkflowInstanceNodeData(workflowInstanceId, nodeDataResource.getNodeID()));
-//            }
-//            return workflowInstanceData;
-//        } catch (ExperimentLazyLoadedException e) {
-        } catch (Exception e) {
-            throw new RegException(e);
-        }
-        return null;
-    }
-
-
-	@Override
-	public NodeExecutionData getWorkflowInstanceNodeData(
-			String workflowInstanceId, String nodeId) throws RegException {
-        if (provenanceRegistry != null){
-            return provenanceRegistry.getWorkflowInstanceNodeData(workflowInstanceId, nodeId);
-        }
-        if (!isWorkflowInstanceNodePresent(workflowInstanceId, nodeId)){
-			throw new WorkflowInstanceNodeDoesNotExistsException(workflowInstanceId,nodeId);
-		}
-//		NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstanceId).getNodeData(nodeId);
-//		NodeExecutionData data = new NodeExecutionData(new WorkflowInstanceNode(new WorkflowExecution(nodeData.getWorkflowDataResource().getExperimentID(),nodeData.getWorkflowDataResource().getWorkflowInstanceID()),nodeData.getNodeID()));
-//		data.setInput(nodeData.getInputs());
-//		data.setOutput(nodeData.getOutputs());
-//        data.setType(WorkflowNodeType.getType(nodeData.getNodeType()).g

<TRUNCATED>

[2/9] retiring previous registry API - AIRAVATA-1234

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentLazyLoadedException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentLazyLoadedException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentLazyLoadedException.java
deleted file mode 100644
index f78966b..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/ExperimentLazyLoadedException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.common.exception.LazyLoadedDataException;
-
-public class ExperimentLazyLoadedException extends LazyLoadedDataException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public ExperimentLazyLoadedException(String experimentId) {
-		super("The experiment "+experimentId+" is lazy loaded by the client!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/InvalidApplicationJobIDException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/InvalidApplicationJobIDException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/InvalidApplicationJobIDException.java
deleted file mode 100644
index d3b7749..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/InvalidApplicationJobIDException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class InvalidApplicationJobIDException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public InvalidApplicationJobIDException() {
-		super("The Application job ID cannot be null or empty!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/UserWorkflowAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/UserWorkflowAlreadyExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/UserWorkflowAlreadyExistsException.java
deleted file mode 100644
index 8c62521..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/UserWorkflowAlreadyExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class UserWorkflowAlreadyExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public UserWorkflowAlreadyExistsException(String workflowTemplateName) {
-		super("The workflow "+workflowTemplateName+" already exists in user space!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/UserWorkflowDoesNotExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/UserWorkflowDoesNotExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/UserWorkflowDoesNotExistsException.java
deleted file mode 100644
index 9b9d6b4..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/UserWorkflowDoesNotExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class UserWorkflowDoesNotExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public UserWorkflowDoesNotExistsException(String workflowTemplateName) {
-		super("The workflow "+workflowTemplateName+" does not exists in user space!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceAlreadyExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceAlreadyExistsException.java
deleted file mode 100644
index 585f6ba..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceAlreadyExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class WorkflowInstanceAlreadyExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public WorkflowInstanceAlreadyExistsException(String instanceId) {
-		super("The workflow instance "+instanceId+" is already added to the registry & workflowInstanceId should be unique for the system!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceDoesNotExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceDoesNotExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceDoesNotExistsException.java
deleted file mode 100644
index 9a2f18e..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceDoesNotExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class WorkflowInstanceDoesNotExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public WorkflowInstanceDoesNotExistsException(String instanceId) {
-		super("The workflow instance "+instanceId+" is not present in the registry!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceNodeAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceNodeAlreadyExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceNodeAlreadyExistsException.java
deleted file mode 100644
index 4cf0c5d..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceNodeAlreadyExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class WorkflowInstanceNodeAlreadyExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public WorkflowInstanceNodeAlreadyExistsException(String instanceId, String nodeId) {
-		super("The node "+nodeId+" for the workflow instance "+instanceId+" is already in the registry!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceNodeDoesNotExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceNodeDoesNotExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceNodeDoesNotExistsException.java
deleted file mode 100644
index 4dc9eea..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkflowInstanceNodeDoesNotExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class WorkflowInstanceNodeDoesNotExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public WorkflowInstanceNodeDoesNotExistsException(String instanceId, String nodeId) {
-		super("The node "+nodeId+" for the workflow instance "+instanceId+" is not present in the registry!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkspaceProjectAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkspaceProjectAlreadyExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkspaceProjectAlreadyExistsException.java
deleted file mode 100644
index 869fe92..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkspaceProjectAlreadyExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class WorkspaceProjectAlreadyExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public WorkspaceProjectAlreadyExistsException(String projectName) {
-		super("The workspace project "+projectName+" already exists!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkspaceProjectDoesNotExistsException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkspaceProjectDoesNotExistsException.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkspaceProjectDoesNotExistsException.java
deleted file mode 100644
index c36f719..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/WorkspaceProjectDoesNotExistsException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * 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.registry.api.exception.worker;
-
-import org.apache.airavata.registry.api.exception.RegException;
-
-public class WorkspaceProjectDoesNotExistsException extends RegException {
-
-	private static final long serialVersionUID = -8006347245307495767L;
-
-	public WorkspaceProjectDoesNotExistsException(String projectName) {
-		super("The workspace project "+projectName+" does not exists!!!");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
deleted file mode 100644
index 85befcd..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ExperimentDataImpl.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- *
- * 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.registry.api.impl;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
-import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class ExperimentDataImpl implements ExperimentData{
-	private WorkflowExecutionStatus executionStatus;
-	private String user;
-	private List<WorkflowIOData> output;
-	private String experimentId;
-	private String metadata;
-	private String workflowInstanceName;
-	private List<WorkflowExecutionDataImpl> workflowInstanceDataList=new ArrayList<WorkflowExecutionDataImpl>();
-	private boolean lazyLoaded=false;
-
-    public ExperimentDataImpl() {
-        this(false);
-    }
-
-    public ExperimentDataImpl(boolean lazyLoaded) {
-        this.lazyLoaded = lazyLoaded;
-    }
-
-    public String getMetadata() {
-		return metadata;
-	}
-	public void setMetadata(String metadata) {
-		this.metadata = metadata;
-	}
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-    @Override
-    public String getTemplateName() throws ExperimentLazyLoadedException {
-        return getWorkflowExecutionDataList().get(0).getTemplateName();
-    }
-
-    @Override
-    public WorkflowExecutionStatus.State getState() throws ExperimentLazyLoadedException {
-        if (executionStatus != null)
-            return executionStatus.getExecutionStatus();
-        else
-            return getWorkflowExecutionDataList().get(0).getState();
-    }
-
-    @Override
-    public Date getStatusUpdateTime() throws ExperimentLazyLoadedException {
-        if (executionStatus != null)
-            return executionStatus.getStatusUpdateTime();
-        else
-            return getWorkflowExecutionDataList().get(0).getStatusUpdateTime();
-    }
-
-    @Override
-    public ExperimentData getExperimentData() throws ExperimentLazyLoadedException {
-        return getWorkflowExecutionDataList().get(0).getExperimentData();
-    }
-
-    @Override
-    public void setExperimentData(ExperimentDataImpl experimentData) throws ExperimentLazyLoadedException {
-        getWorkflowExecutionDataList().get(0).setExperimentData(experimentData);
-    }
-
-    public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-	public String getTopic() {
-		return experimentId;
-	}
-	public void setTopic(String topic) {
-		this.experimentId = topic;
-	}
-	public WorkflowExecutionStatus getExecutionStatus() {
-		return executionStatus;
-	}
-	public void setExecutionStatus(WorkflowExecutionStatus executionStatus) {
-		this.executionStatus = executionStatus;
-	}
-	public String getUser() {
-		return user;
-	}
-	public void setUser(String user) {
-		this.user = user;
-	}
-	public List<WorkflowIOData> getOutput() {
-		if (output==null){
-			output=new ArrayList<WorkflowIOData>();
-		}
-		return output;
-	}
-	public void setOutput(List<WorkflowIOData> output) {
-		this.output = output;
-	}
-	public void addOutput(WorkflowIOData output) {
-		getOutput().add(output);
-	}
-	public WorkflowIOData getOutput(String nodeId) {
-		return (WorkflowNodeIOData)getIOData(nodeId, getOutput());
-	}
-
-	private WorkflowIOData getIOData(String nodeId, List<?> list) {
-		for (Object data : list) {
-			WorkflowIOData iodata=(WorkflowIOData)data;
-			if (iodata.getNodeId().equals(nodeId)){
-				return iodata;
-			}
-		}
-		return null;
-	}
-	
-	@Override
-	public String getExperimentName() {
-		return workflowInstanceName;
-	}
-	
-	@Override
-	public void setExperimentName(String workflowInstanceName) {
-		this.workflowInstanceName=workflowInstanceName;
-		
-	}
-
-    @Override
-    public WorkflowExecutionData getWorkflowExecutionData(String workflowInstanceID) throws ExperimentLazyLoadedException {
-        for(WorkflowExecutionData workflowInstanceData : getWorkflowExecutionDataList()){
-            if(workflowInstanceData.getId().equals(workflowInstanceID)){
-                return workflowInstanceData;
-            }
-        }
-        return null;
-    }
-
-    @Override
-	public List<WorkflowExecutionDataImpl> getWorkflowExecutionDataList() throws ExperimentLazyLoadedException{
-		if (isLazyLoaded()){
-			throw new ExperimentLazyLoadedException(getExperimentId());
-		}
-		return workflowInstanceDataList;
-	}
-
-	public boolean isLazyLoaded() {
-		return lazyLoaded;
-	}
-
-	public void setLazyLoaded(boolean lazyLoaded) {
-		this.lazyLoaded = lazyLoaded;
-	}
-
-    @Override
-    public WorkflowExecution getWorkflowExecution() throws ExperimentLazyLoadedException{
-        return getWorkflowExecutionDataList().get(0).getWorkflowExecution();
-    }
-
-    @Override
-    public List<NodeExecutionData> getNodeDataList() throws ExperimentLazyLoadedException{
-        return getWorkflowExecutionDataList().get(0).getNodeDataList();
-    }
-
-    @Override
-    public void addNodeData(NodeExecutionData... nodeData) throws ExperimentLazyLoadedException {
-    	getWorkflowExecutionDataList().get(0).addNodeData(nodeData);
-    }
-
-    @Override
-    public NodeExecutionData getNodeData(String nodeId) throws ExperimentLazyLoadedException {
-        return getWorkflowExecutionDataList().get(0).getNodeData(nodeId);
-    }
-
-	@Override
-	public String getId() {
-		return getExperimentId();
-	}
-
-	@Override
-	public List<NodeExecutionData> getNodeDataList(WorkflowNode type)
-			throws ExperimentLazyLoadedException {
-		return getWorkflowExecutionDataList().get(0).getNodeDataList(type);
-	}
-
-	@Override
-	public List<InputData> getWorkflowInputs() throws ExperimentLazyLoadedException{
-		return getWorkflowExecutionDataList().get(0).getWorkflowInputs();
-	}
-
-	@Override
-	public List<OutputData> getWorkflowOutputs()throws ExperimentLazyLoadedException {
-		return getWorkflowExecutionDataList().get(0).getWorkflowOutputs();
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java
deleted file mode 100644
index a8573b7..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/impl/WorkflowExecutionDataImpl.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- *
- * 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.registry.api.impl;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
-import org.apache.airavata.registry.api.workflow.*;
-import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-import org.apache.airavata.registry.api.workflow.WorkflowNodeType.WorkflowNode;
-
-import javax.xml.bind.annotation.*;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class WorkflowExecutionDataImpl implements WorkflowExecutionData {
-	private WorkflowExecution workflowInstance;
-
-	@XmlTransient
-	private ExperimentDataImpl experimentData;
-
-	private WorkflowExecutionStatus workflowInstanceStatus;
-
-	private List<NodeExecutionData> nodeDataList;
-
-	public WorkflowExecutionDataImpl() {
-	}
-
-	public WorkflowExecutionDataImpl(ExperimentData experimentData,
-			WorkflowExecution workflowInstance,
-			WorkflowExecutionStatus workflowInstanceStatus,
-			List<NodeExecutionData> nodeDataList) {
-		this.experimentData = (ExperimentDataImpl) experimentData;
-		this.workflowInstance = workflowInstance;
-		this.workflowInstanceStatus = workflowInstanceStatus;
-		this.nodeDataList = nodeDataList;
-	}
-
-	public WorkflowExecution getWorkflowExecution() {
-		return workflowInstance;
-	}
-
-	public List<NodeExecutionData> getNodeDataList() {
-		if (nodeDataList == null) {
-			nodeDataList = new ArrayList<NodeExecutionData>();
-		}
-		return nodeDataList;
-	}
-
-	public void addNodeData(NodeExecutionData... nodeData) {
-		getNodeDataList().addAll(Arrays.asList(nodeData));
-	}
-
-	public String getExperimentId() {
-		return workflowInstance.getExperimentId();
-	}
-
-	/**
-	 * @deprecated Use "getWorkflowInstanceID() instead
-	 * @return
-	 */
-	public String getTopicId() {
-		return workflowInstance.getWorkflowExecutionId();
-	}
-
-	/**
-	 * @deprecated Use getId() instead
-	 */
-	public String getWorkflowInstanceId() {
-		return workflowInstance.getWorkflowExecutionId();
-	}
-
-	/**
-	 * @deprecated Use "WorkflowInstanceData.getTemplateName()" instead
-	 * @return
-	 */
-	public String getWorkflowName() {
-		return getTemplateName();
-	}
-
-	public String getTemplateName() {
-		return workflowInstance.getTemplateName();
-	}
-
-	public State getState() {
-		return workflowInstanceStatus.getExecutionStatus();
-	}
-
-	public Date getStatusUpdateTime() {
-		return workflowInstanceStatus.getStatusUpdateTime();
-	}
-
-	public NodeExecutionData getNodeData(String nodeId) {
-		for (NodeExecutionData nodeData : getNodeDataList()) {
-			if (nodeData.getWorkflowInstanceNode().getNodeId().equals(nodeId)) {
-				return nodeData;
-			}
-		}
-		return null;
-	}
-
-	public ExperimentData getExperimentData() {
-		return experimentData;
-	}
-
-	public void setExperimentData(ExperimentDataImpl experimentData) {
-		this.experimentData = experimentData;
-	}
-
-	public String getId() {
-		return workflowInstance.getWorkflowExecutionId();
-	}
-
-	@Override
-	public List<InputData> getWorkflowInputs() {
-		List<InputData> workflowInstanceNodePortDatas = new ArrayList<InputData>();
-		for (NodeExecutionData workflowInstanceNodeData : getNodeDataList(WorkflowNodeType.WorkflowNode.INPUTNODE)) {
-			workflowInstanceNodePortDatas.addAll(convertToInputDataList(workflowInstanceNodeData.getOutputData()));
-		}
-		return workflowInstanceNodePortDatas;
-	}
-
-	private List<InputData> convertToInputDataList(List<OutputData> outputData) {
-		List<InputData> i = new ArrayList<InputData>();
-		for (OutputData o : outputData) {
-			i.add(new InputData(o.getWorkflowInstanceNode(),o.getName(),o.getValue()));
-		}
-		return i;
-	}
-	private List<OutputData> convertToOutputDataList(List<InputData> outputData) {
-		List<OutputData> i = new ArrayList<OutputData>();
-		for (InputData o : outputData) {
-			i.add(new OutputData(o.getWorkflowInstanceNode(),o.getName(),o.getValue()));
-		}
-		return i;
-	}
-
-	@Override
-	public List<NodeExecutionData> getNodeDataList(WorkflowNode type) {
-		List<NodeExecutionData> workflowInstanceNodePortDatas = new ArrayList<NodeExecutionData>();
-		for (NodeExecutionData workflowInstanceNodeData : getNodeDataList()) {
-			if (workflowInstanceNodeData.getType().equals(type)) {
-				workflowInstanceNodePortDatas.add(workflowInstanceNodeData);
-			}
-		}
-		return workflowInstanceNodePortDatas;
-	}
-
-	@Override
-	public List<OutputData> getWorkflowOutputs() {
-		List<OutputData> workflowInstanceNodePortDatas = new ArrayList<OutputData>();
-		for (NodeExecutionData workflowInstanceNodeData : getNodeDataList(WorkflowNodeType.WorkflowNode.OUTPUTNODE)) {
-			workflowInstanceNodePortDatas.addAll(convertToOutputDataList(workflowInstanceNodeData
-					.getInputData()));
-		}
-		return workflowInstanceNodePortDatas;
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/orchestrator/OrchestratorData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/orchestrator/OrchestratorData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/orchestrator/OrchestratorData.java
deleted file mode 100644
index 16df9ea..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/orchestrator/OrchestratorData.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * 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.registry.api.orchestrator;
-
-import javax.jws.WebService;
-import javax.xml.bind.annotation.XmlSeeAlso;
-
-import org.apache.airavata.registry.api.orchestrator.impl.OrchestratorDataImpl;
-
-@WebService
-@XmlSeeAlso(OrchestratorDataImpl.class)
-public interface OrchestratorData {
-
-	/**
-	 * Returns the orchestrator run id
-	 * 
-	 * @return
-	 */
-	public int getOrchestratorId();
-
-	/**
-	 * 
-	 * @return the unique experiment id
-	 */
-	public String getExperimentId();
-
-	/**
-	 * Returns the user of the run
-	 * 
-	 * @return
-	 */
-	public String getUser();
-
-	/**
-	 * Returns application name to execute
-	 */
-	public String getApplicationName();
-	/**
-	 * Returns GFAC service URL
-	 * 
-	 * @return
-	 */
-	public String getGFACServiceEPR();
-
-	/**
-	 * Returns state of processing
-	 * 
-	 * @return
-	 */
-	public String getState();
-
-	/**
-	 * Returns run status
-	 * 
-	 * @return
-	 */
-	public String getStatus();
-
-	/**
-	 * 
-	 * @param experimentId
-	 */
-	public void setExperimentId(String experimentId);
-
-	/**
-	 * 
-	 * @param user
-	 */
-	public void setUser(String user);
-
-	/**
-	 * 
-	 * @param gfacEPR
-	 */
-	public void setGFACServiceEPR(String gfacEPR);
-	
-	/**
-	 * 
-	 * @param state
-	 */
-	public void setState(String state);
-	
-	/**
-	 * 
-	 * @param status
-	 */
-	public void setStatus(String status);
-
-	/**
-	 * 
-	 * @param applicationName
-	 */
-	public void setApplicationName(String applicationName);
-
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/orchestrator/impl/OrchestratorDataImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/orchestrator/impl/OrchestratorDataImpl.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/orchestrator/impl/OrchestratorDataImpl.java
deleted file mode 100644
index 73f2553..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/orchestrator/impl/OrchestratorDataImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.registry.api.orchestrator.impl;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.airavata.registry.api.orchestrator.OrchestratorData;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement
-public class OrchestratorDataImpl implements OrchestratorData{
-
-	private int orchestratorId;
-	private String experimentId;
-	private String user;
-	private String status;
-	private String state;
-	private String gfacEPR;
-	private String applicationName;
-	private boolean lazyLoaded=false;
-
-    public OrchestratorDataImpl() {
-        this(false);
-    }
-
-    public OrchestratorDataImpl(boolean lazyLoaded) {
-        this.lazyLoaded = lazyLoaded;
-    }
-	@Override
-	public int getOrchestratorId() {
-		return orchestratorId;
-	}
-
-	@Override
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	@Override
-	public String getUser() {
-		return user;
-	}
-
-	@Override
-	public String getGFACServiceEPR() {
-		return gfacEPR;
-	}
-
-	@Override
-	public String getState() {
-		return state;
-	}
-
-	@Override
-	public String getStatus() {
-		return status.toString();
-	}
-
-	@Override
-	public void setExperimentId(String experimentId) {
-	this.experimentId =  experimentId;	
-	}
-
-	@Override
-	public void setUser(String user) {
-		this.user = user;
-		
-	}
-
-	@Override
-	public void setGFACServiceEPR(String gfacEPR) {
-		this.gfacEPR = gfacEPR;
-	}
-
-	@Override
-	public void setState(String state) {
-		this.state = state;
-	}
-
-	@Override
-	public void setStatus(String status) {
-		this.status = status;
-	}
-	@Override
-	public String getApplicationName() {
-		return applicationName;
-	}
-	@Override
-	public void setApplicationName(String applicationName) {
-		this.applicationName = applicationName;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistryConstants.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistryConstants.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistryConstants.java
deleted file mode 100644
index 1089acc..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistryConstants.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * 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.registry.api.util;
-
-public class RegistryConstants {
-    public static final String KEY_DEFAULT_GATEWAY_ID = "default.registry.gateway";
-    public static final String KEY_DEFAULT_REGISTRY_USER = "registry.user";
-    public static final String KEY_DEFAULT_REGISTRY_URL = "registry.jdbc.url";
-    public static final String CONFIGURATION_REGISTRY_ACCESSOR_CLASS = "class.configuration.registry.accessor";
-    public static final String DESCRIPTOR_REGISTRY_ACCESSOR_CLASS = "class.descriptor.registry.accessor";
-    public static final String PROJECT_REGISTRY_ACCESSOR_CLASS = "class.project.registry.accessor";
-    public static final String PROVENANCE_REGISTRY_ACCESSOR_CLASS = "class.provenance.registry.accessor";
-    public static final String USER_WF_REGISTRY_ACCESSOR_CLASS = "class.user.workflow.registry.accessor";
-    public static final String PUBLISHED_WF_REGISTRY_ACCESSOR_CLASS = "class.published.workflow.registry.accessor";
-    public static final String USER_REGISTRY_ACCESSOR_CLASS = "class.user.registry.accessor";
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistrySettings.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistrySettings.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistrySettings.java
deleted file mode 100644
index 3c2b9a3..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistrySettings.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- *
- * 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.registry.api.util;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.regex.Pattern;
-
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.ApplicationSettings;
-import org.apache.airavata.common.utils.StringUtil;
-import org.apache.airavata.registry.api.exception.RegistrySettingsException;
-import org.apache.airavata.registry.api.exception.RegistrySettingsLoadException;
-
-public class RegistrySettings {
-    private static final String REPOSITORY_PROPERTIES = "registry.properties";
-    private static Properties properties = new Properties();
-    private static Exception propertyLoadException;
-    private static final String REGISTRY_ACCESSOR_CLASS = "class.registry.accessor";
-    private static final String SAVE_APPLICATION_JOB_STATUS_HISTORY="enable.application.job.status.history";
-    
-    static{
-    	URL url = RegistrySettings.class.getClassLoader()
-				.getResource(REPOSITORY_PROPERTIES);
-		if (url == null) {
-    		if (AiravataUtils.isServer()){
-    			 url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.SERVER_PROPERTIES);
-                if(url == null){
-                    url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.CLIENT_PROPERTIES);
-                }
-    		}else if (AiravataUtils.isClient()){
-        		url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.CLIENT_PROPERTIES);
-                if(url == null){
-                    url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.SERVER_PROPERTIES);
-                }
-        	}else{
-        		//unknown execution mode... If so, first assume its client, if not server...
-        		url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.CLIENT_PROPERTIES);
-        		if (url==null){
-        			url=RegistrySettings.class.getClassLoader().getResource(ApplicationSettings.SERVER_PROPERTIES);
-        		}
-        	}
-		}
-        try {
-            properties.load(url.openStream());
-        } catch (Exception e) {
-        	propertyLoadException=e;
-        }
-        System.out.println(url);
-    }
-    
-    private static void validateSuccessfulPropertyFileLoad() throws RegistrySettingsException{
-    	if (propertyLoadException!=null){
-    		throw new RegistrySettingsLoadException(propertyLoadException);
-    	}
-    }
-    
-    public static String getSetting(String key) throws RegistrySettingsException{
-    	String rawValue=null;
-    	if (System.getProperties().containsKey(key)){
-    		rawValue=System.getProperties().getProperty(key);
-    	}else{
-    		validateSuccessfulPropertyFileLoad();
-	    	if (properties.containsKey(key)){
-	    		rawValue=properties.getProperty(key);
-	    	}else{
-	    		return null;		
-	    	}
-    	}
-    	return deriveAbsoluteValueImpl(rawValue);
-//    	throw new UnspecifiedRegistrySettingsException(key);
-    }
-    
-	private static String deriveAbsoluteValueImpl(String property){
-		if (property!=null){
-			Map<Integer, String> containedParameters = StringUtil.getContainedParameters(property);
-			List<String> parametersAlreadyProcessed=new ArrayList<String>();
-			for (String parameter : containedParameters.values()) {
-				if (!parametersAlreadyProcessed.contains(parameter)) {
-					String parameterName = parameter.substring(2,parameter.length() - 1);
-					String parameterValue = getSetting(parameterName,parameter);
-					property = property.replaceAll(Pattern.quote(parameter), parameterValue);
-					parametersAlreadyProcessed.add(parameter);
-				}
-			}
-		}
-		return property;
-	}
-    public static String getSetting(String key, String defaultValue){
-    	try {
-    		return getSetting(key);
-		} catch (RegistrySettingsException e) {
-			//we'll ignore this error since a default value is provided
-		}
-		return defaultValue;
-    }
-    
-    public static String getRegistryAccessorClass() throws RegistrySettingsException{
-    	return getSetting(REGISTRY_ACCESSOR_CLASS);
-    }
-    
-    public static boolean isApplicationJobStatusHistoryEnabled(){
-    	return "true".equalsIgnoreCase(getSetting(SAVE_APPLICATION_JOB_STATUS_HISTORY, "false"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistryUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistryUtils.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistryUtils.java
deleted file mode 100644
index 6968d04..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/RegistryUtils.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- *
- * 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.registry.api.util;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-
-import org.apache.airavata.common.exception.AiravataConfigurationException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.registry.api.AiravataRegistryFactory;
-import org.apache.airavata.registry.api.AiravataUser;
-import org.apache.airavata.registry.api.Gateway;
-import org.apache.airavata.registry.api.exception.*;
-import org.apache.airavata.registry.api.exception.RegException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class RegistryUtils {
-    private static final Logger log = LoggerFactory.getLogger(RegistryUtils.class);
-
-
-    public static String validateAxisService(String urlString)throws RegException {
-        if(!urlString.endsWith("?wsdl")){
-            urlString = urlString + "?wsdl";
-        }
-        try {
-            URL url = new URL(urlString);
-            URLConnection conn = url.openConnection();
-            conn.connect();
-        } catch (MalformedURLException e) {
-            // the URL is not in a valid form
-            throw new RegException("Given Axis2 Service URL : " + urlString + " is Invalid",e);
-        } catch (IOException e) {
-            // the connection couldn't be established
-            throw new RegException("Given Axis2 Service URL : " + urlString + " is Invalid",e);
-        }
-        return  urlString;
-    }
-    public static String validateURL(String urlString)throws RegException {
-        try {
-            URL url = new URL(urlString);
-            URLConnection conn = url.openConnection();
-            conn.connect();
-        } catch (MalformedURLException e) {
-            // the URL is not in a valid form
-            throw new RegException("Given URL: " + urlString + " is Invalid",e);
-        } catch (IOException e) {
-            // the connection couldn't be established
-            throw new RegException("Given URL: " + urlString + " is Invalid",e);
-        }
-        return  urlString;
-    }
-//    public static boolean validateRegistryCredentials(String userName,String password,String url)throws RegistryException{
-//        HashMap<String, String> map = new HashMap<String, String>();
-//        map.put("org.apache.jackrabbit.repository.uri", url);
-//        try {
-//            AiravataJCRRegistry airavataJCRRegistry = new AiravataJCRRegistry(new URI(url), "org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory", userName, password, map);
-//            airavataJCRRegistry.saveGFacDescriptor("dummy");
-////            airavataJCRRegistry.deleteGFacDescriptor("dummy");
-//        } catch (Exception e) {
-//            throw new RegistryException("Check the properties file for JCR Registry Configuration",e);
-//        }
-//        return true;
-//    }
-
-    public static AiravataRegistry2 getRegistryFromServerSettings() {
-        String username = "";
-//        Properties properties = new Properties();
-        AiravataRegistry2 registry = null;
-//        try {
-////            properties.load(url.openStream());
-//        	username=ServerSettings.getSystemUser();
-////            if (properties.get(REGISTRY_USER) != null) {
-////                username = (String) properties.get(REGISTRY_USER);
-////            }
-//        } catch (MalformedURLException e) {
-//            e.printStackTrace();
-//        } catch (IOException e) {
-//            e.printStackTrace();
-//        }
-        try {
-        	username=ServerSettings.getSystemUser();
-            registry = AiravataRegistryFactory.getRegistry(new Gateway(ServerSettings.getSystemUserGateway()),
-                    new AiravataUser(username));
-        } catch (AiravataConfigurationException e) {
-            log.error("Error initializing AiravataRegistry2");
-        } catch (RegAccessorNotFoundException e) {
-            log.error("Error initializing AiravataRegistry2");
-        } catch (RegAccessorInstantiateException e) {
-            log.error("Error initializing AiravataRegistry2");
-        } catch (RegAccessorInvalidException e) {
-            log.error("Error initializing AiravataRegistry2");
-        } catch (RegAccessorUndefinedException e) {
-            log.error("Error initializing AiravataRegistry2");
-        } catch (ApplicationSettingsException e) {
-        	log.error("Error initializing AiravataRegistry2",e);
-		} catch (RegException e) {
-            log.error("Error initializing AiravataRegistry2",e);
-        }
-        return registry;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java
deleted file mode 100644
index c909841..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/util/WebServiceUtil.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- *
- * 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.registry.api.util;
-
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.commons.gfac.wsdl.WSDLConstants;
-import org.apache.airavata.commons.gfac.wsdl.WSDLGenerator;
-import org.apache.airavata.schemas.gfac.*;
-
-import java.util.Hashtable;
-
-public class WebServiceUtil {
-
-
-
-    public static String generateWSDL(ServiceDescription service) {
-        StringBuilder builder = new StringBuilder();
-        builder.append("<wsdl:definitions xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:ns1=\"http://org.apache.axis2/xsd\" xmlns:ns=\"http://www.wso2.org/types\" xmlns:wsaw=\"http://www.w3.org/2006/05/addressing/wsdl\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\" xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\" targetNamespace=\"http://www.wso2.org/types\">");
-        builder.append("<wsdl:documentation>");
-        builder.append(service.getType().getName());
-        builder.append("</wsdl:documentation>");
-        builder.append("<wsdl:types>");
-        builder.append("<xs:schema attributeFormDefault=\"qualified\" elementFormDefault=\"unqualified\" targetNamespace=\"http://www.wso2.org/types\">");
-
-        boolean isInputParametersPresent = service.getType().getInputParametersArray() != null
-                && service.getType().getInputParametersArray().length > 0;
-        if (isInputParametersPresent) {
-            builder.append("<xs:element name=\"invoke\">");
-            builder.append("<xs:complexType>");
-            builder.append("<xs:sequence>");
-
-            ServiceDescriptionType p = service.getType();
-
-            for (int i = 0; i < p.getInputParametersArray().length; i++) {
-                generateElementFromInputType(p.getInputParametersArray(i), builder);
-            }
-
-            builder.append("</xs:sequence>");
-            builder.append("</xs:complexType>");
-            builder.append("</xs:element>");
-        }
-
-        boolean isOutputParametersPresent = service.getType().getOutputParametersArray() != null
-                && service.getType().getOutputParametersArray().length > 0;
-        if (isOutputParametersPresent) {
-            builder.append("<xs:element name=\"invokeResponse\">");
-            builder.append("<xs:complexType>");
-            builder.append("<xs:sequence>");
-
-            ServiceDescriptionType p = service.getType();
-
-            for (int i = 0; i < p.getOutputParametersArray().length; i++) {
-                generateElementFromOutputType(p.getOutputParametersArray(i), builder);
-            }
-
-            builder.append("</xs:sequence>");
-            builder.append("</xs:complexType>");
-            builder.append("</xs:element>");
-        }
-
-        builder.append("</xs:schema>");
-        builder.append("</wsdl:types>");
-
-        builder.append("<wsdl:message name=\"invokeRequest\">");
-        if (isInputParametersPresent) {
-            builder.append("<wsdl:part name=\"parameters\" element=\"ns:invoke\"/>");
-        }
-        builder.append("</wsdl:message>");
-        if (isOutputParametersPresent) {
-            builder.append("<wsdl:message name=\"invokeResponse\">");
-            builder.append("<wsdl:part name=\"parameters\" element=\"ns:invokeResponse\"/>");
-            builder.append("</wsdl:message>");
-        }
-
-        builder.append("<wsdl:portType name=\"");
-        builder.append(service.getType().getName());
-        builder.append("\">");
-        builder.append("<wsdl:operation name=\"invoke\">");
-        builder.append("<wsdl:input message=\"ns:invokeRequest\" wsaw:Action=\"urn:invoke\"/>");
-        if (isOutputParametersPresent) {
-            builder.append("<wsdl:output message=\"ns:invokeResponse\" wsaw:Action=\"urn:invokeResponse\"/>");
-        }
-        builder.append("</wsdl:operation>");
-        builder.append("</wsdl:portType>");
-
-        builder.append("</wsdl:definitions>");
-
-        return builder.toString();
-    }
-
-    private static void generateElementFromInputType(InputParameterType parameter, StringBuilder builder) {
-
-        String type = parameter.getParameterType().getName();
-        if (type.equals("String")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" nillable=\"true\" type=\"xs:string\"/>");
-        } else if (type.equals("Integer")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" type=\"xs:int\"/>");
-        } else if (type.equals("Boolean")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" type=\"xs:boolean\"/>");
-        } else if (type.equals("Double")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" type=\"xs:double\"/>");
-        } else if (type.equals("Float")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" type=\"xs:float\"/>");
-        } else if (type.equals("File")) {
-            // TODO adding this means adding a new complex type for File type
-            // builder.append("<xs:element minOccurs=\"0\" name=\"");
-            // builder.append(parameter.getName());
-            // builder.append("\"  nillable=\"true\" type=\"ax22:File\"/>");
-        }
-
-    }
-
-        private static void generateElementFromOutputType(OutputParameterType parameter, StringBuilder builder) {
-
-        String type = parameter.getParameterType().getName();
-        if (type.equals("String")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" nillable=\"true\" type=\"xs:string\"/>");
-        } else if (type.equals("Integer")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" type=\"xs:int\"/>");
-        } else if (type.equals("Boolean")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" type=\"xs:boolean\"/>");
-        } else if (type.equals("Double")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" type=\"xs:double\"/>");
-        } else if (type.equals("Float")) {
-            builder.append("<xs:element minOccurs=\"0\" name=\"");
-            builder.append(parameter.getParameterName());
-            builder.append("\" type=\"xs:float\"/>");
-        } else if (type.equals("File")) {
-            // TODO adding this means adding a new complex type for File type
-            // builder.append("<xs:element minOccurs=\"0\" name=\"");
-            // builder.append(parameter.getName());
-            // builder.append("\"  nillable=\"true\" type=\"ax22:File\"/>");
-        }
-
-    }
-
-    public static String getWSDL(ServiceDescription service) throws Exception{
-        try {
-
-            ServiceType type = service.getType().addNewService();
-            ServiceType.ServiceName name = type.addNewServiceName();
-            name.setStringValue(service.getType().getName());
-            name.setTargetNamespace("http://airavata.apache.org/schemas/gfac/2012/12");
-            if(service.getType().getPortType() == null){
-                PortTypeType portType = service.getType().addNewPortType();
-                MethodType methodType = portType.addNewMethod();
-                methodType.setMethodName("invoke");
-            }else{
-                MethodType method = service.getType().getPortType().getMethod();
-                if (method == null) {
-                    MethodType methodType = service.getType().getPortType().addNewMethod();
-                    methodType.setMethodName("invoke");
-                } else {
-                    service.getType().getPortType().getMethod().setMethodName("invoke");
-                }
-            }
-            WSDLGenerator generator = new WSDLGenerator();
-            Hashtable table = generator.generateWSDL(null, null, null, service.getType(), true);
-            return (String) table.get(WSDLConstants.AWSDL);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJob.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJob.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJob.java
deleted file mode 100644
index 3fc3089..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJob.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.Date;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ApplicationJob {
-	/**
-	 * Represents the status of the application job execution life cycle.<br /> 
-	 * <em><strong>Note</strong> : The applicable <code>ApplicationJobStatus</code> values and the 
-	 * particular actions that define or lead to those <code>ApplicationJobStatus</code> values is 
-	 * based on type of application (eg: GRAM, EC2) being executed</em>.   
-	 */
-	public static enum ApplicationJobStatus{
-
-        /**
-         * Job not yet submitted to Gram
-         */
-        UN_SUBMITTED,
-		/**
-		 * Validating the application job input data and configurations
-		 */
-		VALIDATE_INPUT,
-		/**
-		 * Input data/files is being staged for the application job.
-		 */
-		STAGING,
-		/**
-		 * Authenticating
-		 */
-		AUTHENTICATE,
-		/**
-		 * Application job is being initialized.
-		 */
-		INITIALIZE, 
-		/**
-		 * Application job is submitted, possibly waiting to start executing.
-		 */
-		SUBMITTED,
-		/**
-		 * Application job is waiting to start/continue its executing.
-		 */
-		PENDING,
-		/**
-		 * Application job is being executed.
-		 */
-		EXECUTING,
-        /**
-         * Application job is being active.
-         */
-        ACTIVE,
-        /**
-		 * Application job is paused/suspended
-		 */
-		SUSPENDED,
-		/**
-		 * Application job is waiting for data or a trigger to continue its execution.
-		 */
-		WAIT_FOR_DATA,
-		/**
-		 * Finalizing the execution of the application job.
-		 */
-		FINALIZE,
-		/**
-		 * Results of the application job execution are being generated.
-		 */
-		RESULTS_GEN,
-		/**
-		 * Generated results from the application job execution is being retrieved.
-		 */
-		RESULTS_RETRIEVE,
-		/**
-		 * Validating the application job execution results
-		 */
-		VALIDATE_OUTPUT,
-		/**
-		 * Application job completed successfully.
-		 */
-		FINISHED,
-		/**
-		 * Error occurred during the application job execution and the job was terminated.
-		 */
-		FAILED, 
-		/**
-		 * Execution of the application job was cancelled.
-		 */
-		CANCELLED,
-        /**
-         * Execution of the application job was cancelled.
-         */
-        CANCELED,
-		/**
-		 * Unable to determine the current status of the application job. <br />
-		 * <em><strong>Note: </strong>More information may be available on the application job 
-		 * </em><code>metadata</code>.
-		 */
-		UNKNOWN 
-	}
-	
-	private String experimentId;
-	private String workflowExecutionId;
-	private String nodeId;
-	
-	private String serviceDescriptionId;
-	private String hostDescriptionId;
-	private String applicationDescriptionId;
-	
-	private String jobId;
-	private String jobData;
-	
-	private Date submittedTime;
-	private Date statusUpdateTime;
-	private ApplicationJobStatus status;
-	
-	private String metadata;
-
-	/**
-	 * The id of the experiment which this application job corresponds to
-	 * @return
-	 */
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-	/**
-	 * The id of the workflow instance execution which this application job corresponds to
-	 */
-	public String getWorkflowExecutionId() {
-		return workflowExecutionId;
-	}
-
-	public void setWorkflowExecutionId(String workflowExecutionId) {
-		this.workflowExecutionId = workflowExecutionId;
-	}
-
-	/**
-	 * The id of the node which this application job corresponds to
-	 */
-	public String getNodeId() {
-		return nodeId;
-	}
-
-	public void setNodeId(String nodeId) {
-		this.nodeId = nodeId;
-	}
-
-	/**
-	 * The id of the service description which this application job corresponds to
-	 */
-	public String getServiceDescriptionId() {
-		return serviceDescriptionId;
-	}
-
-	public void setServiceDescriptionId(String serviceDescriptionId) {
-		this.serviceDescriptionId = serviceDescriptionId;
-	}
-	
-	/**
-	 * The id of the host description which this application job corresponds to <br />
-	 * <em><strong>Note: </strong>For data saved using the deprecated API function 
-	 * {@code updateWorkflowNodeGramData(...)} this will be the address of the host</em>
-	 */
-	public String getHostDescriptionId() {
-		return hostDescriptionId;
-	}
-
-	public void setHostDescriptionId(String hostDescriptionId) {
-		this.hostDescriptionId = hostDescriptionId;
-	}
-
-	/**
-	 * The id of the application description which this application job corresponds to 
-	 */
-	public String getApplicationDescriptionId() {
-		return applicationDescriptionId;
-	}
-
-	public void setApplicationDescriptionId(String applicationDescriptionId) {
-		this.applicationDescriptionId = applicationDescriptionId;
-	}
-
-	/**
-	 * id representing the application job uniquely identified in the Airavata system <br />
-	 * <em><strong>Note: </strong>This id may or may not correspond to an id that can identify a 
-	 * resource execution in the computational middleware</em>
-	 */
-	public String getJobId() {
-		return jobId;
-	}
-
-	/**
-	 * Set a unique id which represents this job in the Airavata system. 
-	 */
-	public void setJobId(String jobId) {
-		this.jobId = jobId;
-	}
-
-	/**
-	 * Configuration, execution and input data relating to the execution of the application job. <br /> 
-	 * <em><strong>Note: </strong>The structure of the data is determined by the type of application 
-	 * <code>(eg: GRAM, EC2) being executed.</code></em> 
-	 */
-	public String getJobData() {
-		return jobData;
-	}
-
-	/**
-	 * Set the configuration, execution and input data relating to the execution of the application. 
-	 * job. <br /> 
-	 * <em><strong>Note: </strong>The structure of the data is up to the Provider implementation 
-	 * <code>(eg: GRAMProvider, EC2Provider)</code>. It is strongly encouraged to include in this 
-	 * field all the information (excluding descriptor data & any sensitive data such as password 
-	 * credentials) necessary for a 3rd party to repeat the execution of application job if 
-	 * necessary.</em> 
-	 */
-	public void setJobData(String jobData) {
-		this.jobData = jobData;
-	}
-
-	/**
-	 * When was this application job was submitted.
-	 */
-	public Date getSubmittedTime() {
-		return submittedTime;
-	}
-
-	public void setSubmittedTime(Date submittedTime) {
-		this.submittedTime = submittedTime;
-	}
-
-	/**
-	 * When was the status of this application job was last updated.
-	 * @return
-	 */
-	public Date getStatusUpdateTime() {
-		return statusUpdateTime;
-	}
-
-	public void setStatusUpdateTime(Date statusUpdateTime) {
-		this.statusUpdateTime = statusUpdateTime;
-	}
-
-	/**
-	 * Get the currently recorded status of the application job. 
-	 * @return
-	 */
-	public ApplicationJobStatus getStatus() {
-		return status;
-	}
-
-	public void setStatus(ApplicationJobStatus status) {
-		this.status = status;
-	}
-
-	/**
-	 * Custom metadata maintained for the application job containing that may contain any additional 
-	 * information relating to the execution.
-	 * @return
-	 */
-	public String getMetadata() {
-		return metadata;
-	}
-
-	public void setMetadata(String metadata) {
-		this.metadata = metadata;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJobExecutionError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJobExecutionError.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJobExecutionError.java
deleted file mode 100644
index d4f9b06..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJobExecutionError.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ApplicationJobExecutionError extends ExecutionError {
-	private String experimentId;
-	private String workflowInstanceId;
-	private String nodeId;
-	private String jobId;
-
-	public String getExperimentId() {
-		return experimentId;
-	}
-
-	public void setExperimentId(String experimentId) {
-		this.experimentId = experimentId;
-	}
-
-	public String getWorkflowInstanceId() {
-		return workflowInstanceId;
-	}
-
-	public void setWorkflowInstanceId(String workflowInstanceId) {
-		this.workflowInstanceId = workflowInstanceId;
-	}
-
-	public String getNodeId() {
-		return nodeId;
-	}
-
-	public void setNodeId(String nodeId) {
-		this.nodeId = nodeId;
-	}
-
-	public String getJobId() {
-		return jobId;
-	}
-
-	public void setJobId(String jobId) {
-		this.jobId = jobId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJobStatusData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJobStatusData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJobStatusData.java
deleted file mode 100644
index b4d6657..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ApplicationJobStatusData.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import java.util.Date;
-
-import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ApplicationJobStatusData {
-	private String jobId;
-	private ApplicationJobStatus status;
-	private Date time;
-	
-	public ApplicationJobStatusData(String jobId, ApplicationJobStatus status, Date time) {
-		setJobId(jobId);
-		setStatus(status);
-		setTime(time);
-	}
-	
-	public String getJobId() {
-		return jobId;
-	}
-	private void setJobId(String jobId) {
-		this.jobId = jobId;
-	}
-	public ApplicationJobStatus getStatus() {
-		return status;
-	}
-	private void setStatus(ApplicationJobStatus status) {
-		this.status = status;
-	}
-	public Date getTime() {
-		return time;
-	}
-	private void setTime(Date time) {
-		this.time = time;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java
deleted file mode 100644
index b01b6ea..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExecutionError.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import java.util.Date;
-
-import org.apache.airavata.registry.api.ExecutionErrors;
-import org.codehaus.jackson.annotate.JsonTypeInfo;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class")
-public abstract class ExecutionError {
-	public ExecutionErrors.Source source;
-	public Date errorTime;
-	public String errorCode;
-	public String errorMessage;
-	public String errorDescription;
-	public String errorLocation;
-	public String actionTaken;
-	private String errorReported;
-	private int errorReference;
-	
-	public ExecutionErrors.Source getSource() {
-		return source;
-	}
-	public void setSource(ExecutionErrors.Source source) {
-		this.source = source;
-	}
-	public Date getErrorTime() {
-		return errorTime;
-	}
-	public void setErrorTime(Date errorTime) {
-		this.errorTime = errorTime;
-	}
-	public String getErrorCode() {
-		return errorCode;
-	}
-	public void setErrorCode(String errorCode) {
-		this.errorCode = errorCode;
-	}
-	public String getErrorMessage() {
-		return errorMessage;
-	}
-	public void setErrorMessage(String errorMessage) {
-		this.errorMessage = errorMessage;
-	}
-	public String getErrorDescription() {
-		return errorDescription;
-	}
-	public void setErrorDescription(String errorDescription) {
-		this.errorDescription = errorDescription;
-	}
-	public String getErrorLocation() {
-		return errorLocation;
-	}
-	public void setErrorLocation(String errorLocation) {
-		this.errorLocation = errorLocation;
-	}
-	public String getActionTaken() {
-		return actionTaken;
-	}
-	public void setActionTaken(String actionTaken) {
-		this.actionTaken = actionTaken;
-	}
-	public String getErrorReported() {
-		return errorReported;
-	}
-	public void setErrorReported(String errorReported) {
-		this.errorReported = errorReported;
-	}
-	public int getErrorReference() {
-		return errorReference;
-	}
-	public void setErrorReference(int errorReference) {
-		this.errorReference = errorReference;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java b/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
deleted file mode 100644
index b2594f6..0000000
--- a/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/ExperimentData.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *
- * 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.registry.api.workflow;
-
-import java.util.List;
-
-import org.apache.airavata.registry.api.exception.worker.ExperimentLazyLoadedException;
-import org.apache.airavata.registry.api.impl.ExperimentDataImpl;
-import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
-
-import javax.jws.WebService;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-
-//@XmlRootElement
-//@XmlAccessorType(XmlAccessType.FIELD)
-@WebService
-@XmlSeeAlso(ExperimentDataImpl.class)
-public interface ExperimentData extends WorkflowExecutionData {
-    //Current Id and Topic values are similar
-
-    /**
-     * Returns the ExperimentID of the workflow Run
-     * @return
-     */
-    public String getId();
-
-    /**
-     * Returns the Experiment Topic... Currently the ID and the Topic are identical
-     * @return
-     */
-	public String getTopic();
-
-    /**
-     * Returns the user of the workflow run
-     * @return
-     */
-	public String getUser();
-
-    /**
-     * Returns metadata related to the workflow run
-     * @return
-     */
-	public String getMetadata();
-
-    /**
-     * Returns the Experiment Name of the workflow run, This is given in the XBaya-GUI when you user run a workflow
-     * @return
-     */
-	public String getExperimentName();
-
-    /**
-     * get data related to a particular experiment, this returns all the workflow runs for the given Experiment
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-	public List<WorkflowExecutionDataImpl> getWorkflowExecutionDataList() throws ExperimentLazyLoadedException;
-
-    /**
-     * Reut
-     * @param workflowExecutionID
-     * @return
-     * @throws ExperimentLazyLoadedException
-     */
-    public WorkflowExecutionData getWorkflowExecutionData(String workflowExecutionID) throws ExperimentLazyLoadedException;
-
-    /**
-     *
-     * @param experimentId
-     */
-    public void setExperimentId(String experimentId);
-
-    /**
-     *
-     * @param topic
-     */
-	public void setTopic(String topic);
-
-    /**
-     *
-     * @param user
-     */
-	public void setUser(String user);
-
-    /**
-     *
-     * @param metadata
-     */
-	public void setMetadata(String metadata);
-
-    /**
-     *
-     * @param experimentName
-     */
-	public void setExperimentName(String experimentName);
-
-    /**
-     *
-     * @return
-     */
-	public String getExperimentId();
-}


[7/9] retiring previous registry API - AIRAVATA-1234

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index 9043d06..6c364df 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -20,22 +20,18 @@
  */
 package org.apache.airavata.gfac.core.utils;
 
-import java.io.*;
-import java.net.InetAddress;
-import java.net.URISyntaxException;
-import java.net.UnknownHostException;
-import java.util.*;
-
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.*;
+import org.apache.airavata.common.utils.AiravataZKUtils;
+import org.apache.airavata.common.utils.DBUtil;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.credential.store.store.CredentialReader;
 import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
-import org.apache.airavata.gfac.*;
 import org.apache.airavata.gfac.Constants;
 import org.apache.airavata.gfac.ExecutionMode;
+import org.apache.airavata.gfac.GFacConfiguration;
+import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
@@ -43,19 +39,22 @@ import org.apache.airavata.gfac.core.states.GfacPluginState;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.model.workspace.experiment.DataType;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.api.workflow.ApplicationJob;
-import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
 import org.apache.airavata.registry.cpi.ChildDataType;
 import org.apache.airavata.registry.cpi.CompositeIdentifier;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.schemas.gfac.*;
-import org.apache.airavata.schemas.gfac.DataType.Enum;
 import org.apache.axiom.om.OMElement;
 import org.apache.zookeeper.*;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.*;
+import java.net.InetAddress;
+import java.net.URISyntaxException;
+import java.net.UnknownHostException;
+import java.util.*;
+
 public class GFacUtils {
 	private final static Logger log = LoggerFactory.getLogger(GFacUtils.class);
 
@@ -565,133 +564,133 @@ public class GFacUtils {
 		return actualParameter;
 	}
 
-	public static ApplicationJob createApplicationJob(
-			JobExecutionContext jobExecutionContext) {
-		ApplicationJob appJob = new ApplicationJob();
-		appJob.setExperimentId((String) jobExecutionContext
-				.getProperty(Constants.PROP_TOPIC));
-		appJob.setWorkflowExecutionId(appJob.getExperimentId());
-		appJob.setNodeId((String) jobExecutionContext
-				.getProperty(Constants.PROP_WORKFLOW_NODE_ID));
-		appJob.setServiceDescriptionId(jobExecutionContext
-				.getApplicationContext().getServiceDescription().getType()
-				.getName());
-		appJob.setHostDescriptionId(jobExecutionContext.getApplicationContext()
-				.getHostDescription().getType().getHostName());
-		appJob.setApplicationDescriptionId(jobExecutionContext
-				.getApplicationContext().getApplicationDeploymentDescription()
-				.getType().getApplicationName().getStringValue());
-		return appJob;
-	}
-
-	public static void updateApplicationJobStatusUpdateTime(
-			JobExecutionContext context, String jobId, Date statusUpdateTime) {
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			airavataAPI.getProvenanceManager()
-					.updateApplicationJobStatusUpdateTime(jobId,
-							statusUpdateTime);
-		} catch (AiravataAPIInvocationException e) {
-			log.error("Error in updating application job status time "
-					+ statusUpdateTime.toString() + " for job Id " + jobId
-					+ "!!!", e);
-		}
-	}
-
-	public static void updateApplicationJobStatus(JobExecutionContext context,
-			String jobId, ApplicationJobStatus status, Date statusUpdateTime) {
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			airavataAPI.getProvenanceManager().updateApplicationJobStatus(
-					jobId, status, statusUpdateTime);
-		} catch (AiravataAPIInvocationException e) {
-			log.error(
-					"Error in updating application job status "
-							+ status.toString() + " for job Id " + jobId
-							+ "!!!", e);
-		}
-	}
-
-	/**
-	 * Gets the job ids given experiment id.
-	 * 
-	 * @param context
-	 *            The job execution context.
-	 * @param experimentId
-	 *            The experiment id.
-	 * @return List of job ids relevant to given experiment id.
-	 */
-	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
-			String experimentId) {
-
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			return airavataAPI.getProvenanceManager().getApplicationJobs(
-					experimentId, null, null);
-		} catch (AiravataAPIInvocationException e) {
-			log.error("Error retrieving application jobs for experiment id "
-					+ experimentId, e);
-		}
-
-		return new ArrayList<ApplicationJob>(0);
-	}
-
-	/**
-	 * Gets the job ids given experiment id and workflow id.
-	 * 
-	 * @param context
-	 *            The job execution context.
-	 * @param experimentId
-	 *            The experiment id.
-	 * @param workflowId
-	 *            The workflow id
-	 * @return List of job ids relevant to given experiment id and workflow id.
-	 */
-	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
-			String experimentId, String workflowId) {
-
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			return airavataAPI.getProvenanceManager().getApplicationJobs(
-					experimentId, workflowId, null);
-		} catch (AiravataAPIInvocationException e) {
-			log.error("Error retrieving application jobs for experiment id "
-					+ experimentId, " workflow id " + workflowId, e);
-		}
-
-		return new ArrayList<ApplicationJob>(0);
-	}
-
-	/**
-	 * Gets the job ids given experiment id and workflow id.
-	 * 
-	 * @param context
-	 *            The job execution context.
-	 * @param experimentId
-	 *            The experiment id.
-	 * @param workflowId
-	 *            The workflow id
-	 * @return List of job ids relevant to given experiment id and workflow id.
-	 */
-	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
-			String experimentId, String workflowId, String nodeId) {
-
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			return airavataAPI.getProvenanceManager().getApplicationJobs(
-					experimentId, workflowId, nodeId);
-		} catch (AiravataAPIInvocationException e) {
-			log.error("Error retrieving application jobs for experiment id "
-					+ experimentId, " workflow id " + workflowId, e);
-		}
-
-		return new ArrayList<ApplicationJob>(0);
-	}
+//	public static ApplicationJob createApplicationJob(
+//			JobExecutionContext jobExecutionContext) {
+//		ApplicationJob appJob = new ApplicationJob();
+//		appJob.setExperimentId((String) jobExecutionContext
+//				.getProperty(Constants.PROP_TOPIC));
+//		appJob.setWorkflowExecutionId(appJob.getExperimentId());
+//		appJob.setNodeId((String) jobExecutionContext
+//				.getProperty(Constants.PROP_WORKFLOW_NODE_ID));
+//		appJob.setServiceDescriptionId(jobExecutionContext
+//				.getApplicationContext().getServiceDescription().getType()
+//				.getName());
+//		appJob.setHostDescriptionId(jobExecutionContext.getApplicationContext()
+//				.getHostDescription().getType().getHostName());
+//		appJob.setApplicationDescriptionId(jobExecutionContext
+//				.getApplicationContext().getApplicationDeploymentDescription()
+//				.getType().getApplicationName().getStringValue());
+//		return appJob;
+//	}
+
+//	public static void updateApplicationJobStatusUpdateTime(
+//			JobExecutionContext context, String jobId, Date statusUpdateTime) {
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			airavataAPI.getProvenanceManager()
+//					.updateApplicationJobStatusUpdateTime(jobId,
+//							statusUpdateTime);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error("Error in updating application job status time "
+//					+ statusUpdateTime.toString() + " for job Id " + jobId
+//					+ "!!!", e);
+//		}
+//	}
+//
+//	public static void updateApplicationJobStatus(JobExecutionContext context,
+//			String jobId, ApplicationJobStatus status, Date statusUpdateTime) {
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			airavataAPI.getProvenanceManager().updateApplicationJobStatus(
+//					jobId, status, statusUpdateTime);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error(
+//					"Error in updating application job status "
+//							+ status.toString() + " for job Id " + jobId
+//							+ "!!!", e);
+//		}
+//	}
+
+//	/**
+//	 * Gets the job ids given experiment id.
+//	 *
+//	 * @param context
+//	 *            The job execution context.
+//	 * @param experimentId
+//	 *            The experiment id.
+//	 * @return List of job ids relevant to given experiment id.
+//	 */
+//	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
+//			String experimentId) {
+//
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			return airavataAPI.getProvenanceManager().getApplicationJobs(
+//					experimentId, null, null);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error("Error retrieving application jobs for experiment id "
+//					+ experimentId, e);
+//		}
+//
+//		return new ArrayList<ApplicationJob>(0);
+//	}
+
+//	/**
+//	 * Gets the job ids given experiment id and workflow id.
+//	 *
+//	 * @param context
+//	 *            The job execution context.
+//	 * @param experimentId
+//	 *            The experiment id.
+//	 * @param workflowId
+//	 *            The workflow id
+//	 * @return List of job ids relevant to given experiment id and workflow id.
+//	 */
+//	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
+//			String experimentId, String workflowId) {
+//
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			return airavataAPI.getProvenanceManager().getApplicationJobs(
+//					experimentId, workflowId, null);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error("Error retrieving application jobs for experiment id "
+//					+ experimentId, " workflow id " + workflowId, e);
+//		}
+//
+//		return new ArrayList<ApplicationJob>(0);
+//	}
+
+//	/**
+//	 * Gets the job ids given experiment id and workflow id.
+//	 *
+//	 * @param context
+//	 *            The job execution context.
+//	 * @param experimentId
+//	 *            The experiment id.
+//	 * @param workflowId
+//	 *            The workflow id
+//	 * @return List of job ids relevant to given experiment id and workflow id.
+//	 */
+//	public static List<ApplicationJob> getJobIds(JobExecutionContext context,
+//			String experimentId, String workflowId, String nodeId) {
+//
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			return airavataAPI.getProvenanceManager().getApplicationJobs(
+//					experimentId, workflowId, nodeId);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error("Error retrieving application jobs for experiment id "
+//					+ experimentId, " workflow id " + workflowId, e);
+//		}
+//
+//		return new ArrayList<ApplicationJob>(0);
+//	}
 
 	/*
 	 * public static RequestData getRequestData(Properties
@@ -717,18 +716,18 @@ public class GFacUtils {
 	 * }
 	 */
 
-	public static void recordApplicationJob(JobExecutionContext context,
-			ApplicationJob job) {
-		AiravataAPI airavataAPI = context.getGFacConfiguration()
-				.getAiravataAPI();
-		try {
-			airavataAPI.getProvenanceManager().addApplicationJob(job);
-		} catch (AiravataAPIInvocationException e) {
-			log.error(
-					"Error in persisting application job data for application job "
-							+ job.getJobId() + "!!!", e);
-		}
-	}
+//	public static void recordApplicationJob(JobExecutionContext context,
+//			ApplicationJob job) {
+//		AiravataAPI airavataAPI = context.getGFacConfiguration()
+//				.getAiravataAPI();
+//		try {
+//			airavataAPI.getProvenanceManager().addApplicationJob(job);
+//		} catch (AiravataAPIInvocationException e) {
+//			log.error(
+//					"Error in persisting application job data for application job "
+//							+ job.getJobId() + "!!!", e);
+//		}
+//	}
 
 	public static void saveJobStatus(JobExecutionContext jobExecutionContext,
 			JobDetails details, JobState state) throws GFacException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
index 08db750..e32bd9b 100644
--- a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
+++ b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/job/GFacConfigXmlTest.java
@@ -28,7 +28,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.Scheduler;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.schemas.gfac.GsisshHostType;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -40,10 +40,10 @@ import java.io.IOException;
 
 public class GFacConfigXmlTest {
 
-    private GFacImpl gfac;
+    private BetterGfacImpl gfac;
     @BeforeClass
     public void setUp() throws Exception {
-        gfac = new GFacImpl();
+        gfac = new BetterGfacImpl();
     }
 
     @Test
@@ -51,7 +51,7 @@ public class GFacConfigXmlTest {
         Assert.assertNotNull(gfac.getGfacConfigFile());
         Assert.assertEquals(1,gfac.getDaemonHandlers().size());
         try {
-            JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null, null), "testService");
+            JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null), "testService");
             ApplicationContext applicationContext = new ApplicationContext();
             HostDescription host = new HostDescription(GsisshHostType.type);
             host.getType().setHostAddress("trestles.sdsc.edu");
@@ -80,7 +80,7 @@ public class GFacConfigXmlTest {
             Assert.assertNotNull(gfac.getGfacConfigFile());
             Assert.assertEquals(1,gfac.getDaemonHandlers().size());
             try {
-                JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null, null), "UltraScan");
+                JobExecutionContext jec = new JobExecutionContext(GFacConfiguration.create(gfac.getGfacConfigFile(), null), "UltraScan");
                 ApplicationContext applicationContext = new ApplicationContext();
                 HostDescription host = new HostDescription(GsisshHostType.type);
                 host.getType().setHostAddress("trestles.sdsc.edu");

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ec2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/pom.xml b/modules/gfac/gfac-ec2/pom.xml
index 26c3b75..f083e0a 100644
--- a/modules/gfac/gfac-ec2/pom.xml
+++ b/modules/gfac/gfac-ec2/pom.xml
@@ -44,11 +44,6 @@
         <!-- GFAC schemas -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-workflow-execution-context</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java b/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
index a8a9eb1..940fff3 100644
--- a/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
+++ b/modules/gfac/gfac-ec2/src/main/java/org/apache/airavata/gfac/ec2/EC2Provider.java
@@ -28,8 +28,6 @@ import java.util.Calendar;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.gfac.GFacException;
@@ -140,14 +138,14 @@ public class EC2Provider extends AbstractProvider {
     public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException {
     
         String shellCmd = createShellCmd(jobExecutionContext);
-        AiravataAPI airavataAPI = jobExecutionContext.getGFacConfiguration().getAiravataAPI();
-        if (airavataAPI!=null){
-        	try {
-				airavataAPI.getProvenanceManager().updateApplicationJobData(jobId, shellCmd);
-			} catch (AiravataAPIInvocationException e) {
-				log.error("Error in saving EC2 shell command!!!", e);
-			}
-        }
+//        AiravataAPI airavataAPI = jobExecutionContext.getGFacConfiguration().getAiravataAPI();
+//        if (airavataAPI!=null){
+//        	try {
+//				airavataAPI.getProvenanceManager().updateApplicationJobData(jobId, shellCmd);
+//			} catch (AiravataAPIInvocationException e) {
+//				log.error("Error in saving EC2 shell command!!!", e);
+//			}
+//        }
         SshClient sshClient = new SshClient();
         sshClient.setSocketTimeout(SOCKET_TIMEOUT);
         SshConnectionProperties properties = new SshConnectionProperties();

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java b/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
index 32d7972..d558ab9 100644
--- a/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
+++ b/modules/gfac/gfac-ec2/src/test/java/org/apache/airavata/gfac/ec2/EC2ProviderTest.java
@@ -27,7 +27,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.schemas.gfac.*;
 import org.junit.Assert;
 import org.junit.Before;
@@ -83,7 +83,7 @@ public class EC2ProviderTest {
         URL resource = EC2ProviderTest.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null, null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
 
         /* EC2 Host */
         HostDescription host = new HostDescription(Ec2HostType.type);
@@ -160,7 +160,7 @@ public class EC2ProviderTest {
 
     @Test
     public void testGramProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
         Assert.assertEquals(MappingFactory.

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java
index 3ee3a1d..6d5427a 100644
--- a/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-gram/src/test/java/org/apache/airavata/core/gfac/services/impl/GramProviderTestWithMyProxyAuth.java
@@ -37,7 +37,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.gram.security.GSISecurityContext;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.GlobusHostType;
@@ -73,7 +73,7 @@ public class GramProviderTestWithMyProxyAuth extends GFacBaseTestWithMyProxyAuth
         URL resource = GramProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null,null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
 //        gFacConfiguration.setMyProxyLifeCycle(3600);
 //        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
 //        gFacConfiguration.setMyProxyUser("*****");
@@ -212,7 +212,7 @@ public class GramProviderTestWithMyProxyAuth extends GFacBaseTestWithMyProxyAuth
 
     @Test
     public void testGramProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
         Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
index 59949ac..f28307e 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -25,7 +25,6 @@ import org.apache.airavata.gfac.ExecutionMode;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
@@ -137,7 +136,7 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
     }
 
     public void delegateToMonitorHandlers(JobExecutionContext jobExecutionContext, GsisshHostType host, String jobID) throws GFacHandlerException {
-        List<ThreadedHandler> daemonHandlers = GFacImpl.getDaemonHandlers();
+        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         if (daemonHandlers == null) {
             daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         }
@@ -173,7 +172,7 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
     }
 
     public void removeFromMonitorHandlers(JobExecutionContext jobExecutionContext, GsisshHostType host, String jobID) throws GFacHandlerException {
-        List<ThreadedHandler> daemonHandlers = GFacImpl.getDaemonHandlers();
+        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         if (daemonHandlers == null) {
             daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
index 019a772..0774022 100644
--- a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
@@ -37,7 +37,7 @@ import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.gsissh.security.GSISecurityContext;
 import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
@@ -91,7 +91,7 @@ public class GSISSHProviderTestWithMyProxyAuth {
         URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null, null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
 
 //        gFacConfiguration.setMyProxyLifeCycle(3600);
 //        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
@@ -227,7 +227,7 @@ public class GSISSHProviderTestWithMyProxyAuth {
     }
     @Test
     public void testGSISSHProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
         System.out.println(jobExecutionContext.getJobDetails().getJobID());

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
index 9ba7e5d..343b4bf 100644
--- a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
+++ b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
@@ -60,7 +60,7 @@ public class LocalProviderTest {
 
         URL resource = this.getClass().getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         File configFile = new File(resource.getPath());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null, null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(configFile, null);
         //have to set InFlwo Handlers and outFlowHandlers
         ApplicationContext applicationContext = new ApplicationContext();
         HostDescription host = new HostDescription();

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/pom.xml b/modules/gfac/gfac-monitor/pom.xml
index e4601ea..8893342 100644
--- a/modules/gfac/gfac-monitor/pom.xml
+++ b/modules/gfac/gfac-monitor/pom.xml
@@ -32,11 +32,6 @@
         <!-- GFAC schemas -->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -57,11 +52,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-registry-cpi</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
index fea2d20..9ca5235 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
@@ -24,7 +24,6 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
@@ -68,8 +67,8 @@ public class GridPullMonitorHandler extends ThreadedHandler implements Watcher{
             String myProxyServer = ServerSettings.getSetting("myproxy.server");
             setAuthenticationInfo(new MyProxyAuthenticationInfo(myProxyUser, myProxyPass, myProxyServer,
                     7512, 17280000, certPath));
-            if(GFacImpl.getMonitorPublisher() != null){
-                hpcPullMonitor = new HPCPullMonitor(GFacImpl.getMonitorPublisher(),getAuthenticationInfo());    // we use our own credentials for monitoring, not from the store
+            if(BetterGfacImpl.getMonitorPublisher() != null){
+                hpcPullMonitor = new HPCPullMonitor(BetterGfacImpl.getMonitorPublisher(),getAuthenticationInfo());    // we use our own credentials for monitoring, not from the store
             }else {
                 hpcPullMonitor = new HPCPullMonitor(BetterGfacImpl.getMonitorPublisher(),getAuthenticationInfo());  // we use our own credentials for monitoring, not from the store
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
index c69b516..1155965 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPushMonitorHandler.java
@@ -28,7 +28,7 @@ import java.util.concurrent.LinkedBlockingQueue;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
@@ -67,7 +67,7 @@ public class GridPushMonitorHandler extends ThreadedHandler {
             LinkedBlockingQueue<MonitorID> pushQueue = new LinkedBlockingQueue<MonitorID>();
             LinkedBlockingQueue<MonitorID> finishQueue = new LinkedBlockingQueue<MonitorID>();
             List<String> hosts= Arrays.asList(hostList.split(","));
-            amqpMonitor=new AMQPMonitor(GFacImpl.getMonitorPublisher(),pushQueue,finishQueue,proxyFilePath,connectionName,hosts);
+            amqpMonitor=new AMQPMonitor(BetterGfacImpl.getMonitorPublisher(),pushQueue,finishQueue,proxyFilePath,connectionName,hosts);
         }catch (ApplicationSettingsException e){
             e.printStackTrace();
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index 0e5f69e..c059676 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -37,7 +37,6 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
@@ -253,7 +252,7 @@ public class SSHProvider extends AbstractProvider {
     }
 
     public void removeFromMonitorHandlers(JobExecutionContext jobExecutionContext, GsisshHostType host, String jobID) throws GFacHandlerException {
-        List<ThreadedHandler> daemonHandlers = GFacImpl.getDaemonHandlers();
+        List<ThreadedHandler> daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         if (daemonHandlers == null) {
             daemonHandlers = BetterGfacImpl.getDaemonHandlers();
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
index 69716d3..e84848c 100644
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
+++ b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
@@ -30,7 +30,7 @@ import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.gsi.ssh.api.Cluster;
 import org.apache.airavata.gsi.ssh.api.SSHApiException;
@@ -94,7 +94,7 @@ public class BigRed2TestWithSSHAuth {
         URL resource = BigRed2TestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null, null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), null);
 
 //        gFacConfiguration.setMyProxyLifeCycle(3600);
 //        gFacConfiguration.setMyProxyServer("myproxy.teragrid.org");
@@ -243,7 +243,7 @@ public class BigRed2TestWithSSHAuth {
 
     @Test
     public void testSSHProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobDescription());
         org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobID());

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
index 9bec659..5cb1200 100644
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
+++ b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
@@ -37,7 +37,7 @@ import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.cpi.GFacImpl;
+import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.ssh.security.SSHSecurityContext;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.InputParameterType;
@@ -55,7 +55,7 @@ public class SSHProviderTestWithSSHAuth {
     public void setUp() throws Exception {
 
     	URL resource = SSHProviderTestWithSSHAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
-        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null,null);
+        GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()),null);
 //        gFacConfiguration.s
         //have to set InFlwo Handlers and outFlowHandlers
         ApplicationContext applicationContext = new ApplicationContext();
@@ -164,7 +164,7 @@ public class SSHProviderTestWithSSHAuth {
 
     @Test
     public void testLocalProvider() throws GFacException {
-        GFacImpl gFacAPI = new GFacImpl();
+        BetterGfacImpl gFacAPI = new BetterGfacImpl();
         gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
         MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
         Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java
index 51bd31c..7a90789 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/AbstractIntegrationTest.java
@@ -25,8 +25,6 @@ import java.io.IOException;
 
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.utils.ClientSettings;
 import org.slf4j.Logger;
@@ -36,7 +34,6 @@ public class AbstractIntegrationTest {
 
 	private static String THRIFT_SERVER_HOST;
 	private static int THRIFT_SERVER_PORT;
-	protected AiravataAPI airavataAPI;
 	protected Airavata.Client client;
 	private final int TRIES = 20;
 	private final int TIME_OUT = 10000;
@@ -56,7 +53,6 @@ public class AbstractIntegrationTest {
 	        initClient();
 	
 	        //getting the Airavata API ( to add the descriptors
-	        this.airavataAPI = getAiravataAPI();
 	    } catch (IOException e) {
 	        log.error("Error loading client-properties ..." + e.getMessage());
 	    } catch (AiravataAPIInvocationException e) {
@@ -66,13 +62,6 @@ public class AbstractIntegrationTest {
 	    }
 	}
 
-	protected AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException {
-	    if (airavataAPI == null) {
-	        airavataAPI = AiravataAPIFactory.getAPI("default", "admin");
-	    }
-	    return airavataAPI;
-	}
-
 	protected void initClient() throws Exception {
 	    int tries = 0;
 	    while (client==null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
index d5436d2..2d651c6 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
@@ -29,7 +29,7 @@ import java.util.Set;
 import junit.framework.Assert;
 
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.DocumentCreator;
+import org.apache.airavata.client.tools.DocumentCreatorNew;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;
@@ -40,7 +40,6 @@ import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.model.workspace.experiment.JobStatus;
 import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
-import org.apache.airavata.registry.api.workflow.ApplicationJob;
 import org.apache.airavata.workflow.model.wf.Workflow;
 import org.apache.airavata.ws.monitor.EventData;
 import org.apache.airavata.ws.monitor.EventDataListenerAdapter;
@@ -62,7 +61,6 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
 
     @BeforeTest
     public void setUp() throws Exception {
-        this.airavataAPI = getAiravataAPI();
         this.client = getClient();
     }
 
@@ -86,8 +84,8 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
     @Test(groups = {"echoGroup"}, dependsOnGroups = {"setupTests"})
     public void testEchoService() throws Exception {
         log.info("Running job in trestles...");
-        DocumentCreator documentCreator = new DocumentCreator(airavataAPI);
-        documentCreator.createPBSDocsForOGCE();
+        DocumentCreatorNew documentCreator = new DocumentCreatorNew(client);
+        documentCreator.createPBSDocsForOGCE_Echo();
         List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
         DataObjectType input = new DataObjectType();
         input.setKey("echo_input");
@@ -160,7 +158,7 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
     @Test(groups = {"echoGroup"}, dependsOnGroups = {"setupTests"})
     public void testEchoServiceStampede() throws Exception {
         log.info("Running job in Stampede...");
-        DocumentCreator documentCreator = new DocumentCreator(airavataAPI);
+        DocumentCreatorNew documentCreator = new DocumentCreatorNew(client);
         documentCreator.createSlurmDocs();
         List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
         DataObjectType input = new DataObjectType();
@@ -231,10 +229,10 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
 
     }
 
-    @Test(groups = {"performanceTesting"})
-    public void testExistsHostDescriptor() throws AiravataAPIInvocationException {
-        airavataAPI.getApplicationManager().isHostDescriptorExists("trestles.sdsc.edu");
-    }
+//    @Test(groups = {"performanceTesting"})
+//    public void testExistsHostDescriptor() throws AiravataAPIInvocationException {
+//        airavataAPI.getApplicationManager().isHostDescriptorExists("trestles.sdsc.edu");
+//    }
 
 //    @Test(groups = {"echoGroup"}/* , dependsOnMethods = { "testEchoService" } */)
 //    public void testUpdateEchoService() throws Exception {
@@ -326,23 +324,23 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
 //        }
 //    }
 
-    protected void runWorkFlow(Workflow workflow, List<String> inputValues) throws Exception {
-
-        String experimentId = executeWorkflow(workflow, inputValues);
-        monitor(experimentId);
-    }
-
-    protected void runWorkFlowWithoutMonitor(Workflow workflow, List<String> inputValues) throws Exception {
-
-        String experimentId = executeWorkflow(workflow, inputValues);
-
-        verifyOutput(experimentId, "echo_output=Airavata_Test");
-
-        log.info("Verifying application jobs ....");
+//    protected void runWorkFlow(Workflow workflow, List<String> inputValues) throws Exception {
+//
+//        String experimentId = executeWorkflow(workflow, inputValues);
+//        monitor(experimentId);
+//    }
 
-        List<ApplicationJob> applicationJobs = airavataAPI.getProvenanceManager().getApplicationJobs(experimentId, null, null);
-        Assert.assertEquals(applicationJobs.size(), 1);
-    }
+//    protected void runWorkFlowWithoutMonitor(Workflow workflow, List<String> inputValues) throws Exception {
+//
+//        String experimentId = executeWorkflow(workflow, inputValues);
+//
+//        verifyOutput(experimentId, "echo_output=Airavata_Test");
+//
+//        log.info("Verifying application jobs ....");
+//
+//        List<ApplicationJob> applicationJobs = airavataAPI.getProvenanceManager().getApplicationJobs(experimentId, null, null);
+//        Assert.assertEquals(applicationJobs.size(), 1);
+//    }
 
 //    protected String getWorkflowComposeContent(String fileName) throws IOException {
 //        File f = new File(".");
@@ -364,27 +362,27 @@ public class BaseCaseIT extends WorkflowIntegrationTestBase {
 //        return buffer.toString();
 //    }
 
-    public void monitor(final String experimentId) throws Exception {
-        final Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(experimentId,
-                new EventDataListenerAdapter() {
-
-                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
-                        Assert.assertNotNull(eventDataRepo);
-                        Assert.assertNotNull(eventData);
-                        if (MonitorUtil.EventType.WORKFLOW_TERMINATED.equals(eventData.getType())) {
-                            try {
-                                BaseCaseIT.this.verifyOutput(experimentId, "echo_output=Airavata_Test");
-                            } catch (Exception e) {
-                                log.error("Error verifying output", e);
-                                Assert.fail("Error occurred while verifying output.");
-                            } finally {
-                                getMonitor().stopMonitoring();
-                            }
-                        }
-                        log.info("No of events: " + eventDataRepo.getEvents().size());
-                    }
-                });
-        experimentMonitor.startMonitoring();
-        experimentMonitor.waitForCompletion();
-    }
+//    public void monitor(final String experimentId) throws Exception {
+//        final Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(experimentId,
+//                new EventDataListenerAdapter() {
+//
+//                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
+//                        Assert.assertNotNull(eventDataRepo);
+//                        Assert.assertNotNull(eventData);
+//                        if (MonitorUtil.EventType.WORKFLOW_TERMINATED.equals(eventData.getType())) {
+//                            try {
+//                                BaseCaseIT.this.verifyOutput(experimentId, "echo_output=Airavata_Test");
+//                            } catch (Exception e) {
+//                                log.error("Error verifying output", e);
+//                                Assert.fail("Error occurred while verifying output.");
+//                            } finally {
+//                                getMonitor().stopMonitoring();
+//                            }
+//                        }
+//                        log.info("No of events: " + eventDataRepo.getEvents().size());
+//                    }
+//                });
+//        experimentMonitor.startMonitoring();
+//        experimentMonitor.waitForCompletion();
+//    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
index b66862e..777aee1 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
@@ -21,20 +21,12 @@
 
 package org.apache.airavata.integration;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
+import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.api.Airavata.Client;
-import org.apache.airavata.model.error.AiravataClientConnectException;
-import org.apache.airavata.model.error.AiravataClientException;
-import org.apache.airavata.model.error.AiravataSystemException;
-import org.apache.airavata.model.error.ExperimentNotFoundException;
-import org.apache.airavata.model.error.InvalidRequestException;
-import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.tools.DocumentCreator;
+import org.apache.airavata.client.tools.DocumentCreatorNew;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.model.error.*;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Project;
@@ -49,6 +41,10 @@ import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
 public class DataRetrievalIT extends AbstractIntegrationTest {
     private final static Logger log = LoggerFactory.getLogger(DataRetrievalIT.class);
     
@@ -154,7 +150,6 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
             public boolean matches(Object o) {
                 return theExpected.contains((String)o);
             }
-			@Override
 			public void describeTo(Description d) {
 			}
         };
@@ -219,9 +214,8 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
 		return expId;
 	}
 
-	private void addApplications() throws AiravataAPIInvocationException {
-		AiravataAPI airavataAPI = getAiravataAPI();
-		DocumentCreator documentCreator = new DocumentCreator(airavataAPI);
+	private void addApplications() throws AppCatalogException, TException {
+		DocumentCreatorNew documentCreator = new DocumentCreatorNew(client);
 		documentCreator.createLocalHostDocs();
 	}
 	

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java
index 60f94cc..f909b35 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/ForEachCaseIT.java
@@ -50,9 +50,7 @@ public class ForEachCaseIT extends WorkflowIntegrationTestBase {
 
     @BeforeTest
     public void setUp() throws Exception {
-        this.airavataAPI = getAiravataAPI();
-
-        setupDescriptors();
+//        setupDescriptors();
     }
 
 //    @Test(groups = {"forEachGroup"})
@@ -68,60 +66,60 @@ public class ForEachCaseIT extends WorkflowIntegrationTestBase {
 
     private void setupDescriptors() throws AiravataAPIInvocationException,
             DescriptorAlreadyExistsException, IOException {
-        DescriptorBuilder descriptorBuilder = airavataAPI.getDescriptorBuilder();
-        HostDescription hostDescription = descriptorBuilder.buildHostDescription(HostDescriptionType.type, "localhost2",
-                "127.0.0.1");
-
-        log("Adding host description ....");
-        addHostDescriptor(hostDescription);
-        Assert.assertTrue(airavataAPI.getApplicationManager().isHostDescriptorExists(hostDescription.getType().getHostName()));
-
-        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
-        inputParameters.add(descriptorBuilder.buildInputParameterType("data1", "data1", DataType.STRING));
-        inputParameters.add(descriptorBuilder.buildInputParameterType("data2", "data2", DataType.STRING));
-
-        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
-        outputParameters.add(descriptorBuilder.buildOutputParameterType("out", "out", DataType.STD_OUT));
-
-        ServiceDescription serviceDescription = descriptorBuilder.buildServiceDescription("comma_app", "comma_app",
-                inputParameters, outputParameters);
-
-        ServiceDescription serviceDescription2 = descriptorBuilder.buildServiceDescription("echo_app", "echo_app",
-                inputParameters, outputParameters);
-
-        log("Adding service description ...");
-        addServiceDescriptor(serviceDescription, "comma_app");
-        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
-                serviceDescription.getType().getName()));
-
-        addServiceDescriptor(serviceDescription2, "echo_app");
-        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
-                serviceDescription2.getType().getName()));
-
-        // Deployment descriptor
-        File executable;
-        if (OsUtils.isWindows()) {
-            executable = getFile("src/test/resources/comma_data.bat");
-        } else {
-            executable = getFile("src/test/resources/comma_data.sh");
-            Runtime.getRuntime().exec("chmod +x " + executable.getAbsolutePath());
-        }
-
-        ApplicationDescription applicationDeploymentDescription = descriptorBuilder
-                .buildApplicationDeploymentDescription("comma_app_localhost", executable.getAbsolutePath(), OsUtils.getTempFolderPath());
-        ApplicationDescription applicationDeploymentDescription2 = descriptorBuilder
-                .buildApplicationDeploymentDescription("echo_app_localhost", OsUtils.getEchoExecutable(), OsUtils.getTempFolderPath());
-
-        log("Adding deployment description ...");
-        addApplicationDescriptor(applicationDeploymentDescription, serviceDescription, hostDescription, "comma_app_localhost");
-
-        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
-                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
-                applicationDeploymentDescription.getType().getApplicationName().getStringValue()));
-
-        addApplicationDescriptor(applicationDeploymentDescription2, serviceDescription2, hostDescription, "echo_app_localhost");
-        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
-                serviceDescription2.getType().getName(), hostDescription.getType().getHostName(),
-                applicationDeploymentDescription2.getType().getApplicationName().getStringValue()));
+//        DescriptorBuilder descriptorBuilder = airavataAPI.getDescriptorBuilder();
+//        HostDescription hostDescription = descriptorBuilder.buildHostDescription(HostDescriptionType.type, "localhost2",
+//                "127.0.0.1");
+//
+//        log("Adding host description ....");
+//        addHostDescriptor(hostDescription);
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isHostDescriptorExists(hostDescription.getType().getHostName()));
+//
+//        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
+//        inputParameters.add(descriptorBuilder.buildInputParameterType("data1", "data1", DataType.STRING));
+//        inputParameters.add(descriptorBuilder.buildInputParameterType("data2", "data2", DataType.STRING));
+//
+//        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
+//        outputParameters.add(descriptorBuilder.buildOutputParameterType("out", "out", DataType.STD_OUT));
+//
+//        ServiceDescription serviceDescription = descriptorBuilder.buildServiceDescription("comma_app", "comma_app",
+//                inputParameters, outputParameters);
+//
+//        ServiceDescription serviceDescription2 = descriptorBuilder.buildServiceDescription("echo_app", "echo_app",
+//                inputParameters, outputParameters);
+//
+//        log("Adding service description ...");
+//        addServiceDescriptor(serviceDescription, "comma_app");
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
+//                serviceDescription.getType().getName()));
+//
+//        addServiceDescriptor(serviceDescription2, "echo_app");
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
+//                serviceDescription2.getType().getName()));
+//
+//        // Deployment descriptor
+//        File executable;
+//        if (OsUtils.isWindows()) {
+//            executable = getFile("src/test/resources/comma_data.bat");
+//        } else {
+//            executable = getFile("src/test/resources/comma_data.sh");
+//            Runtime.getRuntime().exec("chmod +x " + executable.getAbsolutePath());
+//        }
+//
+//        ApplicationDescription applicationDeploymentDescription = descriptorBuilder
+//                .buildApplicationDeploymentDescription("comma_app_localhost", executable.getAbsolutePath(), OsUtils.getTempFolderPath());
+//        ApplicationDescription applicationDeploymentDescription2 = descriptorBuilder
+//                .buildApplicationDeploymentDescription("echo_app_localhost", OsUtils.getEchoExecutable(), OsUtils.getTempFolderPath());
+//
+//        log("Adding deployment description ...");
+//        addApplicationDescriptor(applicationDeploymentDescription, serviceDescription, hostDescription, "comma_app_localhost");
+//
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
+//                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
+//                applicationDeploymentDescription.getType().getApplicationName().getStringValue()));
+//
+//        addApplicationDescriptor(applicationDeploymentDescription2, serviceDescription2, hostDescription, "echo_app_localhost");
+//        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
+//                serviceDescription2.getType().getName(), hostDescription.getType().getHostName(),
+//                applicationDeploymentDescription2.getType().getApplicationName().getStringValue()));
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
index d7763d2..b28bbca 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
@@ -1,39 +1,39 @@
-/*
- *
- * 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.integration;
-
-import org.apache.airavata.registry.api.PasswordCallback;
-
-/**
- * Callback for tests
- */
-public class PasswordCallbackImpl implements PasswordCallback {
-    @Override
-    public String getPassword(String username) {
-
-        if (username.equals("admin")) {
-            return "admin";
-        }
-
-        return null;
-    }
-}
+///*
+// *
+// * 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.integration;
+//
+//import org.apache.airavata.registry.api.PasswordCallback;
+//
+///**
+// * Callback for tests
+// */
+//public class PasswordCallbackImpl implements PasswordCallback {
+//    @Override
+//    public String getPassword(String username) {
+//
+//        if (username.equals("admin")) {
+//            return "admin";
+//        }
+//
+//        return null;
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f72637f2/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
index 81d01b6..dd4d2b6 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/WorkflowIntegrationTestBase.java
@@ -36,19 +36,12 @@ import org.apache.airavata.model.error.AiravataClientException;
 import org.apache.airavata.model.error.AiravataSystemException;
 import org.apache.airavata.model.error.ExperimentNotFoundException;
 import org.apache.airavata.model.error.InvalidRequestException;
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.ApplicationManager;
-import org.apache.airavata.client.api.ExperimentAdvanceOptions;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.api.exception.WorkflowAlreadyExistsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.registry.api.impl.WorkflowExecutionDataImpl;
 import org.apache.airavata.registry.api.workflow.ExperimentData;
 import org.apache.airavata.registry.api.workflow.InputData;
 import org.apache.airavata.registry.api.workflow.NodeExecutionData;
@@ -86,9 +79,7 @@ public abstract class WorkflowIntegrationTestBase {
 
     protected static final int TIME_OUT = 20000;
     protected static final int TRIES = 3;
-    protected AiravataAPI airavataAPI;
     protected Airavata.Client client;
-    protected ApplicationManager applicationManager;
 
     protected void log(String message) {
         log.info(message);
@@ -125,12 +116,6 @@ public abstract class WorkflowIntegrationTestBase {
         return userName;
     }
 
-    public AiravataAPI getAiravataAPI() throws AiravataAPIInvocationException {
-        if (airavataAPI == null){
-            airavataAPI = AiravataAPIFactory.getAPI(getGatewayName(), getUserName());
-        }
-        return airavataAPI;
-    }
 
     public String getPassword() {
         return password;
@@ -231,164 +216,147 @@ public abstract class WorkflowIntegrationTestBase {
         getClient().launchExperiment(expId, "testToken");
     }
 
-    protected void executeExperiment(String workflowFilePath,
-                                     List<String> inputs, List<String> outputs) throws GraphException,
-            ComponentException, IOException, WorkflowAlreadyExistsException,
-            AiravataAPIInvocationException, Exception {
-        log("Saving workflow ...");
-
-        Workflow workflow = new Workflow(getWorkflowComposeContent(workflowFilePath));
-        if (!airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName())) {
-            airavataAPI.getWorkflowManager().addWorkflow(workflow);
-        }
-        Assert.assertTrue(airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName()));
-
-        log("Workflow setting up completed ...");
-
-//        executeWorkflow(workflow, inputs, outputs);
-    }
-
-
-    protected void executeWorkflow(Workflow workflow, List<String> inputValues, List<String> outputValue) throws Exception {
-        String experimentId = executeWorkflow(workflow, inputValues);
-        airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);
-        verifyOutput(experimentId, outputValue);
-    }
-
-    protected String executeWorkflow(Workflow workflow, List<String> inputValues) throws Exception {
-        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
-        String workflowName = workflow.getName();
-        ExperimentAdvanceOptions options = getAiravataAPI().getExecutionManager().createExperimentAdvanceOptions(
-                workflowName, getUserName(), null);
-
-        options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setTokenId("1234");
-
-        String experimentId = getAiravataAPI().getExecutionManager().runExperiment(workflowName, workflowInputs, options);
-
-        Assert.assertNotNull(experimentId);
-
-        log.info("Run workflow completed ....");
-        log.info("Starting monitoring ....");
-        return experimentId;
-    }
-
-
-    protected void verifyOutput(String experimentId, List<String> outputVerifyingString) throws Exception {
-        log.info("Experiment ID Returned : " + experimentId);
-
-        ExperimentData experimentData = getAiravataAPI().getProvenanceManager().getExperimentData(experimentId);
-
-        log.info("Verifying output ...");
-
-        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
-
-        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
-
-        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
-            List<NodeExecutionData> nodeDataList = data.getNodeDataList(WorkflowNodeType.WorkflowNode.OUTPUTNODE);
-            Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
-            for (NodeExecutionData nodeData : nodeDataList) {
-                for (InputData inputData : nodeData.getInputData()) {
-                    String[] outputValues = StringUtil.getElementsFromString(inputData.getValue());
-                    Assert.assertEquals(outputVerifyingString.size(), outputValues.length);
-                    for (int i = 0; i < outputValues.length; i++) {
-                        Assert.assertEquals(outputVerifyingString.get(i), outputValues[i]);
-                    }
-                }
-            }
-        }
-    }
-
-    protected void verifyOutput(String experimentId, String outputVerifyingString) throws Exception {
-        log.info("Experiment ID Returned : " + experimentId);
-
-        ExperimentData experimentData = getAiravataAPI().getProvenanceManager().getExperimentData(experimentId);
-
-        log.info("Verifying output ...");
-
-        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
-
-        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
-
-        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
-            List<NodeExecutionData> nodeDataList = data.getNodeDataList();
-            for (NodeExecutionData nodeData : nodeDataList) {
-
-                Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
-
-                for (OutputData outputData : nodeData.getOutputData()) {
-                    Assert.assertEquals("Airavata_Test", outputData.getValue());
-                }
-                for (InputData inputData : nodeData.getInputData()) {
-                    Assert.assertEquals(outputVerifyingString, inputData.getValue());
-                }
-            }
-        }
-    }
-
-    protected List<WorkflowInput> setupInputs(Workflow workflow, List<String> inputValues) throws Exception {
-        List<WorkflowInput> workflowInputs = getAiravataAPI().getWorkflowManager().getWorkflowInputs(workflow.getName());
-
-        Assert.assertEquals(workflowInputs.size(), inputValues.size());
-
-        int i = 0;
-        for (String valueString : inputValues) {
-            workflowInputs.get(i).setValue(valueString);
-            ++i;
-        }
-        return workflowInputs;
-    }
-
-    protected String getWorkflowComposeContent(String fileName) throws IOException {
-        File file = getFile(fileName);
-
-        BufferedReader reader = new BufferedReader(new FileReader(file));
-        String line;
-        StringBuilder buffer = new StringBuilder();
-        while ((line = reader.readLine()) != null) {
-            buffer.append(line);
-        }
-        reader.close();
-        log.debug("Workflow compose - " + buffer.toString());
-        return buffer.toString();
-    }
-
-    protected File getFile(String fileName) {
-        File f = new File(".");
-        log.debug(f.getAbsolutePath());
-
-        File file = new File(fileName);
-        if (!file.exists()) {
-            file = new File("modules/integration-tests/" + fileName);
-        }
-        return file;
-    }
-
-    /*
-    * When running the tests multiple times in the same server, when the application, Host, service descriptions are
-    * there already the tests fail. But using these functions for the tests prevents that from happening.
-    * */
-    protected void addHostDescriptor(HostDescription hostDescription) throws AiravataAPIInvocationException {
-        applicationManager = getAiravataAPI().getApplicationManager();
-        String hostName = hostDescription.getType().getHostName();
-        if (!applicationManager.isHostDescriptorExists(hostName)){
-            applicationManager.addHostDescription(hostDescription);
-        }
-    }
-
-    protected void addServiceDescriptor(ServiceDescription serviceDescription, String serviceName) throws AiravataAPIInvocationException {
-        applicationManager = getAiravataAPI().getApplicationManager();
-        if (!applicationManager.isServiceDescriptorExists(serviceName)){
-            applicationManager.addServiceDescription(serviceDescription);
-        }
-    }
 
-    protected void addApplicationDescriptor(ApplicationDescription applicationDescription, ServiceDescription serviceDescription, HostDescription hostDescription, String appeName) throws AiravataAPIInvocationException {
-        boolean descriptorExists = applicationManager.isApplicationDescriptorExists(serviceDescription.getType().getName(), hostDescription.getType().getHostName(), appeName);
-        if (!descriptorExists) {
-            applicationManager.addApplicationDescription(serviceDescription, hostDescription,
-                    applicationDescription);
-        }
-    }
+//    protected void executeWorkflow(Workflow workflow, List<String> inputValues, List<String> outputValue) throws Exception {
+//        String experimentId = executeWorkflow(workflow, inputValues);
+//        airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);
+//        verifyOutput(experimentId, outputValue);
+//    }
+//
+//    protected String executeWorkflow(Workflow workflow, List<String> inputValues) throws Exception {
+//        List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
+//        String workflowName = workflow.getName();
+//        ExperimentAdvanceOptions options = getAiravataAPI().getExecutionManager().createExperimentAdvanceOptions(
+//                workflowName, getUserName(), null);
+//
+//        options.getCustomSecuritySettings().getCredentialStoreSecuritySettings().setTokenId("1234");
+//
+//        String experimentId = getAiravataAPI().getExecutionManager().runExperiment(workflowName, workflowInputs, options);
+//
+//        Assert.assertNotNull(experimentId);
+//
+//        log.info("Run workflow completed ....");
+//        log.info("Starting monitoring ....");
+//        return experimentId;
+//    }
+//
+//
+//    protected void verifyOutput(String experimentId, List<String> outputVerifyingString) throws Exception {
+//        log.info("Experiment ID Returned : " + experimentId);
+//
+//        ExperimentData experimentData = getAiravataAPI().getProvenanceManager().getExperimentData(experimentId);
+//
+//        log.info("Verifying output ...");
+//
+//        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
+//
+//        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
+//
+//        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
+//            List<NodeExecutionData> nodeDataList = data.getNodeDataList(WorkflowNodeType.WorkflowNode.OUTPUTNODE);
+//            Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
+//            for (NodeExecutionData nodeData : nodeDataList) {
+//                for (InputData inputData : nodeData.getInputData()) {
+//                    String[] outputValues = StringUtil.getElementsFromString(inputData.getValue());
+//                    Assert.assertEquals(outputVerifyingString.size(), outputValues.length);
+//                    for (int i = 0; i < outputValues.length; i++) {
+//                        Assert.assertEquals(outputVerifyingString.get(i), outputValues[i]);
+//                    }
+//                }
+//            }
+//        }
+//    }
+//
+//    protected void verifyOutput(String experimentId, String outputVerifyingString) throws Exception {
+//        log.info("Experiment ID Returned : " + experimentId);
+//
+//        ExperimentData experimentData = getAiravataAPI().getProvenanceManager().getExperimentData(experimentId);
+//
+//        log.info("Verifying output ...");
+//
+//        List<WorkflowExecutionDataImpl> workflowInstanceData = experimentData.getWorkflowExecutionDataList();
+//
+//        Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
+//
+//        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
+//            List<NodeExecutionData> nodeDataList = data.getNodeDataList();
+//            for (NodeExecutionData nodeData : nodeDataList) {
+//
+//                Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
+//
+//                for (OutputData outputData : nodeData.getOutputData()) {
+//                    Assert.assertEquals("Airavata_Test", outputData.getValue());
+//                }
+//                for (InputData inputData : nodeData.getInputData()) {
+//                    Assert.assertEquals(outputVerifyingString, inputData.getValue());
+//                }
+//            }
+//        }
+//    }
+//
+//    protected List<WorkflowInput> setupInputs(Workflow workflow, List<String> inputValues) throws Exception {
+//        List<WorkflowInput> workflowInputs = getAiravataAPI().getWorkflowManager().getWorkflowInputs(workflow.getName());
+//
+//        Assert.assertEquals(workflowInputs.size(), inputValues.size());
+//
+//        int i = 0;
+//        for (String valueString : inputValues) {
+//            workflowInputs.get(i).setValue(valueString);
+//            ++i;
+//        }
+//        return workflowInputs;
+//    }
+//
+//    protected String getWorkflowComposeContent(String fileName) throws IOException {
+//        File file = getFile(fileName);
+//
+//        BufferedReader reader = new BufferedReader(new FileReader(file));
+//        String line;
+//        StringBuilder buffer = new StringBuilder();
+//        while ((line = reader.readLine()) != null) {
+//            buffer.append(line);
+//        }
+//        reader.close();
+//        log.debug("Workflow compose - " + buffer.toString());
+//        return buffer.toString();
+//    }
+//
+//    protected File getFile(String fileName) {
+//        File f = new File(".");
+//        log.debug(f.getAbsolutePath());
+//
+//        File file = new File(fileName);
+//        if (!file.exists()) {
+//            file = new File("modules/integration-tests/" + fileName);
+//        }
+//        return file;
+//    }
+//
+//    /*
+//    * When running the tests multiple times in the same server, when the application, Host, service descriptions are
+//    * there already the tests fail. But using these functions for the tests prevents that from happening.
+//    * */
+//    protected void addHostDescriptor(HostDescription hostDescription) throws AiravataAPIInvocationException {
+//        applicationManager = getAiravataAPI().getApplicationManager();
+//        String hostName = hostDescription.getType().getHostName();
+//        if (!applicationManager.isHostDescriptorExists(hostName)){
+//            applicationManager.addHostDescription(hostDescription);
+//        }
+//    }
+//
+//    protected void addServiceDescriptor(ServiceDescription serviceDescription, String serviceName) throws AiravataAPIInvocationException {
+//        applicationManager = getAiravataAPI().getApplicationManager();
+//        if (!applicationManager.isServiceDescriptorExists(serviceName)){
+//            applicationManager.addServiceDescription(serviceDescription);
+//        }
+//    }
+//
+//    protected void addApplicationDescriptor(ApplicationDescription applicationDescription, ServiceDescription serviceDescription, HostDescription hostDescription, String appeName) throws AiravataAPIInvocationException {
+//        boolean descriptorExists = applicationManager.isApplicationDescriptorExists(serviceDescription.getType().getName(), hostDescription.getType().getHostName(), appeName);
+//        if (!descriptorExists) {
+//            applicationManager.addApplicationDescription(serviceDescription, hostDescription,
+//                    applicationDescription);
+//        }
+//    }
 
 }