You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/10/07 16:31:20 UTC

[1/3] airavata git commit: changing Airavata Server Handler to use new Sharing Module

Repository: airavata
Updated Branches:
  refs/heads/airavata-gov-registry 4ddfa10de -> 10f30a96f


http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_cpi.thrift b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
index cec2543..3f2d4b3 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -75,6 +75,8 @@ service GovRegistryService {
     sharing_models.Entity getEntity(1: required string entityId) throws (1: sharing_models.GovRegistryException gre)
     list<sharing_models.Entity> searchEntities(1: required string userId, 2: required string entityTypeId, 3: required map<sharing_models.EntitySearchFields,
      string> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.GovRegistryException gre)
+    list<sharing_models.User> getListOfSharedUsers(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.GovRegistryException gre)
+    list<sharing_models.UserGroup> getListOfSharedGroups(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.GovRegistryException gre)
 
     /**
      * Permission Operations


[3/3] airavata git commit: changing Airavata Server Handler to use new Sharing Module

Posted by sc...@apache.org.
changing Airavata Server Handler to use new Sharing Module


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

Branch: refs/heads/airavata-gov-registry
Commit: 10f30a96f6478fb045ae6e0cdb15b25614581856
Parents: 4ddfa10
Author: scnakandala <su...@gmail.com>
Authored: Fri Oct 7 12:31:14 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Oct 7 12:31:14 2016 -0400

----------------------------------------------------------------------
 airavata-api/airavata-api-server/pom.xml        |    7 +-
 .../server/handler/AiravataServerHandler.java   |  357 +--
 .../server/SharingRegistryServerHandler.java    |   13 +-
 .../sharing/registry/models/Domain.java         |    2 +-
 .../sharing/registry/models/Entity.java         |    2 +-
 .../sharing/registry/models/EntityType.java     |    2 +-
 .../registry/models/GovRegistryException.java   |    2 +-
 .../registry/models/GroupMembership.java        |    2 +-
 .../sharing/registry/models/PermissionType.java |    2 +-
 .../sharing/registry/models/Sharing.java        |  134 +-
 .../airavata/sharing/registry/models/User.java  |    2 +-
 .../sharing/registry/models/UserGroup.java      |    2 +-
 .../service/cpi/GovRegistryService.java         | 2950 +++++++++++++++---
 .../thrift_models/sharing_cpi.thrift            |    2 +
 14 files changed, 2741 insertions(+), 738 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/airavata-api/airavata-api-server/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/pom.xml b/airavata-api/airavata-api-server/pom.xml
index e5b549c..e529a4d 100644
--- a/airavata-api/airavata-api-server/pom.xml
+++ b/airavata-api/airavata-api-server/pom.xml
@@ -73,9 +73,14 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>group-manager</artifactId>
+            <artifactId>airavata-sharing-registry-core</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.airavata</groupId>-->
+            <!--<artifactId>group-manager</artifactId>-->
+            <!--<version>${project.version}</version>-->
+        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.thrift</groupId>
             <artifactId>libthrift</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 5ccf874..01fcff7 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -27,19 +27,13 @@ import org.apache.airavata.api.server.security.interceptor.SecurityCheck;
 import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.client.CredentialStoreClientFactory;
 import org.apache.airavata.credential.store.cpi.CredentialStoreService;
 import org.apache.airavata.credential.store.datamodel.PasswordCredential;
 import org.apache.airavata.credential.store.datamodel.SSHCredential;
 import org.apache.airavata.credential.store.exception.CredentialStoreException;
-import org.apache.airavata.grouper.GroupManagerCPI;
-import org.apache.airavata.grouper.GroupManagerException;
-import org.apache.airavata.grouper.GroupManagerFactory;
-import org.apache.airavata.grouper.SubjectType;
-import org.apache.airavata.grouper.group.Group;
-import org.apache.airavata.grouper.permission.PermissionAction;
-import org.apache.airavata.grouper.resource.Resource;
 import org.apache.airavata.messaging.core.MessageContext;
 import org.apache.airavata.messaging.core.MessagingFactory;
 import org.apache.airavata.messaging.core.Publisher;
@@ -80,6 +74,8 @@ import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.registry.api.RegistryService;
 import org.apache.airavata.registry.api.client.RegistryServiceClientFactory;
 import org.apache.airavata.registry.api.exception.RegistryServiceException;
+import org.apache.airavata.sharing.registry.models.Entity;
+import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -92,10 +88,14 @@ public class AiravataServerHandler implements Airavata.Iface {
     private Publisher experimentPublisher;
     private CredentialStoreService.Client csClient;
 
+    private SharingRegistryServerHandler sharingRegistryServerHandler;
+
     public AiravataServerHandler() {
         try {
             statusPublisher = MessagingFactory.getPublisher(Type.STATUS);
             experimentPublisher = MessagingFactory.getPublisher(Type.EXPERIMENT_LAUNCH);
+
+            sharingRegistryServerHandler = new SharingRegistryServerHandler();
         } catch (ApplicationSettingsException e) {
             logger.error("Error occured while reading airavata-server properties..", e);
         } catch (AiravataException e) {
@@ -499,14 +499,17 @@ public class AiravataServerHandler implements Airavata.Iface {
 
         try {
             String projectId = getRegistryServiceClient().createProject(gatewayId, project);
-            Resource projResource = new Resource(projectId, org.apache.airavata.grouper.resource.ResourceType.PROJECT);
-            projResource.setOwnerId(project.getOwner() + "@" + project.getGatewayId());
-            projResource.setName(project.getName());
-            projResource.setDescription(project.getDescription());
 
             if(ServerSettings.isEnableSharing()){
-                GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-                groupManager.createResource(projResource);
+                Entity entity = new Entity();
+                entity.setEntityId(projectId);
+                entity.setDomainId(project.getGatewayId());
+                entity.setEntityTypeId(project.getGatewayId()+":"+"PROJECT");
+                entity.setOwnerId(project.getOwner() + "@" + project.getGatewayId());
+                entity.setName(project.getName());
+                entity.setDescription(project.getDescription());
+
+                sharingRegistryServerHandler.createEntity(entity);
             }
 
             logger.debug("Airavata created project with project Id : " + projectId + " for gateway Id : " + gatewayId);
@@ -530,9 +533,10 @@ public class AiravataServerHandler implements Airavata.Iface {
             if(ServerSettings.isEnableSharing() && !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME).equals(existingProject.getOwner())
                     || !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID).equals(existingProject.getGatewayId())){
                 try {
-                    if(!hasPermission(authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME)
-                                    +"@"+authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID),
-                            existingProject.getProjectID(), ResourceType.PROJECT, ResourcePermissionType.WRITE)){
+                    String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+                    String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
+                    if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
+                            projectId, gatewayId + ":WRITE")){
                         throw new AuthorizationException("User does not have permission to access this resource");
                     }
                 } catch (Exception e) {
@@ -560,9 +564,10 @@ public class AiravataServerHandler implements Airavata.Iface {
             if(ServerSettings.isEnableSharing() && !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME).equals(existingProject.getOwner())
                     || !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID).equals(existingProject.getGatewayId())){
                 try {
-                    if(!hasPermission(authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME)
-                                    +"@"+authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID),
-                            existingProject.getProjectID(), ResourceType.PROJECT, ResourcePermissionType.WRITE)){
+                    String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+                    String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
+                    if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
+                            projectId, gatewayId + ":WRITE")){
                         throw new AuthorizationException("User does not have permission to access this resource");
                     }
                 } catch (Exception e) {
@@ -604,13 +609,13 @@ public class AiravataServerHandler implements Airavata.Iface {
                 return project;
             }else if (ServerSettings.isEnableSharing()){
                 try {
-                    if(hasPermission(authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME)
-                                    +"@"+authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID),
-                            project.getProjectID(), ResourceType.PROJECT, ResourcePermissionType.READ)){
-                        return project;
-                    }else {
+                    String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+                    String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
+                    if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
+                            projectId, gatewayId + ":READ")){
                         throw new AuthorizationException("User does not have permission to access this resource");
                     }
+                    return project;
                 } catch (Exception e) {
                     throw new AuthorizationException("User does not have permission to access this resource");
                 }
@@ -683,7 +688,8 @@ public class AiravataServerHandler implements Airavata.Iface {
             List<String> accessibleProjIds  = new ArrayList<>();
 
             if(ServerSettings.isEnableSharing())
-                accessibleProjIds.addAll(getAllAccessibleResourcesForUser(userName+"@"+gatewayId, ResourceType.PROJECT, ResourcePermissionType.READ));
+                sharingRegistryServerHandler.searchEntities(userName+"@"+gatewayId, gatewayId+":PROJECT",
+                        new HashMap<>(), 0, -1).stream().forEach(e->accessibleProjIds.add(e.entityId));
 
             return getRegistryServiceClient().searchProjects(gatewayId, userName, accessibleProjIds, filters, limit, offset);
         }catch (Exception e) {
@@ -719,7 +725,8 @@ public class AiravataServerHandler implements Airavata.Iface {
         try {
             List<String> accessibleExpIds = new ArrayList<>();
             if(ServerSettings.isEnableSharing())
-                accessibleExpIds.addAll(getAllAccessibleResourcesForUser(userName + "@" + gatewayId, ResourceType.EXPERIMENT, ResourcePermissionType.READ));
+                sharingRegistryServerHandler.searchEntities(userName+"@"+gatewayId, gatewayId+":EXPERIMENT",
+                        new HashMap<>(), 0, -1).forEach(e->accessibleExpIds.add(e.entityId));
             return getRegistryServiceClient().searchExperiments(gatewayId, userName, accessibleExpIds, filters, limit, offset);
         }catch (Exception e) {
             logger.error("Error while retrieving experiments", e);
@@ -781,9 +788,10 @@ public class AiravataServerHandler implements Airavata.Iface {
             if(ServerSettings.isEnableSharing() && !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME).equals(project.getOwner())
                     || !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID).equals(project.getGatewayId())){
                 try {
-                    if(!hasPermission(authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME)
-                                    +"@"+authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID),
-                            project.getProjectID(), ResourceType.PROJECT, ResourcePermissionType.READ)){
+                    String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+                    String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
+                    if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
+                            projectId, gatewayId + ":READ")){
                         throw new AuthorizationException("User does not have permission to access this resource");
                     }
                 } catch (Exception e) {
@@ -857,15 +865,17 @@ public class AiravataServerHandler implements Airavata.Iface {
             AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
             String experimentId = getRegistryServiceClient().createExperiment(gatewayId, experiment);
-            Resource expResource = new Resource(experimentId, org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT);
-            expResource.setOwnerId(experiment.getUserName()+"@"+experiment.getGatewayId());
-            expResource.setParentResourceId(experiment.getProjectId());
-            expResource.setName(experiment.getExperimentName());
-            expResource.setDescription(experiment.getDescription());
 
             if(ServerSettings.isEnableSharing()) {
-                GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-                groupManager.createResource(expResource);
+                Entity entity = new Entity();
+                entity.setEntityId(experimentId);
+                entity.setDomainId(experiment.getGatewayId());
+                entity.setEntityTypeId(experiment.getGatewayId()+":"+"EXPERIMENT");
+                entity.setOwnerId(experiment.getUserName() + "@" + experiment.getGatewayId());
+                entity.setName(experiment.getExperimentName());
+                entity.setDescription(experiment.getDescription());
+
+                sharingRegistryServerHandler.createEntity(entity);
             }
 
             ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent(ExperimentState.CREATED,
@@ -909,9 +919,10 @@ public class AiravataServerHandler implements Airavata.Iface {
             if(ServerSettings.isEnableSharing() && !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME).equals(experimentModel.getUserName())
                     || !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID).equals(experimentModel.getGatewayId())){
                 try {
-                    if(! hasPermission(authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME)
-                                    +"@"+authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID),
-                            experimentModel.getExperimentId(), ResourceType.EXPERIMENT, ResourcePermissionType.WRITE)){
+                    String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+                    String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
+                    if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
+                            experimentId, gatewayId + ":WRITE")){
                         throw new AuthorizationException("User does not have permission to access this resource");
                     }
                 } catch (Exception e) {
@@ -967,13 +978,13 @@ public class AiravataServerHandler implements Airavata.Iface {
                 return experimentModel;
             }else if(ServerSettings.isEnableSharing()){
                 try {
-                    if(hasPermission(authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME)
-                                    +"@"+authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID),
-                            experimentModel.getExperimentId(), ResourceType.EXPERIMENT, ResourcePermissionType.READ)){
-                        return experimentModel;
-                    }else {
+                    String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+                    String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
+                    if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
+                            airavataExperimentId, gatewayId + ":READ")){
                         throw new AuthorizationException("User does not have permission to access this resource");
                     }
+                    return experimentModel;
                 } catch (Exception e) {
                     throw new AuthorizationException("User does not have permission to access this resource");
                 }
@@ -1062,9 +1073,10 @@ public class AiravataServerHandler implements Airavata.Iface {
             if(ServerSettings.isEnableSharing() && !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME).equals(experimentModel.getUserName())
                 || !authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID).equals(experimentModel.getGatewayId())){
                 try {
-                    if(! hasPermission(authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME)
-                                    +"@"+authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.GATEWAY_ID),
-                            experimentModel.getExperimentId(), ResourceType.EXPERIMENT, ResourcePermissionType.WRITE)){
+                    String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+                    String userId = authzToken.getClaimsMap().get(Constants.USER_NAME);
+                    if(!sharingRegistryServerHandler.userHasAccess(gatewayId, userId + "@" + gatewayId,
+                            airavataExperimentId, gatewayId + ":WRITE")){
                         throw new AuthorizationException("User does not have permission to access this resource");
                     }
                 } catch (Exception e) {
@@ -1394,13 +1406,16 @@ public class AiravataServerHandler implements Airavata.Iface {
             existingExperiment.setUserName(authzToken.getClaimsMap().get(org.apache.airavata.common.utils.Constants.USER_NAME));
             String expId = regClient.createExperiment(gatewayId, existingExperiment);
 
-            String projectId = existingExperiment.getProjectId();
-
             if(ServerSettings.isEnableSharing()){
-                if(!isResourceExistsInGrouper(projectId, ResourceType.PROJECT)){
-                    initializeResourceWithGrouper(projectId, ResourceType.PROJECT);
-                }
-                initializeResourceWithGrouper(expId, ResourceType.EXPERIMENT);
+                Entity entity = new Entity();
+                entity.setEntityId(expId);
+                entity.setDomainId(existingExperiment.getGatewayId());
+                entity.setEntityTypeId(existingExperiment.getGatewayId()+":"+"EXPERIMENT");
+                entity.setOwnerId(existingExperiment.getUserName() + "@" + existingExperiment.getGatewayId());
+                entity.setName(existingExperiment.getExperimentName());
+                entity.setDescription(existingExperiment.getDescription());
+
+                sharingRegistryServerHandler.createEntity(entity);
             }
 
             return expId;
@@ -3330,29 +3345,13 @@ public class AiravataServerHandler implements Airavata.Iface {
                                           Map<String, ResourcePermissionType> userPermissionList) throws InvalidRequestException,
             AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
-            if(!isResourceExistsInGrouper(resourceId, resourceType)){
-                initializeResourceWithGrouper(resourceId, resourceType);
-            }
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-            for(Map.Entry<String, ResourcePermissionType> entry : userPermissionList.entrySet()){
-                org.apache.airavata.grouper.resource.ResourceType gResouceType;
-                if(resourceType.equals(ResourceType.EXPERIMENT)){
-                    gResouceType = org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT;
-                }else if(resourceType.equals(ResourceType.PROJECT)){
-                    gResouceType = org.apache.airavata.grouper.resource.ResourceType.PROJECT;
-                }else{
-                    //Unsupported data type
-                    continue;
-                }
-
-                if(entry.getValue().equals(ResourcePermissionType.READ)){
-                    groupManager.grantPermission(entry.getKey(), SubjectType.PERSON, resourceId, gResouceType, PermissionAction.READ);
-                }else if(entry.getValue().equals(ResourcePermissionType.WRITE)){
-                    groupManager.grantPermission(entry.getKey(), SubjectType.PERSON, resourceId, gResouceType, PermissionAction.WRITE);
-                }else{
-                    //Unsupported permission type
-                    continue;
-                }
+            for(Map.Entry<String, ResourcePermissionType> userPermission : userPermissionList.entrySet()){
+                if(userPermission.getValue().equals(ResourcePermissionType.WRITE))
+                    sharingRegistryServerHandler.shareEntityWithUsers(resourceId,
+                            Arrays.asList(userPermission.getKey()), authzToken.getClaimsMap().get(Constants.GATEWAY_ID) + ":" + "WRITE", true);
+                else
+                    sharingRegistryServerHandler.shareEntityWithUsers(resourceId,
+                            Arrays.asList(userPermission.getKey()), authzToken.getClaimsMap().get("GatewatId") + ":" + "READ", true);
             }
             return true;
         } catch (Exception e) {
@@ -3369,29 +3368,13 @@ public class AiravataServerHandler implements Airavata.Iface {
     public boolean revokeSharingOfResourceFromUsers(AuthzToken authzToken, String resourceId, ResourceType resourceType,
                                                     Map<String, ResourcePermissionType> userPermissionList) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
-            if(!isResourceExistsInGrouper(resourceId, resourceType)){
-                initializeResourceWithGrouper(resourceId, resourceType);
-            }
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-            for(Map.Entry<String, ResourcePermissionType> entry : userPermissionList.entrySet()){
-                org.apache.airavata.grouper.resource.ResourceType gResouceType;
-                if(resourceType.equals(ResourceType.EXPERIMENT)){
-                    gResouceType = org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT;
-                }else if(resourceType.equals(ResourceType.PROJECT)){
-                    gResouceType = org.apache.airavata.grouper.resource.ResourceType.PROJECT;
-                }else{
-                    //Unsupported data type
-                    continue;
-                }
-
-                if(entry.getValue().equals(ResourcePermissionType.READ)){
-                    groupManager.revokePermission(entry.getKey(), SubjectType.PERSON, resourceId, gResouceType, PermissionAction.READ);
-                }else if(entry.getValue().equals(ResourcePermissionType.WRITE)){
-                    groupManager.revokePermission(entry.getKey(), SubjectType.PERSON, resourceId, gResouceType, PermissionAction.WRITE);
-                }else{
-                    //Unsupported permission type
-                    continue;
-                }
+            for(Map.Entry<String, ResourcePermissionType> userPermission : userPermissionList.entrySet()){
+                if(userPermission.getValue().equals(ResourcePermissionType.WRITE))
+                    sharingRegistryServerHandler.revokeEntitySharingFromUsers(resourceId,
+                            Arrays.asList(userPermission.getKey()), authzToken.getClaimsMap().get(Constants.GATEWAY_ID) + ":" + "WRITE");
+                else
+                    sharingRegistryServerHandler.revokeEntitySharingFromUsers(resourceId,
+                            Arrays.asList(userPermission.getKey()), authzToken.getClaimsMap().get(Constants.GATEWAY_ID) + ":" + "READ");
             }
             return true;
         } catch (Exception e) {
@@ -3407,26 +3390,9 @@ public class AiravataServerHandler implements Airavata.Iface {
     @SecurityCheck
     public List<String> getAllAccessibleUsers(AuthzToken authzToken, String resourceId, ResourceType resourceType, ResourcePermissionType permissionType) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-            org.apache.airavata.grouper.resource.ResourceType gResourceType;
-            if(resourceType.equals(ResourceType.PROJECT)){
-                gResourceType = org.apache.airavata.grouper.resource.ResourceType.PROJECT;
-            }else if(resourceType.equals(ResourceType.EXPERIMENT)){
-                gResourceType = org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT;
-            }else{
-                throw new GroupManagerException("Unsupported Resource Type");
-            }
-
-            org.apache.airavata.grouper.permission.PermissionAction gPermissionType;
-            if(permissionType.equals(ResourcePermissionType.READ)){
-                gPermissionType = PermissionAction.READ;
-            } else if (permissionType.equals(ResourcePermissionType.WRITE)){
-                gPermissionType = PermissionAction.WRITE;
-            }else{
-                throw new GroupManagerException("Unsupported Permission Type");
-            }
             List<String> accessibleUsers = new ArrayList<>();
-            accessibleUsers.addAll(groupManager.getAllAccessibleUsers(resourceId, gResourceType, gPermissionType));
+            if(permissionType.equals(ResourcePermissionType.WRITE))
+            sharingRegistryServerHandler.getListOfSharedUsers(resourceId, authzToken.getClaimsMap().get(Constants.GATEWAY_ID) + ":WRITE").stream().forEach(u->accessibleUsers.add(u.userId));
             return accessibleUsers;
         } catch (Exception e) {
             String msg = "Error in getting all accessible users for resource. Resource ID : " + resourceId + " Resource Type : " + resourceType.toString() ;
@@ -3441,12 +3407,7 @@ public class AiravataServerHandler implements Airavata.Iface {
     @SecurityCheck
     public boolean createGroup(AuthzToken authzToken, GroupModel groupModel) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-            Group group = new Group();
-            group.setName(groupModel.getName());
-            group.setDescription(groupModel.getDescription());
-            group.setMembers(groupModel.getMembers());
-            groupManager.createGroup(group);
+            throw new UnsupportedOperationException("Method not supported yet");
         } catch (Exception e) {
             String msg = "Error Creating Group" ;
             logger.error(msg, e);
@@ -3454,20 +3415,14 @@ public class AiravataServerHandler implements Airavata.Iface {
             exception.setMessage(msg + " More info : " + e.getMessage());
             throw exception;
         }
-        return true;
     }
 
     @Override
     @SecurityCheck
-    public boolean updateGroup(AuthzToken authzToken, GroupModel groupModel) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+    public boolean updateGroup(AuthzToken authzToken, GroupModel groupModel) throws InvalidRequestException,
+            AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-            Group group = new Group();
-            group.setId(groupModel.getId());
-            group.setName(groupModel.getName());
-            group.setDescription(groupModel.getDescription());
-            group.setMembers(groupModel.getMembers());
-            groupManager.updateGroup(group);
+            throw new UnsupportedOperationException("Method not supported yet");
         } catch (Exception e) {
             String msg = "Error Updating Group" ;
             logger.error(msg, e);
@@ -3475,15 +3430,14 @@ public class AiravataServerHandler implements Airavata.Iface {
             exception.setMessage(msg + " More info : " + e.getMessage());
             throw exception;
         }
-        return true;
     }
 
     @Override
     @SecurityCheck
-    public boolean deleteGroup(AuthzToken authzToken, String groupId, String ownerId, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+    public boolean deleteGroup(AuthzToken authzToken, String groupId, String ownerId, String gatewayId) throws
+            InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-            groupManager.deleteGroup(groupId, ownerId + "@" + gatewayId);
+            throw new UnsupportedOperationException("Method not supported yet");
         } catch (Exception e) {
             String msg = "Error Deleting Group. Group ID: " + groupId ;
             logger.error(msg, e);
@@ -3491,22 +3445,14 @@ public class AiravataServerHandler implements Airavata.Iface {
             exception.setMessage(msg + " More info : " + e.getMessage());
             throw exception;
         }
-        return true;
     }
 
     @Override
     @SecurityCheck
-    public GroupModel getGroup(AuthzToken authzToken, String groupId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+    public GroupModel getGroup(AuthzToken authzToken, String groupId) throws InvalidRequestException,
+            AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-            Group group = groupManager.getGroup(groupId);
-            GroupModel groupModel = new GroupModel();
-            groupModel.setId(group.getId());
-            groupModel.setName(group.getName());
-            groupModel.setDescription(group.getDescription());
-            groupModel.setMembers(group.getMembers());
-
-            return  groupModel;
+            throw new UnsupportedOperationException("Method not supported yet");
         } catch (Exception e) {
             String msg = "Error Retreiving Group. Group ID: " + groupId ;
             logger.error(msg, e);
@@ -3518,21 +3464,10 @@ public class AiravataServerHandler implements Airavata.Iface {
 
     @Override
     @SecurityCheck
-    public List<GroupModel> getAllGroupsUserBelongs(AuthzToken authzToken, String userName, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+    public List<GroupModel> getAllGroupsUserBelongs(AuthzToken authzToken, String userName, String gatewayId)
+            throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
-            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-            List<Group> userGroups = groupManager.getAllGroupsUserBelongs(userName+"@"+gatewayId);
-            List<GroupModel> groupModels = new ArrayList<>();
-            userGroups.stream().forEach(group->{
-                GroupModel groupModel = new GroupModel();
-                groupModel.setId(group.getId());
-                groupModel.setName(group.getName());
-                groupModel.setDescription(group.getDescription());
-                groupModel.setMembers(group.getMembers());
-
-                groupModels.add(groupModel);
-            });
-            return groupModels;
+            throw new UnsupportedOperationException("Method not supported yet");
         } catch (Exception e) {
             String msg = "Error Retreiving All Groups for User. User ID: " + userName ;
             logger.error(msg, e);
@@ -3542,104 +3477,6 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
-    private void initializeResourceWithGrouper(String resourceId, ResourceType resourceType) throws RegistryServiceException, GroupManagerException, TException, ApplicationSettingsException {
-        GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-        if(resourceType.equals(ResourceType.PROJECT)){
-            Project project = (Project) getRegistryServiceClient().getProject(resourceId);
-
-            Resource projectResource = new Resource(project.getProjectID(), org.apache.airavata.grouper.resource.ResourceType.PROJECT);
-            projectResource.setName(project.getName());
-            projectResource.setDescription(project.getDescription());
-            projectResource.setOwnerId(project.getOwner()+"@"+project.getGatewayId());
-            groupManager.createResource(projectResource);
-
-        }else if(resourceType.equals(ResourceType.EXPERIMENT)){
-            ExperimentModel experiment = getRegistryServiceClient().getExperiment(resourceId);
-            if(!isResourceExistsInGrouper(experiment.getProjectId(), ResourceType.PROJECT)){
-                initializeResourceWithGrouper(experiment.getProjectId(), ResourceType.PROJECT);
-            }
-            Resource experimentResource = new Resource(experiment.getExperimentId(), org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT);
-            experimentResource.setName(experiment.getExperimentName());
-            experimentResource.setDescription(experiment.getDescription());
-            experimentResource.setParentResourceId(experiment.getProjectId());
-            experimentResource.setOwnerId(experiment.getUserName()+"@"+experiment.getGatewayId());
-            groupManager.createResource(experimentResource);
-        }else{
-            throw new GroupManagerException("Unsupported Resource Type");
-        }
-
-    }
-
-    private boolean isResourceExistsInGrouper(String resourceId, ResourceType resourceType) throws GroupManagerException {
-        GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-        if(resourceType.equals(ResourceType.PROJECT)){
-            return groupManager.isResourceRegistered(resourceId, org.apache.airavata.grouper.resource.ResourceType.PROJECT);
-        }else if(resourceType.equals(ResourceType.EXPERIMENT)){
-            return groupManager.isResourceRegistered(resourceId, org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT);
-        }else{
-            throw new GroupManagerException("Unsupported Resource Type");
-        }
-
-    }
-
-    private boolean hasPermission(String userId, String resourceId, ResourceType resourceType, ResourcePermissionType permissionType)
-            throws GroupManagerException, TException, ApplicationSettingsException {
-        if(!isResourceExistsInGrouper(resourceId, resourceType)){
-            initializeResourceWithGrouper(resourceId, resourceType);
-        }
-        GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-        org.apache.airavata.grouper.resource.ResourceType gResourceType;
-        if(resourceType.equals(ResourceType.PROJECT)){
-            gResourceType = org.apache.airavata.grouper.resource.ResourceType.PROJECT;
-        }else if(resourceType.equals(ResourceType.EXPERIMENT)){
-            gResourceType = org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT;
-        }else{
-            throw new GroupManagerException("Unsupported Resource Type");
-        }
-
-        org.apache.airavata.grouper.permission.PermissionAction gPermissionType;
-        if(permissionType.equals(ResourcePermissionType.READ)){
-            gPermissionType = PermissionAction.READ;
-        } else if (permissionType.equals(ResourcePermissionType.WRITE)){
-            gPermissionType = PermissionAction.WRITE;
-        }else{
-            throw new GroupManagerException("Unsupported Permission Type");
-        }
-        Set<String> accessibleUsers = groupManager.getAllAccessibleUsers(resourceId, gResourceType, gPermissionType);
-        return accessibleUsers.contains(userId);
-    }
-
-    private List<String> getAllAccessibleResourcesForUser(String userId, ResourceType resourceType, ResourcePermissionType permissionType)
-            throws GroupManagerException, TException, ApplicationSettingsException {
-        if(!getRegistryServiceClient().isUserExists(userId.split("@")[1], userId.split("@")[0])){
-            //user is still not initialized in the sistem
-            return new ArrayList<>();
-        }
-
-        GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
-        org.apache.airavata.grouper.resource.ResourceType gResourceType;
-        if(resourceType.equals(ResourceType.PROJECT)){
-            gResourceType = org.apache.airavata.grouper.resource.ResourceType.PROJECT;
-        }else if(resourceType.equals(ResourceType.EXPERIMENT)){
-            gResourceType = org.apache.airavata.grouper.resource.ResourceType.EXPERIMENT;
-        }else{
-            throw new GroupManagerException("Unsupported Resource Type");
-        }
-
-        org.apache.airavata.grouper.permission.PermissionAction gPermissionType;
-        if(permissionType.equals(ResourcePermissionType.READ)){
-            gPermissionType = PermissionAction.READ;
-        } else if (permissionType.equals(ResourcePermissionType.WRITE)){
-            gPermissionType = PermissionAction.WRITE;
-        }else{
-            throw new GroupManagerException("Unsupported Permission Type");
-        }
-
-        List<String> allAccessibleResources = groupManager.getAccessibleResourcesForUser(userId, gResourceType, gPermissionType);
-        return allAccessibleResources;
-    }
-
-
     private void submitExperiment(String gatewayId,String experimentId) throws AiravataException {
         ExperimentSubmitEvent event = new ExperimentSubmitEvent(experimentId, gatewayId);
         MessageContext messageContext = new MessageContext(event, MessageType.EXPERIMENT, "LAUNCH.EXP-" + UUID.randomUUID().toString(), gatewayId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
index 247cbfe..bfcaa1f 100644
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -430,6 +430,16 @@ public class SharingRegistryServerHandler implements GovRegistryService.Iface{
         return entityRepository.searchEntities(groupIds, entityTypeId, filters, offset, limit);
     }
 
+    @Override
+    public List<User> getListOfSharedUsers(String entityId, String permissionTypeId) throws GovRegistryException, TException {
+        return null;
+    }
+
+    @Override
+    public List<UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws GovRegistryException, TException {
+        return null;
+    }
+
     /**
      * * Sharing Entity with Users and Groups
      * *
@@ -459,10 +469,8 @@ public class SharingRegistryServerHandler implements GovRegistryService.Iface{
             sharing.setInheritedParentId(entityId);
             if(cascadePermission) {
                 sharing.setSharingType(SharingType.DIRECT_CASCADING);
-                sharing.setCascadePermission(true);
             }else {
                 sharing.setSharingType(SharingType.DIRECT_NON_CASCADING);
-                sharing.setCascadePermission(false);
             }
             sharing.setCreatedTime(System.currentTimeMillis());
             sharing.setUpdatedTime(System.currentTimeMillis());
@@ -484,7 +492,6 @@ public class SharingRegistryServerHandler implements GovRegistryService.Iface{
                     sharing.setInheritedParentId(entityId);
                     sharing.setSharingType(SharingType.INDIRECT_CASCADING);
                     sharing.setInheritedParentId(entityId);
-                    sharing.setCascadePermission(true);
                     sharing.setCreatedTime(System.currentTimeMillis());
                     sharing.setUpdatedTime(System.currentTimeMillis());
                     sharingRepository.create(sharing);

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index 367e04f..eb30e38 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class Domain implements org.apache.thrift.TBase<Domain, Domain._Fields>, java.io.Serializable, Cloneable, Comparable<Domain> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Domain");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
index 462d892..0818b70 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, java.io.Serializable, Cloneable, Comparable<Entity> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entity");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
index d2ddffa..4244502 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class EntityType implements org.apache.thrift.TBase<EntityType, EntityType._Fields>, java.io.Serializable, Cloneable, Comparable<EntityType> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EntityType");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java
index 7df20a7..40bc7c0 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class GovRegistryException extends TException implements org.apache.thrift.TBase<GovRegistryException, GovRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<GovRegistryException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GovRegistryException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
index 00843aa..5ec148f 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class GroupMembership implements org.apache.thrift.TBase<GroupMembership, GroupMembership._Fields>, java.io.Serializable, Cloneable, Comparable<GroupMembership> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupMembership");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
index 91645ce..806c15b 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class PermissionType implements org.apache.thrift.TBase<PermissionType, PermissionType._Fields>, java.io.Serializable, Cloneable, Comparable<PermissionType> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PermissionType");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
index 4cfdc82..c2ddf18 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields>, java.io.Serializable, Cloneable, Comparable<Sharing> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Sharing");
 
@@ -43,9 +43,8 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
   private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField SHARING_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("sharingType", org.apache.thrift.protocol.TType.I32, (short)4);
   private static final org.apache.thrift.protocol.TField INHERITED_PARENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inheritedParentId", org.apache.thrift.protocol.TType.STRING, (short)5);
-  private static final org.apache.thrift.protocol.TField CASCADE_PERMISSION_FIELD_DESC = new org.apache.thrift.protocol.TField("cascadePermission", org.apache.thrift.protocol.TType.BOOL, (short)6);
-  private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)7);
-  private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)8);
+  private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)6);
+  private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)7);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -62,7 +61,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
    */
   public SharingType sharingType; // optional
   public String inheritedParentId; // optional
-  public boolean cascadePermission; // optional
   public long createdTime; // optional
   public long updatedTime; // optional
 
@@ -77,9 +75,8 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
      */
     SHARING_TYPE((short)4, "sharingType"),
     INHERITED_PARENT_ID((short)5, "inheritedParentId"),
-    CASCADE_PERMISSION((short)6, "cascadePermission"),
-    CREATED_TIME((short)7, "createdTime"),
-    UPDATED_TIME((short)8, "updatedTime");
+    CREATED_TIME((short)6, "createdTime"),
+    UPDATED_TIME((short)7, "updatedTime");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -104,11 +101,9 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
           return SHARING_TYPE;
         case 5: // INHERITED_PARENT_ID
           return INHERITED_PARENT_ID;
-        case 6: // CASCADE_PERMISSION
-          return CASCADE_PERMISSION;
-        case 7: // CREATED_TIME
+        case 6: // CREATED_TIME
           return CREATED_TIME;
-        case 8: // UPDATED_TIME
+        case 7: // UPDATED_TIME
           return UPDATED_TIME;
         default:
           return null;
@@ -150,11 +145,10 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
   }
 
   // isset id assignments
