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); - } } }