airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [1/2] removing app catalog database from previous registry
Date Tue, 22 Jul 2014 16:51:34 GMT
Repository: airavata
Updated Branches:
  refs/heads/master d5b1b2d97 -> 10103a445


http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
index a4a3482..34aa67e 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
@@ -108,19 +108,6 @@ public class GatewayResource extends AbstractResource {
                 UserWorkflowResource userWorkflowResource = new UserWorkflowResource();
                 userWorkflowResource.setGateway(this);
                 return userWorkflowResource;
-            case HOST_DESCRIPTOR:
-                HostDescriptorResource hostDescriptorResource = new HostDescriptorResource();
-                hostDescriptorResource.setGatewayName(gatewayName);
-                return hostDescriptorResource;
-            case SERVICE_DESCRIPTOR:
-                ServiceDescriptorResource serviceDescriptorResource = new ServiceDescriptorResource();
-                serviceDescriptorResource.setGatewayName(gatewayName);
-                return serviceDescriptorResource;
-            case APPLICATION_DESCRIPTOR:
-                ApplicationDescriptorResource applicationDescriptorResource =
-                        new ApplicationDescriptorResource();
-                applicationDescriptorResource.setGatewayName(gatewayName);
-                return applicationDescriptorResource;
             case EXPERIMENT:
                 ExperimentResource experimentResource =new ExperimentResource();
                 experimentResource.setGateway(this);
@@ -161,33 +148,12 @@ public class GatewayResource extends AbstractResource {
                     q = generator.deleteQuery(em);
                     q.executeUpdate();
                     break;
-                case HOST_DESCRIPTOR:
-                    generator = new QueryGenerator(HOST_DESCRIPTOR);
-                    generator.setParameter(HostDescriptorConstants.HOST_DESC_ID, name);
-                    generator.setParameter(HostDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case SERVICE_DESCRIPTOR:
-                    generator = new QueryGenerator(SERVICE_DESCRIPTOR);
-                    generator.setParameter(ServiceDescriptorConstants.SERVICE_DESC_ID, name);
-                    generator.setParameter(ServiceDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
                 case EXPERIMENT:
                     generator = new QueryGenerator(EXPERIMENT);
                     generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
                     q = generator.deleteQuery(em);
                     q.executeUpdate();
                     break;
-                case APPLICATION_DESCRIPTOR:
-                    generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
-                    generator.setParameter(ApplicationDescriptorConstants.APPLICATION_DESC_ID, name);
-                    generator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
                 default:
                     logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
                     break;
@@ -253,17 +219,6 @@ public class GatewayResource extends AbstractResource {
                     em.getTransaction().commit();
                     em.close();
                     return publishWorkflowResource;
-                case HOST_DESCRIPTOR:
-                    generator = new QueryGenerator(HOST_DESCRIPTOR);
-                    generator.setParameter(HostDescriptorConstants.HOST_DESC_ID, name);
-                    generator.setParameter(HostDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.selectQuery(em);
-                    Host_Descriptor eHostDesc = (Host_Descriptor) q.getSingleResult();
-                    HostDescriptorResource hostDescriptorResource =
-                            (HostDescriptorResource) Utils.getResource(ResourceType.HOST_DESCRIPTOR, eHostDesc);
-                    em.getTransaction().commit();
-                    em.close();
-                    return hostDescriptorResource;
                 case EXPERIMENT:
                     generator = new QueryGenerator(EXPERIMENT);
                     generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
@@ -274,28 +229,6 @@ public class GatewayResource extends AbstractResource {
                     em.getTransaction().commit();
                     em.close();
                     return experimentResource;
-                case SERVICE_DESCRIPTOR:
-                    generator = new QueryGenerator(SERVICE_DESCRIPTOR);
-                    generator.setParameter(ServiceDescriptorConstants.SERVICE_DESC_ID, name);
-                    generator.setParameter(ServiceDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.selectQuery(em);
-                    Service_Descriptor eServiceDesc = (Service_Descriptor) q.getSingleResult();
-                    ServiceDescriptorResource serviceDescriptorResource =
-                            (ServiceDescriptorResource) Utils.getResource(ResourceType.SERVICE_DESCRIPTOR, eServiceDesc);
-                    em.getTransaction().commit();
-                    em.close();
-                    return serviceDescriptorResource;
-                case APPLICATION_DESCRIPTOR:
-                    generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
-                    generator.setParameter(ApplicationDescriptorConstants.APPLICATION_DESC_ID, name);
-                    generator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.selectQuery(em);
-                    Application_Descriptor eAppDesc = (Application_Descriptor) q.getSingleResult();
-                    ApplicationDescriptorResource applicationDescriptorResource =
-                            (ApplicationDescriptorResource) Utils.getResource(ResourceType.APPLICATION_DESCRIPTOR, eAppDesc);
-                    em.getTransaction().commit();
-                    em.close();
-                    return applicationDescriptorResource;
                 default:
                     em.getTransaction().commit();
                     em.close();
@@ -373,48 +306,6 @@ public class GatewayResource extends AbstractResource {
                         }
                     }
                     break;
-                case HOST_DESCRIPTOR:
-                    generator = new QueryGenerator(HOST_DESCRIPTOR);
-                    generator.setParameter(HostDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Host_Descriptor hostDescriptor = (Host_Descriptor) result;
-                            HostDescriptorResource hostDescriptorResource =
-                                    (HostDescriptorResource) Utils.getResource(ResourceType.HOST_DESCRIPTOR, hostDescriptor);
-                            resourceList.add(hostDescriptorResource);
-                        }
-                    }
-                    break;
-                case SERVICE_DESCRIPTOR:
-                    generator = new QueryGenerator(SERVICE_DESCRIPTOR);
-                    generator.setParameter(ServiceDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Service_Descriptor serviceDescriptor = (Service_Descriptor) result;
-                            ServiceDescriptorResource serviceDescriptorResource =
-                                    (ServiceDescriptorResource) Utils.getResource(ResourceType.SERVICE_DESCRIPTOR, serviceDescriptor);
-                            resourceList.add(serviceDescriptorResource);
-                        }
-                    }
-                    break;
-                case APPLICATION_DESCRIPTOR:
-                    generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
-                    generator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Application_Descriptor applicationDescriptor = (Application_Descriptor) result;
-                            ApplicationDescriptorResource applicationDescriptorResource =
-                                    (ApplicationDescriptorResource) Utils.getResource(ResourceType.APPLICATION_DESCRIPTOR, applicationDescriptor);
-                            resourceList.add(applicationDescriptorResource);
-                        }
-                    }
-                    break;
                 case EXPERIMENT:
                     generator = new QueryGenerator(EXPERIMENT);
                     generator.setParameter(ExperimentConstants.GATEWAY_NAME, gatewayName);
@@ -524,21 +415,6 @@ public class GatewayResource extends AbstractResource {
                     em.close();
                     boolean a = existingWf != null;
                     return existingWf != null;
-                case HOST_DESCRIPTOR:
-                    em = ResourceUtils.getEntityManager();
-                    Host_Descriptor existingHostDesc = em.find(Host_Descriptor.class, new Host_Descriptor_PK(gatewayName, name.toString()));
-                    em.close();
-                    return existingHostDesc != null;
-                case SERVICE_DESCRIPTOR:
-                    em = ResourceUtils.getEntityManager();
-                    Service_Descriptor existingServiceDesc = em.find(Service_Descriptor.class, new Service_Descriptor_PK(gatewayName, name.toString()));
-                    em.close();
-                    return existingServiceDesc != null;
-                case APPLICATION_DESCRIPTOR:
-                    em = ResourceUtils.getEntityManager();
-                    Application_Descriptor existingAppDesc = em.find(Application_Descriptor.class, new Application_Descriptor_PK(gatewayName, name.toString()));
-                    em.close();
-                    return existingAppDesc != null;
                 case EXPERIMENT:
                     em = ResourceUtils.getEntityManager();
                     Experiment existingExp = em.find(Experiment.class, name.toString());
@@ -563,215 +439,6 @@ public class GatewayResource extends AbstractResource {
 
     /**
      *
-     * @param descriptorName host descriptor name
-     * @return whether host descriptor already available
-     */
-    public boolean isHostDescriptorExists(String descriptorName) throws RegistryException{
-    	return isExists(ResourceType.HOST_DESCRIPTOR, descriptorName);
-    }
-
-    /**
-     *
-     * @param hostDescriptorName host descriptor name
-     * @return HostDescriptorResource
-     */
-    public HostDescriptorResource createHostDescriptorResource(String hostDescriptorName) throws RegistryException{
-    	HostDescriptorResource hdr = (HostDescriptorResource)create(ResourceType.HOST_DESCRIPTOR);
-    	hdr.setHostDescName(hostDescriptorName);
-    	return hdr;
-    }
-
-    /**
-     *
-     * @param hostDescriptorName host descriptor name
-     * @return HostDescriptorResource
-     */
-    public HostDescriptorResource getHostDescriptorResource(String hostDescriptorName) throws RegistryException{
-    	return (HostDescriptorResource)get(ResourceType.HOST_DESCRIPTOR,hostDescriptorName);
-    }
-
-    /**
-     *
-     * @param descriptorName host descriptor name
-     */
-    public void removeHostDescriptor(String descriptorName) throws RegistryException{
-    	remove(ResourceType.HOST_DESCRIPTOR, descriptorName);
-    }
-
-    /**
-     *
-     * @return list of host descriptors available for the gateway
-     */
-    public List<HostDescriptorResource> getHostDescriptorResources() throws RegistryException{
-    	List<HostDescriptorResource> results=new ArrayList<HostDescriptorResource>();
-    	List<Resource> list = get(ResourceType.HOST_DESCRIPTOR);
-    	for (Resource resource : list) {
-    		results.add((HostDescriptorResource) resource);
-		}
-    	return results;
-    }
-
-    /**
-     *
-     * @param descriptorName service descriptor name
-     * @return whether service descriptor already available
-     */
-    public boolean isServiceDescriptorExists(String descriptorName) throws RegistryException{
-    	return isExists(ResourceType.SERVICE_DESCRIPTOR, descriptorName);
-    }
-
-    /**
-     *
-     * @param descriptorName  service descriptor name
-     * @return  ServiceDescriptorResource
-     */
-    public ServiceDescriptorResource createServiceDescriptorResource(String descriptorName) throws RegistryException{
-    	ServiceDescriptorResource hdr = (ServiceDescriptorResource)create(ResourceType.SERVICE_DESCRIPTOR);
-    	hdr.setServiceDescName(descriptorName);
-    	return hdr;
-    }
-
-    /**
-     *
-     * @param descriptorName   service descriptor name
-     * @return ServiceDescriptorResource
-     */
-    public ServiceDescriptorResource getServiceDescriptorResource(String descriptorName) throws RegistryException{
-    	return (ServiceDescriptorResource)get(ResourceType.SERVICE_DESCRIPTOR,descriptorName);
-    }
-
-    /**
-     *
-     * @param descriptorName Service descriptor name
-     */
-    public void removeServiceDescriptor(String descriptorName) throws RegistryException{
-    	remove(ResourceType.SERVICE_DESCRIPTOR, descriptorName);
-    }
-
-    /**
-     *
-     * @return list of service descriptors for the gateway
-     */
-    public List<ServiceDescriptorResource> getServiceDescriptorResources() throws RegistryException{
-    	List<ServiceDescriptorResource> results=new ArrayList<ServiceDescriptorResource>();
-    	List<Resource> list = get(ResourceType.SERVICE_DESCRIPTOR);
-    	for (Resource resource : list) {
-    		results.add((ServiceDescriptorResource) resource);
-		}
-    	return results;
-    }
-
-    /**
-     *
-     * @param descriptorName application descriptor name
-     * @return  whether application descriptor already available
-     */
-    public boolean isApplicationDescriptorExists(String descriptorName) throws RegistryException{
-    	return isExists(ResourceType.APPLICATION_DESCRIPTOR, descriptorName);
-    }
-
-    /**
-     *
-     * @param descriptorName  application descriptor name
-     * @return ApplicationDescriptorResource
-     */
-    public ApplicationDescriptorResource createApplicationDescriptorResource(String descriptorName) throws RegistryException{
-    	ApplicationDescriptorResource hdr = (ApplicationDescriptorResource)create(ResourceType.APPLICATION_DESCRIPTOR);
-    	hdr.setName(descriptorName);
-    	return hdr;
-    }
-
-    /**
-     *
-     * @param descriptorName application descriptor name
-     * @return ApplicationDescriptorResource
-     */
-    public ApplicationDescriptorResource getApplicationDescriptorResource(String descriptorName) throws RegistryException{
-    	return (ApplicationDescriptorResource)get(ResourceType.APPLICATION_DESCRIPTOR,descriptorName);
-    }
-
-    /**
-     *
-     * @param descriptorName  application descriptor name
-     */
-    public void removeApplicationDescriptor(String descriptorName) throws RegistryException{
-    	remove(ResourceType.APPLICATION_DESCRIPTOR, descriptorName);
-    }
-
-    /**
-     *
-     * @return list of application descriptors for the gateway
-     */
-    public List<ApplicationDescriptorResource> getApplicationDescriptorResources() throws RegistryException{
-    	List<ApplicationDescriptorResource> results=new ArrayList<ApplicationDescriptorResource>();
-    	List<Resource> list = get(ResourceType.APPLICATION_DESCRIPTOR);
-    	for (Resource resource : list) {
-    		results.add((ApplicationDescriptorResource) resource);
-		}
-    	return results;
-    }
-
-    /**
-     *
-     * @param serviceName service descriptor name
-     * @param hostName host descriptor name
-     * @return  list of application descriptors for the gateway
-     */
-    public List<ApplicationDescriptorResource> getApplicationDescriptorResources(String serviceName,String hostName) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            String qString = "SELECT p FROM Application_Descriptor p WHERE " +
-                    "p.gateway_name =:gate_name";
-            if (hostName != null) {
-                qString += " and p.host_descriptor_ID =:host_name";
-            }
-            if (serviceName != null) {
-                qString += " and p.service_descriptor_ID =:service_name";
-            }
-            Query q = em.createQuery(qString);
-            q.setParameter("gate_name", gatewayName);
-            if (serviceName != null) {
-                q.setParameter("service_name", serviceName);
-            }
-            if (hostName != null) {
-                q.setParameter("host_name", hostName);
-            }
-            List<?> results = q.getResultList();
-            List<ApplicationDescriptorResource> resourceList = new ArrayList<ApplicationDescriptorResource>();
-            if (results.size() != 0) {
-                for (Object result : results) {
-                    Application_Descriptor applicationDescriptor = (Application_Descriptor) result;
-                    ApplicationDescriptorResource applicationDescriptorResource =
-                            new ApplicationDescriptorResource(
-                                    applicationDescriptor.getApplication_descriptor_ID(),
-                                    applicationDescriptor.getGateway().getGateway_name());
-                    applicationDescriptorResource.setContent(new String(applicationDescriptor.getApplication_descriptor_xml()));
-                    applicationDescriptorResource.setUpdatedUser(applicationDescriptor.getUser().getUser_name());
-                    applicationDescriptorResource.setHostDescName(applicationDescriptor.getHost_descriptor_ID());
-                    applicationDescriptorResource.setServiceDescName(applicationDescriptor.getService_descriptor_ID());
-                    resourceList.add(applicationDescriptorResource);
-                }
-            }
-            em.getTransaction().commit();
-            em.close();
-            return resourceList;
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
      * @param workflowTemplateName published workflow template name
      * @return boolean - whether workflow with the same name exists
      */

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java
deleted file mode 100644
index 7ef4088..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/HostDescriptorResource.java
+++ /dev/null
@@ -1,257 +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.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.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.util.ArrayList;
-import java.util.List;
-
-public class HostDescriptorResource extends AbstractResource {
-    private final static Logger logger = LoggerFactory.getLogger(HostDescriptorResource.class);
-    private String hostDescName;
-    private String gatewayName;
-    private String userName;
-    private String content;
-
-    /**
-     *
-     */
-    public HostDescriptorResource() {
-    }
-
-    /**
-     *
-     * @return user name
-     */
-    public String getUserName() {
-        return userName;
-    }
-
-    /**
-     *
-     * @param userName user name
-     */
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    /**
-     *
-     * @return  host descriptor name
-     */
-    public String getHostDescName() {
-        return hostDescName;
-    }
-
-    /**
-     *
-     * @return gateway name
-     */
-    public String getGatewayName() {
-        return gatewayName;
-    }
-
-    /**
-     *
-     * @return  content of the host descriptor
-     */
-    public String getContent() {
-        return content;
-    }
-
-    /**
-     *
-     * @param gatewayName gateway name
-     */
-    public void setGatewayName(String gatewayName) {
-        this.gatewayName = gatewayName;
-    }
-
-    /**
-     *
-     * @param content content of the host descriptor
-     */
-    public void setContent(String content) {
-        this.content = content;
-    }
-
-    /**
-     * Host descriptor can create an application descriptor
-     * @param type child resource type
-     * @return child resource
-     */
-    public Resource create(ResourceType type) throws RegistryException {
-        if (type == ResourceType.APPLICATION_DESCRIPTOR) {
-            ApplicationDescriptorResource applicationDescriptorResource = new ApplicationDescriptorResource();
-            applicationDescriptorResource.setGatewayName(gatewayName);
-            applicationDescriptorResource.setHostDescName(getHostDescName());
-            return applicationDescriptorResource;
-        }else{
-            logger.error("Unsupported resource type for host descriptor resource.", new IllegalArgumentException());
-            throw new IllegalArgumentException("Unsupported resource type for host descriptor resource.");
-        }
-
-    }
-
-    /**
-     * Host descriptor by alone cannot remove any other resource types
-     * @param type child resource type
-     * @param name child resource name
-     */
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for host descriptor resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Host descriptor by alone cannot get any other resource types
-     * @param type child resource type
-     * @param name child resource name
-     * @return UnsupportedOperationException
-     */
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for host descriptor resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-
-    /**
-     * Host descriptors can get a list of application descriptors
-     * @param type child resource type
-     * @return list of child resources
-     */
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            if (type == ResourceType.APPLICATION_DESCRIPTOR) {
-                em = ResourceUtils.getEntityManager();
-                em.getTransaction().begin();
-                QueryGenerator generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
-                generator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
-                generator.setParameter(ApplicationDescriptorConstants.HOST_DESC_ID, getHostDescName());
-                Query q = generator.selectQuery(em);
-                List results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        Application_Descriptor applicationDescriptor = (Application_Descriptor) result;
-                        ApplicationDescriptorResource applicationDescriptorResource =
-                                (ApplicationDescriptorResource) Utils.getResource(
-                                        ResourceType.APPLICATION_DESCRIPTOR, applicationDescriptor);
-                        resourceList.add(applicationDescriptorResource);
-                    }
-                }
-                em.getTransaction().commit();
-                em.close();
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    /**
-     * save host descriptor to the database
-     */
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Host_Descriptor existingHost_desc = em.find(Host_Descriptor.class, new Host_Descriptor_PK(gatewayName, hostDescName));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Host_Descriptor hostDescriptor = new Host_Descriptor();
-            Gateway existingGateway = em.find(Gateway.class, gatewayName);
-            Users existingUser = em.find(Users.class, userName);
-//            Gateway gateway = new Gateway();
-//            gateway.setGateway_name(gatewayName);
-//            Users user = new Users();
-//            user.setUser_name(userName);
-            hostDescriptor.setHost_descriptor_ID(getHostDescName());
-            hostDescriptor.setGateway(existingGateway);
-            hostDescriptor.setGateway_name(existingGateway.getGateway_name());
-            byte[] contentBytes = content.getBytes();
-            hostDescriptor.setHost_descriptor_xml(contentBytes);
-            hostDescriptor.setUser(existingUser);
-            if (existingHost_desc != null) {
-                existingHost_desc.setGateway(existingGateway);
-                existingHost_desc.setGateway_name(existingGateway.getGateway_name());
-                existingHost_desc.setUser(existingUser);
-                existingHost_desc.setHost_descriptor_xml(contentBytes);
-                hostDescriptor = em.merge(existingHost_desc);
-            } else {
-                em.persist(hostDescriptor);
-            }
-
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @param name child resource name
-     * @return boolean whether the child resource already exists
-     */
-    public boolean isExists(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for host descriptor resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     *
-     * @param hostDescName host descriptor name
-     */
-    public void setHostDescName(String hostDescName) {
-		this.hostDescName = hostDescName;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.java
deleted file mode 100644
index 65e29b3..0000000
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.java
+++ /dev/null
@@ -1,185 +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.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.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.airavata.registry.cpi.RegistryException;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ServiceDescriptorResource extends AbstractResource {
-    private final static Logger logger = LoggerFactory.getLogger(ServiceDescriptorResource.class);
-    private String serviceDescName;
-    private String gatewayName;
-    private String userName;
-    private String content;
-
-    public ServiceDescriptorResource() {
-
-    }
-
-    public String getGatewayName() {
-        return gatewayName;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setGatewayName(String gatewayName) {
-        this.gatewayName = gatewayName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getServiceDescName() {
-        return serviceDescName;
-    }
-
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-
-    public Resource create(ResourceType type) throws RegistryException{
-        if (type == ResourceType.APPLICATION_DESCRIPTOR) {
-            ApplicationDescriptorResource applicationDescriptorResource = new ApplicationDescriptorResource();
-            applicationDescriptorResource.setGatewayName(gatewayName);
-            applicationDescriptorResource.setHostDescName(getServiceDescName());
-            return applicationDescriptorResource;
-        }
-        logger.error("Unsupported resource type for service descriptor resource.", new IllegalArgumentException());
-        throw new IllegalArgumentException("Unsupported resource type for service descriptor resource.");
-    }
-
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for service descriptor resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for service descriptor resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            if (type == ResourceType.APPLICATION_DESCRIPTOR) {
-                em = ResourceUtils.getEntityManager();
-                em.getTransaction().begin();
-                QueryGenerator queryGenerator = new QueryGenerator(APPLICATION_DESCRIPTOR);
-                queryGenerator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
-                queryGenerator.setParameter(ApplicationDescriptorConstants.SERVICE_DESC_ID, serviceDescName);
-                Query q = queryGenerator.selectQuery(em);
-                List results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        Application_Descriptor applicationDescriptor = (Application_Descriptor) result;
-                        ApplicationDescriptorResource applicationDescriptorResource = (ApplicationDescriptorResource) Utils.getResource(ResourceType.APPLICATION_DESCRIPTOR, applicationDescriptor);
-                        resourceList.add(applicationDescriptorResource);
-                    }
-                }
-                em.getTransaction().commit();
-                em.close();
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Service_Descriptor existingServiceDesc = em.find(Service_Descriptor.class, new Service_Descriptor_PK(gatewayName, serviceDescName));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Service_Descriptor serviceDescriptor = new Service_Descriptor();
-            serviceDescriptor.setService_descriptor_ID(getServiceDescName());
-            Gateway gateway = em.find(Gateway.class, gatewayName);
-            serviceDescriptor.setGateway(gateway);
-            serviceDescriptor.setGateway_name(gateway.getGateway_name());
-            byte[] bytes = content.getBytes();
-            serviceDescriptor.setService_descriptor_xml(bytes);
-            Users user = em.find(Users.class, userName);
-            serviceDescriptor.setUser(user);
-            if (existingServiceDesc != null) {
-                existingServiceDesc.setUser(user);
-                existingServiceDesc.setService_descriptor_xml(bytes);
-                existingServiceDesc.setGateway(gateway);
-                existingServiceDesc.setGateway_name(gateway.getGateway_name());
-                serviceDescriptor = em.merge(existingServiceDesc);
-            } else {
-                em.persist(serviceDescriptor);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-
-    }
-
-    public boolean isExists(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for service descriptor resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-	public void setServiceDescName(String serviceDescName) {
-		this.serviceDescName = serviceDescName;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
index 575d5f0..3218ecd 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -184,13 +184,6 @@ public class Utils {
                     logger.error("Object should be a Configuration.", new IllegalArgumentException());
                     throw new IllegalArgumentException("Object should be a Configuration.");
                 }
-            case APPLICATION_DESCRIPTOR:
-                if (o instanceof Application_Descriptor){
-                    return createApplicationDescriptor((Application_Descriptor) o);
-                } else {
-                    logger.error("Object should be a Application Descriptor.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Application Descriptor.");
-                }
             case USER:
                 if(o instanceof Users) {
                     return createUser((Users) o);
@@ -198,20 +191,6 @@ public class Utils {
                     logger.error("Object should be a User.", new IllegalArgumentException());
                     throw new IllegalArgumentException("Object should be a User.");
                 }
-            case HOST_DESCRIPTOR:
-                if (o instanceof Host_Descriptor){
-                    return createHostDescriptor((Host_Descriptor) o);
-                }else {
-                    logger.error("Object should be a Host Descriptor.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Host Descriptor.");
-                }
-            case SERVICE_DESCRIPTOR:
-                if (o instanceof Service_Descriptor){
-                    return createServiceDescriptor((Service_Descriptor) o);
-                }else {
-                    logger.error("Object should be a Service Descriptor.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Service Descriptor.");
-                }
             case PUBLISHED_WORKFLOW:
                 if (o instanceof Published_Workflow){
                     return createPublishWorkflow((Published_Workflow) o);
@@ -429,26 +408,6 @@ public class Utils {
 
     /**
      *
-     * @param o application descriptor model object
-     * @return  application descriptor resource object
-     */
-    private static Resource createApplicationDescriptor(Application_Descriptor o) {
-        ApplicationDescriptorResource applicationDescriptorResource = new ApplicationDescriptorResource();
-        if (o != null){
-            applicationDescriptorResource.setName(o.getApplication_descriptor_ID());
-            applicationDescriptorResource.setHostDescName(o.getHost_descriptor_ID());
-            applicationDescriptorResource.setServiceDescName(o.getService_descriptor_ID());
-            applicationDescriptorResource.setContent(new String(o.getApplication_descriptor_xml()));
-            applicationDescriptorResource.setUpdatedUser(o.getUser().getUser_name());
-            applicationDescriptorResource.setGatewayName(o.getGateway().getGateway_name());
-        }
-        return applicationDescriptorResource;
-    }
-
-
-
-    /**
-     *
      * @param o Gateway_Worker model object
      * @return  Gateway_Worker resource object
      */
@@ -463,29 +422,6 @@ public class Utils {
 
     /**
      *
-     * @param o Host_Descriptor model object
-     * @return  HostDescriptor resource object
-     */
-    private static Resource createHostDescriptor(Host_Descriptor o) {
-        if (o != null){
-            try {
-                HostDescriptorResource hostDescriptorResource = new HostDescriptorResource();
-                hostDescriptorResource.setGatewayName(o.getGateway().getGateway_name());
-                hostDescriptorResource.setUserName(o.getUser().getUser_name());
-                hostDescriptorResource.setHostDescName(o.getHost_descriptor_ID());
-                byte[] bytes = o.getHost_descriptor_xml();
-                hostDescriptorResource.setContent(new String(bytes));
-                return hostDescriptorResource;
-            } catch (Exception e) {
-                e.printStackTrace();
-                return null;
-            }
-        }
-        return null;
-    }
-
-    /**
-     *
      * @param o  Published_Workflow model object
      * @return  Published Workflow resource object
      */
@@ -507,23 +443,6 @@ public class Utils {
 
     /**
      *
-     * @param o Service_Descriptor model object
-     * @return ServiceDescriptor resource object
-     */
-    private static Resource createServiceDescriptor(Service_Descriptor o) {
-        ServiceDescriptorResource serviceDescriptorResource = new ServiceDescriptorResource();
-        if (o != null){
-            serviceDescriptorResource.setGatewayName(o.getGateway().getGateway_name());
-            serviceDescriptorResource.setUserName(o.getUser().getUser_name());
-            serviceDescriptorResource.setServiceDescName(o.getService_descriptor_ID());
-            serviceDescriptorResource.setContent(new String(o.getService_descriptor_xml()));
-        }
-
-        return serviceDescriptorResource;
-    }
-
-    /**
-     *
      * @param o User_Workflow model object
      * @return User_Workflow resource object
      */

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml b/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
index 39eea77..c5b9aec 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/META-INF/persistence.xml
@@ -31,9 +31,6 @@
         <class>org.apache.airavata.persistance.registry.jpa.model.ProjectUser</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Published_Workflow</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.User_Workflow</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Host_Descriptor</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Service_Descriptor</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Application_Descriptor</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Experiment</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Input</class>
         <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Output</class>

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
index 05c4667..9ed5ca9 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
@@ -101,41 +101,6 @@ CREATE TABLE USER_WORKFLOW
          FOREIGN KEY (OWNER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
 );
 
-CREATE TABLE HOST_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         HOST_DESCRIPTOR_ID VARCHAR(255),
-         HOST_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME, HOST_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE SERVICE_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         SERVICE_DESCRIPTOR_ID VARCHAR(255),
-         SERVICE_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME,SERVICE_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE APPLICATION_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         APPLICATION_DESCRIPTOR_ID VARCHAR(255),
-         HOST_DESCRIPTOR_ID VARCHAR(255),
-         SERVICE_DESCRIPTOR_ID VARCHAR(255),
-         APPLICATION_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME,APPLICATION_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
 CREATE TABLE EXPERIMENT
 (
         EXPERIMENT_ID VARCHAR(255),

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
index 9ada1ee..a30f093 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
@@ -101,41 +101,6 @@ CREATE TABLE USER_WORKFLOW
          FOREIGN KEY (OWNER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
 );
 
-CREATE TABLE HOST_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         HOST_DESCRIPTOR_ID VARCHAR(255),
-         HOST_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME, HOST_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE SERVICE_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         SERVICE_DESCRIPTOR_ID VARCHAR(255),
-         SERVICE_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME,SERVICE_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE APPLICATION_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         APPLICATION_DESCRIPTOR_ID VARCHAR(255),
-         HOST_DESCRIPTOR_ID VARCHAR(255),
-         SERVICE_DESCRIPTOR_ID VARCHAR(255),
-         APPLICATION_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME,APPLICATION_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
 CREATE TABLE EXPERIMENT
 (
         EXPERIMENT_ID VARCHAR(255),

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.java
deleted file mode 100644
index 0f2ee31..0000000
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.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.persistance.registry.jpa;
-
-import static org.junit.Assert.*;
-
-import org.apache.airavata.persistance.registry.jpa.resources.ApplicationDescriptorResource;
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.junit.After;
-import org.junit.Test;
-
-public class ApplicationDescriptorResourceTest extends AbstractResourceTest {
-    private GatewayResource gatewayResource;
-
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        gatewayResource = super.getGatewayResource();
-    }
-
-    @Test
-    public void testSave() throws Exception {
-        ApplicationDescriptorResource applicationDescriptorResouce = (ApplicationDescriptorResource) gatewayResource.create(ResourceType.APPLICATION_DESCRIPTOR);
-        applicationDescriptorResouce.setHostDescName("testHostDesc");
-        applicationDescriptorResouce.setServiceDescName("testServiceDesc");
-        applicationDescriptorResouce.setName("testAppDesc");
-        applicationDescriptorResouce.setContent("testContent");
-        applicationDescriptorResouce.setUpdatedUser("admin");
-        applicationDescriptorResouce.save();
-
-        assertTrue("application descriptor saved successfully", gatewayResource.isExists(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc"));
-
-        gatewayResource.remove(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc");
-    }
-
-    @After
-    public void tearDown() throws Exception {
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
index 80d29f9..0779418 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
@@ -38,9 +38,6 @@ public class GatewayResourceTest extends AbstractResourceTest {
     private WorkerResource workerResource;
     private PublishWorkflowResource publishWorkflowResource;
     private UserWorkflowResource userWorkflowResource;
-    private HostDescriptorResource hostDescriptorResource;
-    private ServiceDescriptorResource serviceDescriptorResource;
-    private ApplicationDescriptorResource applicationDescriptorResource;
     private ExperimentResource experimentResource;
 
 
@@ -63,28 +60,8 @@ public class GatewayResourceTest extends AbstractResourceTest {
 
         publishWorkflowResource = (PublishWorkflowResource) gatewayResource.create(ResourceType.PUBLISHED_WORKFLOW);
         userWorkflowResource = (UserWorkflowResource) gatewayResource.create(ResourceType.USER_WORKFLOW);
-        hostDescriptorResource = (HostDescriptorResource) gatewayResource.create(ResourceType.HOST_DESCRIPTOR);
-        serviceDescriptorResource = (ServiceDescriptorResource) gatewayResource.create(ResourceType.SERVICE_DESCRIPTOR);
-        applicationDescriptorResource = (ApplicationDescriptorResource) gatewayResource.create(ResourceType.APPLICATION_DESCRIPTOR);
         experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
 
-        hostDescriptorResource.setUserName(workerResource.getUser());
-        hostDescriptorResource.setHostDescName("testHostDesc");
-        hostDescriptorResource.setContent("testContent");
-        hostDescriptorResource.save();
-
-        serviceDescriptorResource.setUserName(workerResource.getUser());
-        serviceDescriptorResource.setServiceDescName("testServiceDesc");
-        serviceDescriptorResource.setContent("testContent");
-        serviceDescriptorResource.save();
-
-        applicationDescriptorResource.setHostDescName(hostDescriptorResource.getHostDescName());
-        applicationDescriptorResource.setServiceDescName(serviceDescriptorResource.getServiceDescName());
-        applicationDescriptorResource.setUpdatedUser(workerResource.getUser());
-        applicationDescriptorResource.setName("testAppDesc");
-        applicationDescriptorResource.setContent("testContent");
-        applicationDescriptorResource.save();
-
         userWorkflowResource.setName("workflow1");
         userWorkflowResource.setLastUpdateDate(currentDate);
         userWorkflowResource.setWorker(workerResource);
@@ -124,9 +101,6 @@ public class GatewayResourceTest extends AbstractResourceTest {
         assertNotNull("worker resource cannot be null", workerResource);
         assertNotNull("publish workflow resource cannot be null", publishWorkflowResource);
         assertNotNull("user workflow resource cannot be null", userWorkflowResource);
-        assertNotNull("host descriptor resource cannot be null", hostDescriptorResource);
-        assertNotNull("service descriptor resource cannot be null", serviceDescriptorResource);
-        assertNotNull("application descriptor resource cannot be null", applicationDescriptorResource);
         assertNotNull("experiment resource cannot be null", experimentResource);
     }
     
@@ -134,9 +108,6 @@ public class GatewayResourceTest extends AbstractResourceTest {
     public void testIsExists() throws Exception {
         assertTrue(gatewayResource.isExists(ResourceType.GATEWAY_WORKER, "admin"));
         assertTrue(gatewayResource.isExists(ResourceType.PUBLISHED_WORKFLOW, "pubworkflow1"));
-        assertTrue(gatewayResource.isExists(ResourceType.HOST_DESCRIPTOR, "testHostDesc"));
-        assertTrue(gatewayResource.isExists(ResourceType.SERVICE_DESCRIPTOR, "testServiceDesc"));
-        assertTrue(gatewayResource.isExists(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc"));
         assertTrue(gatewayResource.isExists(ResourceType.EXPERIMENT, "testExpID"));
     }
 
@@ -144,9 +115,6 @@ public class GatewayResourceTest extends AbstractResourceTest {
     public void testGet() throws Exception {
         assertNotNull(gatewayResource.get(ResourceType.GATEWAY_WORKER, "admin"));
         assertNotNull(gatewayResource.get(ResourceType.PUBLISHED_WORKFLOW, "pubworkflow1"));
-        assertNotNull(gatewayResource.get(ResourceType.HOST_DESCRIPTOR, "testHostDesc"));
-        assertNotNull(gatewayResource.get(ResourceType.SERVICE_DESCRIPTOR, "testServiceDesc"));
-        assertNotNull(gatewayResource.get(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc"));
         assertNotNull(gatewayResource.get(ResourceType.EXPERIMENT, "testExpID"));
     }
 
@@ -155,9 +123,6 @@ public class GatewayResourceTest extends AbstractResourceTest {
         assertNotNull(gatewayResource.get(ResourceType.GATEWAY_WORKER));
         assertNotNull(gatewayResource.get(ResourceType.PROJECT));
         assertNotNull(gatewayResource.get(ResourceType.PUBLISHED_WORKFLOW));
-        assertNotNull(gatewayResource.get(ResourceType.HOST_DESCRIPTOR));
-        assertNotNull(gatewayResource.get(ResourceType.SERVICE_DESCRIPTOR));
-        assertNotNull(gatewayResource.get(ResourceType.APPLICATION_DESCRIPTOR));
         assertNotNull(gatewayResource.get(ResourceType.EXPERIMENT));
     }
     
@@ -167,18 +132,9 @@ public class GatewayResourceTest extends AbstractResourceTest {
         gatewayResource.remove(ResourceType.PUBLISHED_WORKFLOW, "pubworkflow1");
         assertFalse(gatewayResource.isExists(ResourceType.PUBLISHED_WORKFLOW, "pubworkflow1"));
 
-        gatewayResource.remove(ResourceType.HOST_DESCRIPTOR, "testHostDesc");
-        assertFalse(gatewayResource.isExists(ResourceType.HOST_DESCRIPTOR, "testHostDesc"));
-
-        gatewayResource.remove(ResourceType.SERVICE_DESCRIPTOR, "testServiceDesc");
-        assertFalse(gatewayResource.isExists(ResourceType.SERVICE_DESCRIPTOR, "testServiceDesc"));
-
         gatewayResource.remove(ResourceType.EXPERIMENT, "testExpID");
         assertFalse(gatewayResource.isExists(ResourceType.EXPERIMENT, "testExpID"));
 
-        gatewayResource.remove(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc");
-        assertFalse(gatewayResource.isExists(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc"));
-
     }
 
     @After

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.java
deleted file mode 100644
index 4f5c6e5..0000000
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.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.persistance.registry.jpa;
-
-import static org.junit.Assert.*;
-
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.resources.HostDescriptorResource;
-import org.junit.After;
-import org.junit.Test;
-
-public class HostDescriptorResourceTest extends AbstractResourceTest {
-    private GatewayResource gatewayResource;
-    private HostDescriptorResource hostDescriptorResource;
-
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        gatewayResource = super.getGatewayResource();
-        hostDescriptorResource = gatewayResource.createHostDescriptorResource("testHostDesc");
-        hostDescriptorResource.setUserName("admin");
-        hostDescriptorResource.setContent("testContent");
-    }
-
-    @Test
-    public void testGetList() throws Exception {
-        assertNotNull("application data being retrieved successfully", hostDescriptorResource.get(ResourceType.APPLICATION_DESCRIPTOR));
-    }
-    @Test
-    public void testSave() throws Exception {
-        hostDescriptorResource.save();
-        assertTrue("host descriptor saved successfully", gatewayResource.isHostDescriptorExists("testHostDesc"));
-        //remove host descriptor
-        gatewayResource.removeHostDescriptor("testHostDesc");
-    }
-
-    @After
-    public void tearDown() throws Exception {
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.java
deleted file mode 100644
index 02cd943..0000000
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.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.persistance.registry.jpa;
-
-import static org.junit.Assert.*;
-
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.resources.ServiceDescriptorResource;
-import org.junit.After;
-import org.junit.Test;
-
-public class ServiceDescriptorResourceTest extends AbstractResourceTest {
-    private GatewayResource gatewayResource;
-    private ServiceDescriptorResource serviceDescriptorResource;
-
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        gatewayResource = super.getGatewayResource();
-        serviceDescriptorResource = gatewayResource.createServiceDescriptorResource("testServiceDesc");
-        serviceDescriptorResource.setUserName("admin");
-        serviceDescriptorResource.setContent("testContent");
-    }
-
-    @Test
-    public void testGetList() throws Exception {
-        assertNotNull("application data being retrieved successfully", serviceDescriptorResource.get(ResourceType.APPLICATION_DESCRIPTOR));
-    }
-    @Test
-    public void testSave() throws Exception {
-        serviceDescriptorResource.save();
-        assertTrue("service descriptor saved successfully", gatewayResource.isServiceDescriptorExists("testServiceDesc"));
-        //remove host descriptor
-        gatewayResource.removeServiceDescriptor("testServiceDesc");
-    }
-
-    @After
-    public void tearDown() throws Exception {
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/10103a44/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
index 05c4667..9ed5ca9 100644
--- a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
@@ -101,41 +101,6 @@ CREATE TABLE USER_WORKFLOW
          FOREIGN KEY (OWNER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
 );
 
-CREATE TABLE HOST_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         HOST_DESCRIPTOR_ID VARCHAR(255),
-         HOST_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME, HOST_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE SERVICE_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         SERVICE_DESCRIPTOR_ID VARCHAR(255),
-         SERVICE_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME,SERVICE_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE APPLICATION_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         APPLICATION_DESCRIPTOR_ID VARCHAR(255),
-         HOST_DESCRIPTOR_ID VARCHAR(255),
-         SERVICE_DESCRIPTOR_ID VARCHAR(255),
-         APPLICATION_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME,APPLICATION_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
 CREATE TABLE EXPERIMENT
 (
         EXPERIMENT_ID VARCHAR(255),


Mime
View raw message