-  private static final int __CASCADEPERMISSION_ISSET_ID = 0;
-  private static final int __CREATEDTIME_ISSET_ID = 1;
-  private static final int __UPDATEDTIME_ISSET_ID = 2;
+  private static final int __CREATEDTIME_ISSET_ID = 0;
+  private static final int __UPDATEDTIME_ISSET_ID = 1;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.PERMISSION_TYPE_ID,_Fields.ENTITY_ID,_Fields.GROUP_ID,_Fields.SHARING_TYPE,_Fields.INHERITED_PARENT_ID,_Fields.CASCADE_PERMISSION,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
+  private static final _Fields optionals[] = {_Fields.PERMISSION_TYPE_ID,_Fields.ENTITY_ID,_Fields.GROUP_ID,_Fields.SHARING_TYPE,_Fields.INHERITED_PARENT_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -168,8 +162,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SharingType.class)));
     tmpMap.put(_Fields.INHERITED_PARENT_ID, new org.apache.thrift.meta_data.FieldMetaData("inheritedParentId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.CASCADE_PERMISSION, new org.apache.thrift.meta_data.FieldMetaData("cascadePermission", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -201,7 +193,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     if (other.isSetInheritedParentId()) {
       this.inheritedParentId = other.inheritedParentId;
     }
-    this.cascadePermission = other.cascadePermission;
     this.createdTime = other.createdTime;
     this.updatedTime = other.updatedTime;
   }
