airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [1/2] airavata git commit: removing user reference in Project JPA model
Date Mon, 04 Jan 2016 22:10:35 GMT
Repository: airavata
Updated Branches:
  refs/heads/master bedf91c1a -> 885158202


removing user reference in Project JPA model


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

Branch: refs/heads/master
Commit: fde02b84c440acd535dfc0a5ccdcad7e46f3352b
Parents: 4286bf7
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Mon Jan 4 17:10:07 2016 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Mon Jan 4 17:10:07 2016 -0500

----------------------------------------------------------------------
 .../manager/core/MetadataCatalogService.java    | 76 --------------------
 .../core/experiment/catalog/model/Project.java  | 11 ---
 .../catalog/resources/ProjectResource.java      | 10 +--
 .../experiment/catalog/resources/Utils.java     |  2 +-
 4 files changed, 3 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fde02b84/modules/file-manager/file-manager-core/src/main/java/org/apache/airavata/file/manager/core/MetadataCatalogService.java
----------------------------------------------------------------------
diff --git a/modules/file-manager/file-manager-core/src/main/java/org/apache/airavata/file/manager/core/MetadataCatalogService.java
b/modules/file-manager/file-manager-core/src/main/java/org/apache/airavata/file/manager/core/MetadataCatalogService.java
deleted file mode 100644
index 5c09de5..0000000
--- a/modules/file-manager/file-manager-core/src/main/java/org/apache/airavata/file/manager/core/MetadataCatalogService.java
+++ /dev/null
@@ -1,76 +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.file.manager.core;
-
-import org.apache.airavata.file.manager.cpi.FileManagerException;
-import org.apache.airavata.model.file.metadata.MetadataModel;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MetadataCatalogService implements org.apache.airavata.file.manager.cpi.MetadataCatalogService{
-    private final static Logger logger = LoggerFactory.getLogger(MetadataCatalogService.class);
-
-    /**
-     * Create new metadata model
-     *
-     * @param metadataModel
-     * @return
-     * @throws FileManagerException
-     */
-    @Override
-    public String createMetadata(MetadataModel metadataModel) throws FileManagerException
{
-        return null;
-    }
-
-    /**
-     * Update existing metadata model
-     *
-     * @param metadataModel
-     * @throws FileManagerException
-     */
-    @Override
-    public void updateMetadata(MetadataModel metadataModel) throws FileManagerException {
-
-    }
-
-    /**
-     * Delete existing metadata model
-     *
-     * @param metadataId
-     * @throws FileManagerException
-     */
-    @Override
-    public void deleteMetadata(String metadataId) throws FileManagerException {
-
-    }
-
-    /**
-     * Retrieve metadata model
-     *
-     * @param metadataId
-     * @return
-     * @throws FileManagerException
-     */
-    @Override
-    public MetadataModel getMetadata(String metadataId) throws FileManagerException {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/fde02b84/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
index 98a5d87..ef72004 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
@@ -38,7 +38,6 @@ public class Project {
     private String description;
     private Timestamp creationTime;
     private Collection<Experiment> experiments;
-    private Users user;
     private Gateway gateway;
     private Collection<ProjectUser> projectUsers;
 
@@ -138,16 +137,6 @@ public class Project {
     }
 
     @ManyToOne
-    @JoinColumn(name = "USER_NAME", referencedColumnName = "USER_NAME")
-    public Users getUser() {
-        return user;
-    }
-
-    public void setUser(Users userByOwnerName) {
-        this.user = userByOwnerName;
-    }
-
-    @ManyToOne
     @JoinColumn(name = "GATEWAY_ID", referencedColumnName = "GATEWAY_ID")
     public Gateway getGateway() {
         return gateway;

http://git-wip-us.apache.org/repos/asf/airavata/blob/fde02b84/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProjectResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProjectResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProjectResource.java
index b1738d2..a4251a0 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProjectResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProjectResource.java
@@ -339,20 +339,14 @@ public class ProjectResource extends AbstractExpCatResource {
             project.setProjectId(id);
             project.setProjectName(name);
             project.setGatewayId(gatewayId);
-            UserPK userPK = new UserPK();
-            userPK.setUserName(worker.getUser());
-            userPK.setGatewayId(getGatewayId());
-            Users user = em.find(Users.class, userPK);
-            project.setUser(user);
-            project.setUserName(user.getUserName());
+            project.setUserName(worker.getUser());
             project.setDescription(description);
             project.setCreationTime(creationTime);
 
             if (existingProject != null) {
                 existingProject.setProjectName(name);
                 existingProject.setGatewayId(gatewayId);
-                existingProject.setUser(user);
-                existingProject.setUserName(user.getUserName());
+                existingProject.setUserName(worker.getUser());
                 existingProject.setDescription(description);
                 existingProject.setCreationTime(creationTime);
                 em.merge(existingProject);

http://git-wip-us.apache.org/repos/asf/airavata/blob/fde02b84/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
index d2818a6..9642fe8 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
@@ -351,7 +351,7 @@ public class Utils {
             projectResource.setGatewayId(o.getGatewayId());
             GatewayWorker gatewayWorker = new GatewayWorker();
             gatewayWorker.setGateway(o.getGateway());
-            gatewayWorker.setUserName(o.getUser().getUserName());
+            gatewayWorker.setUserName(o.getUserName());
             WorkerResource workerResource = (WorkerResource) createGatewayWorker(gatewayWorker);
             projectResource.setWorker(workerResource);
             projectResource.setDescription(o.getDescription());


Mime
View raw message