airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata] 01/03: AIRAVATA-2732 Create new entity types in SharingServiceDBEventHandler
Date Tue, 05 Jun 2018 15:42:14 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch group-based-auth
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 21533f6444bf1f1c5221df646c12e9cff15339ee
Author: Marcus Christie <machristie@apache.org>
AuthorDate: Tue Jun 5 10:44:51 2018 -0400

    AIRAVATA-2732 Create new entity types in SharingServiceDBEventHandler
---
 .../messaging/SharingServiceDBEventHandler.java         | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/messaging/SharingServiceDBEventHandler.java
b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/messaging/SharingServiceDBEventHandler.java
index f90dc86..838898d 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/messaging/SharingServiceDBEventHandler.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/messaging/SharingServiceDBEventHandler.java
@@ -29,6 +29,7 @@ import org.apache.airavata.messaging.core.MessageHandler;
 import org.apache.airavata.model.dbevent.DBEventMessage;
 import org.apache.airavata.model.dbevent.DBEventMessageContext;
 import org.apache.airavata.model.error.DuplicateEntryException;
+import org.apache.airavata.model.group.ResourceType;
 import org.apache.airavata.model.user.UserProfile;
 import org.apache.airavata.model.workspace.Gateway;
 import org.apache.airavata.sharing.registry.client.SharingRegistryServiceClientFactory;
@@ -195,6 +196,22 @@ public class SharingServiceDBEventHandler implements MessageHandler {
                                     log.warn("DuplicateEntryException while consuming TENANT
create message, ex: " + ex.getMessage() + ", Entity Id : " + domain.domainId+":FILE", ex);
                                 }
 
+                                log.info("Creating entity type. Id : " + domain.domainId+":"+ResourceType.APPLICATION_DEPLOYMENT);
+                                entityType = new org.apache.airavata.sharing.registry.models.EntityType();
+                                entityType.setEntityTypeId(domain.domainId+":"+ ResourceType.APPLICATION_DEPLOYMENT.name());
+                                entityType.setDomainId(domain.domainId);
+                                entityType.setName("APPLICATION-DEPLOYMENT");
+                                entityType.setDescription("Application Deployment entity
type");
+                                sharingRegistryClient.createEntityType(entityType);
+
+                                log.info("Creating entity type. Id : " + domain.domainId+":"+ResourceType.GROUP_RESOURCE_PROFILE);
+                                entityType = new org.apache.airavata.sharing.registry.models.EntityType();
+                                entityType.setEntityTypeId(domain.domainId+":"+ResourceType.GROUP_RESOURCE_PROFILE.name());
+                                entityType.setDomainId(domain.domainId);
+                                entityType.setName(ResourceType.GROUP_RESOURCE_PROFILE.name());
+                                entityType.setDescription("Group Resource Profile entity
type");
+                                sharingRegistryClient.createEntityType(entityType);
+
                                 //Creating Permission Types for each domain
                                 log.info("Creating Permission Type. Id : " + domain.domainId+":READ");
                                 PermissionType permissionType = new PermissionType();

-- 
To stop receiving notification emails like this one, please contact
machristie@apache.org.

Mime
View raw message