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/14 21:26:49 UTC

[1/4] airavata git commit: adding docs

Repository: airavata
Updated Branches:
  refs/heads/develop d521922ff -> 87564d2be


http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 3cef3e6..51d494f 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -25,73 +25,187 @@ include "./sharing_models.thrift"
 service SharingRegistryService {
 
     /**
-     * Domain Operations
-    **/
-    string createDomain(1: required sharing_models.Domain domain) throws (1: sharing_models.SharingRegistryException gre)
-    bool updateDomain(1: required sharing_models.Domain domain) throws (1: sharing_models.SharingRegistryException gre)
-    bool deleteDomain(1: required string domainId) throws (1: sharing_models.SharingRegistryException gre)
-    sharing_models.Domain getDomain(1: required string domainId) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.Domain> getDomains(1: required i32 offset, 2: required i32 limit) throws (1: sharing_models.SharingRegistryException gre);
+      <p>API method to create a new domainId.</p>
+    */
+    string createDomain(1: required sharing_models.Domain domainId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to update a domainId.</p>
+    */
+    bool updateDomain(1: required sharing_models.Domain domainId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to delete domainId.</p>
+    */
+    bool deleteDomain(1: required string domainId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to retrieve a domainId.</p>
+    */
+    sharing_models.Domain getDomain(1: required string domainId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get all domainIds.</p>
+    */
+    list<sharing_models.Domain> getDomains(1: required i32 offset, 2: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
+
+    /**
+     <p>API method to register a user in the system</p>
+    */
+    string registerUser(1: required sharing_models.User user) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to update existing user</p>
+    */
+    bool updatedUser(1: required sharing_models.User user) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to delete user</p>
+    */
+    bool deleteUser(1: required string userId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get a user</p>
+    */
+    sharing_models.User getUser(1: required string userId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get a list of users in a specific domainId. Users will be reverse sorted based on the created time.</p>
+     <li>domainId : Domain id</li>
+     <li>offset : Starting result number</li>
+     <li>limit : Number of max results to be sent</li>
+    */
+    list<sharing_models.User> getUsers(1: required string domainId, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
 
     /**
-     * User Operations
-    **/
-    string createUser(1: required sharing_models.User user) throws (1: sharing_models.SharingRegistryException gre)
-    bool updatedUser(1: required sharing_models.User user) throws (1: sharing_models.SharingRegistryException gre)
-    bool deleteUser(1: required string userId) throws (1: sharing_models.SharingRegistryException gre)
-    sharing_models.User getUser(1: required string userId) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.User> getUsers(1: required string domain, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException gre);
+     <p>API method to create a new group</p>
+    */
+    string createGroup(1: required sharing_models.UserGroup group) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to update a group</p>
+    */
+    bool updateGroup(1: required sharing_models.UserGroup group) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to delete a group</p>
+    */
+    bool deleteGroup(1: required string groupId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get a group</p>
+    */
+    sharing_models.UserGroup getGroup(1: required string groupId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get groups in a domainId. Results are reverse sorted based on created time.</p>
+    */
+    list<sharing_models.UserGroup> getGroups(1: required string domainId, 2: required i32 offset, 3: required i32 limit)
+
+    /**
+     <p>API method to add list of users to a group</p>
+    */
+    bool addUsersToGroup(1: required list<string> userIds, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
+    /**
+     <p>API method to remove users from a group</p>
+    */
+    bool removeUsersFromGroup(1: required list<string> userIds, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
+    /**
+     <p>API method to get list of child users in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
+    */
+    list<sharing_models.User> getGroupMembersOfTypeUser(1: required string groupId, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
+    /**
+     <p>API method to get list of child groups in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
+    */
+    list<sharing_models.UserGroup> getGroupMembersOfTypeGroup(1: required string groupId, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
+    /**
+     <p>API method to add a child group to a parent group.</p>
+    */
+    bool addChildGroupsToParentGroup(1: required list<string> childIds, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
+    /**
+     <p>API method to remove a child group from parent group.</p>
+    */
+    bool removeChildGroupFromParentGroup(1: required string childId, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
 
     /**
-     * Group Operations
-    **/
-    string createGroup(1: required sharing_models.UserGroup group) throws (1: sharing_models.SharingRegistryException gre)
-    bool updateGroup(1: required sharing_models.UserGroup group) throws (1: sharing_models.SharingRegistryException gre)
-    bool deleteGroup(1: required string groupId) throws (1: sharing_models.SharingRegistryException gre)
-    sharing_models.UserGroup getGroup(1: required string groupId) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.UserGroup> getGroups(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+     <p>API method to create a new entity type</p>
+    */
+    string createEntityType(1: required sharing_models.EntityType entityType) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to update entity type</p>
+    */
+    bool updateEntityType(1: required sharing_models.EntityType entityType) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to delete entity type</p>
+    */
+    bool deleteEntityType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get an entity type</p>
+    */
+    sharing_models.EntityType getEntityType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get entity types in a domainId. Results are reverse time sorted based on creation time</p>
+    */
+    list<sharing_models.EntityType> getEntityTypes(1: required string domainId, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
 
-    bool addUsersToGroup(1: required list<string> userIds, 2: required string groupId) throws (1: sharing_models.SharingRegistryException gre);
-    bool removeUsersFromGroup(1: required list<string> userIds, 2: required string groupId) throws (1: sharing_models.SharingRegistryException gre);
-    map<string, sharing_models.GroupChildType> getGroupMembers(1: required string groupId, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException gre);
-    bool addChildGroupToParentGroup(1: required string childId, 2: required string groupId) throws (1: sharing_models.SharingRegistryException gre);
-    bool removeChildGroupFromParentGroup(1: required string childId, 2: required string groupId) throws (1: sharing_models.SharingRegistryException gre);
 
     /**
-     * EntityType Operations
-    **/
-    string createEntityType(1: required sharing_models.EntityType entityType) throws (1: sharing_models.SharingRegistryException gre)
-    bool updateEntityType(1: required sharing_models.EntityType entityType) throws (1: sharing_models.SharingRegistryException gre)
-    bool deleteEntityType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException gre)
-    sharing_models.EntityType getEntityType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.EntityType> getEntityTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException gre);
+     <p>API method to register new entity</p>
+    */
+    string registerEntity(1: required sharing_models.Entity entity) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to update entity</p>
+    */
+    bool updateEntity(1: required sharing_models.Entity entity) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to delete entity</p>
+    */
+    bool deleteEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get entity</p>
+    */
+    sharing_models.Entity getEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to search entities</p>
+    */
+    list<sharing_models.Entity> searchEntities(1: required string userId, 2: required string entityTypeId, 3: required list<sharing_models.SearchCriteria> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get a list of shared users given the entity id</p>
+    */
+    list<sharing_models.User> getListOfSharedUsers(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get a list of shared groups given the entity id</p>
+    */
+    list<sharing_models.UserGroup> getListOfSharedGroups(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
 
     /**
-     * Entity Operations
-    **/
-    string createEntity(1: required sharing_models.Entity entity) throws (1: sharing_models.SharingRegistryException gre)
-    bool updateEntity(1: required sharing_models.Entity entity) throws (1: sharing_models.SharingRegistryException gre)
-    bool deleteEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException gre)
-    sharing_models.Entity getEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.Entity> searchEntities(1: required string userId, 2: required string entityTypeId, 3: required list<sharing_models.SearchCriteria> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.User> getListOfSharedUsers(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.UserGroup> getListOfSharedGroups(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
+     <p>API method to create permission type</p>
+    */
+    string createPermissionType(1: required sharing_models.PermissionType permissionType) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to update permission type</p>
+    */
+    bool updatePermissionType(1: required sharing_models.PermissionType permissionType) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to delete permission type</p>
+    */
+    bool deletePermissionType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get permission type</p>
+    */
+    sharing_models.PermissionType getPermissionType(1: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to get list of permission types in a given domainId. Results are reverse time sorted based on creation time</p>
+    */
+    list<sharing_models.PermissionType> getPermissionTypes(1: required string domainId, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException sre)
 
     /**
-     * Permission Operations
-    **/
-    string createPermissionType(1: required sharing_models.PermissionType permissionType) throws (1: sharing_models.SharingRegistryException gre)
-    bool updatePermissionType(1: required sharing_models.PermissionType permissionType) throws (1: sharing_models.SharingRegistryException gre)
-    bool deletePermissionType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException gre)
-    sharing_models.PermissionType getPermissionType(1: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.PermissionType> getPermissionTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException gre)
+     <p>API method to share an entity with users</p>
+    */
+    bool shareEntityWithUsers(1: required string domainId, 2: required string entityId, 3: required list<string> userList, 4: required string perssionTypeId, 5: required bool cascadePermission) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to revoke sharing from a list of users</p>
+    */
+    bool revokeEntitySharingFromUsers(1: required string domainId, 2: required string entityId, 3: required list<string> userList, 4: required string perssionTypeId ) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to share an entity with list of groups</p>
+    */
+    bool shareEntityWithGroups(1: required string domainId, 2: required string entityId, 3: required list<string> groupList, 4: required string perssionTypeId, 5: required bool cascadePermission) throws (1: sharing_models.SharingRegistryException sre)
+    /**
+     <p>API method to revoke sharing from list of users</p>
+    */
+    bool revokeEntitySharingFromGroups(1: required string domainId, 2: required string entityId, 3: required list<string> groupList, 4: required string perssionTypeId) throws (1: sharing_models.SharingRegistryException sre)
 
     /**
-     * Sharing Entity with Users and Groups
-    **/
-    bool shareEntityWithUsers(1: required string domainId, 2: required string entityId, 3: required list<string> userList, 4: required string perssionTypeId, 5: required bool cascadePermission) throws (1: sharing_models.SharingRegistryException gre)
-    bool revokeEntitySharingFromUsers(1: required string domainId, 2: required string entityId, 3: required list<string> userList, 4: required string perssionTypeId ) throws (1: sharing_models.SharingRegistryException gre)
-    bool shareEntityWithGroups(1: required string domainId, 2: required string entityId, 3: required list<string> groupList, 4: required string perssionTypeId, 5: required bool cascadePermission) throws (1: sharing_models.SharingRegistryException gre)
-    bool revokeEntitySharingFromGroups(1: required string domainId, 2: required string entityId, 3: required list<string> groupList, 4: required string perssionTypeId) throws (1: sharing_models.SharingRegistryException gre)
-    bool userHasAccess(1: required string domainId, 2: required string userId, 3: required string entityId, 4: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
+     <p>API method to check whether a user has access to a specific entity</p>
+    */
+    bool userHasAccess(1: required string domainId, 2: required string userId, 3: required string entityId, 4: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/thrift_models/sharing_models.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_models.thrift b/modules/sharing-registry/thrift_models/sharing_models.thrift
index 69409fc..f8c6f31 100644
--- a/modules/sharing-registry/thrift_models/sharing_models.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_models.thrift
@@ -22,6 +22,16 @@
 
 const string DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID"
 
+/**
+* <p>Domain is the entity that enables multi-tenency in this componenet. Every tenant will be
+* operating separately it's own silo which is identified by the domain id. In the current implementation domain id
+* will be same as the domain name</p>
+* <li>domainId : Will be generated by the server based on the domain name</li>
+* <li><b>name</b> : A single word name that identifies the domain e.g seagrid, ultrascan</li>
+* <li>description : A short description for the domain</li>
+* <li>createdTime : Will be set by the system</li>
+* <li>updatedTime : Will be set by the system</li>
+**/
 struct Domain {
     1: optional string domainId = DO_NOT_SET_AT_CLIENTS_ID,
     2: optional string name,
@@ -30,48 +40,101 @@ struct Domain {
     5: optional i64 updatedTime
 }
 
- struct User {
-     1: optional string userId = DO_NOT_SET_AT_CLIENTS_ID,
-     2: optional string domainId,
-     3: optional string userName,
-     4: optional string firstName,
-     5: optional string lastName,
-     6: optional binary icon,
-     7: optional i64 createdTime,
-     8: optional i64 updatedTime
- }
+/**
+* <p>User is the model used to register a user in the system. Minimal user information will be required to provide
+* regarding the user.</p>
+* <li><b>userId</b> : Client provided user id. (The id is not system generated and it is a must to provide this id)</li>
+* <li><b>domainId</b> : Domain id for that user</li>
+* <li><b>userName</b> : User name for the user</li>
+* <li><b>firstName</b> : First name of the user</li>
+* <li><b>lastName</b> : Last name of the user</li>
+* <li><b>email</b> : Email address of the user</li>
+* <li>icon : A binary field for storing the user icon</li>
+* <li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+* <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+**/
+struct User {
+ 1: optional string userId,
+ 2: optional string domainId,
+ 3: optional string userName,
+ 4: optional string firstName,
+ 5: optional string lastName,
+ 6: optional string email,
+ 7: optional binary icon,
+ 8: optional i64 createdTime,
+ 9: optional i64 updatedTime
+}
 
-enum GroupType {
+/**
+* <p>This is an system internal enum used to define single user groups and multi users groups. Every user is also
+* considered as a group in it's own right for implementation ease</p>
+**/
+enum GroupCardinality {
     SINGLE_USER,
     MULTI_USER
 }
 
- struct UserGroup {
-     1: optional string groupId = DO_NOT_SET_AT_CLIENTS_ID,
-     2: optional string domainId,
-     3: optional string name,
-     6: optional string description,
-     7: optional string ownerId,
-     8: optional i64 createdTime,
-     9: optional i64 updatedTime,
-     10: optional GroupType groupType
- }
+/**
+* <p>Group types can be either user level or domain level groups.</p>
+**/
+enum GroupType {
+    DOMAIN_LEVEL_GROUP,
+    USER_LEVEL_GROUP
+}
+
+/**
+*<p>User group is a collection of users.</p>
+* <li>groupId : System generated grouo id. In the current implementation this is of the form domainId:name</li>
+* <li><b>domainId</b> : Domain id for this user group</li>
+* <li><b>name</b> : Name for the user group. should be one word</li>
+* <li>description : Short description for the group.</li>
+* <li><b>ownerId</b> : Owner id of this group.</li>
+* <li><b>groupType</b> : Group type (DOMAIN_LEVEL_GROUP, USER_LEVEL_GROUP)</li>
+* <li><b>groupCardinality</b> : Group cardinality (SINGLE_USER, MULTI_USER)</li>
+* <li>createdTime : Will be set by the system</li>
+* <li>updatedTime : Will be set by the system</li>
+**/
+struct UserGroup {
+ 1: optional string groupId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 4: optional string description,
+ 5: optional string ownerId,
+ 6: optional GroupType groupType,
+ 7: optional GroupCardinality groupCardinality,
+ 8: optional i64 createdTime,
+ 9: optional i64 updatedTime
+}
 
- enum GroupChildType {
+/**
+* <p>System internal data type to match group child types</p>
+**/
+enum GroupChildType {
     USER,
     GROUP
- }
-
- struct GroupMembership {
-    1: optional string parentId,
-    2: optional string childId,
-    3: optional GroupChildType childType
-    4: optional i64 createdTime,
-    5: optional i64 updatedTime
- }
+}
 
+/**
+* <p>System internal data type to map group memberships</p>
+**/
+struct GroupMembership {
+1: optional string parentId,
+2: optional string childId,
+3: optional GroupChildType childType
+4: optional i64 createdTime,
+5: optional i64 updatedTime
+}
 
 
+/**
+* <p>client defined entity types</p>
+* <li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
+* <li><b>domainId</b> : Domain id of the domain.</li>
+* <li><b>name</b> : Name for the entity type. Should be a single word.</li>
+* <li>description : Short description for the entity type.</li>
+* <li>createdTime : Will be set by the system</li>
+* <li>updatedTime : Will be set by the system</li>
+**/
 struct EntityType {
     1: optional string entityTypeId = DO_NOT_SET_AT_CLIENTS_ID,
     2: optional string domainId,
@@ -81,6 +144,15 @@ struct EntityType {
     6: optional i64 updatedTime
 }
 
+/**
+* <p>This list of fields that can be used to search entities</p>
+* <li>NAME : Name of the entity</li>
+* <li>DESCRIPTION : Description of the entity</li>
+* <li>FULL_TEXT : Full text field of the entity</li>
+* <li>PARENT_ENTITY_ID : Parent entity id of the entity</li>
+* <li>CREATED_TIME : Created time of the entity</li>
+* <li>UPDATED_TIME : Updated time of the entity</li>
+**/
 enum EntitySearchField {
     NAME,
     DESCRIPTION,
@@ -90,21 +162,50 @@ enum EntitySearchField {
     UPDATED_TIME
 }
 
+/**
+* <p>Different search operators that can be used with the entity search fields</p>
+* <li>EQUAL : Simply matches for equality. Applicable for name, and parent entity id</li>
+* <li>LIKE : Check for the condition %$FIELD% condition. Applicable for name, and description</li>
+* <li>FULL_TEXT : Does a full text search. Only applicable for the FULL_TEXT field.</li>
+* <li>GTE : Greater than or equal. Only applicable for created time and updated time.</li>
+* <li>LTE : Less than or equal. Only applicable for created time and updated time.</li>
+**/
 enum SearchCondition {
     EQUAL,
     LIKE,
+    FULL_TEXT,
     GTE,
     LTE
 }
 
+/**
+* <p>Container object for search criteria</p>
+* <li><b>searchField</b> : Entity search field</li>
+* <li><b>value</b> : Search value</li>
+* <li><b>searchCondition</b> : EQUAL, LIKE etc..</li>
+**/
 struct SearchCriteria {
     1: optional EntitySearchField searchField,
     2: optional string value,
     3: optional SearchCondition searchCondition
 }
 
+/**
+* <p>Entity object which is used to register an entity in the system.</p>
+* <li><b>entityId</b> : Client id provided by the client</li>
+* <li><b>domainId</b> : Domain id</li>
+* <li><b>entityTypeId</b> : Entity type id</li>
+* <li><b>ownerId</b> : Owner id</li>
+* <li>parentEntityId : Parent entity id</li>
+* <li><b>name</b> : Name</li>
+* <li>description : Short description for the entity</li>
+* <li>metadata : Map of optional metadata</li>
+* <li>fullText : A string which will be considered for full text search</li>
+* <li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+* <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+**/
 struct Entity {
-    1: optional string entityId = DO_NOT_SET_AT_CLIENTS_ID,
+    1: optional string entityId,
     2: optional string domainId,
     3: optional string entityTypeId,
     4: optional string ownerId,
@@ -117,6 +218,15 @@ struct Entity {
     11: optional i64 updatedTime
 }
 
+/**
+* <p>Object for creating client defined permission type</p>
+* <li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
+* <li><b>domainId</b> : Domain id</li>
+* <li><b>name</b> : Single word name for the permission</li>
+* <li>description : Short description for the permission type</li>
+* <li>createdTime : Will be set by the system</li>
+* <li>updatedTime : Will be set by the system</li>
+**/
 struct PermissionType {
     1: optional string permissionTypeId = DO_NOT_SET_AT_CLIENTS_ID,
     2: optional string domainId,
@@ -126,12 +236,18 @@ struct PermissionType {
     6: optional i64 updatedTime
 }
 
+/**
+* <p>This is an internal enum type for managing sharings</p>
+**/
 enum SharingType {
     DIRECT_NON_CASCADING,
     DIRECT_CASCADING,
     INDIRECT_CASCADING
  }
 
+/**
+* <p>This is an internal enum type for managing sharings</p>
+**/
 struct Sharing {
     1: optional string permissionTypeId,
     2: optional string entityId,
@@ -142,6 +258,9 @@ struct Sharing {
     7: optional i64 updatedTime
 }
 
+/**
+* <p>Exception model used in the sharing registry service</p>
+**/
 exception SharingRegistryException {
   1: required string message
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/thrift_models/thrift-gen.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/thrift-gen.sh b/modules/sharing-registry/thrift_models/thrift-gen.sh
index 0119a98..89d2efd 100755
--- a/modules/sharing-registry/thrift_models/thrift-gen.sh
+++ b/modules/sharing-registry/thrift_models/thrift-gen.sh
@@ -20,4 +20,3 @@ thrift --gen html sharing_cpi.thrift
 
 rm -r ../api-docs
 mv gen-html ../api-docs
-rm -r gen-html


[4/4] airavata git commit: adding docs

Posted by sc...@apache.org.
adding docs


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

Branch: refs/heads/develop
Commit: 87564d2be2c0a118213443e2938df511cef356f9
Parents: d521922
Author: scnakandala <su...@gmail.com>
Authored: Fri Oct 14 17:26:41 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Oct 14 17:26:41 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |     8 +-
 modules/sharing-registry/api-docs/index.html    |    10 +-
 .../sharing-registry/api-docs/sharing_cpi.html  |   174 +-
 .../api-docs/sharing_models.html                |   160 +-
 .../migrator/airavata/AiravataDataMigrator.java |     6 +-
 .../registry/db/entities/SharingUserEntity.java |    11 +
 .../registry/db/entities/UserGroupEntity.java   |    11 +
 .../db/repositories/UserGroupRepository.java    |     4 +-
 .../sharing/registry/db/utils/DBConstants.java  |     1 +
 .../server/SharingRegistryServerHandler.java    |    57 +-
 .../main/resources/sharing-registry-derby.sql   |     2 +
 .../main/resources/sharing-registry-mysql.sql   |     2 +
 .../SharingRegistryServerHandlerTest.java       |    26 +-
 .../sharing/registry/models/Domain.java         |    13 +-
 .../sharing/registry/models/Entity.java         |    22 +-
 .../registry/models/EntitySearchField.java      |    10 +
 .../sharing/registry/models/EntityType.java     |    12 +-
 .../sharing/registry/models/GroupChildType.java |     4 +
 .../registry/models/GroupMembership.java        |     6 +-
 .../sharing/registry/models/GroupType.java      |    12 +-
 .../sharing/registry/models/PermissionType.java |    12 +-
 .../registry/models/SearchCondition.java        |    18 +-
 .../sharing/registry/models/SearchCriteria.java |     9 +-
 .../sharing/registry/models/Sharing.java        |     6 +-
 .../models/SharingRegistryException.java        |     6 +-
 .../sharing/registry/models/SharingType.java    |     4 +
 .../airavata/sharing/registry/models/User.java  |   168 +-
 .../sharing/registry/models/UserGroup.java      |   394 +-
 .../service/cpi/SharingRegistryService.java     | 10311 ++++++++++-------
 .../thrift_models/sharing_cpi.thrift            |   226 +-
 .../thrift_models/sharing_models.thrift         |   183 +-
 .../thrift_models/thrift-gen.sh                 |     1 -
 32 files changed, 7065 insertions(+), 4824 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 45ddc3f..7690ca2 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
@@ -123,7 +123,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             user.setDomainId(domain.domainId);
             user.setUserId(ServerSettings.getDefaultUser()+"@"+ServerSettings.getDefaultUserGateway());
             user.setUserName(ServerSettings.getDefaultUser());
-            sharingRegistryServerHandler.createUser(user);
+            sharingRegistryServerHandler.registerUser(user);
 
             //Creating Entity Types for each domain
             EntityType entityType = new EntityType();
@@ -671,7 +671,7 @@ public class AiravataServerHandler implements Airavata.Iface {
                 entity.setName(project.getName());
                 entity.setDescription(project.getDescription());
 
-                sharingRegistryServerHandler.createEntity(entity);
+                sharingRegistryServerHandler.registerEntity(entity);
             }
 
             logger.debug("Airavata created project with project Id : " + projectId + " for gateway Id : " + gatewayId);
@@ -1046,7 +1046,7 @@ public class AiravataServerHandler implements Airavata.Iface {
                 entity.setName(experiment.getExperimentName());
                 entity.setDescription(experiment.getDescription());
 
-                sharingRegistryServerHandler.createEntity(entity);
+                sharingRegistryServerHandler.registerEntity(entity);
             }
 
             ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent(ExperimentState.CREATED,
@@ -1586,7 +1586,7 @@ public class AiravataServerHandler implements Airavata.Iface {
                 entity.setName(existingExperiment.getExperimentName());
                 entity.setDescription(existingExperiment.getDescription());
 
-                sharingRegistryServerHandler.createEntity(entity);
+                sharingRegistryServerHandler.registerEntity(entity);
             }
 
             return expId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/api-docs/index.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/index.html b/modules/sharing-registry/api-docs/index.html
index ead6c2f..6663a9d 100644
--- a/modules/sharing-registry/api-docs/index.html
+++ b/modules/sharing-registry/api-docs/index.html
@@ -7,14 +7,12 @@
 <tr>
 <td>sharing_cpi</td><td><a href="sharing_cpi.html#Svc_SharingRegistryService">SharingRegistryService</a><br/>
 <ul>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_addChildGroupToParentGroup">addChildGroupToParentGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_addChildGroupsToParentGroup">addChildGroupsToParentGroup</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_addUsersToGroup">addUsersToGroup</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_createDomain">createDomain</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createEntity">createEntity</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_createEntityType">createEntityType</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_createGroup">createGroup</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_createPermissionType">createPermissionType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createUser">createUser</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteDomain">deleteDomain</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteEntity">deleteEntity</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteEntityType">deleteEntityType</a></li>
@@ -27,7 +25,8 @@
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntityType">getEntityType</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntityTypes">getEntityTypes</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroup">getGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroupMembers">getGroupMembers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroupMembersOfTypeGroup">getGroupMembersOfTypeGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroupMembersOfTypeUser">getGroupMembersOfTypeUser</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroups">getGroups</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getListOfSharedGroups">getListOfSharedGroups</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getListOfSharedUsers">getListOfSharedUsers</a></li>
@@ -35,6 +34,8 @@
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getPermissionTypes">getPermissionTypes</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getUser">getUser</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_getUsers">getUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_registerEntity">registerEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_registerUser">registerUser</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_removeChildGroupFromParentGroup">removeChildGroupFromParentGroup</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_removeUsersFromGroup">removeUsersFromGroup</a></li>
 <li><a href="sharing_cpi.html#Fn_SharingRegistryService_revokeEntitySharingFromGroups">revokeEntitySharingFromGroups</a></li>
@@ -59,6 +60,7 @@
 <a href="sharing_models.html#Struct_Entity">Entity</a><br/>
 <a href="sharing_models.html#Enum_EntitySearchField">EntitySearchField</a><br/>
 <a href="sharing_models.html#Struct_EntityType">EntityType</a><br/>
+<a href="sharing_models.html#Enum_GroupCardinality">GroupCardinality</a><br/>
 <a href="sharing_models.html#Enum_GroupChildType">GroupChildType</a><br/>
 <a href="sharing_models.html#Struct_GroupMembership">GroupMembership</a><br/>
 <a href="sharing_models.html#Enum_GroupType">GroupType</a><br/>

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/api-docs/sharing_cpi.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/sharing_cpi.html b/modules/sharing-registry/api-docs/sharing_cpi.html
index b510ecc..fa1edc1 100644
--- a/modules/sharing-registry/api-docs/sharing_cpi.html
+++ b/modules/sharing-registry/api-docs/sharing_cpi.html
@@ -11,14 +11,12 @@
 <tr>
 <td>sharing_cpi</td><td><a href="#Svc_SharingRegistryService">SharingRegistryService</a><br/>
 <ul>
-<li><a href="#Fn_SharingRegistryService_addChildGroupToParentGroup">addChildGroupToParentGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_addChildGroupsToParentGroup">addChildGroupsToParentGroup</a></li>
 <li><a href="#Fn_SharingRegistryService_addUsersToGroup">addUsersToGroup</a></li>
 <li><a href="#Fn_SharingRegistryService_createDomain">createDomain</a></li>
-<li><a href="#Fn_SharingRegistryService_createEntity">createEntity</a></li>
 <li><a href="#Fn_SharingRegistryService_createEntityType">createEntityType</a></li>
 <li><a href="#Fn_SharingRegistryService_createGroup">createGroup</a></li>
 <li><a href="#Fn_SharingRegistryService_createPermissionType">createPermissionType</a></li>
-<li><a href="#Fn_SharingRegistryService_createUser">createUser</a></li>
 <li><a href="#Fn_SharingRegistryService_deleteDomain">deleteDomain</a></li>
 <li><a href="#Fn_SharingRegistryService_deleteEntity">deleteEntity</a></li>
 <li><a href="#Fn_SharingRegistryService_deleteEntityType">deleteEntityType</a></li>
@@ -31,7 +29,8 @@
 <li><a href="#Fn_SharingRegistryService_getEntityType">getEntityType</a></li>
 <li><a href="#Fn_SharingRegistryService_getEntityTypes">getEntityTypes</a></li>
 <li><a href="#Fn_SharingRegistryService_getGroup">getGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_getGroupMembers">getGroupMembers</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroupMembersOfTypeGroup">getGroupMembersOfTypeGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroupMembersOfTypeUser">getGroupMembersOfTypeUser</a></li>
 <li><a href="#Fn_SharingRegistryService_getGroups">getGroups</a></li>
 <li><a href="#Fn_SharingRegistryService_getListOfSharedGroups">getListOfSharedGroups</a></li>
 <li><a href="#Fn_SharingRegistryService_getListOfSharedUsers">getListOfSharedUsers</a></li>
@@ -39,6 +38,8 @@
 <li><a href="#Fn_SharingRegistryService_getPermissionTypes">getPermissionTypes</a></li>
 <li><a href="#Fn_SharingRegistryService_getUser">getUser</a></li>
 <li><a href="#Fn_SharingRegistryService_getUsers">getUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_registerEntity">registerEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_registerUser">registerUser</a></li>
 <li><a href="#Fn_SharingRegistryService_removeChildGroupFromParentGroup">removeChildGroupFromParentGroup</a></li>
 <li><a href="#Fn_SharingRegistryService_removeUsersFromGroup">removeUsersFromGroup</a></li>
 <li><a href="#Fn_SharingRegistryService_revokeEntitySharingFromGroups">revokeEntitySharingFromGroups</a></li>
@@ -61,180 +62,217 @@
 <hr/><h2 id="Services">Services</h2>
 <h3 id="Svc_SharingRegistryService">Service: SharingRegistryService</h3>
 <div class="definition"><h4 id="Fn_SharingRegistryService_createDomain">Function: SharingRegistryService.createDomain</h4>
-<pre><code>string</code> createDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domain)
+<pre><code>string</code> createDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domainId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre> * Domain Operations
-*
+</pre><p>API method to create a new domainId.</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateDomain">Function: SharingRegistryService.updateDomain</h4>
-<pre><code>bool</code> updateDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domain)
+<pre><code>bool</code> updateDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domainId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteDomain">Function: SharingRegistryService.deleteDomain</h4>
+</pre><p>API method to update a domainId.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteDomain">Function: SharingRegistryService.deleteDomain</h4>
 <pre><code>bool</code> deleteDomain(<code>string</code> domainId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomain">Function: SharingRegistryService.getDomain</h4>
+</pre><p>API method to delete domainId.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomain">Function: SharingRegistryService.getDomain</h4>
 <pre><code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> getDomain(<code>string</code> domainId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomains">Function: SharingRegistryService.getDomains</h4>
+</pre><p>API method to retrieve a domainId.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomains">Function: SharingRegistryService.getDomains</h4>
 <pre><code>list&lt;<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code>&gt;</code> getDomains(<code>i32</code> offset,
                                        <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createUser">Function: SharingRegistryService.createUser</h4>
-<pre><code>string</code> createUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
+</pre><p>API method to get all domainIds.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_registerUser">Function: SharingRegistryService.registerUser</h4>
+<pre><code>string</code> registerUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre> * User Operations
-*
+</pre><p>API method to register a user in the system</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updatedUser">Function: SharingRegistryService.updatedUser</h4>
 <pre><code>bool</code> updatedUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteUser">Function: SharingRegistryService.deleteUser</h4>
+</pre><p>API method to update existing user</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteUser">Function: SharingRegistryService.deleteUser</h4>
 <pre><code>bool</code> deleteUser(<code>string</code> userId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUser">Function: SharingRegistryService.getUser</h4>
+</pre><p>API method to delete user</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUser">Function: SharingRegistryService.getUser</h4>
 <pre><code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> getUser(<code>string</code> userId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUsers">Function: SharingRegistryService.getUsers</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getUsers(<code>string</code> domain,
+</pre><p>API method to get a user</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUsers">Function: SharingRegistryService.getUsers</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getUsers(<code>string</code> domainId,
                                    <code>i32</code> offset,
                                    <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createGroup">Function: SharingRegistryService.createGroup</h4>
+</pre><p>API method to get a list of users in a specific domainId. Users will be reverse sorted based on the created time.</p>
+<li>domainId : Domain id</li>
+<li>offset : Starting result number</li>
+<li>limit : Number of max results to be sent</li>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createGroup">Function: SharingRegistryService.createGroup</h4>
 <pre><code>string</code> createGroup(<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> group)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre> * Group Operations
-*
+</pre><p>API method to create a new group</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateGroup">Function: SharingRegistryService.updateGroup</h4>
 <pre><code>bool</code> updateGroup(<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> group)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteGroup">Function: SharingRegistryService.deleteGroup</h4>
+</pre><p>API method to update a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteGroup">Function: SharingRegistryService.deleteGroup</h4>
 <pre><code>bool</code> deleteGroup(<code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroup">Function: SharingRegistryService.getGroup</h4>
+</pre><p>API method to delete a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroup">Function: SharingRegistryService.getGroup</h4>
 <pre><code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> getGroup(<code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroups">Function: SharingRegistryService.getGroups</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroups(<code>string</code> domain,
+</pre><p>API method to get a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroups">Function: SharingRegistryService.getGroups</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroups(<code>string</code> domainId,
                                          <code>i32</code> offset,
                                          <code>i32</code> limit)
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_addUsersToGroup">Function: SharingRegistryService.addUsersToGroup</h4>
+</pre><p>API method to get groups in a domainId. Results are reverse sorted based on created time.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_addUsersToGroup">Function: SharingRegistryService.addUsersToGroup</h4>
 <pre><code>bool</code> addUsersToGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
                      <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeUsersFromGroup">Function: SharingRegistryService.removeUsersFromGroup</h4>
+</pre><p>API method to add list of users to a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeUsersFromGroup">Function: SharingRegistryService.removeUsersFromGroup</h4>
 <pre><code>bool</code> removeUsersFromGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
                           <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembers">Function: SharingRegistryService.getGroupMembers</h4>
-<pre><code>map&lt;<code>string</code>, <code><a href="sharing_models.html#Enum_GroupChildType">sharing_models.GroupChildType</a></code>&gt;</code> getGroupMembers(<code>string</code> groupId,
-                                                         <code>i32</code> offset,
-                                                         <code>i32</code> limit)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_addChildGroupToParentGroup">Function: SharingRegistryService.addChildGroupToParentGroup</h4>
-<pre><code>bool</code> addChildGroupToParentGroup(<code>string</code> childId,
-                                <code>string</code> groupId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeChildGroupFromParentGroup">Function: SharingRegistryService.removeChildGroupFromParentGroup</h4>
+</pre><p>API method to remove users from a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembersOfTypeUser">Function: SharingRegistryService.getGroupMembersOfTypeUser</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getGroupMembersOfTypeUser(<code>string</code> groupId,
+                                                    <code>i32</code> offset,
+                                                    <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get list of child users in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembersOfTypeGroup">Function: SharingRegistryService.getGroupMembersOfTypeGroup</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroupMembersOfTypeGroup(<code>string</code> groupId,
+                                                          <code>i32</code> offset,
+                                                          <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get list of child groups in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_addChildGroupsToParentGroup">Function: SharingRegistryService.addChildGroupsToParentGroup</h4>
+<pre><code>bool</code> addChildGroupsToParentGroup(<code>list&lt;<code>string</code>&gt;</code> childIds,
+                                 <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to add a child group to a parent group.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeChildGroupFromParentGroup">Function: SharingRegistryService.removeChildGroupFromParentGroup</h4>
 <pre><code>bool</code> removeChildGroupFromParentGroup(<code>string</code> childId,
                                      <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createEntityType">Function: SharingRegistryService.createEntityType</h4>
+</pre><p>API method to remove a child group from parent group.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createEntityType">Function: SharingRegistryService.createEntityType</h4>
 <pre><code>string</code> createEntityType(<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> entityType)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre> * EntityType Operations
-*
+</pre><p>API method to create a new entity type</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateEntityType">Function: SharingRegistryService.updateEntityType</h4>
 <pre><code>bool</code> updateEntityType(<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> entityType)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntityType">Function: SharingRegistryService.deleteEntityType</h4>
+</pre><p>API method to update entity type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntityType">Function: SharingRegistryService.deleteEntityType</h4>
 <pre><code>bool</code> deleteEntityType(<code>string</code> entityTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityType">Function: SharingRegistryService.getEntityType</h4>
+</pre><p>API method to delete entity type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityType">Function: SharingRegistryService.getEntityType</h4>
 <pre><code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> getEntityType(<code>string</code> entityTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityTypes">Function: SharingRegistryService.getEntityTypes</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code>&gt;</code> getEntityTypes(<code>string</code> domain,
+</pre><p>API method to get an entity type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityTypes">Function: SharingRegistryService.getEntityTypes</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code>&gt;</code> getEntityTypes(<code>string</code> domainId,
                                                <code>i32</code> offset,
                                                <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createEntity">Function: SharingRegistryService.createEntity</h4>
-<pre><code>string</code> createEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
+</pre><p>API method to get entity types in a domainId. Results are reverse time sorted based on creation time</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_registerEntity">Function: SharingRegistryService.registerEntity</h4>
+<pre><code>string</code> registerEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre> * Entity Operations
-*
+</pre><p>API method to register new entity</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateEntity">Function: SharingRegistryService.updateEntity</h4>
 <pre><code>bool</code> updateEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntity">Function: SharingRegistryService.deleteEntity</h4>
+</pre><p>API method to update entity</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntity">Function: SharingRegistryService.deleteEntity</h4>
 <pre><code>bool</code> deleteEntity(<code>string</code> entityId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntity">Function: SharingRegistryService.getEntity</h4>
+</pre><p>API method to delete entity</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntity">Function: SharingRegistryService.getEntity</h4>
 <pre><code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> getEntity(<code>string</code> entityId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_searchEntities">Function: SharingRegistryService.searchEntities</h4>
+</pre><p>API method to get entity</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_searchEntities">Function: SharingRegistryService.searchEntities</h4>
 <pre><code>list&lt;<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code>&gt;</code> searchEntities(<code>string</code> userId,
                                            <code>string</code> entityTypeId,
                                            <code>list&lt;<code><a href="sharing_models.html#Struct_SearchCriteria">sharing_models.SearchCriteria</a></code>&gt;</code> filters,
                                            <code>i32</code> offset,
                                            <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedUsers">Function: SharingRegistryService.getListOfSharedUsers</h4>
+</pre><p>API method to search entities</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedUsers">Function: SharingRegistryService.getListOfSharedUsers</h4>
 <pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getListOfSharedUsers(<code>string</code> entityId,
                                                <code>string</code> permissionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedGroups">Function: SharingRegistryService.getListOfSharedGroups</h4>
+</pre><p>API method to get a list of shared users given the entity id</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedGroups">Function: SharingRegistryService.getListOfSharedGroups</h4>
 <pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getListOfSharedGroups(<code>string</code> entityId,
                                                      <code>string</code> permissionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createPermissionType">Function: SharingRegistryService.createPermissionType</h4>
+</pre><p>API method to get a list of shared groups given the entity id</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createPermissionType">Function: SharingRegistryService.createPermissionType</h4>
 <pre><code>string</code> createPermissionType(<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> permissionType)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre> * Permission Operations
-*
+</pre><p>API method to create permission type</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updatePermissionType">Function: SharingRegistryService.updatePermissionType</h4>
 <pre><code>bool</code> updatePermissionType(<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> permissionType)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deletePermissionType">Function: SharingRegistryService.deletePermissionType</h4>
+</pre><p>API method to update permission type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deletePermissionType">Function: SharingRegistryService.deletePermissionType</h4>
 <pre><code>bool</code> deletePermissionType(<code>string</code> entityTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionType">Function: SharingRegistryService.getPermissionType</h4>
+</pre><p>API method to delete permission type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionType">Function: SharingRegistryService.getPermissionType</h4>
 <pre><code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> getPermissionType(<code>string</code> permissionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionTypes">Function: SharingRegistryService.getPermissionTypes</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code>&gt;</code> getPermissionTypes(<code>string</code> domain,
+</pre><p>API method to get permission type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionTypes">Function: SharingRegistryService.getPermissionTypes</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code>&gt;</code> getPermissionTypes(<code>string</code> domainId,
                                                        <code>i32</code> offset,
                                                        <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithUsers">Function: SharingRegistryService.shareEntityWithUsers</h4>
+</pre><p>API method to get list of permission types in a given domainId. Results are reverse time sorted based on creation time</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithUsers">Function: SharingRegistryService.shareEntityWithUsers</h4>
 <pre><code>bool</code> shareEntityWithUsers(<code>string</code> domainId,
                           <code>string</code> entityId,
                           <code>list&lt;<code>string</code>&gt;</code> userList,
                           <code>string</code> perssionTypeId,
                           <code>bool</code> cascadePermission)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre> * Sharing Entity with Users and Groups
-*
+</pre><p>API method to share an entity with users</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromUsers">Function: SharingRegistryService.revokeEntitySharingFromUsers</h4>
 <pre><code>bool</code> revokeEntitySharingFromUsers(<code>string</code> domainId,
                                   <code>string</code> entityId,
                                   <code>list&lt;<code>string</code>&gt;</code> userList,
                                   <code>string</code> perssionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithGroups">Function: SharingRegistryService.shareEntityWithGroups</h4>
+</pre><p>API method to revoke sharing from a list of users</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithGroups">Function: SharingRegistryService.shareEntityWithGroups</h4>
 <pre><code>bool</code> shareEntityWithGroups(<code>string</code> domainId,
                            <code>string</code> entityId,
                            <code>list&lt;<code>string</code>&gt;</code> groupList,
                            <code>string</code> perssionTypeId,
                            <code>bool</code> cascadePermission)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromGroups">Function: SharingRegistryService.revokeEntitySharingFromGroups</h4>
+</pre><p>API method to share an entity with list of groups</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromGroups">Function: SharingRegistryService.revokeEntitySharingFromGroups</h4>
 <pre><code>bool</code> revokeEntitySharingFromGroups(<code>string</code> domainId,
                                    <code>string</code> entityId,
                                    <code>list&lt;<code>string</code>&gt;</code> groupList,
                                    <code>string</code> perssionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_userHasAccess">Function: SharingRegistryService.userHasAccess</h4>
+</pre><p>API method to revoke sharing from list of users</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_userHasAccess">Function: SharingRegistryService.userHasAccess</h4>
 <pre><code>bool</code> userHasAccess(<code>string</code> domainId,
                    <code>string</code> userId,
                    <code>string</code> entityId,
                    <code>string</code> permissionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre></div></div></body></html>
+</pre><p>API method to check whether a user has access to a specific entity</p>
+<br/></div></div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/api-docs/sharing_models.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/sharing_models.html b/modules/sharing-registry/api-docs/sharing_models.html
index be6bd17..1d4dff8 100644
--- a/modules/sharing-registry/api-docs/sharing_models.html
+++ b/modules/sharing-registry/api-docs/sharing_models.html
@@ -14,6 +14,7 @@
 <a href="#Struct_Entity">Entity</a><br/>
 <a href="#Enum_EntitySearchField">EntitySearchField</a><br/>
 <a href="#Struct_EntityType">EntityType</a><br/>
+<a href="#Enum_GroupCardinality">GroupCardinality</a><br/>
 <a href="#Enum_GroupChildType">GroupChildType</a><br/>
 <a href="#Struct_GroupMembership">GroupMembership</a><br/>
 <a href="#Enum_GroupType">GroupType</a><br/>
@@ -32,22 +33,44 @@
 <hr/><h2 id="Constants">Constants</h2>
 <table class="table-bordered table-striped table-condensed"><thead><th>Constant</th><th>Type</th><th>Value</th></thead>
 <tr id="Const_DO_NOT_SET_AT_CLIENTS_ID"><td><code>DO_NOT_SET_AT_CLIENTS_ID</code></td><td><code>string</code></td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr></table><hr/><h2 id="Enumerations">Enumerations</h2>
-<div class="definition"><h3 id="Enum_GroupType">Enumeration: GroupType</h3>
-<br/><table class="table-bordered table-striped table-condensed">
+<div class="definition"><h3 id="Enum_GroupCardinality">Enumeration: GroupCardinality</h3>
+<p>This is an system internal enum used to define single user groups and multi users groups. Every user is also
+considered as a group in it's own right for implementation ease</p>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
 <tr><td><code>SINGLE_USER</code></td><td><code>0</code></td><td>
 </td></tr>
 <tr><td><code>MULTI_USER</code></td><td><code>1</code></td><td>
 </td></tr>
 </table></div>
+<div class="definition"><h3 id="Enum_GroupType">Enumeration: GroupType</h3>
+<p>Group types can be either user level or domain level groups.</p>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>DOMAIN_LEVEL_GROUP</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>USER_LEVEL_GROUP</code></td><td><code>1</code></td><td>
+</td></tr>
+</table></div>
 <div class="definition"><h3 id="Enum_GroupChildType">Enumeration: GroupChildType</h3>
-<br/><table class="table-bordered table-striped table-condensed">
+<p>System internal data type to match group child types</p>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
 <tr><td><code>USER</code></td><td><code>0</code></td><td>
 </td></tr>
 <tr><td><code>GROUP</code></td><td><code>1</code></td><td>
 </td></tr>
 </table></div>
 <div class="definition"><h3 id="Enum_EntitySearchField">Enumeration: EntitySearchField</h3>
-<br/><table class="table-bordered table-striped table-condensed">
+<p>This list of fields that can be used to search entities</p>
+<li>NAME : Name of the entity</li>
+<li>DESCRIPTION : Description of the entity</li>
+<li>FULL_TEXT : Full text field of the entity</li>
+<li>PARENT_ENTITY_ID : Parent entity id of the entity</li>
+<li>CREATED_TIME : Created time of the entity</li>
+<li>UPDATED_TIME : Updated time of the entity</li>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
 <tr><td><code>NAME</code></td><td><code>0</code></td><td>
 </td></tr>
 <tr><td><code>DESCRIPTION</code></td><td><code>1</code></td><td>
@@ -62,18 +85,29 @@
 </td></tr>
 </table></div>
 <div class="definition"><h3 id="Enum_SearchCondition">Enumeration: SearchCondition</h3>
-<br/><table class="table-bordered table-striped table-condensed">
+<p>Different search operators that can be used with the entity search fields</p>
+<li>EQUAL : Simply matches for equality. Applicable for name, and parent entity id</li>
+<li>LIKE : Check for the condition %$FIELD% condition. Applicable for name, and description</li>
+<li>FULL_TEXT : Does a full text search. Only applicable for the FULL_TEXT field.</li>
+<li>GTE : Greater than or equal. Only applicable for created time and updated time.</li>
+<li>LTE : Less than or equal. Only applicable for created time and updated time.</li>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
 <tr><td><code>EQUAL</code></td><td><code>0</code></td><td>
 </td></tr>
 <tr><td><code>LIKE</code></td><td><code>1</code></td><td>
 </td></tr>
-<tr><td><code>GTE</code></td><td><code>2</code></td><td>
+<tr><td><code>FULL_TEXT</code></td><td><code>2</code></td><td>
+</td></tr>
+<tr><td><code>GTE</code></td><td><code>3</code></td><td>
 </td></tr>
-<tr><td><code>LTE</code></td><td><code>3</code></td><td>
+<tr><td><code>LTE</code></td><td><code>4</code></td><td>
 </td></tr>
 </table></div>
 <div class="definition"><h3 id="Enum_SharingType">Enumeration: SharingType</h3>
-<br/><table class="table-bordered table-striped table-condensed">
+<p>This is an internal enum type for managing sharings</p>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
 <tr><td><code>DIRECT_NON_CASCADING</code></td><td><code>0</code></td><td>
 </td></tr>
 <tr><td><code>DIRECT_CASCADING</code></td><td><code>1</code></td><td>
@@ -89,34 +123,70 @@
 <tr><td>3</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_User">Struct: User</h3>
+</table><br/><p>Domain is the entity that enables multi-tenency in this componenet. Every tenant will be
+operating separately it's own silo which is identified by the domain id. In the current implementation domain id
+will be same as the domain name</p>
+<li>domainId : Will be generated by the server based on the domain name</li>
+<li><b>name</b> : A single word name that identifies the domain e.g seagrid, ultrascan</li>
+<li>description : A short description for the domain</li>
+<li>createdTime : Will be set by the system</li>
+<li>updatedTime : Will be set by the system</li>
+
+<br/></div><div class="definition"><h3 id="Struct_User">Struct: User</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>userId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>1</td><td>userId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>userName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>4</td><td>firstName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>5</td><td>lastName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>icon</td><td><code>binary</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>7</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>8</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_UserGroup">Struct: UserGroup</h3>
+<tr><td>6</td><td>email</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>icon</td><td><code>binary</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>User is the model used to register a user in the system. Minimal user information will be required to provide
+regarding the user.</p>
+<li><b>userId</b> : Client provided user id. (The id is not system generated and it is a must to provide this id)</li>
+<li><b>domainId</b> : Domain id for that user</li>
+<li><b>userName</b> : User name for the user</li>
+<li><b>firstName</b> : First name of the user</li>
+<li><b>lastName</b> : Last name of the user</li>
+<li><b>email</b> : Email address of the user</li>
+<li>icon : A binary field for storing the user icon</li>
+<li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+<li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+
+<br/></div><div class="definition"><h3 id="Struct_UserGroup">Struct: UserGroup</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
 <tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>7</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>groupType</td><td><code><a href="#Enum_GroupType">GroupType</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>groupCardinality</td><td><code><a href="#Enum_GroupCardinality">GroupCardinality</a></code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>8</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>10</td><td>groupType</td><td><code><a href="#Enum_GroupType">GroupType</a></code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_GroupMembership">Struct: GroupMembership</h3>
+</table><br/><p>User group is a collection of users.</p>
+ <li>groupId : System generated grouo id. In the current implementation this is of the form domainId:name</li>
+ <li><b>domainId</b> : Domain id for this user group</li>
+ <li><b>name</b> : Name for the user group. should be one word</li>
+ <li>description : Short description for the group.</li>
+ <li><b>ownerId</b> : Owner id of this group.</li>
+ <li><b>groupType</b> : Group type (DOMAIN_LEVEL_GROUP, USER_LEVEL_GROUP)</li>
+ <li><b>groupCardinality</b> : Group cardinality (SINGLE_USER, MULTI_USER)</li>
+ <li>createdTime : Will be set by the system</li>
+ <li>updatedTime : Will be set by the system</li>
+ 
+<br/></div><div class="definition"><h3 id="Struct_GroupMembership">Struct: GroupMembership</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>parentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>childId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>childType</td><td><code><a href="#Enum_GroupChildType">GroupChildType</a></code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_EntityType">Struct: EntityType</h3>
+</table><br/><p>System internal data type to map group memberships</p>
+
+<br/></div><div class="definition"><h3 id="Struct_EntityType">Struct: EntityType</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
 <tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
@@ -124,14 +194,27 @@
 <tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_SearchCriteria">Struct: SearchCriteria</h3>
+</table><br/><p>client defined entity types</p>
+<li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
+<li><b>domainId</b> : Domain id of the domain.</li>
+<li><b>name</b> : Name for the entity type. Should be a single word.</li>
+<li>description : Short description for the entity type.</li>
+<li>createdTime : Will be set by the system</li>
+<li>updatedTime : Will be set by the system</li>
+
+<br/></div><div class="definition"><h3 id="Struct_SearchCriteria">Struct: SearchCriteria</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>searchField</td><td><code><a href="#Enum_EntitySearchField">EntitySearchField</a></code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>value</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>searchCondition</td><td><code><a href="#Enum_SearchCondition">SearchCondition</a></code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_Entity">Struct: Entity</h3>
+</table><br/><p>Container object for search criteria</p>
+<li><b>searchField</b> : Entity search field</li>
+<li><b>value</b> : Search value</li>
+<li><b>searchCondition</b> : EQUAL, LIKE etc..</li>
+
+<br/></div><div class="definition"><h3 id="Struct_Entity">Struct: Entity</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>1</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>4</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
@@ -142,7 +225,20 @@
 <tr><td>9</td><td>fullText</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>10</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>11</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_PermissionType">Struct: PermissionType</h3>
+</table><br/><p>Entity object which is used to register an entity in the system.</p>
+<li><b>entityId</b> : Client id provided by the client</li>
+<li><b>domainId</b> : Domain id</li>
+<li><b>entityTypeId</b> : Entity type id</li>
+<li><b>ownerId</b> : Owner id</li>
+<li>parentEntityId : Parent entity id</li>
+<li><b>name</b> : Name</li>
+<li>description : Short description for the entity</li>
+<li>metadata : Map of optional metadata</li>
+<li>fullText : A string which will be considered for full text search</li>
+<li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+<li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+
+<br/></div><div class="definition"><h3 id="Struct_PermissionType">Struct: PermissionType</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
 <tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
@@ -150,7 +246,15 @@
 <tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_Sharing">Struct: Sharing</h3>
+</table><br/><p>Object for creating client defined permission type</p>
+<li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
+<li><b>domainId</b> : Domain id</li>
+<li><b>name</b> : Single word name for the permission</li>
+<li>description : Short description for the permission type</li>
+<li>createdTime : Will be set by the system</li>
+<li>updatedTime : Will be set by the system</li>
+
+<br/></div><div class="definition"><h3 id="Struct_Sharing">Struct: Sharing</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
@@ -159,7 +263,11 @@
 <tr><td>5</td><td>inheritedParentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>6</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>7</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/></div><div class="definition"><h3 id="Struct_SharingRegistryException">Exception: SharingRegistryException</h3>
+</table><br/><p>This is an internal enum type for managing sharings</p>
+
+<br/></div><div class="definition"><h3 id="Struct_SharingRegistryException">Exception: SharingRegistryException</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>message</td><td><code>string</code></td><td></td><td>required</td><td></td></tr>
-</table><br/></div></div></body></html>
+</table><br/><p>Exception model used in the sharing registry service</p>
+
+<br/></div></div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
index a8ec19f..e38a760 100644
--- a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
+++ b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
@@ -106,7 +106,7 @@ public class AiravataDataMigrator {
             user.setDomainId(rs.getString("GATEWAY_ID"));
             user.setUserName(rs.getString("USER_NAME"));
 
-            govRegistryServerHandler.createUser(user);
+            govRegistryServerHandler.registerUser(user);
         }
 
         //Creating project entries
@@ -128,7 +128,7 @@ public class AiravataDataMigrator {
             Map<String, String> metadata = new HashMap<>();
             metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
 
-            govRegistryServerHandler.createEntity(entity);
+            govRegistryServerHandler.registerEntity(entity);
         }
 
         //Creating experiment entries
@@ -158,7 +158,7 @@ public class AiravataDataMigrator {
             metadata.put("GATEWAY_INSTANCE_ID", rs.getString("GATEWAY_INSTANCE_ID"));
             metadata.put("ARCHIVE", rs.getString("ARCHIVE"));
 
-            govRegistryServerHandler.createEntity(entity);
+            govRegistryServerHandler.registerEntity(entity);
         }
 
         expCatConnection.close();

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
index 0d17279..1482ce9 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
@@ -35,6 +35,7 @@ public class SharingUserEntity {
     private String userName;
     private String firstName;
     private String lastName;
+    private String email;
     private ByteBuffer icon;
     private Long createdTime;
     private Long updatedTime;
@@ -89,6 +90,16 @@ public class SharingUserEntity {
         this.lastName = lastName;
     }
 
+    @Basic
+    @Column(name = "EMAIL")
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
     @Lob
     @Column(name = "ICON")
     public ByteBuffer getIcon() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
index 10d901a..09fd8d8 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
@@ -35,6 +35,7 @@ public class UserGroupEntity {
     private String description;
     private String ownerId;
     private String groupType;
+    private String groupCardinality;
     private Long createdTime;
     private Long updatedTime;
 
@@ -89,6 +90,16 @@ public class UserGroupEntity {
     }
 
     @Basic
+    @Column(name = "GROUP_CARDINALITY")
+    public String getGroupCardinality() {
+        return groupCardinality;
+    }
+
+    public void setGroupCardinality(String groupCardinality) {
+        this.groupCardinality = groupCardinality;
+    }
+
+    @Basic
     @Column(name = "GROUP_TYPE")
     public String getGroupType() {
         return groupType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
index ed49c94..1ed1f06 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
@@ -23,7 +23,7 @@ package org.apache.airavata.sharing.registry.db.repositories;
 import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
 import org.apache.airavata.sharing.registry.db.entities.UserGroupEntity;
 import org.apache.airavata.sharing.registry.db.utils.DBConstants;
-import org.apache.airavata.sharing.registry.models.GroupType;
+import org.apache.airavata.sharing.registry.models.GroupCardinality;
 import org.apache.airavata.sharing.registry.models.SharingRegistryException;
 import org.apache.airavata.sharing.registry.models.UserGroup;
 import org.slf4j.Logger;
@@ -44,7 +44,7 @@ public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroup
         query += "g." + DBConstants.UserGroupTable.GROUP_ID + " = s." + DBConstants.SharingTable.GROUP_ID + " AND ";
         query += "s." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
         query += "s." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " = '" + permissionTypeId + "' AND ";
-        query += "g." + DBConstants.UserGroupTable.GROUP_TYPE + " = '" + GroupType.MULTI_USER.toString() + "'";
+        query += "g." + DBConstants.UserGroupTable.GROUP_CARDINALITY + " = '" + GroupCardinality.MULTI_USER.toString() + "'";
         query += " ORDER BY s.createdTime DESC";
         return select(query, 0, -1);
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
index 387e0e5..e444c43 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
@@ -51,6 +51,7 @@ public class DBConstants {
         public static String DESCRIPTION = "description";
         public static String OWNER_ID = "ownerId";
         public static String GROUP_TYPE = "groupType";
+        public static String GROUP_CARDINALITY = "groupCardinality";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
index a123975..5757f61 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -119,7 +119,7 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      * *
      */
     @Override
-    public String createUser(User user) throws SharingRegistryException, TException {
+    public String registerUser(User user) throws SharingRegistryException, TException {
         if(userRepository.get(user.userId) != null)
             throw new SharingRegistryException("There exist user with given user id");
 
@@ -133,7 +133,8 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
         userGroup.setName(user.userName);
         userGroup.setDescription("user " + user.userName + " group");
         userGroup.setOwnerId(user.userId);
-        userGroup.setGroupType(GroupType.SINGLE_USER);
+        userGroup.setGroupType(GroupType.USER_LEVEL_GROUP);
+        userGroup.setGroupCardinality(GroupCardinality.SINGLE_USER);
         createGroup(userGroup);
 
         return user.userId;
@@ -242,25 +243,29 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public Map<String, GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws SharingRegistryException, TException {
-        HashMap<String, GroupChildType> groupMembers = new HashMap<>();
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.GroupMembershipTable.PARENT_ID, groupId);
-        List<GroupMembership> groupMembershipList = groupMembershipRepository.select(filters, 0, -1);
-        groupMembershipList.stream().forEach(gm->{groupMembers.put(gm.getChildId(), gm.getChildType());});
-        return groupMembers;
-    }
-
-    @Override
-    public boolean addChildGroupToParentGroup(String childId, String groupId) throws SharingRegistryException, TException {
-        //Todo check for cyclic dependencies
-        GroupMembership groupMembership = new GroupMembership();
-        groupMembership.setParentId(groupId);
-        groupMembership.setChildId(childId);
-        groupMembership.setChildType(GroupChildType.GROUP);
-        groupMembership.setCreatedTime(System.currentTimeMillis());
-        groupMembership.setUpdatedTime(System.currentTimeMillis());
-        groupMembershipRepository.create(groupMembership);
+    public List<User> getGroupMembersOfTypeUser(String groupId, int offset, int limit) throws SharingRegistryException, TException {
+        List<User> groupMemberUsers = groupMembershipRepository.getAllChildUsers(groupId);
+        return groupMemberUsers;
+    }
+
+    @Override
+    public List<UserGroup> getGroupMembersOfTypeGroup(String groupId, int offset, int limit) throws SharingRegistryException, TException {
+        List<UserGroup> groupMemberGroups = groupMembershipRepository.getAllChildGroups(groupId);
+        return groupMemberGroups;
+    }
+
+    @Override
+    public boolean addChildGroupsToParentGroup(List<String> childIds, String groupId) throws SharingRegistryException, TException {
+        for(String childId : childIds) {
+            //Todo check for cyclic dependencies
+            GroupMembership groupMembership = new GroupMembership();
+            groupMembership.setParentId(groupId);
+            groupMembership.setChildId(childId);
+            groupMembership.setChildType(GroupChildType.GROUP);
+            groupMembership.setCreatedTime(System.currentTimeMillis());
+            groupMembership.setUpdatedTime(System.currentTimeMillis());
+            groupMembershipRepository.create(groupMembership);
+        }
         return true;
     }
 
@@ -362,7 +367,7 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      * *
      */
     @Override
-    public String createEntity(Entity entity) throws SharingRegistryException, TException {
+    public String registerEntity(Entity entity) throws SharingRegistryException, TException {
         if(entityRepository.get(entity.entityId) != null)
             throw new SharingRegistryException("There exist Entity with given Entity id");
 
@@ -372,7 +377,7 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
             user.setDomainId(entity.domainId);
             user.setUserName(user.userId.split("@")[0]);
 
-            createUser(user);
+            registerUser(user);
         }
 
         entity.setCreatedTime(System.currentTimeMillis());
@@ -463,15 +468,15 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      */
     @Override
     public boolean shareEntityWithUsers(String domainId, String entityId, List<String> userList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
-        return shareEntity(domainId, entityId, userList, permissionTypeId, GroupType.SINGLE_USER, cascadePermission);
+        return shareEntity(domainId, entityId, userList, permissionTypeId, cascadePermission);
     }
 
     @Override
     public boolean shareEntityWithGroups(String domainId, String entityId, List<String> groupList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
-        return shareEntity(domainId, entityId, groupList, permissionTypeId, GroupType.MULTI_USER, cascadePermission);
+        return shareEntity(domainId, entityId, groupList, permissionTypeId, cascadePermission);
     }
 
-    private boolean shareEntity(String domainId, String entityId, List<String> groupOrUserList, String permissionTypeId, GroupType groupType, boolean cascadePermission)  throws SharingRegistryException, TException {
+    private boolean shareEntity(String domainId, String entityId, List<String> groupOrUserList, String permissionTypeId, boolean cascadePermission)  throws SharingRegistryException, TException {
         if(permissionTypeId.equals(permissionTypeRepository.getGlobalPermissionTypeIdForDomain(domainId))){
             throw new SharingRegistryException(OWNER_PERMISSION_NAME + " permission cannot be assigned");
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
index 0e58356..e1937fd 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
+++ b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
@@ -34,6 +34,7 @@ CREATE TABLE SHARING_USER (
   USER_NAME VARCHAR(255) NOT NULL,
   FIRST_NAME VARCHAR (255),
   LAST_NAME VARCHAR (255),
+  EMAIL VARCHAR (255),
   ICON BLOB,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
@@ -48,6 +49,7 @@ CREATE TABLE USER_GROUP (
   DESCRIPTION VARCHAR(255),
   OWNER_ID VARCHAR(255) NOT NULL,
   GROUP_TYPE VARCHAR(255) NOT NULL,
+  GROUP_CARDINALITY VARCHAR(255) NOT NULL,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
   PRIMARY KEY (GROUP_ID),

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
index 78d5d78..675fad3 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
+++ b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
@@ -34,6 +34,7 @@ CREATE TABLE SHARING_USER (
   USER_NAME VARCHAR(255) NOT NULL,
   FIRST_NAME VARCHAR (255),
   LAST_NAME VARCHAR (255),
+  EMAIL VARCHAR (255),
   ICON BLOB,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
@@ -48,6 +49,7 @@ CREATE TABLE USER_GROUP (
   DESCRIPTION VARCHAR(255),
   OWNER_ID VARCHAR(255) NOT NULL,
   GROUP_TYPE VARCHAR(255) NOT NULL,
+  GROUP_CARDINALITY VARCHAR(255) NOT NULL,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
   PRIMARY KEY (GROUP_ID),

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
index 8a9bcb2..df0dcba 100644
--- a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
+++ b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
@@ -73,7 +73,7 @@ public class SharingRegistryServerHandlerTest {
         user1.setCreatedTime(System.currentTimeMillis());
         user1.setUpdatedTime(System.currentTimeMillis());
 
-        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user1));
+        Assert.assertNotNull(sharingRegistryServerHandler.registerUser(user1));
 
         User user2 = new User();
         String userName2 = "test-user-2." + System.currentTimeMillis();
@@ -84,7 +84,7 @@ public class SharingRegistryServerHandlerTest {
         user2.setCreatedTime(System.currentTimeMillis());
         user2.setUpdatedTime(System.currentTimeMillis());
 
-        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user2));
+        Assert.assertNotNull(sharingRegistryServerHandler.registerUser(user2));
 
         User user3 = new User();
         String userName3 = "test-user-3." + System.currentTimeMillis();
@@ -95,7 +95,7 @@ public class SharingRegistryServerHandlerTest {
         user3.setCreatedTime(System.currentTimeMillis());
         user3.setUpdatedTime(System.currentTimeMillis());
 
-        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user3));
+        Assert.assertNotNull(sharingRegistryServerHandler.registerUser(user3));
 
         Assert.assertTrue(sharingRegistryServerHandler.getUsers(domainId, 0, 10).size() > 0);
 
@@ -108,7 +108,8 @@ public class SharingRegistryServerHandlerTest {
         userGroup1.setName(groupName1);
         userGroup1.setDescription("test group description");
         userGroup1.setOwnerId(userId1);
-        userGroup1.setGroupType(GroupType.MULTI_USER);
+        userGroup1.setGroupType(GroupType.USER_LEVEL_GROUP);
+        userGroup1.setGroupCardinality(GroupCardinality.MULTI_USER);
         userGroup1.setCreatedTime(System.currentTimeMillis());
         userGroup1.setUpdatedTime(System.currentTimeMillis());
 
@@ -122,7 +123,8 @@ public class SharingRegistryServerHandlerTest {
         userGroup2.setName(groupName2);
         userGroup2.setDescription("test group description");
         userGroup2.setOwnerId(userId2);
-        userGroup2.setGroupType(GroupType.MULTI_USER);
+        userGroup2.setGroupType(GroupType.USER_LEVEL_GROUP);
+        userGroup2.setGroupCardinality(GroupCardinality.MULTI_USER);
         userGroup2.setCreatedTime(System.currentTimeMillis());
         userGroup2.setUpdatedTime(System.currentTimeMillis());
 
@@ -130,10 +132,10 @@ public class SharingRegistryServerHandlerTest {
 
         sharingRegistryServerHandler.addUsersToGroup(Arrays.asList(userId1), groupId1);
         sharingRegistryServerHandler.addUsersToGroup(Arrays.asList(userId2, userId3), groupId2);
-        sharingRegistryServerHandler.addChildGroupToParentGroup(groupId2, groupId1);
+        sharingRegistryServerHandler.addChildGroupsToParentGroup(Arrays.asList(groupId2), groupId1);
 
-        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembers(groupId1, 0, 10).size() == 2);
-        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembers(groupId2, 0, 10).size() == 2);
+        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembersOfTypeGroup(groupId1, 0, 10).size() == 1);
+        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembersOfTypeUser(groupId2, 0, 10).size() == 2);
 
 
         //Creating permission types
@@ -208,7 +210,7 @@ public class SharingRegistryServerHandlerTest {
         entity1.setCreatedTime(System.currentTimeMillis());
         entity1.setUpdatedTime(System.currentTimeMillis());
 
-        String entityId1 = sharingRegistryServerHandler.createEntity(entity1);
+        String entityId1 = sharingRegistryServerHandler.registerEntity(entity1);
         Assert.assertNotNull(entityId1);
 
         Entity entity2 = new Entity();
@@ -226,7 +228,7 @@ public class SharingRegistryServerHandlerTest {
         entity2.setCreatedTime(System.currentTimeMillis());
         entity2.setUpdatedTime(System.currentTimeMillis());
 
-        String entityId2 = sharingRegistryServerHandler.createEntity(entity2);
+        String entityId2 = sharingRegistryServerHandler.registerEntity(entity2);
         Assert.assertNotNull(entityId2);
 
         Entity entity3 = new Entity();
@@ -244,7 +246,7 @@ public class SharingRegistryServerHandlerTest {
         entity3.setCreatedTime(System.currentTimeMillis());
         entity3.setUpdatedTime(System.currentTimeMillis());
 
-        String entityId3 = sharingRegistryServerHandler.createEntity(entity3);
+        String entityId3 = sharingRegistryServerHandler.registerEntity(entity3);
         Assert.assertNotNull(entityId3);
 
         sharingRegistryServerHandler.shareEntityWithUsers(domainId, entityId1, Arrays.asList(userId2), permissionTypeId1, true);
@@ -265,7 +267,7 @@ public class SharingRegistryServerHandlerTest {
         entity4.setCreatedTime(System.currentTimeMillis());
         entity4.setUpdatedTime(System.currentTimeMillis());
 
-        String entityId4 = sharingRegistryServerHandler.createEntity(entity4);
+        String entityId4 = sharingRegistryServerHandler.registerEntity(entity4);
         Assert.assertNotNull(entityId4);
 
         Assert.assertTrue(sharingRegistryServerHandler.userHasAccess(domainId, userId3, entityId4, permissionTypeId1));

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 7d8270f..a0e89a5 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,18 @@ 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-14")
+/**
+ * <p>Domain is the entity that enables multi-tenency in this componenet. Every tenant will be
+ * operating separately it's own silo which is identified by the domain id. In the current implementation domain id
+ * will be same as the domain name</p>
+ * <li>domainId : Will be generated by the server based on the domain name</li>
+ * <li><b>name</b> : A single word name that identifies the domain e.g seagrid, ultrascan</li>
+ * <li>description : A short description for the domain</li>
+ * <li>createdTime : Will be set by the system</li>
+ * <li>updatedTime : Will be set by the system</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 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");
 


[2/4] airavata git commit: adding docs

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
index fc4f384..70459c3 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
@@ -34,124 +34,305 @@ 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-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class SharingRegistryService {
 
   public interface Iface {
 
     /**
-     *  * Domain Operations
-     * *
+     * <p>API method to create a new domainId.</p>
      * 
-     * @param domain
+     * @param domainId
      */
-    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    /**
+     * <p>API method to update a domainId.</p>
+     * 
+     * @param domainId
+     */
+    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to delete domainId.</p>
+     * 
+     * @param domainId
+     */
     public boolean deleteDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to retrieve a domainId.</p>
+     * 
+     * @param domainId
+     */
     public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to get all domainIds.</p>
+     * 
+     * @param offset
+     * @param limit
+     */
     public List<org.apache.airavata.sharing.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     *  * User Operations
-     * *
+     * <p>API method to register a user in the system</p>
      * 
      * @param user
      */
-    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public String registerUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to update existing user</p>
+     * 
+     * @param user
+     */
     public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to delete user</p>
+     * 
+     * @param userId
+     */
     public boolean deleteUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to get a user</p>
+     * 
+     * @param userId
+     */
     public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    /**
+     * <p>API method to get a list of users in a specific domainId. Users will be reverse sorted based on the created time.</p>
+     * <li>domainId : Domain id</li>
+     * <li>offset : Starting result number</li>
+     * <li>limit : Number of max results to be sent</li>
+     * 
+     * @param domainId
+     * @param offset
+     * @param limit
+     */
+    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domainId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     *  * Group Operations
-     * *
+     * <p>API method to create a new group</p>
      * 
      * @param group
      */
     public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to update a group</p>
+     * 
+     * @param group
+     */
     public boolean updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to delete a group</p>
+     * 
+     * @param groupId
+     */
     public boolean deleteGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to get a group</p>
+     * 
+     * @param groupId
+     */
     public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
+    /**
+     * <p>API method to get groups in a domainId. Results are reverse sorted based on created time.</p>
+     * 
+     * @param domainId
+     * @param offset
+     * @param limit
+     */
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domainId, int offset, int limit) throws org.apache.thrift.TException;
 
+    /**
+     * <p>API method to add list of users to a group</p>
+     * 
+     * @param userIds
+     * @param groupId
+     */
     public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to remove users from a group</p>
+     * 
+     * @param userIds
+     * @param groupId
+     */
     public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    /**
+     * <p>API method to get list of child users in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
+     * 
+     * @param groupId
+     * @param offset
+     * @param limit
+     */
+    public List<org.apache.airavata.sharing.registry.models.User> getGroupMembersOfTypeUser(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    /**
+     * <p>API method to get list of child groups in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
+     * 
+     * @param groupId
+     * @param offset
+     * @param limit
+     */
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroupMembersOfTypeGroup(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean addChildGroupToParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    /**
+     * <p>API method to add a child group to a parent group.</p>
+     * 
+     * @param childIds
+     * @param groupId
+     */
+    public boolean addChildGroupsToParentGroup(List<String> childIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to remove a child group from parent group.</p>
+     * 
+     * @param childId
+     * @param groupId
+     */
     public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     *  * EntityType Operations
-     * *
+     * <p>API method to create a new entity type</p>
      * 
      * @param entityType
      */
     public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to update entity type</p>
+     * 
+     * @param entityType
+     */
     public boolean updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to delete entity type</p>
+     * 
+     * @param entityTypeId
+     */
     public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to get an entity type</p>
+     * 
+     * @param entityTypeId
+     */
     public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    /**
+     * <p>API method to get entity types in a domainId. Results are reverse time sorted based on creation time</p>
+     * 
+     * @param domainId
+     * @param offset
+     * @param limit
+     */
+    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domainId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     *  * Entity Operations
-     * *
+     * <p>API method to register new entity</p>
      * 
      * @param entity
      */
-    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public String registerEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to update entity</p>
+     * 
+     * @param entity
+     */
     public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to delete entity</p>
+     * 
+     * @param entityId
+     */
     public boolean deleteEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to get entity</p>
+     * 
+     * @param entityId
+     */
     public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to search entities</p>
+     * 
+     * @param userId
+     * @param entityTypeId
+     * @param filters
+     * @param offset
+     * @param limit
+     */
     public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to get a list of shared users given the entity id</p>
+     * 
+     * @param entityId
+     * @param permissionTypeId
+     */
     public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to get a list of shared groups given the entity id</p>
+     * 
+     * @param entityId
+     * @param permissionTypeId
+     */
     public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     *  * Permission Operations
-     * *
+     * <p>API method to create permission type</p>
      * 
      * @param permissionType
      */
     public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to update permission type</p>
+     * 
+     * @param permissionType
+     */
     public boolean updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to delete permission type</p>
+     * 
+     * @param entityTypeId
+     */
     public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to get permission type</p>
+     * 
+     * @param permissionTypeId
+     */
     public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    /**
+     * <p>API method to get list of permission types in a given domainId. Results are reverse time sorted based on creation time</p>
+     * 
+     * @param domainId
+     * @param offset
+     * @param limit
+     */
+    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domainId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     *  * Sharing Entity with Users and Groups
-     * *
+     * <p>API method to share an entity with users</p>
      * 
      * @param domainId
      * @param entityId
@@ -161,21 +342,54 @@ public class SharingRegistryService {
      */
     public boolean shareEntityWithUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to revoke sharing from a list of users</p>
+     * 
+     * @param domainId
+     * @param entityId
+     * @param userList
+     * @param perssionTypeId
+     */
     public boolean revokeEntitySharingFromUsers(String domainId, String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to share an entity with list of groups</p>
+     * 
+     * @param domainId
+     * @param entityId
+     * @param groupList
+     * @param perssionTypeId
+     * @param cascadePermission
+     */
     public boolean shareEntityWithGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to revoke sharing from list of users</p>
+     * 
+     * @param domainId
+     * @param entityId
+     * @param groupList
+     * @param perssionTypeId
+     */
     public boolean revokeEntitySharingFromGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
+    /**
+     * <p>API method to check whether a user has access to a specific entity</p>
+     * 
+     * @param domainId
+     * @param userId
+     * @param entityId
+     * @param permissionTypeId
+     */
     public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
   }
 
   public interface AsyncIface {
 
-    public void createDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void createDomain(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -183,7 +397,7 @@ public class SharingRegistryService {
 
     public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void createUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void registerUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void updatedUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -191,7 +405,7 @@ public class SharingRegistryService {
 
     public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getUsers(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void createGroup(org.apache.airavata.sharing.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -201,15 +415,17 @@ public class SharingRegistryService {
 
     public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getGroups(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getGroupMembers(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getGroupMembersOfTypeUser(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void addChildGroupToParentGroup(String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getGroupMembersOfTypeGroup(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addChildGroupsToParentGroup(List<String> childIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void removeChildGroupFromParentGroup(String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -221,9 +437,9 @@ public class SharingRegistryService {
 
     public void getEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getEntityTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getEntityTypes(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void createEntity(org.apache.airavata.sharing.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void registerEntity(org.apache.airavata.sharing.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void updateEntity(org.apache.airavata.sharing.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -245,7 +461,7 @@ public class SharingRegistryService {
 
     public void getPermissionType(String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getPermissionTypes(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void shareEntityWithUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -279,16 +495,16 @@ public class SharingRegistryService {
       super(iprot, oprot);
     }
 
-    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_createDomain(domain);
+      send_createDomain(domainId);
       return recv_createDomain();
     }
 
-    public void send_createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.thrift.TException
+    public void send_createDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.thrift.TException
     {
       createDomain_args args = new createDomain_args();
-      args.setDomain(domain);
+      args.setDomainId(domainId);
       sendBase("createDomain", args);
     }
 
@@ -299,22 +515,22 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createDomain failed: unknown result");
     }
 
-    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_updateDomain(domain);
+      send_updateDomain(domainId);
       return recv_updateDomain();
     }
 
-    public void send_updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.thrift.TException
+    public void send_updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.thrift.TException
     {
       updateDomain_args args = new updateDomain_args();
-      args.setDomain(domain);
+      args.setDomainId(domainId);
       sendBase("updateDomain", args);
     }
 
@@ -325,8 +541,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateDomain failed: unknown result");
     }
@@ -351,8 +567,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteDomain failed: unknown result");
     }
@@ -377,8 +593,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDomain failed: unknown result");
     }
@@ -404,36 +620,36 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDomains failed: unknown result");
     }
 
-    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public String registerUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_createUser(user);
-      return recv_createUser();
+      send_registerUser(user);
+      return recv_registerUser();
     }
 
-    public void send_createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.thrift.TException
+    public void send_registerUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.thrift.TException
     {
-      createUser_args args = new createUser_args();
+      registerUser_args args = new registerUser_args();
       args.setUser(user);
-      sendBase("createUser", args);
+      sendBase("registerUser", args);
     }
 
-    public String recv_createUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public String recv_registerUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      createUser_result result = new createUser_result();
-      receiveBase(result, "createUser");
+      registerUser_result result = new registerUser_result();
+      receiveBase(result, "registerUser");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerUser failed: unknown result");
     }
 
     public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
@@ -456,8 +672,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatedUser failed: unknown result");
     }
@@ -482,8 +698,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
     }
@@ -508,22 +724,22 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUser failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domainId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getUsers(domain, offset, limit);
+      send_getUsers(domainId, offset, limit);
       return recv_getUsers();
     }
 
-    public void send_getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
+    public void send_getUsers(String domainId, int offset, int limit) throws org.apache.thrift.TException
     {
       getUsers_args args = new getUsers_args();
-      args.setDomain(domain);
+      args.setDomainId(domainId);
       args.setOffset(offset);
       args.setLimit(limit);
       sendBase("getUsers", args);
@@ -536,8 +752,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
     }
@@ -562,8 +778,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createGroup failed: unknown result");
     }
@@ -588,8 +804,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateGroup failed: unknown result");
     }
@@ -614,8 +830,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteGroup failed: unknown result");
     }
@@ -640,22 +856,22 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroup failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domainId, int offset, int limit) throws org.apache.thrift.TException
     {
-      send_getGroups(domain, offset, limit);
+      send_getGroups(domainId, offset, limit);
       return recv_getGroups();
     }
 
-    public void send_getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+    public void send_getGroups(String domainId, int offset, int limit) throws org.apache.thrift.TException
     {
       getGroups_args args = new getGroups_args();
-      args.setDomain(domain);
+      args.setDomainId(domainId);
       args.setOffset(offset);
       args.setLimit(limit);
       sendBase("getGroups", args);
@@ -692,8 +908,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addUsersToGroup failed: unknown result");
     }
@@ -719,65 +935,93 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeUsersFromGroup failed: unknown result");
     }
 
-    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> getGroupMembersOfTypeUser(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getGroupMembers(groupId, offset, limit);
-      return recv_getGroupMembers();
+      send_getGroupMembersOfTypeUser(groupId, offset, limit);
+      return recv_getGroupMembersOfTypeUser();
     }
 
-    public void send_getGroupMembers(String groupId, int offset, int limit) throws org.apache.thrift.TException
+    public void send_getGroupMembersOfTypeUser(String groupId, int offset, int limit) throws org.apache.thrift.TException
     {
-      getGroupMembers_args args = new getGroupMembers_args();
+      getGroupMembersOfTypeUser_args args = new getGroupMembersOfTypeUser_args();
       args.setGroupId(groupId);
       args.setOffset(offset);
       args.setLimit(limit);
-      sendBase("getGroupMembers", args);
+      sendBase("getGroupMembersOfTypeUser", args);
     }
 
-    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> recv_getGroupMembers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> recv_getGroupMembersOfTypeUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      getGroupMembers_result result = new getGroupMembers_result();
-      receiveBase(result, "getGroupMembers");
+      getGroupMembersOfTypeUser_result result = new getGroupMembersOfTypeUser_result();
+      receiveBase(result, "getGroupMembersOfTypeUser");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembers failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembersOfTypeUser failed: unknown result");
     }
 
-    public boolean addChildGroupToParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroupMembersOfTypeGroup(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_addChildGroupToParentGroup(childId, groupId);
-      return recv_addChildGroupToParentGroup();
+      send_getGroupMembersOfTypeGroup(groupId, offset, limit);
+      return recv_getGroupMembersOfTypeGroup();
     }
 
-    public void send_addChildGroupToParentGroup(String childId, String groupId) throws org.apache.thrift.TException
+    public void send_getGroupMembersOfTypeGroup(String groupId, int offset, int limit) throws org.apache.thrift.TException
     {
-      addChildGroupToParentGroup_args args = new addChildGroupToParentGroup_args();
-      args.setChildId(childId);
+      getGroupMembersOfTypeGroup_args args = new getGroupMembersOfTypeGroup_args();
+      args.setGroupId(groupId);
+      args.setOffset(offset);
+      args.setLimit(limit);
+      sendBase("getGroupMembersOfTypeGroup", args);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> recv_getGroupMembersOfTypeGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      getGroupMembersOfTypeGroup_result result = new getGroupMembersOfTypeGroup_result();
+      receiveBase(result, "getGroupMembersOfTypeGroup");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.sre != null) {
+        throw result.sre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembersOfTypeGroup failed: unknown result");
+    }
+
+    public boolean addChildGroupsToParentGroup(List<String> childIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_addChildGroupsToParentGroup(childIds, groupId);
+      return recv_addChildGroupsToParentGroup();
+    }
+
+    public void send_addChildGroupsToParentGroup(List<String> childIds, String groupId) throws org.apache.thrift.TException
+    {
+      addChildGroupsToParentGroup_args args = new addChildGroupsToParentGroup_args();
+      args.setChildIds(childIds);
       args.setGroupId(groupId);
-      sendBase("addChildGroupToParentGroup", args);
+      sendBase("addChildGroupsToParentGroup", args);
     }
 
-    public boolean recv_addChildGroupToParentGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_addChildGroupsToParentGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      addChildGroupToParentGroup_result result = new addChildGroupToParentGroup_result();
-      receiveBase(result, "addChildGroupToParentGroup");
+      addChildGroupsToParentGroup_result result = new addChildGroupsToParentGroup_result();
+      receiveBase(result, "addChildGroupsToParentGroup");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addChildGroupToParentGroup failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addChildGroupsToParentGroup failed: unknown result");
     }
 
     public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
@@ -801,8 +1045,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeChildGroupFromParentGroup failed: unknown result");
     }
@@ -827,8 +1071,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createEntityType failed: unknown result");
     }
@@ -853,8 +1097,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateEntityType failed: unknown result");
     }
@@ -879,8 +1123,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteEntityType failed: unknown result");
     }
@@ -905,22 +1149,22 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEntityType failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domainId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getEntityTypes(domain, offset, limit);
+      send_getEntityTypes(domainId, offset, limit);
       return recv_getEntityTypes();
     }
 
-    public void send_getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+    public void send_getEntityTypes(String domainId, int offset, int limit) throws org.apache.thrift.TException
     {
       getEntityTypes_args args = new getEntityTypes_args();
-      args.setDomain(domain);
+      args.setDomainId(domainId);
       args.setOffset(offset);
       args.setLimit(limit);
       sendBase("getEntityTypes", args);
@@ -933,36 +1177,36 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEntityTypes failed: unknown result");
     }
 
-    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public String registerEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_createEntity(entity);
-      return recv_createEntity();
+      send_registerEntity(entity);
+      return recv_registerEntity();
     }
 
-    public void send_createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.thrift.TException
+    public void send_registerEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.thrift.TException
     {
-      createEntity_args args = new createEntity_args();
+      registerEntity_args args = new registerEntity_args();
       args.setEntity(entity);
-      sendBase("createEntity", args);
+      sendBase("registerEntity", args);
     }
 
-    public String recv_createEntity() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public String recv_registerEntity() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      createEntity_result result = new createEntity_result();
-      receiveBase(result, "createEntity");
+      registerEntity_result result = new registerEntity_result();
+      receiveBase(result, "registerEntity");
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createEntity failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerEntity failed: unknown result");
     }
 
     public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
@@ -985,8 +1229,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateEntity failed: unknown result");
     }
@@ -1011,8 +1255,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteEntity failed: unknown result");
     }
@@ -1037,8 +1281,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEntity failed: unknown result");
     }
@@ -1067,8 +1311,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchEntities failed: unknown result");
     }
@@ -1094,8 +1338,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedUsers failed: unknown result");
     }
@@ -1121,8 +1365,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedGroups failed: unknown result");
     }
@@ -1147,8 +1391,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPermissionType failed: unknown result");
     }
@@ -1173,8 +1417,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatePermissionType failed: unknown result");
     }
@@ -1199,8 +1443,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deletePermissionType failed: unknown result");
     }
@@ -1225,22 +1469,22 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionType failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domainId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getPermissionTypes(domain, offset, limit);
+      send_getPermissionTypes(domainId, offset, limit);
       return recv_getPermissionTypes();
     }
 
-    public void send_getPermissionTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+    public void send_getPermissionTypes(String domainId, int offset, int limit) throws org.apache.thrift.TException
     {
       getPermissionTypes_args args = new getPermissionTypes_args();
-      args.setDomain(domain);
+      args.setDomainId(domainId);
       args.setOffset(offset);
       args.setLimit(limit);
       sendBase("getPermissionTypes", args);
@@ -1253,8 +1497,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionTypes failed: unknown result");
     }
@@ -1283,8 +1527,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithUsers failed: unknown result");
     }
@@ -1312,8 +1556,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromUsers failed: unknown result");
     }
@@ -1342,8 +1586,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithGroups failed: unknown result");
     }
@@ -1371,8 +1615,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromGroups failed: unknown result");
     }
@@ -1400,8 +1644,8 @@ public class SharingRegistryService {
       if (result.isSetSuccess()) {
         return result.success;
       }
-      if (result.gre != null) {
-        throw result.gre;
+      if (result.sre != null) {
+        throw result.sre;
       }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "userHasAccess failed: unknown result");
     }
@@ -1424,24 +1668,24 @@ public class SharingRegistryService {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void createDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void createDomain(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      createDomain_call method_call = new createDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
+      createDomain_call method_call = new createDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class createDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private org.apache.airavata.sharing.registry.models.Domain domain;
-      public createDomain_call(org.apache.airavata.sharing.registry.models.Domain domain, 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 {
+      private org.apache.airavata.sharing.registry.models.Domain domainId;
+      public createDomain_call(org.apache.airavata.sharing.registry.models.Domain domainId, 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.domain = domain;
+        this.domainId = domainId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
         createDomain_args args = new createDomain_args();
-        args.setDomain(domain);
+        args.setDomainId(domainId);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -1456,24 +1700,24 @@ public class SharingRegistryService {
       }
     }
 
-    public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateDomain_call method_call = new updateDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
+      updateDomain_call method_call = new updateDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class updateDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private org.apache.airavata.sharing.registry.models.Domain domain;
-      public updateDomain_call(org.apache.airavata.sharing.registry.models.Domain domain, 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 {
+      private org.apache.airavata.sharing.registry.models.Domain domainId;
+      public updateDomain_call(org.apache.airavata.sharing.registry.models.Domain domainId, 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.domain = domain;
+        this.domainId = domainId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
         updateDomain_args args = new updateDomain_args();
-        args.setDomain(domain);
+        args.setDomainId(domainId);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -1587,23 +1831,23 @@ public class SharingRegistryService {
       }
     }
 
-    public void createUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void registerUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      createUser_call method_call = new createUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
+      registerUser_call method_call = new registerUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class createUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class registerUser_call extends org.apache.thrift.async.TAsyncMethodCall {
       private org.apache.airavata.sharing.registry.models.User user;
-      public createUser_call(org.apache.airavata.sharing.registry.models.User user, 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 {
+      public registerUser_call(org.apache.airavata.sharing.registry.models.User user, 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.user = user;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        createUser_args args = new createUser_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        registerUser_args args = new registerUser_args();
         args.setUser(user);
         args.write(prot);
         prot.writeMessageEnd();
@@ -1615,7 +1859,7 @@ public class SharingRegistryService {
         }
         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_createUser();
+        return (new Client(prot)).recv_registerUser();
       }
     }
 
@@ -1715,20 +1959,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getUsers(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getUsers_call method_call = new getUsers_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+      getUsers_call method_call = new getUsers_call(domainId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String domain;
+      private String domainId;
       private int offset;
       private int limit;
-      public getUsers_call(String domain, int offset, int limit, 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 {
+      public getUsers_call(String domainId, int offset, int limit, 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.domain = domain;
+        this.domainId = domainId;
         this.offset = offset;
         this.limit = limit;
       }
@@ -1736,7 +1980,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getUsers_args args = new getUsers_args();
-        args.setDomain(domain);
+        args.setDomainId(domainId);
         args.setOffset(offset);
         args.setLimit(limit);
         args.write(prot);
@@ -1881,20 +2125,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getGroups(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getGroups_call method_call = new getGroups_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+      getGroups_call method_call = new getGroups_call(domainId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String domain;
+      private String domainId;
       private int offset;
       private int limit;
-      public getGroups_call(String domain, int offset, int limit, 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 {
+      public getGroups_call(String domainId, int offset, int limit, 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.domain = domain;
+        this.domainId = domainId;
         this.offset = offset;
         this.limit = limit;
       }
@@ -1902,7 +2146,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getGroups_args args = new getGroups_args();
-        args.setDomain(domain);
+        args.setDomainId(domainId);
         args.setOffset(offset);
         args.setLimit(limit);
         args.write(prot);
@@ -1989,18 +2233,18 @@ public class SharingRegistryService {
       }
     }
 
-    public void getGroupMembers(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getGroupMembersOfTypeUser(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getGroupMembers_call method_call = new getGroupMembers_call(groupId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+      getGroupMembersOfTypeUser_call method_call = new getGroupMembersOfTypeUser_call(groupId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class getGroupMembers_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class getGroupMembersOfTypeUser_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String groupId;
       private int offset;
       private int limit;
-      public getGroupMembers_call(String groupId, int offset, int limit, 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 {
+      public getGroupMembersOfTypeUser_call(String groupId, int offset, int limit, 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.groupId = groupId;
         this.offset = offset;
@@ -2008,8 +2252,8 @@ public class SharingRegistryService {
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroupMembers", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        getGroupMembers_args args = new getGroupMembers_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroupMembersOfTypeUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getGroupMembersOfTypeUser_args args = new getGroupMembersOfTypeUser_args();
         args.setGroupId(groupId);
         args.setOffset(offset);
         args.setLimit(limit);
@@ -2017,36 +2261,74 @@ public class SharingRegistryService {
         prot.writeMessageEnd();
       }
 
-      public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
+      public List<org.apache.airavata.sharing.registry.models.User> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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_getGroupMembers();
+        return (new Client(prot)).recv_getGroupMembersOfTypeUser();
       }
     }
 
-    public void addChildGroupToParentGroup(String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getGroupMembersOfTypeGroup(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      addChildGroupToParentGroup_call method_call = new addChildGroupToParentGroup_call(childId, groupId, resultHandler, this, ___protocolFactory, ___transport);
+      getGroupMembersOfTypeGroup_call method_call = new getGroupMembersOfTypeGroup_call(groupId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class addChildGroupToParentGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String childId;
+    public static class getGroupMembersOfTypeGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String groupId;
-      public addChildGroupToParentGroup_call(String childId, String groupId, 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 {
+      private int offset;
+      private int limit;
+      public getGroupMembersOfTypeGroup_call(String groupId, int offset, int limit, 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.childId = childId;
         this.groupId = groupId;
+        this.offset = offset;
+        this.limit = limit;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addChildGroupToParentGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        addChildGroupToParentGroup_args args = new addChildGroupToParentGroup_args();
-        args.setChildId(childId);
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroupMembersOfTypeGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getGroupMembersOfTypeGroup_args args = new getGroupMembersOfTypeGroup_args();
+        args.setGroupId(groupId);
+        args.setOffset(offset);
+        args.setLimit(limit);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.sharing.registry.models.UserGroup> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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_getGroupMembersOfTypeGroup();
+      }
+    }
+
+    public void addChildGroupsToParentGroup(List<String> childIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addChildGroupsToParentGroup_call method_call = new addChildGroupsToParentGroup_call(childIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addChildGroupsToParentGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private List<String> childIds;
+      private String groupId;
+      public addChildGroupsToParentGroup_call(List<String> childIds, String groupId, 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.childIds = childIds;
+        this.groupId = groupId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addChildGroupsToParentGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addChildGroupsToParentGroup_args args = new addChildGroupsToParentGroup_args();
+        args.setChildIds(childIds);
         args.setGroupId(groupId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2058,7 +2340,7 @@ public class SharingRegistryService {
         }
         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_addChildGroupToParentGroup();
+        return (new Client(prot)).recv_addChildGroupsToParentGroup();
       }
     }
 
@@ -2225,20 +2507,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void getEntityTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getEntityTypes(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getEntityTypes_call method_call = new getEntityTypes_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+      getEntityTypes_call method_call = new getEntityTypes_call(domainId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getEntityTypes_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String domain;
+      private String domainId;
       private int offset;
       private int limit;
-      public getEntityTypes_call(String domain, int offset, int limit, 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 {
+      public getEntityTypes_call(String domainId, int offset, int limit, 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.domain = domain;
+        this.domainId = domainId;
         this.offset = offset;
         this.limit = limit;
       }
@@ -2246,7 +2528,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getEntityTypes", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getEntityTypes_args args = new getEntityTypes_args();
-        args.setDomain(domain);
+        args.setDomainId(domainId);
         args.setOffset(offset);
         args.setLimit(limit);
         args.write(prot);
@@ -2263,23 +2545,23 @@ public class SharingRegistryService {
       }
     }
 
-    public void createEntity(org.apache.airavata.sharing.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void registerEntity(org.apache.airavata.sharing.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      createEntity_call method_call = new createEntity_call(entity, resultHandler, this, ___protocolFactory, ___transport);
+      registerEntity_call method_call = new registerEntity_call(entity, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class createEntity_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class registerEntity_call extends org.apache.thrift.async.TAsyncMethodCall {
       private org.apache.airavata.sharing.registry.models.Entity entity;
-      public createEntity_call(org.apache.airavata.sharing.registry.models.Entity entity, 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 {
+      public registerEntity_call(org.apache.airavata.sharing.registry.models.Entity entity, 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.entity = entity;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createEntity", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        createEntity_args args = new createEntity_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerEntity", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        registerEntity_args args = new registerEntity_args();
         args.setEntity(entity);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2291,7 +2573,7 @@ public class SharingRegistryService {
         }
         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_createEntity();
+        return (new Client(prot)).recv_registerEntity();
       }
     }
 
@@ -2633,20 +2915,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getPermissionTypes(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getPermissionTypes_call method_call = new getPermissionTypes_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+      getPermissionTypes_call method_call = new getPermissionTypes_call(domainId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getPermissionTypes_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String domain;
+      private String domainId;
       private int offset;
       private int limit;
-      public getPermissionTypes_call(String domain, int offset, int limit, 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 {
+      public getPermissionTypes_call(String domainId, int offset, int limit, 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.domain = domain;
+        this.domainId = domainId;
         this.offset = offset;
         this.limit = limit;
       }
@@ -2654,7 +2936,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPermissionTypes", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getPermissionTypes_args args = new getPermissionTypes_args();
-        args.setDomain(domain);
+        args.setDomainId(domainId);
         args.setOffset(offset);
         args.setLimit(limit);
         args.write(prot);
@@ -2900,7 +3182,7 @@ public class SharingRegistryService {
       processMap.put("deleteDomain", new deleteDomain());
       processMap.put("getDomain", new getDomain());
       processMap.put("getDomains", new getDomains());
-      processMap.put("createUser", new createUser());
+      processMap.put("registerUser", new registerUser());
       processMap.put("updatedUser", new updatedUser());
       processMap.put("deleteUser", new deleteUser());
       processMap.put("getUser", new getUser());
@@ -2912,15 +3194,16 @@ public class SharingRegistryService {
       processMap.put("getGroups", new getGroups());
       processMap.put("addUsersToGroup", new addUsersToGroup());
       processMap.put("removeUsersFromGroup", new removeUsersFromGroup());
-      processMap.put("getGroupMembers", new getGroupMembers());
-      processMap.put("addChildGroupToParentGroup", new addChildGroupToParentGroup());
+      processMap.put("getGroupMembersOfTypeUser", new getGroupMembersOfTypeUser());
+      processMap.put("getGroupMembersOfTypeGroup", new getGroupMembersOfTypeGroup());
+      processMap.put("addChildGroupsToParentGroup", new addChildGroupsToParentGroup());
       processMap.put("removeChildGroupFromParentGroup", new removeChildGroupFromParentGroup());
       processMap.put("createEntityType", new createEntityType());
       processMap.put("updateEntityType", new updateEntityType());
       processMap.put("deleteEntityType", new deleteEntityType());
       processMap.put("getEntityType", new getEntityType());
       processMap.put("getEnt

<TRUNCATED>

[3/4] airavata git commit: adding docs

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 81b8b2b..00e0068 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,22 @@ 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-14")
+/**
+ * <p>Entity object which is used to register an entity in the system.</p>
+ * <li><b>entityId</b> : Client id provided by the client</li>
+ * <li><b>domainId</b> : Domain id</li>
+ * <li><b>entityTypeId</b> : Entity type id</li>
+ * <li><b>ownerId</b> : Owner id</li>
+ * <li>parentEntityId : Parent entity id</li>
+ * <li><b>name</b> : Name</li>
+ * <li>description : Short description for the entity</li>
+ * <li>metadata : Map of optional metadata</li>
+ * <li>fullText : A string which will be considered for full text search</li>
+ * <li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+ * <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 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");
 
@@ -193,8 +208,6 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
   }
 
   public Entity() {
-    this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
-
   }
 
   /**
@@ -240,8 +253,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
 
   @Override
   public void clear() {
-    this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
-
+    this.entityId = null;
     this.domainId = null;
     this.entityTypeId = null;
     this.ownerId = null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
index 9dd62b7..3ca2012 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
@@ -11,6 +11,16 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
+/**
+ * <p>This list of fields that can be used to search entities</p>
+ * <li>NAME : Name of the entity</li>
+ * <li>DESCRIPTION : Description of the entity</li>
+ * <li>FULL_TEXT : Full text field of the entity</li>
+ * <li>PARENT_ENTITY_ID : Parent entity id of the entity</li>
+ * <li>CREATED_TIME : Created time of the entity</li>
+ * <li>UPDATED_TIME : Updated time of the entity</li>
+ * 
+ */
 public enum EntitySearchField implements org.apache.thrift.TEnum {
   NAME(0),
   DESCRIPTION(1),

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 cfce3e1..fe72364 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,17 @@ 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-14")
+/**
+ * <p>client defined entity types</p>
+ * <li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
+ * <li><b>domainId</b> : Domain id of the domain.</li>
+ * <li><b>name</b> : Name for the entity type. Should be a single word.</li>
+ * <li>description : Short description for the entity type.</li>
+ * <li>createdTime : Will be set by the system</li>
+ * <li>updatedTime : Will be set by the system</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 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/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
index ba7b659..9678ddb 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
@@ -11,6 +11,10 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
+/**
+ * <p>System internal data type to match group child types</p>
+ * 
+ */
 public enum GroupChildType implements org.apache.thrift.TEnum {
   USER(0),
   GROUP(1);

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 629cf26..de4d5a8 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,11 @@ 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-14")
+/**
+ * <p>System internal data type to map group memberships</p>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 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/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
index 5727f83..ee4f131 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
@@ -11,9 +11,13 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
+/**
+ * <p>Group types can be either user level or domain level groups.</p>
+ * 
+ */
 public enum GroupType implements org.apache.thrift.TEnum {
-  SINGLE_USER(0),
-  MULTI_USER(1);
+  DOMAIN_LEVEL_GROUP(0),
+  USER_LEVEL_GROUP(1);
 
   private final int value;
 
@@ -35,9 +39,9 @@ public enum GroupType implements org.apache.thrift.TEnum {
   public static GroupType findByValue(int value) { 
     switch (value) {
       case 0:
-        return SINGLE_USER;
+        return DOMAIN_LEVEL_GROUP;
       case 1:
-        return MULTI_USER;
+        return USER_LEVEL_GROUP;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 f7e041f..103547a 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,17 @@ 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-14")
+/**
+ * <p>Object for creating client defined permission type</p>
+ * <li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
+ * <li><b>domainId</b> : Domain id</li>
+ * <li><b>name</b> : Single word name for the permission</li>
+ * <li>description : Short description for the permission type</li>
+ * <li>createdTime : Will be set by the system</li>
+ * <li>updatedTime : Will be set by the system</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 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/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
index a111c6a..80b57e7 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
@@ -11,11 +11,21 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
+/**
+ * <p>Different search operators that can be used with the entity search fields</p>
+ * <li>EQUAL : Simply matches for equality. Applicable for name, and parent entity id</li>
+ * <li>LIKE : Check for the condition %$FIELD% condition. Applicable for name, and description</li>
+ * <li>FULL_TEXT : Does a full text search. Only applicable for the FULL_TEXT field.</li>
+ * <li>GTE : Greater than or equal. Only applicable for created time and updated time.</li>
+ * <li>LTE : Less than or equal. Only applicable for created time and updated time.</li>
+ * 
+ */
 public enum SearchCondition implements org.apache.thrift.TEnum {
   EQUAL(0),
   LIKE(1),
-  GTE(2),
-  LTE(3);
+  FULL_TEXT(2),
+  GTE(3),
+  LTE(4);
 
   private final int value;
 
@@ -41,8 +51,10 @@ public enum SearchCondition implements org.apache.thrift.TEnum {
       case 1:
         return LIKE;
       case 2:
-        return GTE;
+        return FULL_TEXT;
       case 3:
+        return GTE;
+      case 4:
         return LTE;
       default:
         return null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
index b7e5d91..c0fc452 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
@@ -34,7 +34,14 @@ 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-14")
+/**
+ * <p>Container object for search criteria</p>
+ * <li><b>searchField</b> : Entity search field</li>
+ * <li><b>value</b> : Search value</li>
+ * <li><b>searchCondition</b> : EQUAL, LIKE etc..</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class SearchCriteria implements org.apache.thrift.TBase<SearchCriteria, SearchCriteria._Fields>, java.io.Serializable, Cloneable, Comparable<SearchCriteria> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SearchCriteria");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 590566c..0ffa332 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,11 @@ 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-14")
+/**
+ * <p>This is an internal enum type for managing sharings</p>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 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");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
index 8daea37..4eca646 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
@@ -34,7 +34,11 @@ 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-14")
+/**
+ * <p>Exception model used in the sharing registry service</p>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class SharingRegistryException extends TException implements org.apache.thrift.TBase<SharingRegistryException, SharingRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<SharingRegistryException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SharingRegistryException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java
index f57f7d1..746b23b 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java
@@ -11,6 +11,10 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
+/**
+ * <p>This is an internal enum type for managing sharings</p>
+ * 
+ */
 public enum SharingType implements org.apache.thrift.TEnum {
   DIRECT_NON_CASCADING(0),
   DIRECT_CASCADING(1),

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 2c01c1c..f0d3979 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,21 @@ 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-14")
+/**
+ * <p>User is the model used to register a user in the system. Minimal user information will be required to provide
+ * regarding the user.</p>
+ * <li><b>userId</b> : Client provided user id. (The id is not system generated and it is a must to provide this id)</li>
+ * <li><b>domainId</b> : Domain id for that user</li>
+ * <li><b>userName</b> : User name for the user</li>
+ * <li><b>firstName</b> : First name of the user</li>
+ * <li><b>lastName</b> : Last name of the user</li>
+ * <li><b>email</b> : Email address of the user</li>
+ * <li>icon : A binary field for storing the user icon</li>
+ * <li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+ * <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 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");
 
@@ -43,9 +57,10 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
   private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)5);
-  private static final org.apache.thrift.protocol.TField ICON_FIELD_DESC = new org.apache.thrift.protocol.TField("icon", org.apache.thrift.protocol.TType.STRING, (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 EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)6);
+  private static final org.apache.thrift.protocol.TField ICON_FIELD_DESC = new org.apache.thrift.protocol.TField("icon", org.apache.thrift.protocol.TType.STRING, (short)7);
+  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)8);
+  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)9);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -58,6 +73,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
   public String userName; // optional
   public String firstName; // optional
   public String lastName; // optional
+  public String email; // optional
   public ByteBuffer icon; // optional
   public long createdTime; // optional
   public long updatedTime; // optional
@@ -69,9 +85,10 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     USER_NAME((short)3, "userName"),
     FIRST_NAME((short)4, "firstName"),
     LAST_NAME((short)5, "lastName"),
-    ICON((short)6, "icon"),
-    CREATED_TIME((short)7, "createdTime"),
-    UPDATED_TIME((short)8, "updatedTime");
+    EMAIL((short)6, "email"),
+    ICON((short)7, "icon"),
+    CREATED_TIME((short)8, "createdTime"),
+    UPDATED_TIME((short)9, "updatedTime");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -96,11 +113,13 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
           return FIRST_NAME;
         case 5: // LAST_NAME
           return LAST_NAME;
-        case 6: // ICON
+        case 6: // EMAIL
+          return EMAIL;
+        case 7: // ICON
           return ICON;
-        case 7: // CREATED_TIME
+        case 8: // CREATED_TIME
           return CREATED_TIME;
-        case 8: // UPDATED_TIME
+        case 9: // UPDATED_TIME
           return UPDATED_TIME;
         default:
           return null;
@@ -145,7 +164,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
   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.USER_ID,_Fields.DOMAIN_ID,_Fields.USER_NAME,_Fields.FIRST_NAME,_Fields.LAST_NAME,_Fields.ICON,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
+  private static final _Fields optionals[] = {_Fields.USER_ID,_Fields.DOMAIN_ID,_Fields.USER_NAME,_Fields.FIRST_NAME,_Fields.LAST_NAME,_Fields.EMAIL,_Fields.ICON,_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);
@@ -159,6 +178,8 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.ICON, new org.apache.thrift.meta_data.FieldMetaData("icon", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -170,8 +191,6 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
   }
 
   public User() {
-    this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
-
   }
 
   /**
@@ -194,6 +213,9 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     if (other.isSetLastName()) {
       this.lastName = other.lastName;
     }
+    if (other.isSetEmail()) {
+      this.email = other.email;
+    }
     if (other.isSetIcon()) {
       this.icon = org.apache.thrift.TBaseHelper.copyBinary(other.icon);
     }
@@ -207,12 +229,12 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
 
   @Override
   public void clear() {
-    this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
-
+    this.userId = null;
     this.domainId = null;
     this.userName = null;
     this.firstName = null;
     this.lastName = null;
+    this.email = null;
     this.icon = null;
     setCreatedTimeIsSet(false);
     this.createdTime = 0;
@@ -340,6 +362,30 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     }
   }
 
+  public String getEmail() {
+    return this.email;
+  }
+
+  public User setEmail(String email) {
+    this.email = email;
+    return this;
+  }
+
+  public void unsetEmail() {
+    this.email = null;
+  }
+
+  /** Returns true if field email is set (has been assigned a value) and false otherwise */
+  public boolean isSetEmail() {
+    return this.email != null;
+  }
+
+  public void setEmailIsSet(boolean value) {
+    if (!value) {
+      this.email = null;
+    }
+  }
+
   public byte[] getIcon() {
     setIcon(org.apache.thrift.TBaseHelper.rightSize(icon));
     return icon == null ? null : icon.array();
@@ -462,6 +508,14 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       }
       break;
 
+    case EMAIL:
+      if (value == null) {
+        unsetEmail();
+      } else {
+        setEmail((String)value);
+      }
+      break;
+
     case ICON:
       if (value == null) {
         unsetIcon();
@@ -506,6 +560,9 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     case LAST_NAME:
       return getLastName();
 
+    case EMAIL:
+      return getEmail();
+
     case ICON:
       return getIcon();
 
@@ -536,6 +593,8 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       return isSetFirstName();
     case LAST_NAME:
       return isSetLastName();
+    case EMAIL:
+      return isSetEmail();
     case ICON:
       return isSetIcon();
     case CREATED_TIME:
@@ -604,6 +663,15 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
         return false;
     }
 
+    boolean this_present_email = true && this.isSetEmail();
+    boolean that_present_email = true && that.isSetEmail();
+    if (this_present_email || that_present_email) {
+      if (!(this_present_email && that_present_email))
+        return false;
+      if (!this.email.equals(that.email))
+        return false;
+    }
+
     boolean this_present_icon = true && this.isSetIcon();
     boolean that_present_icon = true && that.isSetIcon();
     if (this_present_icon || that_present_icon) {
@@ -663,6 +731,11 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     if (present_lastName)
       list.add(lastName);
 
+    boolean present_email = true && (isSetEmail());
+    list.add(present_email);
+    if (present_email)
+      list.add(email);
+
     boolean present_icon = true && (isSetIcon());
     list.add(present_icon);
     if (present_icon)
@@ -739,6 +812,16 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetEmail()).compareTo(other.isSetEmail());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetEmail()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, other.email);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     lastComparison = Boolean.valueOf(isSetIcon()).compareTo(other.isSetIcon());
     if (lastComparison != 0) {
       return lastComparison;
@@ -838,6 +921,16 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       }
       first = false;
     }
+    if (isSetEmail()) {
+      if (!first) sb.append(", ");
+      sb.append("email:");
+      if (this.email == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.email);
+      }
+      first = false;
+    }
     if (isSetIcon()) {
       if (!first) sb.append(", ");
       sb.append("icon:");
@@ -945,7 +1038,15 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // ICON
+          case 6: // EMAIL
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.email = iprot.readString();
+              struct.setEmailIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // ICON
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.icon = iprot.readBinary();
               struct.setIconIsSet(true);
@@ -953,7 +1054,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 7: // CREATED_TIME
+          case 8: // CREATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.createdTime = iprot.readI64();
               struct.setCreatedTimeIsSet(true);
@@ -961,7 +1062,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 8: // UPDATED_TIME
+          case 9: // UPDATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.updatedTime = iprot.readI64();
               struct.setUpdatedTimeIsSet(true);
@@ -1019,6 +1120,13 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
           oprot.writeFieldEnd();
         }
       }
+      if (struct.email != null) {
+        if (struct.isSetEmail()) {
+          oprot.writeFieldBegin(EMAIL_FIELD_DESC);
+          oprot.writeString(struct.email);
+          oprot.writeFieldEnd();
+        }
+      }
       if (struct.icon != null) {
         if (struct.isSetIcon()) {
           oprot.writeFieldBegin(ICON_FIELD_DESC);
@@ -1069,16 +1177,19 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       if (struct.isSetLastName()) {
         optionals.set(4);
       }
-      if (struct.isSetIcon()) {
+      if (struct.isSetEmail()) {
         optionals.set(5);
       }
-      if (struct.isSetCreatedTime()) {
+      if (struct.isSetIcon()) {
         optionals.set(6);
       }
-      if (struct.isSetUpdatedTime()) {
+      if (struct.isSetCreatedTime()) {
         optionals.set(7);
       }
-      oprot.writeBitSet(optionals, 8);
+      if (struct.isSetUpdatedTime()) {
+        optionals.set(8);
+      }
+      oprot.writeBitSet(optionals, 9);
       if (struct.isSetUserId()) {
         oprot.writeString(struct.userId);
       }
@@ -1094,6 +1205,9 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       if (struct.isSetLastName()) {
         oprot.writeString(struct.lastName);
       }
+      if (struct.isSetEmail()) {
+        oprot.writeString(struct.email);
+      }
       if (struct.isSetIcon()) {
         oprot.writeBinary(struct.icon);
       }
@@ -1108,7 +1222,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(8);
+      BitSet incoming = iprot.readBitSet(9);
       if (incoming.get(0)) {
         struct.userId = iprot.readString();
         struct.setUserIdIsSet(true);
@@ -1130,14 +1244,18 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
         struct.setLastNameIsSet(true);
       }
       if (incoming.get(5)) {
+        struct.email = iprot.readString();
+        struct.setEmailIsSet(true);
+      }
+      if (incoming.get(6)) {
         struct.icon = iprot.readBinary();
         struct.setIconIsSet(true);
       }
-      if (incoming.get(6)) {
+      if (incoming.get(7)) {
         struct.createdTime = iprot.readI64();
         struct.setCreatedTimeIsSet(true);
       }
-      if (incoming.get(7)) {
+      if (incoming.get(8)) {
         struct.updatedTime = iprot.readI64();
         struct.setUpdatedTimeIsSet(true);
       }

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/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 93819bd..8f5d483 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,18 +34,32 @@ 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-14")
+/**
+ * <p>User group is a collection of users.</p>
+ *  <li>groupId : System generated grouo id. In the current implementation this is of the form domainId:name</li>
+ *  <li><b>domainId</b> : Domain id for this user group</li>
+ *  <li><b>name</b> : Name for the user group. should be one word</li>
+ *  <li>description : Short description for the group.</li>
+ *  <li><b>ownerId</b> : Owner id of this group.</li>
+ *  <li><b>groupType</b> : Group type (DOMAIN_LEVEL_GROUP, USER_LEVEL_GROUP)</li>
+ *  <li><b>groupCardinality</b> : Group cardinality (SINGLE_USER, MULTI_USER)</li>
+ *  <li>createdTime : Will be set by the system</li>
+ *  <li>updatedTime : Will be set by the system</li>
+ *  
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 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");
 
   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)1);
   private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
-  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
-  private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
+  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField GROUP_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("groupType", org.apache.thrift.protocol.TType.I32, (short)6);
+  private static final org.apache.thrift.protocol.TField GROUP_CARDINALITY_FIELD_DESC = new org.apache.thrift.protocol.TField("groupCardinality", org.apache.thrift.protocol.TType.I32, (short)7);
   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)8);
   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)9);
-  private static final org.apache.thrift.protocol.TField GROUP_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("groupType", org.apache.thrift.protocol.TType.I32, (short)10);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -58,28 +72,38 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
   public String name; // optional
   public String description; // optional
   public String ownerId; // optional
-  public long createdTime; // optional
-  public long updatedTime; // optional
   /**
    * 
    * @see GroupType
    */
   public GroupType groupType; // optional
+  /**
+   * 
+   * @see GroupCardinality
+   */
+  public GroupCardinality groupCardinality; // optional
+  public long createdTime; // optional
+  public long updatedTime; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     GROUP_ID((short)1, "groupId"),
     DOMAIN_ID((short)2, "domainId"),
     NAME((short)3, "name"),
-    DESCRIPTION((short)6, "description"),
-    OWNER_ID((short)7, "ownerId"),
-    CREATED_TIME((short)8, "createdTime"),
-    UPDATED_TIME((short)9, "updatedTime"),
+    DESCRIPTION((short)4, "description"),
+    OWNER_ID((short)5, "ownerId"),
     /**
      * 
      * @see GroupType
      */
-    GROUP_TYPE((short)10, "groupType");
+    GROUP_TYPE((short)6, "groupType"),
+    /**
+     * 
+     * @see GroupCardinality
+     */
+    GROUP_CARDINALITY((short)7, "groupCardinality"),
+    CREATED_TIME((short)8, "createdTime"),
+    UPDATED_TIME((short)9, "updatedTime");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -100,16 +124,18 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
           return DOMAIN_ID;
         case 3: // NAME
           return NAME;
-        case 6: // DESCRIPTION
+        case 4: // DESCRIPTION
           return DESCRIPTION;
-        case 7: // OWNER_ID
+        case 5: // OWNER_ID
           return OWNER_ID;
+        case 6: // GROUP_TYPE
+          return GROUP_TYPE;
+        case 7: // GROUP_CARDINALITY
+          return GROUP_CARDINALITY;
         case 8: // CREATED_TIME
           return CREATED_TIME;
         case 9: // UPDATED_TIME
           return UPDATED_TIME;
-        case 10: // GROUP_TYPE
-          return GROUP_TYPE;
         default:
           return null;
       }
@@ -153,7 +179,7 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
   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.GROUP_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.OWNER_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME,_Fields.GROUP_TYPE};
+  private static final _Fields optionals[] = {_Fields.GROUP_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.OWNER_ID,_Fields.GROUP_TYPE,_Fields.GROUP_CARDINALITY,_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);
@@ -167,12 +193,14 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.GROUP_TYPE, new org.apache.thrift.meta_data.FieldMetaData("groupType", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupType.class)));
+    tmpMap.put(_Fields.GROUP_CARDINALITY, new org.apache.thrift.meta_data.FieldMetaData("groupCardinality", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupCardinality.class)));
     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, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-    tmpMap.put(_Fields.GROUP_TYPE, new org.apache.thrift.meta_data.FieldMetaData("groupType", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupType.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserGroup.class, metaDataMap);
   }
@@ -202,11 +230,14 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
     if (other.isSetOwnerId()) {
       this.ownerId = other.ownerId;
     }
-    this.createdTime = other.createdTime;
-    this.updatedTime = other.updatedTime;
     if (other.isSetGroupType()) {
       this.groupType = other.groupType;
     }
+    if (other.isSetGroupCardinality()) {
+      this.groupCardinality = other.groupCardinality;
+    }
+    this.createdTime = other.createdTime;
+    this.updatedTime = other.updatedTime;
   }
 
   public UserGroup deepCopy() {
@@ -221,11 +252,12 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
     this.name = null;
     this.description = null;
     this.ownerId = null;
+    this.groupType = null;
+    this.groupCardinality = null;
     setCreatedTimeIsSet(false);
     this.createdTime = 0;
     setUpdatedTimeIsSet(false);
     this.updatedTime = 0;
-    this.groupType = null;
   }
 
   public String getGroupId() {
@@ -348,6 +380,70 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
     }
   }
 
+  /**
+   * 
+   * @see GroupType
+   */
+  public GroupType getGroupType() {
+    return this.groupType;
+  }
+
+  /**
+   * 
+   * @see GroupType
+   */
+  public UserGroup setGroupType(GroupType groupType) {
+    this.groupType = groupType;
+    return this;
+  }
+
+  public void unsetGroupType() {
+    this.groupType = null;
+  }
+
+  /** Returns true if field groupType is set (has been assigned a value) and false otherwise */
+  public boolean isSetGroupType() {
+    return this.groupType != null;
+  }
+
+  public void setGroupTypeIsSet(boolean value) {
+    if (!value) {
+      this.groupType = null;
+    }
+  }
+
+  /**
+   * 
+   * @see GroupCardinality
+   */
+  public GroupCardinality getGroupCardinality() {
+    return this.groupCardinality;
+  }
+
+  /**
+   * 
+   * @see GroupCardinality
+   */
+  public UserGroup setGroupCardinality(GroupCardinality groupCardinality) {
+    this.groupCardinality = groupCardinality;
+    return this;
+  }
+
+  public void unsetGroupCardinality() {
+    this.groupCardinality = null;
+  }
+
+  /** Returns true if field groupCardinality is set (has been assigned a value) and false otherwise */
+  public boolean isSetGroupCardinality() {
+    return this.groupCardinality != null;
+  }
+
+  public void setGroupCardinalityIsSet(boolean value) {
+    if (!value) {
+      this.groupCardinality = null;
+    }
+  }
+
   public long getCreatedTime() {
     return this.createdTime;
   }
@@ -394,38 +490,6 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
   }
 
-  /**
-   * 
-   * @see GroupType
-   */
-  public GroupType getGroupType() {
-    return this.groupType;
-  }
-
-  /**
-   * 
-   * @see GroupType
-   */
-  public UserGroup setGroupType(GroupType groupType) {
-    this.groupType = groupType;
-    return this;
-  }
-
-  public void unsetGroupType() {
-    this.groupType = null;
-  }
-
-  /** Returns true if field groupType is set (has been assigned a value) and false otherwise */
-  public boolean isSetGroupType() {
-    return this.groupType != null;
-  }
-
-  public void setGroupTypeIsSet(boolean value) {
-    if (!value) {
-      this.groupType = null;
-    }
-  }
-
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case GROUP_ID:
@@ -468,6 +532,22 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
       }
       break;
 
+    case GROUP_TYPE:
+      if (value == null) {
+        unsetGroupType();
+      } else {
+        setGroupType((GroupType)value);
+      }
+      break;
+
+    case GROUP_CARDINALITY:
+      if (value == null) {
+        unsetGroupCardinality();
+      } else {
+        setGroupCardinality((GroupCardinality)value);
+      }
+      break;
+
     case CREATED_TIME:
       if (value == null) {
         unsetCreatedTime();
@@ -484,14 +564,6 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
       }
       break;
 
-    case GROUP_TYPE:
-      if (value == null) {
-        unsetGroupType();
-      } else {
-        setGroupType((GroupType)value);
-      }
-      break;
-
     }
   }
 
@@ -512,15 +584,18 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
     case OWNER_ID:
       return getOwnerId();
 
+    case GROUP_TYPE:
+      return getGroupType();
+
+    case GROUP_CARDINALITY:
+      return getGroupCardinality();
+
     case CREATED_TIME:
       return getCreatedTime();
 
     case UPDATED_TIME:
       return getUpdatedTime();
 
-    case GROUP_TYPE:
-      return getGroupType();
-
     }
     throw new IllegalStateException();
   }
@@ -542,12 +617,14 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
       return isSetDescription();
     case OWNER_ID:
       return isSetOwnerId();
+    case GROUP_TYPE:
+      return isSetGroupType();
+    case GROUP_CARDINALITY:
+      return isSetGroupCardinality();
     case CREATED_TIME:
       return isSetCreatedTime();
     case UPDATED_TIME:
       return isSetUpdatedTime();
-    case GROUP_TYPE:
-      return isSetGroupType();
     }
     throw new IllegalStateException();
   }
@@ -610,6 +687,24 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
         return false;
     }
 
+    boolean this_present_groupType = true && this.isSetGroupType();
+    boolean that_present_groupType = true && that.isSetGroupType();
+    if (this_present_groupType || that_present_groupType) {
+      if (!(this_present_groupType && that_present_groupType))
+        return false;
+      if (!this.groupType.equals(that.groupType))
+        return false;
+    }
+
+    boolean this_present_groupCardinality = true && this.isSetGroupCardinality();
+    boolean that_present_groupCardinality = true && that.isSetGroupCardinality();
+    if (this_present_groupCardinality || that_present_groupCardinality) {
+      if (!(this_present_groupCardinality && that_present_groupCardinality))
+        return false;
+      if (!this.groupCardinality.equals(that.groupCardinality))
+        return false;
+    }
+
     boolean this_present_createdTime = true && this.isSetCreatedTime();
     boolean that_present_createdTime = true && that.isSetCreatedTime();
     if (this_present_createdTime || that_present_createdTime) {
@@ -628,15 +723,6 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
         return false;
     }
 
-    boolean this_present_groupType = true && this.isSetGroupType();
-    boolean that_present_groupType = true && that.isSetGroupType();
-    if (this_present_groupType || that_present_groupType) {
-      if (!(this_present_groupType && that_present_groupType))
-        return false;
-      if (!this.groupType.equals(that.groupType))
-        return false;
-    }
-
     return true;
   }
 
@@ -669,6 +755,16 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
     if (present_ownerId)
       list.add(ownerId);
 
+    boolean present_groupType = true && (isSetGroupType());
+    list.add(present_groupType);
+    if (present_groupType)
+      list.add(groupType.getValue());
+
+    boolean present_groupCardinality = true && (isSetGroupCardinality());
+    list.add(present_groupCardinality);
+    if (present_groupCardinality)
+      list.add(groupCardinality.getValue());
+
     boolean present_createdTime = true && (isSetCreatedTime());
     list.add(present_createdTime);
     if (present_createdTime)
@@ -679,11 +775,6 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
     if (present_updatedTime)
       list.add(updatedTime);
 
-    boolean present_groupType = true && (isSetGroupType());
-    list.add(present_groupType);
-    if (present_groupType)
-      list.add(groupType.getValue());
-
     return list.hashCode();
   }
 
@@ -745,32 +836,42 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+    lastComparison = Boolean.valueOf(isSetGroupType()).compareTo(other.isSetGroupType());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetCreatedTime()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+    if (isSetGroupType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupType, other.groupType);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+    lastComparison = Boolean.valueOf(isSetGroupCardinality()).compareTo(other.isSetGroupCardinality());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetUpdatedTime()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+    if (isSetGroupCardinality()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupCardinality, other.groupCardinality);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetGroupType()).compareTo(other.isSetGroupType());
+    lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetGroupType()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupType, other.groupType);
+    if (isSetCreatedTime()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUpdatedTime()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -844,6 +945,26 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
       }
       first = false;
     }
+    if (isSetGroupType()) {
+      if (!first) sb.append(", ");
+      sb.append("groupType:");
+      if (this.groupType == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.groupType);
+      }
+      first = false;
+    }
+    if (isSetGroupCardinality()) {
+      if (!first) sb.append(", ");
+      sb.append("groupCardinality:");
+      if (this.groupCardinality == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.groupCardinality);
+      }
+      first = false;
+    }
     if (isSetCreatedTime()) {
       if (!first) sb.append(", ");
       sb.append("createdTime:");
@@ -856,16 +977,6 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
       sb.append(this.updatedTime);
       first = false;
     }
-    if (isSetGroupType()) {
-      if (!first) sb.append(", ");
-      sb.append("groupType:");
-      if (this.groupType == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.groupType);
-      }
-      first = false;
-    }
     sb.append(")");
     return sb.toString();
   }
@@ -935,7 +1046,7 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // DESCRIPTION
+          case 4: // DESCRIPTION
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.description = iprot.readString();
               struct.setDescriptionIsSet(true);
@@ -943,7 +1054,7 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 7: // OWNER_ID
+          case 5: // OWNER_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.ownerId = iprot.readString();
               struct.setOwnerIdIsSet(true);
@@ -951,6 +1062,22 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 6: // GROUP_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.groupType = org.apache.airavata.sharing.registry.models.GroupType.findByValue(iprot.readI32());
+              struct.setGroupTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // GROUP_CARDINALITY
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.groupCardinality = org.apache.airavata.sharing.registry.models.GroupCardinality.findByValue(iprot.readI32());
+              struct.setGroupCardinalityIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           case 8: // CREATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.createdTime = iprot.readI64();
@@ -967,14 +1094,6 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 10: // GROUP_TYPE
-            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.groupType = org.apache.airavata.sharing.registry.models.GroupType.findByValue(iprot.readI32());
-              struct.setGroupTypeIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1025,6 +1144,20 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
           oprot.writeFieldEnd();
         }
       }
+      if (struct.groupType != null) {
+        if (struct.isSetGroupType()) {
+          oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
+          oprot.writeI32(struct.groupType.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.groupCardinality != null) {
+        if (struct.isSetGroupCardinality()) {
+          oprot.writeFieldBegin(GROUP_CARDINALITY_FIELD_DESC);
+          oprot.writeI32(struct.groupCardinality.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
       if (struct.isSetCreatedTime()) {
         oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
         oprot.writeI64(struct.createdTime);
@@ -1035,13 +1168,6 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
         oprot.writeI64(struct.updatedTime);
         oprot.writeFieldEnd();
       }
-      if (struct.groupType != null) {
-        if (struct.isSetGroupType()) {
-          oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
-          oprot.writeI32(struct.groupType.getValue());
-          oprot.writeFieldEnd();
-        }
-      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1075,16 +1201,19 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
       if (struct.isSetOwnerId()) {
         optionals.set(4);
       }
-      if (struct.isSetCreatedTime()) {
+      if (struct.isSetGroupType()) {
         optionals.set(5);
       }
-      if (struct.isSetUpdatedTime()) {
+      if (struct.isSetGroupCardinality()) {
         optionals.set(6);
       }
-      if (struct.isSetGroupType()) {
+      if (struct.isSetCreatedTime()) {
         optionals.set(7);
       }
-      oprot.writeBitSet(optionals, 8);
+      if (struct.isSetUpdatedTime()) {
+        optionals.set(8);
+      }
+      oprot.writeBitSet(optionals, 9);
       if (struct.isSetGroupId()) {
         oprot.writeString(struct.groupId);
       }
@@ -1100,21 +1229,24 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
       if (struct.isSetOwnerId()) {
         oprot.writeString(struct.ownerId);
       }
+      if (struct.isSetGroupType()) {
+        oprot.writeI32(struct.groupType.getValue());
+      }
+      if (struct.isSetGroupCardinality()) {
+        oprot.writeI32(struct.groupCardinality.getValue());
+      }
       if (struct.isSetCreatedTime()) {
         oprot.writeI64(struct.createdTime);
       }
       if (struct.isSetUpdatedTime()) {
         oprot.writeI64(struct.updatedTime);
       }
-      if (struct.isSetGroupType()) {
-        oprot.writeI32(struct.groupType.getValue());
-      }
     }
 
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(8);
+      BitSet incoming = iprot.readBitSet(9);
       if (incoming.get(0)) {
         struct.groupId = iprot.readString();
         struct.setGroupIdIsSet(true);
@@ -1136,17 +1268,21 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
         struct.setOwnerIdIsSet(true);
       }
       if (incoming.get(5)) {
+        struct.groupType = org.apache.airavata.sharing.registry.models.GroupType.findByValue(iprot.readI32());
+        struct.setGroupTypeIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.groupCardinality = org.apache.airavata.sharing.registry.models.GroupCardinality.findByValue(iprot.readI32());
+        struct.setGroupCardinalityIsSet(true);
+      }
+      if (incoming.get(7)) {
         struct.createdTime = iprot.readI64();
         struct.setCreatedTimeIsSet(true);
       }
-      if (incoming.get(6)) {
+      if (incoming.get(8)) {
         struct.updatedTime = iprot.readI64();
         struct.setUpdatedTimeIsSet(true);
       }
-      if (incoming.get(7)) {
-        struct.groupType = org.apache.airavata.sharing.registry.models.GroupType.findByValue(iprot.readI32());
-        struct.setGroupTypeIsSet(true);
-      }
     }
   }