@@ -217,8 +208,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     this.groupId = null;
     this.sharingType = null;
     this.inheritedParentId = null;
-    setCascadePermissionIsSet(false);
-    this.cascadePermission = false;
     setCreatedTimeIsSet(false);
     this.createdTime = 0;
     setUpdatedTimeIsSet(false);
@@ -353,29 +342,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     }
   }
 
-  public boolean isCascadePermission() {
-    return this.cascadePermission;
-  }
-
-  public Sharing setCascadePermission(boolean cascadePermission) {
-    this.cascadePermission = cascadePermission;
-    setCascadePermissionIsSet(true);
-    return this;
-  }
-
-  public void unsetCascadePermission() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CASCADEPERMISSION_ISSET_ID);
-  }
-
-  /** Returns true if field cascadePermission is set (has been assigned a value) and false otherwise */
-  public boolean isSetCascadePermission() {
-    return EncodingUtils.testBit(__isset_bitfield, __CASCADEPERMISSION_ISSET_ID);
-  }
-
-  public void setCascadePermissionIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADEPERMISSION_ISSET_ID, value);
-  }
-
   public long getCreatedTime() {
     return this.createdTime;
   }
@@ -464,14 +430,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       }
       break;
 
-    case CASCADE_PERMISSION:
-      if (value == null) {
-        unsetCascadePermission();
-      } else {
-        setCascadePermission((Boolean)value);
-      }
-      break;
-
     case CREATED_TIME:
       if (value == null) {
         unsetCreatedTime();
@@ -508,9 +466,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     case INHERITED_PARENT_ID:
       return getInheritedParentId();
 
-    case CASCADE_PERMISSION:
-      return isCascadePermission();
-
     case CREATED_TIME:
       return getCreatedTime();
 
@@ -538,8 +493,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       return isSetSharingType();
     case INHERITED_PARENT_ID:
       return isSetInheritedParentId();
-    case CASCADE_PERMISSION:
-      return isSetCascadePermission();
     case CREATED_TIME:
       return isSetCreatedTime();
     case UPDATED_TIME:
@@ -606,15 +559,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
         return false;
     }
 
