airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [19/44] airavata git commit: Adding mongo-registry WIP
Date Sun, 07 Jun 2015 17:01:00 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
new file mode 100644
index 0000000..d38b5df
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
@@ -0,0 +1,115 @@
+/*
+ *
+ * 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.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
+import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GatewayRegistry {
+
+    private final static Logger logger = LoggerFactory.getLogger(GatewayRegistry.class);
+    public GatewayResource getDefaultGateway () throws ApplicationSettingsException, RegistryException {
+        return (GatewayResource)ResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
+    }
+
+    public GatewayResource getExistingGateway (String gatewayName) throws RegistryException {
+        return (GatewayResource)ResourceUtils.getGateway(gatewayName);
+    }
+
+    public String addGateway (Gateway gateway) throws RegistryException{
+        try {
+            GatewayResource resource = (GatewayResource)ResourceUtils.createGateway(gateway.getGatewayId());
+            resource.setGatewayName(gateway.getGatewayName());
+            resource.setEmailAddress(gateway.getEmailAddress());
+            resource.setDomain(gateway.getDomain());
+            resource.save();
+            return gateway.getGatewayId();
+        }catch (RegistryException e){
+            logger.error("Error while saving gateway to registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateGateway (String gatewayId, Gateway updatedGateway) throws RegistryException{
+        try {
+            GatewayResource existingGateway = (GatewayResource)ResourceUtils.getGateway(gatewayId);
+            existingGateway.setGatewayName(updatedGateway.getGatewayName());
+            existingGateway.setEmailAddress(updatedGateway.getEmailAddress());
+            existingGateway.setDomain(updatedGateway.getDomain());
+            existingGateway.save();
+        }catch (RegistryException e){
+            logger.error("Error while updating gateway to registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public Gateway getGateway (String gatewayId) throws RegistryException{
+        try {
+            GatewayResource resource = (GatewayResource)ResourceUtils.getGateway(gatewayId);
+            return ThriftDataModelConversion.getGateway(resource);
+        }catch (RegistryException e){
+            logger.error("Error while getting gateway", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isGatewayExist (String gatewayId) throws RegistryException{
+        try {
+            return ResourceUtils.isGatewayExist(gatewayId);
+        }catch (RegistryException e){
+            logger.error("Error while checking gateway exists", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean removeGateway (String gatewayId) throws RegistryException{
+        try {
+            return ResourceUtils.removeGateway(gatewayId);
+        }catch (Exception e){
+            logger.error("Error while removing the gateway", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<Gateway> getAllGateways () throws RegistryException {
+        List<Gateway> gatewayList = new ArrayList<Gateway>();
+        try {
+            List<Resource> allGateways = ResourceUtils.getAllGateways();
+            return ThriftDataModelConversion.getAllGateways(allGateways);
+        }catch (Exception e){
+            logger.error("Error while getting all the gateways", e);
+            throw new RegistryException(e);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
new file mode 100644
index 0000000..0274518
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
@@ -0,0 +1,97 @@
+/*
+ *
+ * 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.registry.cpi.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+
+public class LoggingRegistryImpl implements Registry {
+    private final static Logger logger = LoggerFactory.getLogger(LoggingRegistryImpl.class);
+
+    @Override
+    public Object add(ParentDataType dataType, Object newObjectToAdd, String gatewayId) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public Object add(ChildDataType dataType, Object newObjectToAdd, Object dependentIdentifiers) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public void update(RegistryModelType dataType, Object newObjectToUpdate, Object identifier) throws RegistryException {
+
+    }
+
+    @Override
+    public void update(RegistryModelType dataType, Object identifier, String fieldName, Object value) throws RegistryException {
+
+    }
+
+    @Override
+    public Object get(RegistryModelType dataType, Object identifier) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<Object> get(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<Object> get(RegistryModelType dataType, String fieldName, Object value, int limit, int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<Object> search(RegistryModelType dataType, Map<String, String> filters) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<Object> search(RegistryModelType dataType, Map<String, String> filters, int limit, int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public Object getValue(RegistryModelType dataType, Object identifier, String field) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<String> getIds(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public void remove(RegistryModelType dataType, Object identifier) throws RegistryException {
+
+    }
+
+    @Override
+    public boolean isExist(RegistryModelType dataType, Object identifier) throws RegistryException {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
new file mode 100644
index 0000000..928fe64
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
@@ -0,0 +1,305 @@
+/*
+ *
+ * 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.utils.AiravataUtils;
+import org.apache.airavata.model.workspace.Project;
+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.persistance.registry.jpa.utils.ThriftDataModelConversion;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.*;
+
+public class ProjectRegistry {
+    private GatewayResource gatewayResource;
+    private WorkerResource workerResource;
+    private final static Logger logger = LoggerFactory.getLogger(ProjectRegistry.class);
+
+    public ProjectRegistry(GatewayResource gatewayResource, UserResource user) throws RegistryException {
+        if (!ResourceUtils.isGatewayExist(gatewayResource.getGatewayId())){
+            this.gatewayResource = gatewayResource;
+        }else {
+            this.gatewayResource = (GatewayResource)ResourceUtils.getGateway(gatewayResource.getGatewayId());
+        }
+        if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())){
+            workerResource = ResourceUtils.addGatewayWorker(gatewayResource, user);
+        }else {
+            workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayId(),
+                    user.getUserName());
+        }
+    }
+
+    public String addProject (Project project, String gatewayId) throws RegistryException{
+        String projectId;
+        try {
+            if (!ResourceUtils.isUserExist(project.getOwner())){
+                ResourceUtils.addUser(project.getOwner(), null);
+            }
+            ProjectResource projectResource = new ProjectResource();
+            projectId = getProjectId(project.getName());
+            projectResource.setId(projectId);
+            project.setProjectId(projectId);
+            projectResource.setName(project.getName());
+            projectResource.setDescription(project.getDescription());
+            projectResource.setCreationTime(AiravataUtils.getTime(project.getCreationTime()));
+            GatewayResource gateway = (GatewayResource)ResourceUtils.getGateway(gatewayId);
+            projectResource.setGateway(gateway);
+            WorkerResource worker = new WorkerResource(project.getOwner(), workerResource.getGateway());
+            projectResource.setWorker(worker);
+            projectResource.save();
+            ProjectUserResource resource = (ProjectUserResource)projectResource.create(
+                    ResourceType.PROJECT_USER);
+            resource.setProjectId(project.getProjectId());
+            resource.setUserName(project.getOwner());
+            resource.save();
+            List<String> sharedGroups = project.getSharedGroups();
+            if (sharedGroups != null && !sharedGroups.isEmpty()){
+                for (String group : sharedGroups){
+                    //TODO - add shared groups
+                    logger.info("Groups are not supported at the moment...");
+                }
+            }
+
+            List<String> sharedUsers = project.getSharedUsers();
+            if (sharedUsers != null && !sharedUsers.isEmpty()){
+                for (String username : sharedUsers){
+                    ProjectUserResource pr = (ProjectUserResource)projectResource.
+                            create(ResourceType.PROJECT_USER);
+                    pr.setUserName(username);
+                    pr.save();
+                }
+            }
+        }catch (Exception e){
+            logger.error("Error while saving project to registry", e);
+           throw new RegistryException(e);
+        }
+        return projectId;
+    }
+
+    private String getProjectId (String projectName){
+        String pro = projectName.replaceAll("\\s", "");
+        return pro + "_" + UUID.randomUUID();
+    }
+
+    public void updateProject (Project project, String projectId) throws RegistryException{
+        try {
+            ProjectResource existingProject = workerResource.getProject(projectId);
+            existingProject.setDescription(project.getDescription());
+            existingProject.setName(project.getName());
+            existingProject.setCreationTime(AiravataUtils.getTime(project.getCreationTime()));
+//            existingProject.setGateway(gatewayResource);
+            UserResource user = (UserResource)ResourceUtils.getUser(project.getOwner());
+            if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())){
+                workerResource = ResourceUtils.addGatewayWorker(gatewayResource, user);
+            }else {
+                workerResource = (WorkerResource)ResourceUtils.getWorker(
+                        gatewayResource.getGatewayName(), user.getUserName());
+            }
+            WorkerResource worker = new WorkerResource(project.getOwner(), gatewayResource);
+            existingProject.setWorker(worker);
+            existingProject.save();
+            ProjectUserResource resource = (ProjectUserResource)existingProject.create(
+                    ResourceType.PROJECT_USER);
+            resource.setProjectId(projectId);
+            resource.setUserName(project.getOwner());
+            resource.save();
+            List<String> sharedGroups = project.getSharedGroups();
+            if (sharedGroups != null && !sharedGroups.isEmpty()){
+                for (String group : sharedGroups){
+                    //TODO - add shared groups
+                    logger.info("Groups are not supported at the moment...");
+                }
+            }
+
+            List<String> sharedUsers = project.getSharedUsers();
+            if (sharedUsers != null && !sharedUsers.isEmpty()){
+                for (String username : sharedUsers){
+                    ProjectUserResource pr = (ProjectUserResource)existingProject.create(
+                            ResourceType.PROJECT_USER);
+                    pr.setUserName(username);
+                    pr.save();
+                }
+            }
+        }catch (Exception e){
+            logger.error("Error while saving project to registry", e);
+           throw new RegistryException(e);
+        }
+    }
+
+    public Project getProject (String projectId) throws RegistryException{
+        try {
+            ProjectResource project = workerResource.getProject(projectId);
+            if (project != null){
+                return ThriftDataModelConversion.getProject(project);
+            }
+        }catch (Exception e){
+            logger.error("Error while retrieving project from registry", e);
+           throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    /**
+     * Get list of projects of the user
+     * @param fieldName
+     * @param value
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> getProjectList (String fieldName, Object value) throws RegistryException{
+        return getProjectList(fieldName, value, -1, -1, null, null);
+    }
+
+    /**
+     * Get projects list with pagination and result ordering
+     * @param fieldName
+     * @param value
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> getProjectList (String fieldName, Object value, int limit, int offset,
+                                         Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
+        List<Project> projects = new ArrayList<Project>();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+                workerResource.setUser((String)value);
+                List<ProjectResource> projectList = workerResource.getProjects();
+                if (projectList != null && !projectList.isEmpty()){
+                    for (ProjectResource pr : projectList){
+                        projects.add(ThriftDataModelConversion.getProject(pr));
+                    }
+                }
+                return projects;
+            }
+        }catch (Exception e){
+            logger.error("Error while retrieving project from registry", e);
+            throw new RegistryException(e);
+        }
+        return projects;
+    }
+
+    /**
+     * To search projects of user with the given filter criteria. All the matching results will be sent.
+     * Results are not ordered in any order
+     * @param filters
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> searchProjects (Map<String, String> filters) throws RegistryException{
+        return searchProjects(filters, -1, -1, null, null);
+    }
+
+    /**
+     * To search the projects of user with the given filter criteria and retrieve the results with
+     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
+     * DESC.
+     *
+     * @param filters
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> searchProjects(Map<String, String> filters, int limit,
+            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        Map<String, String> fil = new HashMap<String, String>();
+        if (filters != null && filters.size() != 0){
+            List<Project> projects = new ArrayList<Project>();
+            try {
+                for (String field : filters.keySet()){
+                    if (field.equals(Constants.FieldConstants.ProjectConstants.PROJECT_NAME)){
+                        fil.put(AbstractResource.ProjectConstants.PROJECT_NAME, filters.get(field));
+                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+                        fil.put(AbstractResource.ProjectConstants.USERNAME, filters.get(field));
+                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.DESCRIPTION)){
+                        fil.put(AbstractResource.ProjectConstants.DESCRIPTION, filters.get(field));
+                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_ID)){
+                        fil.put(AbstractResource.ProjectConstants.GATEWAY_ID, filters.get(field));
+                    }
+                }
+                List<ProjectResource> projectResources = workerResource
+                        .searchProjects(fil, limit, offset, orderByIdentifier, resultOrderType);
+                if (projectResources != null && !projectResources.isEmpty()){
+                    for (ProjectResource pr : projectResources){
+                        projects.add(ThriftDataModelConversion.getProject(pr));
+                    }
+                }
+                return projects;
+            }catch (Exception e){
+                logger.error("Error while retrieving project from registry", e);
+                throw new RegistryException(e);
+            }
+        }
+        return null;
+    }
+
+    public List<String> getProjectIds (String fieldName, Object value) throws RegistryException{
+        List<String> projectIds = new ArrayList<String>();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+                workerResource.setUser((String)value);
+                List<ProjectResource> projectList = workerResource.getProjects();
+                if (projectList != null && !projectList.isEmpty()){
+                    for (ProjectResource pr : projectList){
+                        projectIds.add(pr.getName());
+                    }
+                }
+                return projectIds;
+            }
+        }catch (Exception e){
+            logger.error("Error while retrieving projects from registry", e);
+           throw new RegistryException(e);
+        }
+        return projectIds;
+    }
+
+    public void removeProject (String projectId) throws RegistryException {
+        try {
+            workerResource.removeProject(projectId);
+        } catch (Exception e) {
+            logger.error("Error while removing the project..", e);
+           throw new RegistryException(e);
+        }
+    }
+
+    public boolean isProjectExist(String projectId) throws RegistryException {
+        try {
+            return workerResource.isProjectExists(projectId);
+        } catch (Exception e) {
+            logger.error("Error while retrieving project...", e);
+           throw new RegistryException(e);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
new file mode 100644
index 0000000..8af4f19
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RegistryFactory {
+    private static Registry registry;
+    private static Logger logger = LoggerFactory.getLogger(RegistryFactory.class);
+
+    public static Registry getRegistry(String gateway, String username, String password) throws RegistryException {
+        try {
+            if (registry == null) {
+                registry = new RegistryImpl(gateway, username, password);
+            }
+        } catch (RegistryException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        }
+        return registry;
+    }
+
+    public static Registry getRegistry(String gateway) throws RegistryException {
+        try {
+            if (registry == null) {
+                registry = new RegistryImpl(gateway, ServerSettings.getDefaultUser(), ServerSettings.getDefaultUserPassword());
+            }
+        } catch (RegistryException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        }
+        return registry;
+    }
+
+    public static Registry getDefaultRegistry () throws RegistryException {
+        try {
+            if (registry == null) {
+                registry = new RegistryImpl();
+            }
+        } catch (RegistryException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        }
+        return registry;
+    }
+
+    public static Registry getLoggingRegistry() {
+        if(registry == null) {
+            registry = new LoggingRegistryImpl();
+        }
+        return registry;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
new file mode 100644
index 0000000..7920200
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.persistance.registry.jpa.impl;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
+import org.apache.airavata.registry.cpi.RegistryException;
+
+public class UserReg {
+    public WorkerResource getSystemUser() throws ApplicationSettingsException, RegistryException {
+        return (WorkerResource)ResourceUtils.getWorker(ServerSettings.getDefaultUserGateway(), ServerSettings.getDefaultUser());
+    }
+
+    public WorkerResource getExistingUser (String gatewayName, String userName) throws RegistryException {
+        return (WorkerResource)ResourceUtils.getWorker(gatewayName, userName);
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
new file mode 100644
index 0000000..8f40f2d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
@@ -0,0 +1,129 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "ADVANCE_INPUT_DATA_HANDLING")
+public class AdvancedInputDataHandling implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "INPUT_DATA_HANDLING_ID")
+    private int dataHandlingId;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "WORKING_DIR_PARENT")
+    private String parentWorkingDir;
+    @Column(name = "UNIQUE_WORKING_DIR")
+    private String workingDir;
+    @Column(name = "STAGE_INPUT_FILES_TO_WORKING_DIR")
+    private boolean stageInputsToWorkingDir;
+    @Column(name = "CLEAN_AFTER_JOB")
+    private boolean cleanAfterJob;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public int getDataHandlingId() {
+        return dataHandlingId;
+    }
+
+    public void setDataHandlingId(int dataHandlingId) {
+        this.dataHandlingId = dataHandlingId;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getParentWorkingDir() {
+        return parentWorkingDir;
+    }
+
+    public void setParentWorkingDir(String parentWorkingDir) {
+        this.parentWorkingDir = parentWorkingDir;
+    }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
+
+    public boolean isStageInputsToWorkingDir() {
+        return stageInputsToWorkingDir;
+    }
+
+    public void setStageInputsToWorkingDir(boolean stageInputsToWorkingDir) {
+        this.stageInputsToWorkingDir = stageInputsToWorkingDir;
+    }
+
+    public boolean isCleanAfterJob() {
+        return cleanAfterJob;
+    }
+
+    public void setCleanAfterJob(boolean cleanAfterJob) {
+        this.cleanAfterJob = cleanAfterJob;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
new file mode 100644
index 0000000..d305f22
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "ADVANCE_OUTPUT_DATA_HANDLING")
+public class AdvancedOutputDataHandling implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "OUTPUT_DATA_HANDLING_ID")
+    private int outputDataHandlingId;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "OUTPUT_DATA_DIR")
+    private String outputDataDir;
+    @Column(name = "DATA_REG_URL")
+    private String dataRegUrl;
+    @Column(name = "PERSIST_OUTPUT_DATA")
+    private boolean persistOutputData;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public int getOutputDataHandlingId() {
+        return outputDataHandlingId;
+    }
+
+    public void setOutputDataHandlingId(int outputDataHandlingId) {
+        this.outputDataHandlingId = outputDataHandlingId;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getOutputDataDir() {
+        return outputDataDir;
+    }
+
+    public void setOutputDataDir(String outputDataDir) {
+        this.outputDataDir = outputDataDir;
+    }
+
+    public String getDataRegUrl() {
+        return dataRegUrl;
+    }
+
+    public void setDataRegUrl(String dataRegUrl) {
+        this.dataRegUrl = dataRegUrl;
+    }
+
+    public boolean isPersistOutputData() {
+        return persistOutputData;
+    }
+
+    public void setPersistOutputData(boolean persistOutputData) {
+        this.persistOutputData = persistOutputData;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
new file mode 100644
index 0000000..66a9796
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
@@ -0,0 +1,173 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "APPLICATION_INPUT")
+@IdClass(ApplicationInput_PK.class)
+public class ApplicationInput implements Serializable {
+    @Id
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Id
+    @Column(name = "INPUT_KEY")
+    private String inputKey;
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+    @Column(name = "METADATA")
+    private String metadata;
+    @Lob
+    @Column(name = "VALUE")
+    private char[] value;
+    @Column(name = "APP_ARGUMENT")
+    private String appArgument;
+
+    @Column(name = "INPUT_ORDER")
+    private int inputOrder;
+
+    @Column(name = "STANDARD_INPUT")
+    private boolean standardInput;
+
+    @Column(name = "USER_FRIENDLY_DESC")
+    private String userFriendlyDesc;
+
+    @Column(name="IS_REQUIRED")
+    private boolean isRequired;
+    @Column(name="REQUIRED_TO_COMMANDLINE")
+    private boolean requiredToCMD;
+    @Column(name = "DATA_STAGED")
+    private boolean dataStaged;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public String getMetadata() {
+        return metadata;
+    }
+
+    public void setMetadata(String metadata) {
+        this.metadata = metadata;
+    }
+
+    public char[] getValue() {
+        return value;
+    }
+
+    public void setValue(char[] value) {
+        this.value = value;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    public boolean isRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean isRequired) {
+        this.isRequired = isRequired;
+    }
+
+    public boolean isRequiredToCMD() {
+        return requiredToCMD;
+    }
+
+    public void setRequiredToCMD(boolean requiredToCMD) {
+        this.requiredToCMD = requiredToCMD;
+    }
+
+    public boolean isDataStaged() {
+        return dataStaged;
+    }
+
+    public void setDataStaged(boolean dataStaged) {
+        this.dataStaged = dataStaged;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
new file mode 100644
index 0000000..e99cbd2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
@@ -0,0 +1,65 @@
+/*
+ *
+ * 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.model;
+
+import java.io.Serializable;
+
+public class ApplicationInput_PK implements Serializable {
+    private String taskId;
+    private String inputKey;
+
+    public ApplicationInput_PK(String inputKey, String taskId) {
+        this.inputKey = inputKey;
+        this.taskId = taskId;
+    }
+
+    public ApplicationInput_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
new file mode 100644
index 0000000..c95f934
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
@@ -0,0 +1,150 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "APPLICATION_OUTPUT")
+@IdClass(ApplicationOutput_PK.class)
+public class ApplicationOutput implements Serializable {
+    @Id
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Id
+    @Column(name = "OUTPUT_KEY")
+    private String outputKey;
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+    @Lob
+    @Column(name = "VALUE")
+    private char[] value;
+
+    @Column(name = "IS_REQUIRED")
+    private boolean isRequired;
+    @Column(name="REQUIRED_TO_COMMANDLINE")
+    private boolean addedToCmd;
+    @Column(name = "DATA_MOVEMENT")
+    private boolean dataMovement;
+    @Column(name = "DATA_NAME_LOCATION")
+    private String dataNameLocation;
+    @Column(name = "SEARCH_QUERY")
+    private String searchQuery;
+    @Column(name = "APP_ARGUMENT")
+    private String applicationArgument;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public char[] getValue() {
+        return value;
+    }
+
+    public void setValue(char[] value) {
+        this.value = value;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public boolean isRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean isRequired) {
+        this.isRequired = isRequired;
+    }
+
+    public boolean isAddedToCmd() {
+        return addedToCmd;
+    }
+
+    public void setAddedToCmd(boolean addedToCmd) {
+        this.addedToCmd = addedToCmd;
+    }
+
+    public boolean isDataMovement() {
+        return dataMovement;
+    }
+
+    public void setDataMovement(boolean dataMovement) {
+        this.dataMovement = dataMovement;
+    }
+
+    public String getDataNameLocation() {
+        return dataNameLocation;
+    }
+
+    public void setDataNameLocation(String dataNameLocation) {
+        this.dataNameLocation = dataNameLocation;
+    }
+
+    public String getSearchQuery() {
+        return searchQuery;
+    }
+
+    public void setSearchQuery(String searchQuery) {
+        this.searchQuery = searchQuery;
+    }
+
+    public String getApplicationArgument() {
+        return applicationArgument;
+    }
+
+    public void setApplicationArgument(String applicationArgument) {
+        this.applicationArgument = applicationArgument;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
new file mode 100644
index 0000000..17a5021
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.model;
+
+import java.io.Serializable;
+
+public class ApplicationOutput_PK implements Serializable {
+    private String taskId;
+    private String outputKey;
+
+    public ApplicationOutput_PK(String outputKey, String taskId) {
+        this.outputKey = outputKey;
+        this.taskId = taskId;
+    }
+
+    public ApplicationOutput_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
new file mode 100644
index 0000000..e440510
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
@@ -0,0 +1,190 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "COMPUTATIONAL_RESOURCE_SCHEDULING")
+public class Computational_Resource_Scheduling implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "RESOURCE_SCHEDULING_ID")
+    private int schedulingId;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "RESOURCE_HOST_ID")
+    private String resourceHostId;
+    @Column(name = "CPU_COUNT")
+    private int cpuCount;
+    @Column(name = "NODE_COUNT")
+    private int nodeCount;
+    @Column(name = "NO_OF_THREADS")
+    private int numberOfThreads;
+    @Column(name = "QUEUE_NAME")
+    private String queueName;
+    @Column(name = "WALLTIME_LIMIT")
+    private int wallTimeLimit;
+    @Column(name = "JOB_START_TIME")
+    private Timestamp jobStartTime;
+    @Column(name = "TOTAL_PHYSICAL_MEMORY")
+    private int totalPhysicalmemory;
+    @Column(name = "COMPUTATIONAL_PROJECT_ACCOUNT")
+    private String projectName;
+    @Column(name = "CHESSIS_NAME")
+    private String chessisName;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public String getChessisName() {
+        return chessisName;
+    }
+
+    public void setChessisName(String chessisName) {
+        this.chessisName = chessisName;
+    }
+
+    public int getSchedulingId() {
+        return schedulingId;
+    }
+
+    public void setSchedulingId(int schedulingId) {
+        this.schedulingId = schedulingId;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getResourceHostId() {
+        return resourceHostId;
+    }
+
+    public void setResourceHostId(String resourceHostId) {
+        this.resourceHostId = resourceHostId;
+    }
+
+    public int getCpuCount() {
+        return cpuCount;
+    }
+
+    public void setCpuCount(int cpuCount) {
+        this.cpuCount = cpuCount;
+    }
+
+    public int getNodeCount() {
+        return nodeCount;
+    }
+
+    public void setNodeCount(int nodeCount) {
+        this.nodeCount = nodeCount;
+    }
+
+    public int getNumberOfThreads() {
+        return numberOfThreads;
+    }
+
+    public void setNumberOfThreads(int numberOfThreads) {
+        this.numberOfThreads = numberOfThreads;
+    }
+
+    public String getQueueName() {
+        return queueName;
+    }
+
+    public void setQueueName(String queueName) {
+        this.queueName = queueName;
+    }
+
+    public int getWallTimeLimit() {
+        return wallTimeLimit;
+    }
+
+    public void setWallTimeLimit(int wallTimeLimit) {
+        this.wallTimeLimit = wallTimeLimit;
+    }
+
+    public Timestamp getJobStartTime() {
+        return jobStartTime;
+    }
+
+    public void setJobStartTime(Timestamp jobStartTime) {
+        this.jobStartTime = jobStartTime;
+    }
+
+    public int getTotalPhysicalmemory() {
+        return totalPhysicalmemory;
+    }
+
+    public void setTotalPhysicalmemory(int totalPhysicalmemory) {
+        this.totalPhysicalmemory = totalPhysicalmemory;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
new file mode 100644
index 0000000..a7a1d4f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
@@ -0,0 +1,80 @@
+/*
+*
+* 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name ="CONFIGURATION")
+@IdClass(Configuration_PK.class)
+public class Configuration implements Serializable {
+    @Id
+    @Column(name = "CONFIG_KEY")
+    private String config_key;
+
+    @Id
+    @Column(name = "CONFIG_VAL")
+    private String config_val;
+
+    @Id
+    @Column(name = "CATEGORY_ID")
+    private String category_id;
+
+    @Column(name = "EXPIRE_DATE")
+    private Timestamp expire_date;
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+    public Timestamp getExpire_date() {
+        return expire_date;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+
+    public void setExpire_date(Timestamp expire_date) {
+        this.expire_date = expire_date;
+    }
+
+    public String getCategory_id() {
+        return category_id;
+    }
+
+    public void setCategory_id(String category_id) {
+        this.category_id = category_id;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
new file mode 100644
index 0000000..b58fd71
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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.model;
+
+import java.io.Serializable;
+
+public class Configuration_PK implements Serializable {
+    private String config_key;
+    private String config_val;
+    private String category_id;
+
+    public Configuration_PK(String config_key, String config_val, String category_id) {
+        this.config_key = config_key;
+        this.config_val = config_val;
+        this.category_id = category_id;
+    }
+
+    public Configuration_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+    public String getCategory_id() {
+        return category_id;
+    }
+
+    public void setCategory_id(String category_id) {
+        this.category_id = category_id;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
new file mode 100644
index 0000000..95ad0e9
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
@@ -0,0 +1,88 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "DATA_TRANSFER_DETAIL")
+public class DataTransferDetail implements Serializable {
+    @Id
+    @Column(name = "TRANSFER_ID")
+    private String transferId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Lob
+    @Column(name = "TRANSFER_DESC")
+    private char[] transferDesc;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public String getTransferId() {
+        return transferId;
+    }
+
+    public void setTransferId(String transferId) {
+        this.transferId = transferId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public char[] getTransferDesc() {
+        return transferDesc;
+    }
+
+    public void setTransferDesc(char[] transferDesc) {
+        this.transferDesc = transferDesc;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
new file mode 100644
index 0000000..28d393f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
@@ -0,0 +1,196 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "ERROR_DETAIL")
+public class ErrorDetail implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "ERROR_ID")
+    private int errorID;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "NODE_INSTANCE_ID")
+    private String nodeId;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Lob
+    @Column(name = "ACTUAL_ERROR_MESSAGE")
+    private char[] actualErrorMsg;
+    
+    @Column(name = "USER_FRIEDNLY_ERROR_MSG")
+    private String userFriendlyErrorMsg;
+    @Column(name = "TRANSIENT_OR_PERSISTENT")
+    private boolean transientPersistent;
+    @Column(name = "ERROR_CATEGORY")
+    private String errorCategory;
+    @Column(name = "CORRECTIVE_ACTION")
+    private String correctiveAction;
+    @Column(name = "ACTIONABLE_GROUP")
+    private String actionableGroup;
+    @Column(name = "JOB_ID")
+    private String jobId;
+
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "NODE_INSTANCE_ID")
+    private WorkflowNodeDetail nodeDetails;
+
+    public int getErrorId() {
+        return errorID;
+    }
+
+    public void setErrorId(int errorID) {
+        this.errorID = errorID;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public char[] getActualErrorMsg() {
+		return actualErrorMsg;
+	}
+
+	public void setActualErrorMsg(char[] actualErrorMsg) {
+		this.actualErrorMsg = actualErrorMsg;
+	}
+
+	public String getUserFriendlyErrorMsg() {
+        return userFriendlyErrorMsg;
+    }
+
+    public void setUserFriendlyErrorMsg(String userFriendlyErrorMsg) {
+        this.userFriendlyErrorMsg = userFriendlyErrorMsg;
+    }
+
+    public boolean isTransientPersistent() {
+        return transientPersistent;
+    }
+
+    public void setTransientPersistent(boolean transientPersistent) {
+        this.transientPersistent = transientPersistent;
+    }
+
+    public String getErrorCategory() {
+        return errorCategory;
+    }
+
+    public void setErrorCategory(String errorCategory) {
+        this.errorCategory = errorCategory;
+    }
+
+    public String getActionableGroup() {
+        return actionableGroup;
+    }
+
+    public void setActionableGroup(String actionableGroup) {
+        this.actionableGroup = actionableGroup;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+
+    public WorkflowNodeDetail getNodeDetails() {
+        return nodeDetails;
+    }
+
+    public void setNodeDetails(WorkflowNodeDetail nodeDetails) {
+        this.nodeDetails = nodeDetails;
+    }
+
+    public String getCorrectiveAction() {
+        return correctiveAction;
+    }
+
+    public void setCorrectiveAction(String correctiveAction) {
+        this.correctiveAction = correctiveAction;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
new file mode 100644
index 0000000..1c2d430
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
@@ -0,0 +1,211 @@
+/*
+*
+* 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@Entity
+@Table(name = "EXPERIMENT")
+@DataCache
+public class Experiment implements Serializable {
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "GATEWAY_ID")
+    private String gatewayId;
+    @Column(name = "EXECUTION_USER")
+    private String executionUser;
+    @Column(name = "PROJECT_ID")
+    private String projectID;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Column(name = "EXPERIMENT_NAME")
+    private String expName;
+    @Column(name = "EXPERIMENT_DESCRIPTION")
+    private String expDesc;
+    @Column(name = "APPLICATION_ID")
+    private String applicationId;
+    @Column(name = "APPLICATION_VERSION")
+    private String appVersion;
+    @Column(name = "WORKFLOW_TEMPLATE_ID")
+    private String workflowTemplateId;
+    @Column(name = "WORKFLOW_TEMPLATE_VERSION")
+    private String workflowTemplateVersion;
+    @Column(name = "WORKFLOW_EXECUTION_ID")
+    private String workflowExecutionId;
+    @Column(name = "ALLOW_NOTIFICATION")
+    private boolean allowNotification;
+    @Column(name = "GATEWAY_EXECUTION_ID")
+    private String gatewayExecutionId;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "GATEWAY_ID")
+    private Gateway gateway;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "PROJECT_ID")
+    private Project project;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "EXECUTION_USER", referencedColumnName = "USER_NAME")
+    private Users user;
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getExecutionUser() {
+        return executionUser;
+    }
+
+    public void setExecutionUser(String executionUser) {
+        this.executionUser = executionUser;
+    }
+
+    public String getProjectId() {
+        return projectID;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectID = projectId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getExpName() {
+        return expName;
+    }
+
+    public void setExpName(String expName) {
+        this.expName = expName;
+    }
+
+    public String getExpDesc() {
+        return expDesc;
+    }
+
+    public void setExpDesc(String expDesc) {
+        this.expDesc = expDesc;
+    }
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public String getAppVersion() {
+        return appVersion;
+    }
+
+    public void setAppVersion(String appVersion) {
+        this.appVersion = appVersion;
+    }
+
+    public String getWorkflowTemplateId() {
+        return workflowTemplateId;
+    }
+
+    public void setWorkflowTemplateId(String workflowTemplateId) {
+        this.workflowTemplateId = workflowTemplateId;
+    }
+
+    public String getWorkflowTemplateVersion() {
+        return workflowTemplateVersion;
+    }
+
+    public void setWorkflowTemplateVersion(String workflowTemplateVersion) {
+        this.workflowTemplateVersion = workflowTemplateVersion;
+    }
+
+    public String getWorkflowExecutionId() {
+        return workflowExecutionId;
+    }
+
+    public void setWorkflowExecutionId(String workflowExecutionId) {
+        this.workflowExecutionId = workflowExecutionId;
+    }
+
+    public Gateway getGateway() {
+        return gateway;
+    }
+
+    public void setGateway(Gateway gateway) {
+        this.gateway = gateway;
+    }
+
+    public Project getProject() {
+        return project;
+    }
+
+    public void setProject(Project project) {
+        this.project = project;
+    }
+
+    public Users getUser() {
+        return user;
+    }
+
+    public void setUser(Users user) {
+        this.user = user;
+    }
+
+    public boolean isAllowNotification() {
+        return allowNotification;
+    }
+
+    public void setAllowNotification(boolean allowNotification) {
+        this.allowNotification = allowNotification;
+    }
+
+    public String getGatewayExecutionId() {
+        return gatewayExecutionId;
+    }
+
+    public void setGatewayExecutionId(String gatewayExecutionId) {
+        this.gatewayExecutionId = gatewayExecutionId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
new file mode 100644
index 0000000..63e91ad
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
@@ -0,0 +1,106 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "CONFIG_DATA")
+public class ExperimentConfigData implements Serializable {
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "AIRAVATA_AUTO_SCHEDULE")
+    private boolean airavataAutoSchedule;
+    @Column(name = "OVERRIDE_MANUAL_SCHEDULE_PARAMS")
+    private boolean overrideManualParams;
+    @Column(name = "SHARE_EXPERIMENT")
+    private boolean shareExp;
+    @Column(name = "USER_DN")
+    private String userDn;
+    @Column(name = "GENERATE_CERT")
+    private boolean generateCert;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public boolean isAiravataAutoSchedule() {
+        return airavataAutoSchedule;
+    }
+
+    public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
+        this.airavataAutoSchedule = airavataAutoSchedule;
+    }
+
+    public boolean isOverrideManualParams() {
+        return overrideManualParams;
+    }
+
+    public void setOverrideManualParams(boolean overrideManualParams) {
+        this.overrideManualParams = overrideManualParams;
+    }
+
+    public boolean isShareExp() {
+        return shareExp;
+    }
+
+    public void setShareExp(boolean shareExp) {
+        this.shareExp = shareExp;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public String getUserDn() {
+        return userDn;
+    }
+
+    public void setUserDn(String userDn) {
+        this.userDn = userDn;
+    }
+
+    public boolean isGenerateCert() {
+        return generateCert;
+    }
+
+    public void setGenerateCert(boolean generateCert) {
+        this.generateCert = generateCert;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
new file mode 100644
index 0000000..e8c5087
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
@@ -0,0 +1,178 @@
+/*
+ *
+ * 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.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name ="EXPERIMENT_INPUT")
+@IdClass(Experiment_Input_PK.class)
+public class Experiment_Input implements Serializable {
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    private String experiment_id;
+
+    @Id
+    @Column(name = "INPUT_KEY")
+    private String ex_key;
+
+    @Lob
+    @Column(name = "VALUE")
+    private char[] value;
+
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+
+    @Column(name = "APP_ARGUMENT")
+    private String appArgument;
+
+    @Column(name = "STANDARD_INPUT")
+    private boolean standardInput;
+
+    @Column(name = "USER_FRIENDLY_DESC")
+    private String userFriendlyDesc;
+
+    @Column(name = "METADATA")
+    private String metadata;
+
+    @Column(name = "INPUT_ORDER")
+    private int inputOrder;
+
+    @Column(name="IS_REQUIRED")
+    private boolean isRequired;
+    @Column(name="REQUIRED_TO_COMMANDLINE")
+    private boolean requiredToCMD;
+    @Column(name = "DATA_STAGED")
+    private boolean dataStaged;
+
+    @ManyToOne
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public String getExperiment_id() {
+        return experiment_id;
+    }
+
+    public void setExperiment_id(String experiment_id) {
+        this.experiment_id = experiment_id;
+    }
+
+    public String getEx_key() {
+        return ex_key;
+    }
+
+    public void setEx_key(String ex_key) {
+        this.ex_key = ex_key;
+    }
+
+    public char[] getValue() {
+        return value;
+    }
+
+    public void setValue(char[] value) {
+        this.value = value;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public String getMetadata() {
+        return metadata;
+    }
+
+    public void setMetadata(String metadata) {
+        this.metadata = metadata;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    public boolean isRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean isRequired) {
+        this.isRequired = isRequired;
+    }
+
+    public boolean isRequiredToCMD() {
+        return requiredToCMD;
+    }
+
+    public void setRequiredToCMD(boolean requiredToCMD) {
+        this.requiredToCMD = requiredToCMD;
+    }
+
+    public boolean isDataStaged() {
+        return dataStaged;
+    }
+
+    public void setDataStaged(boolean dataStaged) {
+        this.dataStaged = dataStaged;
+    }
+}


Mime
View raw message