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/03 22:23:46 UTC
[1/3] airavata git commit: WIP
Repository: airavata
Updated Branches:
refs/heads/airavata-gov-registry 99de5cc42 -> a99f76612
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/thrift_models/sharing_cpi.thrift b/modules/airavata-sharing-registry/thrift_models/sharing_cpi.thrift
index 065416d..48c87fb 100644
--- a/modules/airavata-sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/airavata-sharing-registry/thrift_models/sharing_cpi.thrift
@@ -84,4 +84,12 @@ service GovRegistryService {
bool deletePermissionType(1: required string entityTypeId) throws (1: sharing_models.GovRegistryException gre)
sharing_models.PermissionType getPermissionType(1: required string permissionTypeId) throws (1: sharing_models.GovRegistryException gre)
list<sharing_models.PermissionType> getPermissionTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.GovRegistryException gre)
+
+ /**
+ * Sharing Entity with Users and Groups
+ **/
+ bool shareEntityWithUsers(1: required string entityId, 2: required list<string> userList, 3: required sharing_models.PermissionType perssionType) throws (1: sharing_models.GovRegistryException gre)
+ bool revokeEntitySharingFromUsers(1: required string entityId, 2: required list<string> userList, 3: required sharing_models.PermissionType perssionType) throws (1: sharing_models.GovRegistryException gre)
+ bool shareEntityWithGroups(1: required string entityId, 2: required list<string> groupList, 3: required sharing_models.PermissionType perssionType) throws (1: sharing_models.GovRegistryException gre)
+ bool revokeEntitySharingFromGroups(1: required string entityId, 2: required list<string> groupList, 3: required sharing_models.PermissionType perssionType) throws (1: sharing_models.GovRegistryException gre)
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/thrift_models/sharing_models.thrift
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/thrift_models/sharing_models.thrift b/modules/airavata-sharing-registry/thrift_models/sharing_models.thrift
index 554d74d..ce74a89 100644
--- a/modules/airavata-sharing-registry/thrift_models/sharing_models.thrift
+++ b/modules/airavata-sharing-registry/thrift_models/sharing_models.thrift
@@ -102,12 +102,20 @@ struct PermissionType {
6: optional i64 updatedTime
}
+enum SharingType {
+ DIRECT,
+ INHERITED
+ }
+
struct Sharing {
1: optional string permissionTypeId,
2: optional string entityId,
3: optional string groupId,
- 4: optional i64 createdTime,
- 5: optional i64 updatedTime
+ 4: optional GroupType groupType,
+ 5: optional SharingType sharingType,
+ 6: optional string inheritedPermissionTypeId,
+ 7: optional i64 createdTime,
+ 8: optional i64 updatedTime
}
exception GovRegistryException {
[3/3] airavata git commit: WIP
Posted by sc...@apache.org.
WIP
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a99f7661
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a99f7661
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a99f7661
Branch: refs/heads/airavata-gov-registry
Commit: a99f76612721c7c739a4ba2699844eda1cb32354
Parents: 99de5cc
Author: scnakandala <su...@gmail.com>
Authored: Mon Oct 3 18:23:42 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Oct 3 18:23:42 2016 -0400
----------------------------------------------------------------------
.../registry/db/entities/SharingEntity.java | 33 +
.../server/GovRegistryServerHandler.java | 28 +
.../src/main/resources/gov-registry.sql | 4 +
.../sharing/registry/db/RepositoriesTest.java | 2 +
.../sharing/registry/models/Sharing.java | 406 +-
.../sharing/registry/models/SharingType.java | 45 +
.../service/cpi/GovRegistryService.java | 6312 ++++++++++++++++--
.../thrift_models/sharing_cpi.thrift | 8 +
.../thrift_models/sharing_models.thrift | 12 +-
9 files changed, 6127 insertions(+), 723 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
index a06e90d..500d622 100644
--- a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
@@ -33,6 +33,9 @@ public class SharingEntity {
private String permissionTypeId;
private String entityId;
private String groupId;
+ private String groupType;
+ private String sharingType;
+ private String inheritedPermissionTypeId;
private Long createdTime;
private Long updatedTime;
private PermissionTypeEntity permissionTypeByPermissionTypeId;
@@ -69,6 +72,36 @@ public class SharingEntity {
}
@Basic
+ @Column(name = "GROUP_TYPE")
+ public String getGroupType() {
+ return groupType;
+ }
+
+ public void setGroupType(String groupType) {
+ this.groupType = groupType;
+ }
+
+ @Basic
+ @Column(name = "SHARING_TYPE")
+ public String getSharingType() {
+ return sharingType;
+ }
+
+ public void setSharingType(String sharingType) {
+ this.sharingType = sharingType;
+ }
+
+ @Basic
+ @Column(name = "INHERITED_PARENT_PERMISSION_ID")
+ public String getInheritedPermissionTypeId() {
+ return inheritedPermissionTypeId;
+ }
+
+ public void setInheritedPermissionTypeId(String inheritedPermissionTypeId) {
+ this.inheritedPermissionTypeId = inheritedPermissionTypeId;
+ }
+
+ @Basic
@Column(name = "CREATED_TIME")
public Long getCreatedTime() {
return createdTime;
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServerHandler.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServerHandler.java
index d657f3c..58b961a 100644
--- a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServerHandler.java
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServerHandler.java
@@ -413,4 +413,32 @@ public class GovRegistryServerHandler implements GovRegistryService.Iface{
}
return hashtable;
}
+
+ /**
+ * * Sharing Entity with Users and Groups
+ * *
+ *
+ * @param entityId
+ * @param userList
+ * @param permissionType
+ */
+ @Override
+ public boolean shareEntityWithUsers(String entityId, List<String> userList, PermissionType perssionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, PermissionType perssionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean shareEntityWithGroups(String entityId, List<String> groupList, PermissionType perssionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, PermissionType perssionType) throws GovRegistryException, TException {
+ return false;
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql
index f2bc98a..6f698f0 100644
--- a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql
@@ -116,10 +116,14 @@ CREATE TABLE SHARING (
PERMISSION_TYPE_ID VARCHAR(255) NOT NULL,
ENTITY_ID VARCHAR(255) NOT NULL,
GROUP_ID VARCHAR(255) NOT NULL,
+ GROUP_TYPE VARCHAR(255) NOT NULL,
+ SHARING_TYPE VARCHAR(255) NOT NULL,
+ INHERITED_PARENT_PERMISSION_ID VARCHAR(255),
CREATED_TIME BIGINT NOT NULL,
UPDATED_TIME BIGINT NOT NULL,
PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID),
FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+ FOREIGN KEY (INHERITED_PARENT_PERMISSION_ID) REFERENCES SHARING(PERMISSION_TYPE_ID) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE
);
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/db/RepositoriesTest.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/db/RepositoriesTest.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/db/RepositoriesTest.java
index aeeaafb..ed549fd 100644
--- a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/db/RepositoriesTest.java
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/db/RepositoriesTest.java
@@ -338,6 +338,7 @@ public class RepositoriesTest {
sharing1.setPermissionTypeId(permissionType1Id);
sharing1.setEntityId(entityId1);
sharing1.setGroupId(userId2);
+ sharing1.setSharingType(SharingType.DIRECT);
SharingRepository sharingRepository = new SharingRepository();
sharing1 = sharingRepository.create(sharing1);
@@ -347,6 +348,7 @@ public class RepositoriesTest {
sharing2.setPermissionTypeId(permissionType1Id);
sharing2.setEntityId(entityId3);
sharing2.setGroupId(groupId2);
+ sharing2.setSharingType(SharingType.DIRECT);
sharingRepository.create(sharing2);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
index 41bdc96..43f049f 100644
--- a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
@@ -6,32 +6,15 @@
*/
package org.apache.airavata.sharing.registry.models;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
-
import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.*;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-03")
@@ -41,8 +24,11 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
private static final org.apache.thrift.protocol.TField PERMISSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("permissionTypeId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)4);
- 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)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)4);
+ private static final org.apache.thrift.protocol.TField SHARING_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("sharingType", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField INHERITED_PERMISSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inheritedPermissionTypeId", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -53,6 +39,17 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
public String permissionTypeId; // optional
public String entityId; // optional
public String groupId; // optional
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType groupType; // optional
+ /**
+ *
+ * @see SharingType
+ */
+ public SharingType sharingType; // optional
+ public String inheritedPermissionTypeId; // optional
public long createdTime; // optional
public long updatedTime; // optional
@@ -61,8 +58,19 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
PERMISSION_TYPE_ID((short)1, "permissionTypeId"),
ENTITY_ID((short)2, "entityId"),
GROUP_ID((short)3, "groupId"),
- CREATED_TIME((short)4, "createdTime"),
- UPDATED_TIME((short)5, "updatedTime");
+ /**
+ *
+ * @see GroupType
+ */
+ GROUP_TYPE((short)4, "groupType"),
+ /**
+ *
+ * @see SharingType
+ */
+ SHARING_TYPE((short)5, "sharingType"),
+ INHERITED_PERMISSION_TYPE_ID((short)6, "inheritedPermissionTypeId"),
+ CREATED_TIME((short)7, "createdTime"),
+ UPDATED_TIME((short)8, "updatedTime");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -83,9 +91,15 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
return ENTITY_ID;
case 3: // GROUP_ID
return GROUP_ID;
- case 4: // CREATED_TIME
+ case 4: // GROUP_TYPE
+ return GROUP_TYPE;
+ case 5: // SHARING_TYPE
+ return SHARING_TYPE;
+ case 6: // INHERITED_PERMISSION_TYPE_ID
+ return INHERITED_PERMISSION_TYPE_ID;
+ case 7: // CREATED_TIME
return CREATED_TIME;
- case 5: // UPDATED_TIME
+ case 8: // UPDATED_TIME
return UPDATED_TIME;
default:
return null;
@@ -130,7 +144,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
private static final int __CREATEDTIME_ISSET_ID = 0;
private static final int __UPDATEDTIME_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.PERMISSION_TYPE_ID,_Fields.ENTITY_ID,_Fields.GROUP_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
+ private static final _Fields optionals[] = {_Fields.PERMISSION_TYPE_ID,_Fields.ENTITY_ID,_Fields.GROUP_ID,_Fields.GROUP_TYPE,_Fields.SHARING_TYPE,_Fields.INHERITED_PERMISSION_TYPE_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -140,6 +154,12 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("groupId", 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.SHARING_TYPE, new org.apache.thrift.meta_data.FieldMetaData("sharingType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SharingType.class)));
+ tmpMap.put(_Fields.INHERITED_PERMISSION_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("inheritedPermissionTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
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,
@@ -165,6 +185,15 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
if (other.isSetGroupId()) {
this.groupId = other.groupId;
}
+ if (other.isSetGroupType()) {
+ this.groupType = other.groupType;
+ }
+ if (other.isSetSharingType()) {
+ this.sharingType = other.sharingType;
+ }
+ if (other.isSetInheritedPermissionTypeId()) {
+ this.inheritedPermissionTypeId = other.inheritedPermissionTypeId;
+ }
this.createdTime = other.createdTime;
this.updatedTime = other.updatedTime;
}
@@ -178,6 +207,9 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
this.permissionTypeId = null;
this.entityId = null;
this.groupId = null;
+ this.groupType = null;
+ this.sharingType = null;
+ this.inheritedPermissionTypeId = null;
setCreatedTimeIsSet(false);
this.createdTime = 0;
setUpdatedTimeIsSet(false);
@@ -256,6 +288,94 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
}
}
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType getGroupType() {
+ return this.groupType;
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public Sharing 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 SharingType
+ */
+ public SharingType getSharingType() {
+ return this.sharingType;
+ }
+
+ /**
+ *
+ * @see SharingType
+ */
+ public Sharing setSharingType(SharingType sharingType) {
+ this.sharingType = sharingType;
+ return this;
+ }
+
+ public void unsetSharingType() {
+ this.sharingType = null;
+ }
+
+ /** Returns true if field sharingType is set (has been assigned a value) and false otherwise */
+ public boolean isSetSharingType() {
+ return this.sharingType != null;
+ }
+
+ public void setSharingTypeIsSet(boolean value) {
+ if (!value) {
+ this.sharingType = null;
+ }
+ }
+
+ public String getInheritedPermissionTypeId() {
+ return this.inheritedPermissionTypeId;
+ }
+
+ public Sharing setInheritedPermissionTypeId(String inheritedPermissionTypeId) {
+ this.inheritedPermissionTypeId = inheritedPermissionTypeId;
+ return this;
+ }
+
+ public void unsetInheritedPermissionTypeId() {
+ this.inheritedPermissionTypeId = null;
+ }
+
+ /** Returns true if field inheritedPermissionTypeId is set (has been assigned a value) and false otherwise */
+ public boolean isSetInheritedPermissionTypeId() {
+ return this.inheritedPermissionTypeId != null;
+ }
+
+ public void setInheritedPermissionTypeIdIsSet(boolean value) {
+ if (!value) {
+ this.inheritedPermissionTypeId = null;
+ }
+ }
+
public long getCreatedTime() {
return this.createdTime;
}
@@ -328,6 +448,30 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
}
break;
+ case GROUP_TYPE:
+ if (value == null) {
+ unsetGroupType();
+ } else {
+ setGroupType((GroupType)value);
+ }
+ break;
+
+ case SHARING_TYPE:
+ if (value == null) {
+ unsetSharingType();
+ } else {
+ setSharingType((SharingType)value);
+ }
+ break;
+
+ case INHERITED_PERMISSION_TYPE_ID:
+ if (value == null) {
+ unsetInheritedPermissionTypeId();
+ } else {
+ setInheritedPermissionTypeId((String)value);
+ }
+ break;
+
case CREATED_TIME:
if (value == null) {
unsetCreatedTime();
@@ -358,6 +502,15 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
case GROUP_ID:
return getGroupId();
+ case GROUP_TYPE:
+ return getGroupType();
+
+ case SHARING_TYPE:
+ return getSharingType();
+
+ case INHERITED_PERMISSION_TYPE_ID:
+ return getInheritedPermissionTypeId();
+
case CREATED_TIME:
return getCreatedTime();
@@ -381,6 +534,12 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
return isSetEntityId();
case GROUP_ID:
return isSetGroupId();
+ case GROUP_TYPE:
+ return isSetGroupType();
+ case SHARING_TYPE:
+ return isSetSharingType();
+ case INHERITED_PERMISSION_TYPE_ID:
+ return isSetInheritedPermissionTypeId();
case CREATED_TIME:
return isSetCreatedTime();
case UPDATED_TIME:
@@ -429,6 +588,33 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
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_sharingType = true && this.isSetSharingType();
+ boolean that_present_sharingType = true && that.isSetSharingType();
+ if (this_present_sharingType || that_present_sharingType) {
+ if (!(this_present_sharingType && that_present_sharingType))
+ return false;
+ if (!this.sharingType.equals(that.sharingType))
+ return false;
+ }
+
+ boolean this_present_inheritedPermissionTypeId = true && this.isSetInheritedPermissionTypeId();
+ boolean that_present_inheritedPermissionTypeId = true && that.isSetInheritedPermissionTypeId();
+ if (this_present_inheritedPermissionTypeId || that_present_inheritedPermissionTypeId) {
+ if (!(this_present_inheritedPermissionTypeId && that_present_inheritedPermissionTypeId))
+ return false;
+ if (!this.inheritedPermissionTypeId.equals(that.inheritedPermissionTypeId))
+ return false;
+ }
+
boolean this_present_createdTime = true && this.isSetCreatedTime();
boolean that_present_createdTime = true && that.isSetCreatedTime();
if (this_present_createdTime || that_present_createdTime) {
@@ -469,6 +655,21 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
if (present_groupId)
list.add(groupId);
+ boolean present_groupType = true && (isSetGroupType());
+ list.add(present_groupType);
+ if (present_groupType)
+ list.add(groupType.getValue());
+
+ boolean present_sharingType = true && (isSetSharingType());
+ list.add(present_sharingType);
+ if (present_sharingType)
+ list.add(sharingType.getValue());
+
+ boolean present_inheritedPermissionTypeId = true && (isSetInheritedPermissionTypeId());
+ list.add(present_inheritedPermissionTypeId);
+ if (present_inheritedPermissionTypeId)
+ list.add(inheritedPermissionTypeId);
+
boolean present_createdTime = true && (isSetCreatedTime());
list.add(present_createdTime);
if (present_createdTime)
@@ -520,6 +721,36 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetGroupType()).compareTo(other.isSetGroupType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupType, other.groupType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSharingType()).compareTo(other.isSetSharingType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSharingType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sharingType, other.sharingType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetInheritedPermissionTypeId()).compareTo(other.isSetInheritedPermissionTypeId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetInheritedPermissionTypeId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inheritedPermissionTypeId, other.inheritedPermissionTypeId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
if (lastComparison != 0) {
return lastComparison;
@@ -589,6 +820,36 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
}
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 (isSetSharingType()) {
+ if (!first) sb.append(", ");
+ sb.append("sharingType:");
+ if (this.sharingType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sharingType);
+ }
+ first = false;
+ }
+ if (isSetInheritedPermissionTypeId()) {
+ if (!first) sb.append(", ");
+ sb.append("inheritedPermissionTypeId:");
+ if (this.inheritedPermissionTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.inheritedPermissionTypeId);
+ }
+ first = false;
+ }
if (isSetCreatedTime()) {
if (!first) sb.append(", ");
sb.append("createdTime:");
@@ -670,7 +931,31 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // CREATED_TIME
+ case 4: // 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 5: // SHARING_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.sharingType = org.apache.airavata.sharing.registry.models.SharingType.findByValue(iprot.readI32());
+ struct.setSharingTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // INHERITED_PERMISSION_TYPE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.inheritedPermissionTypeId = iprot.readString();
+ struct.setInheritedPermissionTypeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // CREATED_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.createdTime = iprot.readI64();
struct.setCreatedTimeIsSet(true);
@@ -678,7 +963,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 5: // UPDATED_TIME
+ case 8: // UPDATED_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.updatedTime = iprot.readI64();
struct.setUpdatedTimeIsSet(true);
@@ -722,6 +1007,27 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
oprot.writeFieldEnd();
}
}
+ if (struct.groupType != null) {
+ if (struct.isSetGroupType()) {
+ oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.groupType.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.sharingType != null) {
+ if (struct.isSetSharingType()) {
+ oprot.writeFieldBegin(SHARING_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.sharingType.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.inheritedPermissionTypeId != null) {
+ if (struct.isSetInheritedPermissionTypeId()) {
+ oprot.writeFieldBegin(INHERITED_PERMISSION_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.inheritedPermissionTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
if (struct.isSetCreatedTime()) {
oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
oprot.writeI64(struct.createdTime);
@@ -759,13 +1065,22 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
if (struct.isSetGroupId()) {
optionals.set(2);
}
- if (struct.isSetCreatedTime()) {
+ if (struct.isSetGroupType()) {
optionals.set(3);
}
- if (struct.isSetUpdatedTime()) {
+ if (struct.isSetSharingType()) {
optionals.set(4);
}
- oprot.writeBitSet(optionals, 5);
+ if (struct.isSetInheritedPermissionTypeId()) {
+ optionals.set(5);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
if (struct.isSetPermissionTypeId()) {
oprot.writeString(struct.permissionTypeId);
}
@@ -775,6 +1090,15 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
if (struct.isSetGroupId()) {
oprot.writeString(struct.groupId);
}
+ if (struct.isSetGroupType()) {
+ oprot.writeI32(struct.groupType.getValue());
+ }
+ if (struct.isSetSharingType()) {
+ oprot.writeI32(struct.sharingType.getValue());
+ }
+ if (struct.isSetInheritedPermissionTypeId()) {
+ oprot.writeString(struct.inheritedPermissionTypeId);
+ }
if (struct.isSetCreatedTime()) {
oprot.writeI64(struct.createdTime);
}
@@ -786,7 +1110,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Sharing struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.permissionTypeId = iprot.readString();
struct.setPermissionTypeIdIsSet(true);
@@ -800,10 +1124,22 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
struct.setGroupIdIsSet(true);
}
if (incoming.get(3)) {
+ struct.groupType = org.apache.airavata.sharing.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.sharingType = org.apache.airavata.sharing.registry.models.SharingType.findByValue(iprot.readI32());
+ struct.setSharingTypeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.inheritedPermissionTypeId = iprot.readString();
+ struct.setInheritedPermissionTypeIdIsSet(true);
+ }
+ if (incoming.get(6)) {
struct.createdTime = iprot.readI64();
struct.setCreatedTimeIsSet(true);
}
- if (incoming.get(4)) {
+ if (incoming.get(7)) {
struct.updatedTime = iprot.readI64();
struct.setUpdatedTimeIsSet(true);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java
new file mode 100644
index 0000000..ff9f919
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingType.java
@@ -0,0 +1,45 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.sharing.registry.models;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum SharingType implements org.apache.thrift.TEnum {
+ DIRECT(0),
+ INHERITED(1);
+
+ private final int value;
+
+ private SharingType(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static SharingType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return DIRECT;
+ case 1:
+ return INHERITED;
+ default:
+ return null;
+ }
+ }
+}
[2/3] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/a99f7661/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
index e7693ac..a7c424e 100644
--- a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
@@ -145,6 +145,22 @@ public class GovRegistryService {
public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+ /**
+ * * Sharing Entity with Users and Groups
+ * *
+ *
+ * @param entityId
+ * @param userList
+ * @param perssionType
+ */
+ public boolean shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
}
public interface AsyncIface {
@@ -219,6 +235,14 @@ public class GovRegistryService {
public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -1167,6 +1191,118 @@ public class GovRegistryService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionTypes failed: unknown result");
}
+ public boolean shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_shareEntityWithUsers(entityId, userList, perssionType);
+ return recv_shareEntityWithUsers();
+ }
+
+ public void send_shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.thrift.TException
+ {
+ shareEntityWithUsers_args args = new shareEntityWithUsers_args();
+ args.setEntityId(entityId);
+ args.setUserList(userList);
+ args.setPerssionType(perssionType);
+ sendBase("shareEntityWithUsers", args);
+ }
+
+ public boolean recv_shareEntityWithUsers() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ shareEntityWithUsers_result result = new shareEntityWithUsers_result();
+ receiveBase(result, "shareEntityWithUsers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gre != null) {
+ throw result.gre;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithUsers failed: unknown result");
+ }
+
+ public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_revokeEntitySharingFromUsers(entityId, userList, perssionType);
+ return recv_revokeEntitySharingFromUsers();
+ }
+
+ public void send_revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.thrift.TException
+ {
+ revokeEntitySharingFromUsers_args args = new revokeEntitySharingFromUsers_args();
+ args.setEntityId(entityId);
+ args.setUserList(userList);
+ args.setPerssionType(perssionType);
+ sendBase("revokeEntitySharingFromUsers", args);
+ }
+
+ public boolean recv_revokeEntitySharingFromUsers() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
+ receiveBase(result, "revokeEntitySharingFromUsers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gre != null) {
+ throw result.gre;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromUsers failed: unknown result");
+ }
+
+ public boolean shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_shareEntityWithGroups(entityId, groupList, perssionType);
+ return recv_shareEntityWithGroups();
+ }
+
+ public void send_shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.thrift.TException
+ {
+ shareEntityWithGroups_args args = new shareEntityWithGroups_args();
+ args.setEntityId(entityId);
+ args.setGroupList(groupList);
+ args.setPerssionType(perssionType);
+ sendBase("shareEntityWithGroups", args);
+ }
+
+ public boolean recv_shareEntityWithGroups() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ shareEntityWithGroups_result result = new shareEntityWithGroups_result();
+ receiveBase(result, "shareEntityWithGroups");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gre != null) {
+ throw result.gre;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithGroups failed: unknown result");
+ }
+
+ public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_revokeEntitySharingFromGroups(entityId, groupList, perssionType);
+ return recv_revokeEntitySharingFromGroups();
+ }
+
+ public void send_revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType) throws org.apache.thrift.TException
+ {
+ revokeEntitySharingFromGroups_args args = new revokeEntitySharingFromGroups_args();
+ args.setEntityId(entityId);
+ args.setGroupList(groupList);
+ args.setPerssionType(perssionType);
+ sendBase("revokeEntitySharingFromGroups", args);
+ }
+
+ public boolean recv_revokeEntitySharingFromGroups() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
+ receiveBase(result, "revokeEntitySharingFromGroups");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gre != null) {
+ throw result.gre;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromGroups failed: unknown result");
+ }
+
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -2362,6 +2498,158 @@ public class GovRegistryService {
}
}
+ public void shareEntityWithUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ shareEntityWithUsers_call method_call = new shareEntityWithUsers_call(entityId, userList, perssionType, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class shareEntityWithUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String entityId;
+ private List<String> userList;
+ private org.apache.airavata.sharing.registry.models.PermissionType perssionType;
+ public shareEntityWithUsers_call(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.entityId = entityId;
+ this.userList = userList;
+ this.perssionType = perssionType;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shareEntityWithUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ shareEntityWithUsers_args args = new shareEntityWithUsers_args();
+ args.setEntityId(entityId);
+ args.setUserList(userList);
+ args.setPerssionType(perssionType);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_shareEntityWithUsers();
+ }
+ }
+
+ public void revokeEntitySharingFromUsers(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ revokeEntitySharingFromUsers_call method_call = new revokeEntitySharingFromUsers_call(entityId, userList, perssionType, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class revokeEntitySharingFromUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String entityId;
+ private List<String> userList;
+ private org.apache.airavata.sharing.registry.models.PermissionType perssionType;
+ public revokeEntitySharingFromUsers_call(String entityId, List<String> userList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.entityId = entityId;
+ this.userList = userList;
+ this.perssionType = perssionType;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revokeEntitySharingFromUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ revokeEntitySharingFromUsers_args args = new revokeEntitySharingFromUsers_args();
+ args.setEntityId(entityId);
+ args.setUserList(userList);
+ args.setPerssionType(perssionType);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_revokeEntitySharingFromUsers();
+ }
+ }
+
+ public void shareEntityWithGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ shareEntityWithGroups_call method_call = new shareEntityWithGroups_call(entityId, groupList, perssionType, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class shareEntityWithGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String entityId;
+ private List<String> groupList;
+ private org.apache.airavata.sharing.registry.models.PermissionType perssionType;
+ public shareEntityWithGroups_call(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.entityId = entityId;
+ this.groupList = groupList;
+ this.perssionType = perssionType;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shareEntityWithGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ shareEntityWithGroups_args args = new shareEntityWithGroups_args();
+ args.setEntityId(entityId);
+ args.setGroupList(groupList);
+ args.setPerssionType(perssionType);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_shareEntityWithGroups();
+ }
+ }
+
+ public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ revokeEntitySharingFromGroups_call method_call = new revokeEntitySharingFromGroups_call(entityId, groupList, perssionType, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class revokeEntitySharingFromGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String entityId;
+ private List<String> groupList;
+ private org.apache.airavata.sharing.registry.models.PermissionType perssionType;
+ public revokeEntitySharingFromGroups_call(String entityId, List<String> groupList, org.apache.airavata.sharing.registry.models.PermissionType perssionType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.entityId = entityId;
+ this.groupList = groupList;
+ this.perssionType = perssionType;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revokeEntitySharingFromGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ revokeEntitySharingFromGroups_args args = new revokeEntitySharingFromGroups_args();
+ args.setEntityId(entityId);
+ args.setGroupList(groupList);
+ args.setPerssionType(perssionType);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_revokeEntitySharingFromGroups();
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -2410,6 +2698,10 @@ public class GovRegistryService {
processMap.put("deletePermissionType", new deletePermissionType());
processMap.put("getPermissionType", new getPermissionType());
processMap.put("getPermissionTypes", new getPermissionTypes());
+ processMap.put("shareEntityWithUsers", new shareEntityWithUsers());
+ processMap.put("revokeEntitySharingFromUsers", new revokeEntitySharingFromUsers());
+ processMap.put("shareEntityWithGroups", new shareEntityWithGroups());
+ processMap.put("revokeEntitySharingFromGroups", new revokeEntitySharingFromGroups());
return processMap;
}
@@ -3265,6 +3557,106 @@ public class GovRegistryService {
}
}
+ public static class shareEntityWithUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, shareEntityWithUsers_args> {
+ public shareEntityWithUsers() {
+ super("shareEntityWithUsers");
+ }
+
+ public shareEntityWithUsers_args getEmptyArgsInstance() {
+ return new shareEntityWithUsers_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public shareEntityWithUsers_result getResult(I iface, shareEntityWithUsers_args args) throws org.apache.thrift.TException {
+ shareEntityWithUsers_result result = new shareEntityWithUsers_result();
+ try {
+ result.success = iface.shareEntityWithUsers(args.entityId, args.userList, args.perssionType);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ result.gre = gre;
+ }
+ return result;
+ }
+ }
+
+ public static class revokeEntitySharingFromUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revokeEntitySharingFromUsers_args> {
+ public revokeEntitySharingFromUsers() {
+ super("revokeEntitySharingFromUsers");
+ }
+
+ public revokeEntitySharingFromUsers_args getEmptyArgsInstance() {
+ return new revokeEntitySharingFromUsers_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public revokeEntitySharingFromUsers_result getResult(I iface, revokeEntitySharingFromUsers_args args) throws org.apache.thrift.TException {
+ revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
+ try {
+ result.success = iface.revokeEntitySharingFromUsers(args.entityId, args.userList, args.perssionType);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ result.gre = gre;
+ }
+ return result;
+ }
+ }
+
+ public static class shareEntityWithGroups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, shareEntityWithGroups_args> {
+ public shareEntityWithGroups() {
+ super("shareEntityWithGroups");
+ }
+
+ public shareEntityWithGroups_args getEmptyArgsInstance() {
+ return new shareEntityWithGroups_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public shareEntityWithGroups_result getResult(I iface, shareEntityWithGroups_args args) throws org.apache.thrift.TException {
+ shareEntityWithGroups_result result = new shareEntityWithGroups_result();
+ try {
+ result.success = iface.shareEntityWithGroups(args.entityId, args.groupList, args.perssionType);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ result.gre = gre;
+ }
+ return result;
+ }
+ }
+
+ public static class revokeEntitySharingFromGroups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, revokeEntitySharingFromGroups_args> {
+ public revokeEntitySharingFromGroups() {
+ super("revokeEntitySharingFromGroups");
+ }
+
+ public revokeEntitySharingFromGroups_args getEmptyArgsInstance() {
+ return new revokeEntitySharingFromGroups_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public revokeEntitySharingFromGroups_result getResult(I iface, revokeEntitySharingFromGroups_args args) throws org.apache.thrift.TException {
+ revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
+ try {
+ result.success = iface.revokeEntitySharingFromGroups(args.entityId, args.groupList, args.perssionType);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ result.gre = gre;
+ }
+ return result;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -3313,6 +3705,10 @@ public class GovRegistryService {
processMap.put("deletePermissionType", new deletePermissionType());
processMap.put("getPermissionType", new getPermissionType());
processMap.put("getPermissionTypes", new getPermissionTypes());
+ processMap.put("shareEntityWithUsers", new shareEntityWithUsers());
+ processMap.put("revokeEntitySharingFromUsers", new revokeEntitySharingFromUsers());
+ processMap.put("shareEntityWithGroups", new shareEntityWithGroups());
+ processMap.put("revokeEntitySharingFromGroups", new revokeEntitySharingFromGroups());
return processMap;
}
@@ -5321,6 +5717,238 @@ public class GovRegistryService {
}
}
+ public static class shareEntityWithUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, shareEntityWithUsers_args, Boolean> {
+ public shareEntityWithUsers() {
+ super("shareEntityWithUsers");
+ }
+
+ public shareEntityWithUsers_args getEmptyArgsInstance() {
+ return new shareEntityWithUsers_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ shareEntityWithUsers_result result = new shareEntityWithUsers_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ shareEntityWithUsers_result result = new shareEntityWithUsers_result();
+ if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+ result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+ result.setGreIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, shareEntityWithUsers_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.shareEntityWithUsers(args.entityId, args.userList, args.perssionType,resultHandler);
+ }
+ }
+
+ public static class revokeEntitySharingFromUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, revokeEntitySharingFromUsers_args, Boolean> {
+ public revokeEntitySharingFromUsers() {
+ super("revokeEntitySharingFromUsers");
+ }
+
+ public revokeEntitySharingFromUsers_args getEmptyArgsInstance() {
+ return new revokeEntitySharingFromUsers_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
+ if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+ result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+ result.setGreIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, revokeEntitySharingFromUsers_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.revokeEntitySharingFromUsers(args.entityId, args.userList, args.perssionType,resultHandler);
+ }
+ }
+
+ public static class shareEntityWithGroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, shareEntityWithGroups_args, Boolean> {
+ public shareEntityWithGroups() {
+ super("shareEntityWithGroups");
+ }
+
+ public shareEntityWithGroups_args getEmptyArgsInstance() {
+ return new shareEntityWithGroups_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ shareEntityWithGroups_result result = new shareEntityWithGroups_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ shareEntityWithGroups_result result = new shareEntityWithGroups_result();
+ if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+ result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+ result.setGreIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, shareEntityWithGroups_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.shareEntityWithGroups(args.entityId, args.groupList, args.perssionType,resultHandler);
+ }
+ }
+
+ public static class revokeEntitySharingFromGroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, revokeEntitySharingFromGroups_args, Boolean> {
+ public revokeEntitySharingFromGroups() {
+ super("revokeEntitySharingFromGroups");
+ }
+
+ public revokeEntitySharingFromGroups_args getEmptyArgsInstance() {
+ return new revokeEntitySharingFromGroups_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
+ if (e instanceof org.apache.airavata.sharing.registry.models.GovRegistryException) {
+ result.gre = (org.apache.airavata.sharing.registry.models.GovRegistryException) e;
+ result.setGreIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, revokeEntitySharingFromGroups_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.revokeEntitySharingFromGroups(args.entityId, args.groupList, args.perssionType,resultHandler);
+ }
+ }
+
}
public static class createDomain_args implements org.apache.thrift.TBase<createDomain_args, createDomain_args._Fields>, java.io.Serializable, Cloneable, Comparable<createDomain_args> {
@@ -33017,71 +33645,3726 @@ public class GovRegistryService {
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.PERMISSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("permissionType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.PERMISSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("permissionType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.sharing.registry.models.PermissionType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePermissionType_args.class, metaDataMap);
+ }
+
+ public updatePermissionType_args() {
+ }
+
+ public updatePermissionType_args(
+ org.apache.airavata.sharing.registry.models.PermissionType permissionType)
+ {
+ this();
+ this.permissionType = permissionType;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updatePermissionType_args(updatePermissionType_args other) {
+ if (other.isSetPermissionType()) {
+ this.permissionType = new org.apache.airavata.sharing.registry.models.PermissionType(other.permissionType);
+ }
+ }
+
+ public updatePermissionType_args deepCopy() {
+ return new updatePermissionType_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.permissionType = null;
+ }
+
+ public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType() {
+ return this.permissionType;
+ }
+
+ public updatePermissionType_args setPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) {
+ this.permissionType = permissionType;
+ return this;
+ }
+
+ public void unsetPermissionType() {
+ this.permissionType = null;
+ }
+
+ /** Returns true if field permissionType is set (has been assigned a value) and false otherwise */
+ public boolean isSetPermissionType() {
+ return this.permissionType != null;
+ }
+
+ public void setPermissionTypeIsSet(boolean value) {
+ if (!value) {
+ this.permissionType = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PERMISSION_TYPE:
+ if (value == null) {
+ unsetPermissionType();
+ } else {
+ setPermissionType((org.apache.airavata.sharing.registry.models.PermissionType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PERMISSION_TYPE:
+ return getPermissionType();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case PERMISSION_TYPE:
+ return isSetPermissionType();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updatePermissionType_args)
+ return this.equals((updatePermissionType_args)that);
+ return false;
+ }
+
+ public boolean equals(updatePermissionType_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_permissionType = true && this.isSetPermissionType();
+ boolean that_present_permissionType = true && that.isSetPermissionType();
+ if (this_present_permissionType || that_present_permissionType) {
+ if (!(this_present_permissionType && that_present_permissionType))
+ return false;
+ if (!this.permissionType.equals(that.permissionType))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_permissionType = true && (isSetPermissionType());
+ list.add(present_permissionType);
+ if (present_permissionType)
+ list.add(permissionType);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(updatePermissionType_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPermissionType()).compareTo(other.isSetPermissionType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPermissionType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissionType, other.permissionType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("updatePermissionType_args(");
+ boolean first = true;
+
+ sb.append("permissionType:");
+ if (this.permissionType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.permissionType);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (permissionType == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'permissionType' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (permissionType != null) {
+ permissionType.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class updatePermissionType_argsStandardSchemeFactory implements SchemeFactory {
+ public updatePermissionType_argsStandardScheme getScheme() {
+ return new updatePermissionType_argsStandardScheme();
+ }
+ }
+
+ private static class updatePermissionType_argsStandardScheme extends StandardScheme<updatePermissionType_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updatePermissionType_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // PERMISSION_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.permissionType = new org.apache.airavata.sharing.registry.models.PermissionType();
+ struct.permissionType.read(iprot);
+ struct.setPermissionTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, updatePermissionType_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.permissionType != null) {
+ oprot.writeFieldBegin(PERMISSION_TYPE_FIELD_DESC);
+ struct.permissionType.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updatePermissionType_argsTupleSchemeFactory implements SchemeFactory {
+ public updatePermissionType_argsTupleScheme getScheme() {
+ return new updatePermissionType_argsTupleScheme();
+ }
+ }
+
+ private static class updatePermissionType_argsTupleScheme extends TupleScheme<updatePermissionType_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updatePermissionType_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.permissionType.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updatePermissionType_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.permissionType = new org.apache.airavata.sharing.registry.models.PermissionType();
+ struct.permissionType.read(iprot);
+ struct.setPermissionTypeIsSet(true);
+ }
+ }
+
+ }
+
+ public static class updatePermissionType_result implements org.apache.thrift.TBase<updatePermissionType_result, updatePermissionType_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePermissionType_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePermissionType_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final org.apache.thrift.protocol.TField GRE_FIELD_DESC = new org.apache.thrift.protocol.TField("gre", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updatePermissionType_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updatePermissionType_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public org.apache.airavata.sharing.registry.models.GovRegistryException gre; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ GRE((short)1, "gre");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // GRE
+ return GRE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.GRE, new org.apache.thrift.meta_data.FieldMetaData("gre", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePermissionType_result.class, metaDataMap);
+ }
+
+ public updatePermissionType_result() {
+ }
+
+ public updatePermissionType_result(
+ boolean success,
+ org.apache.airavata.sharing.registry.models.GovRegistryException gre)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.gre = gre;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updatePermissionType_result(updatePermissionType_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetGre()) {
+ this.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+ }
+ }
+
+ public updatePermissionType_result deepCopy() {
+ return new updatePermissionType_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.gre = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public updatePermissionType_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public org.apache.airavata.sharing.registry.models.GovRegistryException getGre() {
+ return this.gre;
+ }
+
+ public updatePermissionType_result setGre(org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ this.gre = gre;
+ return this;
+ }
+
+ public void unsetGre() {
+ this.gre = null;
+ }
+
+ /** Returns true if field gre is set (has been assigned a value) and false otherwise */
+ public boolean isSetGre() {
+ return this.gre != null;
+ }
+
+ public void setGreIsSet(boolean value) {
+ if (!value) {
+ this.gre = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case GRE:
+ if (value == null) {
+ unsetGre();
+ } else {
+ setGre((org.apache.airavata.sharing.registry.models.GovRegistryException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return isSuccess();
+
+ case GRE:
+ return getGre();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case GRE:
+ return isSetGre();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updatePermissionType_result)
+ return this.equals((updatePermissionType_result)that);
+ return false;
+ }
+
+ public boolean equals(updatePermissionType_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_gre = true && this.isSetGre();
+ boolean that_present_gre = true && that.isSetGre();
+ if (this_present_gre || that_present_gre) {
+ if (!(this_present_gre && that_present_gre))
+ return false;
+ if (!this.gre.equals(that.gre))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true;
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ boolean present_gre = true && (isSetGre());
+ list.add(present_gre);
+ if (present_gre)
+ list.add(gre);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(updatePermissionType_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetGre()).compareTo(other.isSetGre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGre()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gre, other.gre);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("updatePermissionType_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("gre:");
+ if (this.gre == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gre);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class updatePermissionType_resultStandardSchemeFactory implements SchemeFactory {
+ public updatePermissionType_resultStandardScheme getScheme() {
+ return new updatePermissionType_resultStandardScheme();
+ }
+ }
+
+ private static class updatePermissionType_resultStandardScheme extends StandardScheme<updatePermissionType_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updatePermissionType_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // GRE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException();
+ struct.gre.read(iprot);
+ struct.setGreIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, updatePermissionType_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.gre != null) {
+ oprot.writeFieldBegin(GRE_FIELD_DESC);
+ struct.gre.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updatePermissionType_resultTupleSchemeFactory implements SchemeFactory {
+ public updatePermissionType_resultTupleScheme getScheme() {
+ return new updatePermissionType_resultTupleScheme();
+ }
+ }
+
+ private static class updatePermissionType_resultTupleScheme extends TupleScheme<updatePermissionType_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updatePermissionType_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetGre()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetGre()) {
+ struct.gre.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updatePermissionType_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException();
+ struct.gre.read(iprot);
+ struct.setGreIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class deletePermissionType_args implements org.apache.thrift.TBase<deletePermissionType_args, deletePermissionType_args._Fields>, java.io.Serializable, Cloneable, Comparable<deletePermissionType_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePermissionType_args");
+
+ private static final org.apache.thrift.protocol.TField ENTITY_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityTypeId", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deletePermissionType_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deletePermissionType_argsTupleSchemeFactory());
+ }
+
+ public String entityTypeId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ENTITY_TYPE_ID((short)1, "entityTypeId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ENTITY_TYPE_ID
+ return ENTITY_TYPE_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePermissionType_args.class, metaDataMap);
+ }
+
+ public deletePermissionType_args() {
+ }
+
+ public deletePermissionType_args(
+ String entityTypeId)
+ {
+ this();
+ this.entityTypeId = entityTypeId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deletePermissionType_args(deletePermissionType_args other) {
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ }
+
+ public deletePermissionType_args deepCopy() {
+ return new deletePermissionType_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.entityTypeId = null;
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public deletePermissionType_args setEntityTypeId(String entityTypeId) {
+ this.entityTypeId = entityTypeId;
+ return this;
+ }
+
+ public void unsetEntityTypeId() {
+ this.entityTypeId = null;
+ }
+
+ /** Returns true if field entityTypeId is set (has been assigned a value) and false otherwise */
+ public boolean isSetEntityTypeId() {
+ return this.entityTypeId != null;
+ }
+
+ public void setEntityTypeIdIsSet(boolean value) {
+ if (!value) {
+ this.entityTypeId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ return isSetEntityTypeId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deletePermissionType_args)
+ return this.equals((deletePermissionType_args)that);
+ return false;
+ }
+
+ public boolean equals(deletePermissionType_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_entityTypeId = true && this.isSetEntityTypeId();
+ boolean that_present_entityTypeId = true && that.isSetEntityTypeId();
+ if (this_present_entityTypeId || that_present_entityTypeId) {
+ if (!(this_present_entityTypeId && that_present_entityTypeId))
+ return false;
+ if (!this.entityTypeId.equals(that.entityTypeId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_entityTypeId = true && (isSetEntityTypeId());
+ list.add(present_entityTypeId);
+ if (present_entityTypeId)
+ list.add(entityTypeId);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(deletePermissionType_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetEntityTypeId()).compareTo(other.isSetEntityTypeId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEntityTypeId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityTypeId, other.entityTypeId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("deletePermissionType_args(");
+ boolean first = true;
+
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (entityTypeId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityTypeId' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class deletePermissionType_argsStandardSchemeFactory implements SchemeFactory {
+ public deletePermissionType_argsStandardScheme getScheme() {
+ return new deletePermissionType_argsStandardScheme();
+ }
+ }
+
+ private static class deletePermissionType_argsStandardScheme extends StandardScheme<deletePermissionType_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, deletePermissionType_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // ENTITY_TYPE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, deletePermissionType_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.entityTypeId != null) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class deletePermissionType_argsTupleSchemeFactory implements SchemeFactory {
+ public deletePermissionType_argsTupleScheme getScheme() {
+ return new deletePermissionType_argsTupleScheme();
+ }
+ }
+
+ private static class deletePermissionType_argsTupleScheme extends TupleScheme<deletePermissionType_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, deletePermissionType_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.entityTypeId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, deletePermissionType_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ }
+
+ }
+
+ public static class deletePermissionType_result implements org.apache.thrift.TBase<deletePermissionType_result, deletePermissionType_result._Fields>, java.io.Serializable, Cloneable, Comparable<deletePermissionType_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePermissionType_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final org.apache.thrift.protocol.TField GRE_FIELD_DESC = new org.apache.thrift.protocol.TField("gre", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deletePermissionType_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deletePermissionType_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public org.apache.airavata.sharing.registry.models.GovRegistryException gre; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ GRE((short)1, "gre");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // GRE
+ return GRE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.GRE, new org.apache.thrift.meta_data.FieldMetaData("gre", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePermissionType_result.class, metaDataMap);
+ }
+
+ public deletePermissionType_result() {
+ }
+
+ public deletePermissionType_result(
+ boolean success,
+ org.apache.airavata.sharing.registry.models.GovRegistryException gre)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.gre = gre;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deletePermissionType_result(deletePermissionType_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetGre()) {
+ this.gre = new org.apache.airavata.sharing.registry.models.GovRegistryException(other.gre);
+ }
+ }
+
+ public deletePermissionType_result deepCopy() {
+ return new deletePermissionType_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.gre = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public deletePermissionType_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public org.apache.airavata.sharing.registry.models.GovRegistryException getGre() {
+ return this.gre;
+ }
+
+ public deletePermissionType_result setGre(org.apache.airavata.sharing.registry.models.GovRegistryException gre) {
+ this.gre = gre;
+ return this;
+ }
+
+ public void unsetGre() {
+ this.gre = null;
+ }
+
+ /** Returns true if field gre is set (has been assigned a value) and false otherwise */
+ public boolean isSetGre() {
+ return this.gre != null;
+ }
+
+ public void setGreIsSet(boolean value) {
+ if (!value) {
+ this.gre = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case GRE:
+ if (value == null) {
+ unsetGre();
+ } else {
+ setGre((org.apache.airavata.sharing.registry.models.GovRegistryException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return isSuccess();
+
+ case GRE:
+ return getGre();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case GRE:
+ return isSetGre();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deletePermissionType_result)
+ return this.equals((deletePermissionType_result)that);
+ return false;
+ }
+
+ public boolean equals(deletePermissionType_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_gre = true && this.isSetGre();
+ boolean that_present_gre = true && that.isSetGre();
+ if (this_present_gre || that_present_gre) {
+ if (!(this_present_gre && that_present_gre))
+ return false;
+ if (!this.gre.equals(that.gre))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true;
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ boolean present_gre = true && (isSetGre());
+ list.add(present_gre);
+ if (present_gre)
+ list.add(gre);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(deletePermissionType_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetGre()).compareTo(other.isSetGre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGre()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gre, other.gre);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("deletePermissionType_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("gre:");
+ if (this.gre == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gre);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class deletePermissionType_resultStandardSchemeFactory implements SchemeFactory {
+ public deletePermissionType_resultStandardScheme getScheme() {
+ return new deletePermissionType_resultStandardScheme();
+ }
+ }
+
+ private static class deletePermissionType_resultStandardScheme extends StandardScheme<deletePermissionType_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, deletePermissionType_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet
<TRUNCATED>