-    boolean this_present_cascadePermission = true && this.isSetCascadePermission();
-    boolean that_present_cascadePermission = true && that.isSetCascadePermission();
-    if (this_present_cascadePermission || that_present_cascadePermission) {
-      if (!(this_present_cascadePermission && that_present_cascadePermission))
-        return false;
-      if (this.cascadePermission != that.cascadePermission)
-        return false;
-    }
-
     boolean this_present_createdTime = true && this.isSetCreatedTime();
     boolean that_present_createdTime = true && that.isSetCreatedTime();
     if (this_present_createdTime || that_present_createdTime) {
@@ -665,11 +609,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     if (present_inheritedParentId)
       list.add(inheritedParentId);
 
-    boolean present_cascadePermission = true && (isSetCascadePermission());
-    list.add(present_cascadePermission);
-    if (present_cascadePermission)
-      list.add(cascadePermission);
-
     boolean present_createdTime = true && (isSetCreatedTime());
     list.add(present_createdTime);
     if (present_createdTime)
@@ -741,16 +680,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetCascadePermission()).compareTo(other.isSetCascadePermission());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetCascadePermission()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascadePermission, other.cascadePermission);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
     if (lastComparison != 0) {
       return lastComparison;
@@ -840,12 +769,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       }
       first = false;
     }
-    if (isSetCascadePermission()) {
-      if (!first) sb.append(", ");
-      sb.append("cascadePermission:");
-      sb.append(this.cascadePermission);
-      first = false;
-    }
     if (isSetCreatedTime()) {
       if (!first) sb.append(", ");
       sb.append("createdTime:");
@@ -943,15 +866,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // CASCADE_PERMISSION
-            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
-              struct.cascadePermission = iprot.readBool();
-              struct.setCascadePermissionIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 7: // CREATED_TIME
+          case 6: // CREATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.createdTime = iprot.readI64();
               struct.setCreatedTimeIsSet(true);
@@ -959,7 +874,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 8: // UPDATED_TIME
+          case 7: // UPDATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.updatedTime = iprot.readI64();
               struct.setUpdatedTimeIsSet(true);
@@ -1017,11 +932,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
           oprot.writeFieldEnd();
         }
       }
-      if (struct.isSetCascadePermission()) {
-        oprot.writeFieldBegin(CASCADE_PERMISSION_FIELD_DESC);
-        oprot.writeBool(struct.cascadePermission);
-        oprot.writeFieldEnd();
-      }
       if (struct.isSetCreatedTime()) {
         oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
         oprot.writeI64(struct.createdTime);
@@ -1065,16 +975,13 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       if (struct.isSetInheritedParentId()) {
         optionals.set(4);
       }
-      if (struct.isSetCascadePermission()) {
-        optionals.set(5);
-      }
       if (struct.isSetCreatedTime()) {
-        optionals.set(6);
+        optionals.set(5);
       }
       if (struct.isSetUpdatedTime()) {
-        optionals.set(7);
+        optionals.set(6);
       }
-      oprot.writeBitSet(optionals, 8);
+      oprot.writeBitSet(optionals, 7);
       if (struct.isSetPermissionTypeId()) {
         oprot.writeString(struct.permissionTypeId);
       }
@@ -1090,9 +997,6 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       if (struct.isSetInheritedParentId()) {
         oprot.writeString(struct.inheritedParentId);
       }
-      if (struct.isSetCascadePermission()) {
-        oprot.writeBool(struct.cascadePermission);
-      }
       if (struct.isSetCreatedTime()) {
         oprot.writeI64(struct.createdTime);
       }
@@ -1104,7 +1008,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, Sharing struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(8);
+      BitSet incoming = iprot.readBitSet(7);
       if (incoming.get(0)) {
         struct.permissionTypeId = iprot.readString();
         struct.setPermissionTypeIdIsSet(true);
@@ -1126,14 +1030,10 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
         struct.setInheritedParentIdIsSet(true);
       }
       if (incoming.get(5)) {
-        struct.cascadePermission = iprot.readBool();
-        struct.setCascadePermissionIsSet(true);
-      }
-      if (incoming.get(6)) {
         struct.createdTime = iprot.readI64();
         struct.setCreatedTimeIsSet(true);
       }
-      if (incoming.get(7)) {
+      if (incoming.get(6)) {
         struct.updatedTime = iprot.readI64();
         struct.setUpdatedTimeIsSet(true);
       }

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
index 69be6e7..d37ff2a 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
index 0c481bb..f3a9a02 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._Fields>, java.io.Serializable, Cloneable, Comparable<UserGroup> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserGroup");
 


[2/3] airavata git commit: changing Airavata Server Handler to use new Sharing Module

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/10f30a96/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
index 1e0e1b9..9b47bc3 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-05")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
 public class GovRegistryService {
 
   public interface Iface {
@@ -129,6 +129,10 @@ public class GovRegistryService {
 
     public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String userId, String entityTypeId, Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
 
+    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
     /**
      *  * Permission Operations
      * *
@@ -228,6 +232,10 @@ public class GovRegistryService {
 
     public void searchEntities(String userId, String entityTypeId, Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void getListOfSharedUsers(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getListOfSharedGroups(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -1064,6 +1072,60 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchEntities failed: unknown result");
     }
 
+    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+    {
+      send_getListOfSharedUsers(entityId, permissionTypeId);
+      return recv_getListOfSharedUsers();
+    }
+
+    public void send_getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.thrift.TException
+    {
+      getListOfSharedUsers_args args = new getListOfSharedUsers_args();
+      args.setEntityId(entityId);
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("getListOfSharedUsers", args);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.User> recv_getListOfSharedUsers() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+    {
+      getListOfSharedUsers_result result = new getListOfSharedUsers_result();
+      receiveBase(result, "getListOfSharedUsers");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.gre != null) {
+        throw result.gre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedUsers failed: unknown result");
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+    {
+      send_getListOfSharedGroups(entityId, permissionTypeId);
+      return recv_getListOfSharedGroups();
+    }
+
+    public void send_getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.thrift.TException
+    {
+      getListOfSharedGroups_args args = new getListOfSharedGroups_args();
+      args.setEntityId(entityId);
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("getListOfSharedGroups", args);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> recv_getListOfSharedGroups() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+    {
+      getListOfSharedGroups_result result = new getListOfSharedGroups_result();
+      receiveBase(result, "getListOfSharedGroups");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.gre != null) {
+        throw result.gre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedGroups failed: unknown result");
+    }
+
     public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
     {
       send_createPermissionType(permissionType);
@@ -2368,6 +2430,76 @@ public class GovRegistryService {
       }
     }
 
+    public void getListOfSharedUsers(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getListOfSharedUsers_call method_call = new getListOfSharedUsers_call(entityId, permissionTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getListOfSharedUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String entityId;
+      private String permissionTypeId;
+      public getListOfSharedUsers_call(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.entityId = entityId;
+        this.permissionTypeId = permissionTypeId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getListOfSharedUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getListOfSharedUsers_args args = new getListOfSharedUsers_args();
+        args.setEntityId(entityId);
+        args.setPermissionTypeId(permissionTypeId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.sharing.registry.models.User> getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getListOfSharedUsers();
+      }
+    }
+
+    public void getListOfSharedGroups(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getListOfSharedGroups_call method_call = new getListOfSharedGroups_call(entityId, permissionTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getListOfSharedGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String entityId;
+      private String permissionTypeId;
+      public getListOfSharedGroups_call(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.entityId = entityId;
+        this.permissionTypeId = permissionTypeId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getListOfSharedGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getListOfSharedGroups_args args = new getListOfSharedGroups_args();
+        args.setEntityId(entityId);
+        args.setPermissionTypeId(permissionTypeId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.sharing.registry.models.UserGroup> getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getListOfSharedGroups();
+      }
+    }
+
     public void createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       createPermissionType_call method_call = new createPermissionType_call(permissionType, resultHandler, this, ___protocolFactory, ___transport);
@@ -2776,6 +2908,8 @@ public class GovRegistryService {
       processMap.put("deleteEntity", new deleteEntity());
       processMap.put("getEntity", new getEntity());
       processMap.put("searchEntities", new searchEntities());
+      processMap.put("getListOfSharedUsers", new getListOfSharedUsers());
+      processMap.put("getListOfSharedGroups", new getListOfSharedGroups());
       processMap.put("createPermissionType", new createPermissionType());
       processMap.put("updatePermissionType", new updatePermissionType());
       processMap.put("deletePermissionType", new deletePermissionType());
@@ -3519,6 +3653,54 @@ public class GovRegistryService {
       }
     }
 
+    public static class getListOfSharedUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getListOfSharedUsers_args> {
+      public getListOfSharedUsers() {
+        super("getListOfSharedUsers");
+      }
+
+      public getListOfSharedUsers_args getEmptyArgsInstance() {
+        return new getListOfSharedUsers_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getListOfSharedUsers_result getResult(I iface, getListOfSharedUsers_args args) throws org.apache.thrift.TException {
+        getListOfSharedUsers_result result = new getListOfSharedUsers_result();
+        try {
+          result.success = iface.getListOfSharedUsers(args.entityId, args.permissionTypeId);
+        } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+          result.gre = gre;
+        }
+        return result;
+      }
+    }
+
+    public static class getListOfSharedGroups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getListOfSharedGroups_args> {
+      public getListOfSharedGroups() {
+        super("getListOfSharedGroups");
+      }
+
+      public getListOfSharedGroups_args getEmptyArgsInstance() {
+        return new getListOfSharedGroups_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getListOfSharedGroups_result getResult(I iface, getListOfSharedGroups_args args) throws org.apache.thrift.TException {
+        getListOfSharedGroups_result result = new getListOfSharedGroups_result();
+        try {
+          result.success = iface.getListOfSharedGroups(args.entityId, args.permissionTypeId);
+        } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+          result.gre = gre;
+        }
+        return result;
+      }
+    }
+
     public static class createPermissionType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPermissionType_args> {
       public createPermissionType() {
         super("createPermissionType");
@@ -3809,6 +3991,8 @@ public class GovRegistryService {
       processMap.put("deleteEntity", new deleteEntity());
       processMap.put("getEntity", new getEntity());
       processMap.put("searchEntities", new searchEntities());
+      processMap.put("getListOfSharedUsers", new getListOfSharedUsers());
+      processMap.put("getListOfSharedGroups", new getListOfSharedGroups());
       processMap.put("createPermissionType", new createPermissionType());
       processMap.put("updatePermissionType", new updatePermissionType());
       processMap.put("deletePermissionType", new deletePermissionType());
@@ -5540,20 +5724,20 @@ public class GovRegistryService {
       }
     }
 
-    public static class createPermissionType<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createPermissionType_args, String> {
-      public createPermissionType() {
-        super("createPermissionType");
+    public static class getListOfSharedUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getListOfSharedUsers_args, List<org.apache.airavata.sharing.registry.models.User>> {
+      public getListOfSharedUsers() {
+        super("getListOfSharedUsers");
       }
 
-      public createPermissionType_args getEmptyArgsInstance() {
-        return new createPermissionType_args();
+      public getListOfSharedUsers_args getEmptyArgsInstance() {
+        return new getListOfSharedUsers_args();
       }
 
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.User>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            createPermissionType_result result = new createPermissionType_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.User>>() { 
+          public void onComplete(List<org.apache.airavata.sharing.registry.models.User> o) {
+            getListOfSharedUsers_result result = new getListOfSharedUsers_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -5566,7 +5750,7 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            createPermissionType_result result = new createPermissionType_result();
+            getListOfSharedUsers_result result = new getListOfSharedUsers_result();
             if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -5592,27 +5776,26 @@ public class GovRegistryService {
         return false;
       }
 
-      public void start(I iface, createPermissionType_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.createPermissionType(args.permissionType,resultHandler);
+      public void start(I iface, getListOfSharedUsers_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.User>> resultHandler) throws TException {
+        iface.getListOfSharedUsers(args.entityId, args.permissionTypeId,resultHandler);
       }
     }
 
-    public static class updatePermissionType<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updatePermissionType_args, Boolean> {
-      public updatePermissionType() {
-        super("updatePermissionType");
+    public static class getListOfSharedGroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getListOfSharedGroups_args, List<org.apache.airavata.sharing.registry.models.UserGroup>> {
+      public getListOfSharedGroups() {
+        super("getListOfSharedGroups");
       }
 
-      public updatePermissionType_args getEmptyArgsInstance() {
-        return new updatePermissionType_args();
+      public getListOfSharedGroups_args getEmptyArgsInstance() {
+        return new getListOfSharedGroups_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.UserGroup>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updatePermissionType_result result = new updatePermissionType_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.UserGroup>>() { 
+          public void onComplete(List<org.apache.airavata.sharing.registry.models.UserGroup> o) {
+            getListOfSharedGroups_result result = new getListOfSharedGroups_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -5624,7 +5807,7 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updatePermissionType_result result = new updatePermissionType_result();
+            getListOfSharedGroups_result result = new getListOfSharedGroups_result();
             if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -5650,25 +5833,82 @@ public class GovRegistryService {
         return false;
       }
 
-      public void start(I iface, updatePermissionType_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updatePermissionType(args.permissionType,resultHandler);
+      public void start(I iface, getListOfSharedGroups_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.UserGroup>> resultHandler) throws TException {
+        iface.getListOfSharedGroups(args.entityId, args.permissionTypeId,resultHandler);
       }
     }
 
-    public static class deletePermissionType<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePermissionType_args, Boolean> {
-      public deletePermissionType() {
-        super("deletePermissionType");
+    public static class createPermissionType<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createPermissionType_args, String> {
+      public createPermissionType() {
+        super("createPermissionType");
       }
 
-      public deletePermissionType_args getEmptyArgsInstance() {
-        return new deletePermissionType_args();
+      public createPermissionType_args getEmptyArgsInstance() {
+        return new createPermissionType_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            createPermissionType_result result = new createPermissionType_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            createPermissionType_result result = new createPermissionType_result();
+            if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+                        result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+                        result.setGreIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, createPermissionType_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.createPermissionType(args.permissionType,resultHandler);
+      }
+    }
+
+    public static class updatePermissionType<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updatePermissionType_args, Boolean> {
+      public updatePermissionType() {
+        super("updatePermissionType");
+      }
+
+      public updatePermissionType_args getEmptyArgsInstance() {
+        return new updatePermissionType_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            deletePermissionType_result result = new deletePermissionType_result();
+            updatePermissionType_result result = new updatePermissionType_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -5682,7 +5922,7 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deletePermissionType_result result = new deletePermissionType_result();
+            updatePermissionType_result result = new updatePermissionType_result();
             if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -5708,26 +5948,27 @@ public class GovRegistryService {
         return false;
       }
 
-      public void start(I iface, deletePermissionType_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deletePermissionType(args.entityTypeId,resultHandler);
+      public void start(I iface, updatePermissionType_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updatePermissionType(args.permissionType,resultHandler);
       }
     }
 
-    public static class getPermissionType<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPermissionType_args, org.apache.airavata.sharing.registry.models.PermissionType> {
-      public getPermissionType() {
-        super("getPermissionType");
+    public static class deletePermissionType<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePermissionType_args, Boolean> {
+      public deletePermissionType() {
+        super("deletePermissionType");
       }
 
-      public getPermissionType_args getEmptyArgsInstance() {
-        return new getPermissionType_args();
+      public deletePermissionType_args getEmptyArgsInstance() {
+        return new deletePermissionType_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType>() { 
-          public void onComplete(org.apache.airavata.sharing.registry.models.PermissionType o) {
-            getPermissionType_result result = new getPermissionType_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deletePermissionType_result result = new deletePermissionType_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -5739,7 +5980,7 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getPermissionType_result result = new getPermissionType_result();
+            deletePermissionType_result result = new deletePermissionType_result();
             if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -5765,25 +6006,25 @@ public class GovRegistryService {
         return false;
       }
 
-      public void start(I iface, getPermissionType_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType> resultHandler) throws TException {
-        iface.getPermissionType(args.permissionTypeId,resultHandler);
+      public void start(I iface, deletePermissionType_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deletePermissionType(args.entityTypeId,resultHandler);
       }
     }
 
-    public static class getPermissionTypes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPermissionTypes_args, List<org.apache.airavata.sharing.registry.models.PermissionType>> {
-      public getPermissionTypes() {
-        super("getPermissionTypes");
+    public static class getPermissionType<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPermissionType_args, org.apache.airavata.sharing.registry.models.PermissionType> {
+      public getPermissionType() {
+        super("getPermissionType");
       }
 
-      public getPermissionTypes_args getEmptyArgsInstance() {
-        return new getPermissionTypes_args();
+      public getPermissionType_args getEmptyArgsInstance() {
+        return new getPermissionType_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.PermissionType>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.PermissionType>>() { 
-          public void onComplete(List<org.apache.airavata.sharing.registry.models.PermissionType> o) {
-            getPermissionTypes_result result = new getPermissionTypes_result();
+        return new AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType>() { 
+          public void onComplete(org.apache.airavata.sharing.registry.models.PermissionType o) {
+            getPermissionType_result result = new getPermissionType_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -5796,7 +6037,64 @@ public class GovRegistryService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getPermissionTypes_result result = new getPermissionTypes_result();
+            getPermissionType_result result = new getPermissionType_result();
+            if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+                        result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+                        result.setGreIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getPermissionType_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.sharing.registry.models.PermissionType> resultHandler) throws TException {
+        iface.getPermissionType(args.permissionTypeId,resultHandler);
+      }
+    }
+
+    public static class getPermissionTypes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPermissionTypes_args, List<org.apache.airavata.sharing.registry.models.PermissionType>> {
+      public getPermissionTypes() {
+        super("getPermissionTypes");
+      }
+
+      public getPermissionTypes_args getEmptyArgsInstance() {
+        return new getPermissionTypes_args();
+      }
+
+      public AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.PermissionType>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<List<org.apache.airavata.sharing.registry.models.PermissionType>>() { 
+          public void onComplete(List<org.apache.airavata.sharing.registry.models.PermissionType> o) {
+            getPermissionTypes_result result = new getPermissionTypes_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getPermissionTypes_result result = new getPermissionTypes_result();
             if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
                         result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
                         result.setGreIsSet(true);
@@ -32148,57 +32446,2101 @@ public class GovRegistryService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("searchEntities_args(");
+      StringBuilder sb = new StringBuilder("searchEntities_args(");
+      boolean first = true;
+
+      sb.append("userId:");
+      if (this.userId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.userId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("entityTypeId:");
+      if (this.entityTypeId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.entityTypeId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("filters:");
+      if (this.filters == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.filters);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("offset:");
+      sb.append(this.offset);
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("limit:");
+      sb.append(this.limit);
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (userId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'userId' was not present! Struct: " + toString());
+      }
+      if (entityTypeId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityTypeId' was not present! Struct: " + toString());
+      }
+      if (filters == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'filters' was not present! Struct: " + toString());
+      }
+      // alas, we cannot check 'offset' because it's a primitive and you chose the non-beans generator.
+      // alas, we cannot check 'limit' because it's a primitive and you chose the non-beans generator.
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class searchEntities_argsStandardSchemeFactory implements SchemeFactory {
+      public searchEntities_argsStandardScheme getScheme() {
+        return new searchEntities_argsStandardScheme();
+      }
+    }
+
+    private static class searchEntities_argsStandardScheme extends StandardScheme<searchEntities_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, searchEntities_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // USER_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.userId = iprot.readString();
+                struct.setUserIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // ENTITY_TYPE_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.entityTypeId = iprot.readString();
+                struct.setEntityTypeIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // FILTERS
+              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+                {
+                  org.apache.thrift.protocol.TMap _map58 = iprot.readMapBegin();
+                  struct.filters = new HashMap<org.apache.airavata.sharing.registry.models.EntitySearchFields,String>(2*_map58.size);
+                  org.apache.airavata.sharing.registry.models.EntitySearchFields _key59;
+                  String _val60;
+                  for (int _i61 = 0; _i61 < _map58.size; ++_i61)
+                  {
+                    _key59 = org.apache.airavata.sharing.registry.models.EntitySearchFields.findByValue(iprot.readI32());
+                    _val60 = iprot.readString();
+                    struct.filters.put(_key59, _val60);
+                  }
+                  iprot.readMapEnd();
+                }
+                struct.setFiltersIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // OFFSET
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.offset = iprot.readI32();
+                struct.setOffsetIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 5: // LIMIT
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.limit = iprot.readI32();
+                struct.setLimitIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        if (!struct.isSetOffset()) {
+          throw new org.apache.thrift.protocol.TProtocolException("Required field 'offset' was not found in serialized data! Struct: " + toString());
+        }
+        if (!struct.isSetLimit()) {
+          throw new org.apache.thrift.protocol.TProtocolException("Required field 'limit' was not found in serialized data! Struct: " + toString());
+        }
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, searchEntities_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.userId != null) {
+          oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+          oprot.writeString(struct.userId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.entityTypeId != null) {
+          oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+          oprot.writeString(struct.entityTypeId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.filters != null) {
+          oprot.writeFieldBegin(FILTERS_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, struct.filters.size()));
+            for (Map.Entry<org.apache.airavata.sharing.registry.models.EntitySearchFields, String> _iter62 : struct.filters.entrySet())
+            {
+              oprot.writeI32(_iter62.getKey().getValue());
+              oprot.writeString(_iter62.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldBegin(OFFSET_FIELD_DESC);
+        oprot.writeI32(struct.offset);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(LIMIT_FIELD_DESC);
+        oprot.writeI32(struct.limit);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class searchEntities_argsTupleSchemeFactory implements SchemeFactory {
+      public searchEntities_argsTupleScheme getScheme() {
+        return new searchEntities_argsTupleScheme();
+      }
+    }
+
+    private static class searchEntities_argsTupleScheme extends TupleScheme<searchEntities_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, searchEntities_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.userId);
+        oprot.writeString(struct.entityTypeId);
+        {
+          oprot.writeI32(struct.filters.size());
+          for (Map.Entry<org.apache.airavata.sharing.registry.models.EntitySearchFields, String> _iter63 : struct.filters.entrySet())
+          {
+            oprot.writeI32(_iter63.getKey().getValue());
+            oprot.writeString(_iter63.getValue());
+          }
+        }
+        oprot.writeI32(struct.offset);
+        oprot.writeI32(struct.limit);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, searchEntities_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.userId = iprot.readString();
+        struct.setUserIdIsSet(true);
+        struct.entityTypeId = iprot.readString();
+        struct.setEntityTypeIdIsSet(true);
+        {
+          org.apache.thrift.protocol.TMap _map64 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.filters = new HashMap<org.apache.airavata.sharing.registry.models.EntitySearchFields,String>(2*_map64.size);
+          org.apache.airavata.sharing.registry.models.EntitySearchFields _key65;
+          String _val66;
+          for (int _i67 = 0; _i67 < _map64.size; ++_i67)
+          {
+            _key65 = org.apache.airavata.sharing.registry.models.EntitySearchFields.findByValue(iprot.readI32());
+            _val66 = iprot.readString();
+            struct.filters.put(_key65, _val66);
+          }
+        }
+        struct.setFiltersIsSet(true);
+        struct.offset = iprot.readI32();
+        struct.setOffsetIsSet(true);
+        struct.limit = iprot.readI32();
+        struct.setLimitIsSet(true);
+      }
+    }
+
+  }
+
+  public static class searchEntities_result implements org.apache.thrift.TBase<searchEntities_result, searchEntities_result._Fields>, java.io.Serializable, Cloneable, Comparable<searchEntities_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("searchEntities_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+    private static final org.apache.thrift.protocol.TField GRE_FIELD_DESC = new org.apache.thrift.protocol.TField("gre", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new searchEntities_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new searchEntities_resultTupleSchemeFactory());
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.Entity> success; // required
+    public org.apache.airavata.sharing.registry.models.GovRegistryException gre; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success"),
+      GRE((short)1, "gre");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          case 1: // GRE
+            return GRE;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.sharing.registry.models.Entity.class))));
+      tmpMap.put(_Fields.GRE, new org.apache.thrift.meta_data.FieldMetaData("gre", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(searchEntities_result.class, metaDataMap);
+    }
+
+    public searchEntities_result() {
+    }
+
+    public searchEntities_result(
+      List<org.apache.airavata.sharing.registry.models.Entity> success,
+      org.apache.airavata.sharing.registry.models.GovRegistryException gre)
+    {
+      this();
+      this.success = success;
+      this.gre = gre;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public searchEntities_result(searchEntities_result other) {
+      if (other.isSetSuccess()) {
+        List<org.apache.airavata.sharing.registry.models.Entity> __this__success = new ArrayList<org.apache.airavata.sharing.registry.models.Entity>(other.success.size());
+        for (org.apache.airavata.sharing.registry.models.Entity other_element : other.success) {
+          __this__success.add(new org.apache.airavata.sharing.registry.models.Entity(other_element));
+        }
+        this.success = __this__success;
+      }
+      if (other.isSetGre()) {
+        this.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+      }
+    }
+
+    public searchEntities_result deepCopy() {
+      return new searchEntities_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+      this.gre = null;
+    }
+
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public java.util.Iterator<org.apache.airavata.sharing.registry.models.Entity> getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(org.apache.airavata.sharing.registry.models.Entity elem) {
+      if (this.success == null) {
+        this.success = new ArrayList<org.apache.airavata.sharing.registry.models.Entity>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.Entity> getSuccess() {
+      return this.success;
+    }
+
+    public searchEntities_result setSuccess(List<org.apache.airavata.sharing.registry.models.Entity> success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public org.apache.airavata.sharing.registry.models.GovRegistryException getGre() {
+      return this.gre;
+    }
+
+    public searchEntities_result setGre(org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+      this.gre = gre;
+      return this;
+    }
+
+    public void unsetGre() {
+      this.gre = null;
+    }
+
+    /** Returns true if field gre is set (has been assigned a value) and false otherwise */
+    public boolean isSetGre() {
+      return this.gre != null;
+    }
+
+    public void setGreIsSet(boolean value) {
+      if (!value) {
+        this.gre = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((List<org.apache.airavata.sharing.registry.models.Entity>)value);
+        }
+        break;
+
+      case GRE:
+        if (value == null) {
+          unsetGre();
+        } else {
+          setGre((org.apache.airavata.sharing.registry.models.GovRegistryException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
+      case GRE:
+        return getGre();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      case GRE:
+        return isSetGre();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof searchEntities_result)
+        return this.equals((searchEntities_result)that);
+      return false;
+    }
+
+    public boolean equals(searchEntities_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_gre = true && this.isSetGre();
+      boolean that_present_gre = true && that.isSetGre();
+      if (this_present_gre || that_present_gre) {
+        if (!(this_present_gre && that_present_gre))
+          return false;
+        if (!this.gre.equals(that.gre))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_success = true && (isSetSuccess());
+      list.add(present_success);
+      if (present_success)
+        list.add(success);
+
+      boolean present_gre = true && (isSetGre());
+      list.add(present_gre);
+      if (present_gre)
+        list.add(gre);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(searchEntities_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetGre()).compareTo(other.isSetGre());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetGre()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gre, other.gre);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("searchEntities_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("gre:");
+      if (this.gre == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gre);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class searchEntities_resultStandardSchemeFactory implements SchemeFactory {
+      public searchEntities_resultStandardScheme getScheme() {
+        return new searchEntities_resultStandardScheme();
+      }
+    }
+
+    private static class searchEntities_resultStandardScheme extends StandardScheme<searchEntities_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, searchEntities_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list68 = iprot.readListBegin();
+                  struct.success = new ArrayList<org.apache.airavata.sharing.registry.models.Entity>(_list68.size);
+                  org.apache.airavata.sharing.registry.models.Entity _elem69;
+                  for (int _i70 = 0; _i70 < _list68.size; ++_i70)
+                  {
+                    _elem69 = new org.apache.airavata.sharing.registry.models.Entity();
+                    _elem69.read(iprot);
+                    struct.success.add(_elem69);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // GRE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException();
+                struct.gre.read(iprot);
+                struct.setGreIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, searchEntities_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+            for (org.apache.airavata.sharing.registry.models.Entity _iter71 : struct.success)
+            {
+              _iter71.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.gre != null) {
+          oprot.writeFieldBegin(GRE_FIELD_DESC);
+          struct.gre.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class searchEntities_resultTupleSchemeFactory implements SchemeFactory {
+      public searchEntities_resultTupleScheme getScheme() {
+        return new searchEntities_resultTupleScheme();
+      }
+    }
+
+    private static class searchEntities_resultTupleScheme extends TupleScheme<searchEntities_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, searchEntities_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetGre()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          {
+            oprot.writeI32(struct.success.size());
+            for (org.apache.airavata.sharing.registry.models.Entity _iter72 : struct.success)
+            {
+              _iter72.write(oprot);
+            }
+          }
+        }
+        if (struct.isSetGre()) {
+          struct.gre.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, searchEntities_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          {
+            org.apache.thrift.protocol.TList _list73 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<org.apache.airavata.sharing.registry.models.Entity>(_list73.size);
+            org.apache.airavata.sharing.registry.models.Entity _elem74;
+            for (int _i75 = 0; _i75 < _list73.size; ++_i75)
+            {
+              _elem74 = new org.apache.airavata.sharing.registry.models.Entity();
+              _elem74.read(iprot);
+              struct.success.add(_elem74);
+            }
+          }
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException();
+          struct.gre.read(iprot);
+          struct.setGreIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class getListOfSharedUsers_args implements org.apache.thrift.TBase<getListOfSharedUsers_args, getListOfSharedUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getListOfSharedUsers_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getListOfSharedUsers_args");
+
+    private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField PERMISSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("permissionTypeId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getListOfSharedUsers_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getListOfSharedUsers_argsTupleSchemeFactory());
+    }
+
+    public String entityId; // required
+    public String permissionTypeId; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      ENTITY_ID((short)1, "entityId"),
+      PERMISSION_TYPE_ID((short)2, "permissionTypeId");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // ENTITY_ID
+            return ENTITY_ID;
+          case 2: // PERMISSION_TYPE_ID
+            return PERMISSION_TYPE_ID;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.PERMISSION_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("permissionTypeId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getListOfSharedUsers_args.class, metaDataMap);
+    }
+
+    public getListOfSharedUsers_args() {
+    }
+
+    public getListOfSharedUsers_args(
+      String entityId,
+      String permissionTypeId)
+    {
+      this();
+      this.entityId = entityId;
+      this.permissionTypeId = permissionTypeId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getListOfSharedUsers_args(getListOfSharedUsers_args other) {
+      if (other.isSetEntityId()) {
+        this.entityId = other.entityId;
+      }
+      if (other.isSetPermissionTypeId()) {
+        this.permissionTypeId = other.permissionTypeId;
+      }
+    }
+
+    public getListOfSharedUsers_args deepCopy() {
+      return new getListOfSharedUsers_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.entityId = null;
+      this.permissionTypeId = null;
+    }
+
+    public String getEntityId() {
+      return this.entityId;
+    }
+
+    public getListOfSharedUsers_args setEntityId(String entityId) {
+      this.entityId = entityId;
+      return this;
+    }
+
+    public void unsetEntityId() {
+      this.entityId = null;
+    }
+
+    /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
+    public boolean isSetEntityId() {
+      return this.entityId != null;
+    }
+
+    public void setEntityIdIsSet(boolean value) {
+      if (!value) {
+        this.entityId = null;
+      }
+    }
+
+    public String getPermissionTypeId() {
+      return this.permissionTypeId;
+    }
+
+    public getListOfSharedUsers_args setPermissionTypeId(String permissionTypeId) {
+      this.permissionTypeId = permissionTypeId;
+      return this;
+    }
+
+    public void unsetPermissionTypeId() {
+      this.permissionTypeId = null;
+    }
+
+    /** Returns true if field permissionTypeId is set (has been assigned a value) and false otherwise */
+    public boolean isSetPermissionTypeId() {
+      return this.permissionTypeId != null;
+    }
+
+    public void setPermissionTypeIdIsSet(boolean value) {
+      if (!value) {
+        this.permissionTypeId = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case ENTITY_ID:
+        if (value == null) {
+          unsetEntityId();
+        } else {
+          setEntityId((String)value);
+        }
+        break;
+
+      case PERMISSION_TYPE_ID:
+        if (value == null) {
+          unsetPermissionTypeId();
+        } else {
+          setPermissionTypeId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case ENTITY_ID:
+        return getEntityId();
+
+      case PERMISSION_TYPE_ID:
+        return getPermissionTypeId();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case ENTITY_ID:
+        return isSetEntityId();
+      case PERMISSION_TYPE_ID:
+        return isSetPermissionTypeId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getListOfSharedUsers_args)
+        return this.equals((getListOfSharedUsers_args)that);
+      return false;
+    }
+
+    public boolean equals(getListOfSharedUsers_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_entityId = true && this.isSetEntityId();
+      boolean that_present_entityId = true && that.isSetEntityId();
+      if (this_present_entityId || that_present_entityId) {
+        if (!(this_present_entityId && that_present_entityId))
+          return false;
+        if (!this.entityId.equals(that.entityId))
+          return false;
+      }
+
+      boolean this_present_permissionTypeId = true && this.isSetPermissionTypeId();
+      boolean that_present_permissionTypeId = true && that.isSetPermissionTypeId();
+      if (this_present_permissionTypeId || that_present_permissionTypeId) {
+        if (!(this_present_permissionTypeId && that_present_permissionTypeId))
+          return false;
+        if (!this.permissionTypeId.equals(that.permissionTypeId))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_entityId = true && (isSetEntityId());
+      list.add(present_entityId);
+      if (present_entityId)
+        list.add(entityId);
+
+      boolean present_permissionTypeId = true && (isSetPermissionTypeId());
+      list.add(present_permissionTypeId);
+      if (present_permissionTypeId)
+        list.add(permissionTypeId);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(getListOfSharedUsers_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(other.isSetEntityId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetEntityId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, other.entityId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetPermissionTypeId()).compareTo(other.isSetPermissionTypeId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetPermissionTypeId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissionTypeId, other.permissionTypeId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getListOfSharedUsers_args(");
+      boolean first = true;
+
+      sb.append("entityId:");
+      if (this.entityId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.entityId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("permissionTypeId:");
+      if (this.permissionTypeId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.permissionTypeId);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (entityId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityId' was not present! Struct: " + toString());
+      }
+      if (permissionTypeId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'permissionTypeId' was not present! Struct: " + toString());
+      }
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class getListOfSharedUsers_argsStandardSchemeFactory implements SchemeFactory {
+      public getListOfSharedUsers_argsStandardScheme getScheme() {
+        return new getListOfSharedUsers_argsStandardScheme();
+      }
+    }
+
+    private static class getListOfSharedUsers_argsStandardScheme extends StandardScheme<getListOfSharedUsers_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getListOfSharedUsers_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // ENTITY_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.entityId = iprot.readString();
+                struct.setEntityIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // PERMISSION_TYPE_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.permissionTypeId = iprot.readString();
+                struct.setPermissionTypeIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getListOfSharedUsers_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.entityId != null) {
+          oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
+          oprot.writeString(struct.entityId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.permissionTypeId != null) {
+          oprot.writeFieldBegin(PERMISSION_TYPE_ID_FIELD_DESC);
+          oprot.writeString(struct.permissionTypeId);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getListOfSharedUsers_argsTupleSchemeFactory implements SchemeFactory {
+      public getListOfSharedUsers_argsTupleScheme getScheme() {
+        return new getListOfSharedUsers_argsTupleScheme();
+      }
+    }
+
+    private static class getListOfSharedUsers_argsTupleScheme extends TupleScheme<getListOfSharedUsers_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getListOfSharedUsers_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.entityId);
+        oprot.writeString(struct.permissionTypeId);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getListOfSharedUsers_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.entityId = iprot.readString();
+        struct.setEntityIdIsSet(true);
+        struct.permissionTypeId = iprot.readString();
+        struct.setPermissionTypeIdIsSet(true);
+      }
+    }
+
+  }
+
+  public static class getListOfSharedUsers_result implements org.apache.thrift.TBase<getListOfSharedUsers_result, getListOfSharedUsers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getListOfSharedUsers_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getListOfSharedUsers_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+    private static final org.apache.thrift.protocol.TField GRE_FIELD_DESC = new org.apache.thrift.protocol.TField("gre", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getListOfSharedUsers_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getListOfSharedUsers_resultTupleSchemeFactory());
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.User> success; // required
+    public org.apache.airavata.sharing.registry.models.GovRegistryException gre; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success"),
+      GRE((short)1, "gre");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          case 1: // GRE
+            return GRE;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.sharing.registry.models.User.class))));
+      tmpMap.put(_Fields.GRE, new org.apache.thrift.meta_data.FieldMetaData("gre", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getListOfSharedUsers_result.class, metaDataMap);
+    }
+
+    public getListOfSharedUsers_result() {
+    }
+
+    public getListOfSharedUsers_result(
+      List<org.apache.airavata.sharing.registry.models.User> success,
+      org.apache.airavata.sharing.registry.models.GovRegistryException gre)
+    {
+      this();
+      this.success = success;
+      this.gre = gre;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getListOfSharedUsers_result(getListOfSharedUsers_result other) {
+      if (other.isSetSuccess()) {
+        List<org.apache.airavata.sharing.registry.models.User> __this__success = new ArrayList<org.apache.airavata.sharing.registry.models.User>(other.success.size());
+        for (org.apache.airavata.sharing.registry.models.User other_element : other.success) {
+          __this__success.add(new org.apache.airavata.sharing.registry.models.User(other_element));
+        }
+        this.success = __this__success;
+      }
+      if (other.isSetGre()) {
+        this.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+      }
+    }
+
+    public getListOfSharedUsers_result deepCopy() {
+      return new getListOfSharedUsers_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+      this.gre = null;
+    }
+
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public java.util.Iterator<org.apache.airavata.sharing.registry.models.User> getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(org.apache.airavata.sharing.registry.models.User elem) {
+      if (this.success == null) {
+        this.success = new ArrayList<org.apache.airavata.sharing.registry.models.User>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.User> getSuccess() {
+      return this.success;
+    }
+
+    public getListOfSharedUsers_result setSuccess(List<org.apache.airavata.sharing.registry.models.User> success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public org.apache.airavata.sharing.registry.models.GovRegistryException getGre() {
+      return this.gre;
+    }
+
+    public getListOfSharedUsers_result setGre(org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+      this.gre = gre;
+      return this;
+    }
+
+    public void unsetGre() {
+      this.gre = null;
+    }
+
+    /** Returns true if field gre is set (has been assigned a value) and false otherwise */
+    public boolean isSetGre() {
+      return this.gre != null;
+    }
+
+    public void setGreIsSet(boolean value) {
+      if (!value) {
+        this.gre = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((List<org.apache.airavata.sharing.registry.models.User>)value);
+        }
+        break;
+
+      case GRE:
+        if (value == null) {
+          unsetGre();
+        } else {
+          setGre((org.apache.airavata.sharing.registry.models.GovRegistryException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
+      case GRE:
+        return getGre();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      case GRE:
+        return isSetGre();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getListOfSharedUsers_result)
+        return this.equals((getListOfSharedUsers_result)that);
+      return false;
+    }
+
+    public boolean equals(getListOfSharedUsers_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+      

<TRUNCATED>