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 15:38:21 UTC
[01/50] [abbrv] airavata git commit: Updage README.md
Repository: airavata
Updated Branches:
refs/heads/airavata-gov-registry ac819e516 -> d14df923c
Updage README.md
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d5a9c8aa
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d5a9c8aa
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d5a9c8aa
Branch: refs/heads/airavata-gov-registry
Commit: d5a9c8aadd699dbf0679e933a08382c6c0e51daf
Parents: 1ae8263
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Sun Sep 11 02:30:36 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Sun Sep 11 02:30:36 2016 -0400
----------------------------------------------------------------------
README.md | 81 +++++++++++++++++++++++++++++++++-
group_vars/all.yml | 12 -----
roles/mesos-master/tasks/main.yml | 5 +--
3 files changed, 81 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/d5a9c8aa/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 70fcd39..794099a 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,81 @@
# mesos-deployment
-Setup Apache Mesos on Cloud Infrastructures using Anisble
+This project setup Apache Mesos master and slave clusters on Cloud Infrastructures using Anisble
+
+
+## Configurations
+
+To run this ansible script you must have at least 4 instances. 3 instances to setup Mesos master , marathon and zookeeper clusters. Along with Mesos master we install marathon and zookeeper. Another one or more instance/s to setup mesos agent/s. You can use ec2 ansible role provided with this playbook to spin up aws instances. To do that you need to set valid aws credentials.
+
+1. set valid aws credentials in `roles/ec2/vars/aws-credential.yml` if it doesn't work add folowing to ec2 task in `roles/ec2/tasks/main.yml`
+
+ `aws_access_key: <your_valid_access_key>`
+
+ `aws_secret_key: <your_valid_secret_key?`
+
+2. Set ec2 instance names under ec2 task `with_items:` configurations
+
+ After you set valid aws credentials and instance names run following ansible playbook command to spin up require aws ec2 instances.
+
+ `ansible-palybook -i hosts site.yml -t "ec2"`
+
+3. You need to know public ips of all the nodes and private ips of all mesos-master nodes. List all mesos master public ips under `[mesos-master]` section in `hosts` file. List all mesos-slave *(mesos-agent)* public ips under `[mesos-slave]` section. You need to set `my_id` hosts variable along with mesos-master ip addresses. This will use to set zookeeper id.
+
+ > [mesos-master]
+
+ > *1.2.3.4 my_id=1*
+
+ > *11.22.33.44 my_id=2*
+
+ > ...
+
+ > [mesos-slave]
+
+ > *123.123.123.123*
+
+ > ...
+
+4. Use mesos-master private ip addresses to set zookeeper servers properties in `roles/zookeeper/vars/main.yml`
+
+ > zookeeper_servers:
+
+ > \- {id: "1", ip: "172.31.24.149"}
+
+ > \- {id: "2", ip: "172.31.19.49"}
+
+ > \- {id: "3", ip: "172.31.25.80"}
+
+5. Set Mesos-master zookeeper quorum value in `group_vars/all.yml` file
+
+ > zk_quorum: 2
+
+6. Now we are set to deploy Apache Mesos cluster (Mesos-master, marthon, zookeeper, mesos-slave). Following ansible playbook command respectively setup mesos-master cluster , Mesos-slaves, and both mesos-master cluster and mesos-slave
+
+ `ansible-playbook -i hosts site.yml -t "mesos-master"`
+
+ `ansible-playbook -i hosts site.yml -t "mesos-slave"`
+
+ `ansible-playbook -i hosts site.yml -t "mesos"`
+
+ If everything works without any error, now you have running mesos cluster on aws instances.
+
+## verifying installation
+
+1. If your plays works without any error. Now you can access Mesos master console using `http://<master-ip>:5050` run following in one of Mesos master node to find which instance is the leader of cluster.
+
+ ``mesos-resolve `cat /etc/mesos/zk` `` this will return master-ip. Then use it to access console
+
+2. To access marathon console use `http://<master-ip>:8080`
+
+3. If you want run simple task on mesos. run following command on one of master node.
+
+ ``MASTER=$(mesos-resolve `cat /etc/mesos/zk`)``
+
+ `mesos-execute --master=$MASTER --name="cluster-test" --command="sleep 5"`
+
+
+
+## Ansible roles
+- java - install oracle java 8
+- zookeeper - install zookeeper
+- mesos-master - install mesos mastera and marathon
+- mesos-slave - install mesos slave
http://git-wip-us.apache.org/repos/asf/airavata/blob/d5a9c8aa/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index f7d7ae5..62c83dc 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -1,22 +1,10 @@
---
ansible_connection: ssh
-#ansible_ssh_user: root
ansible_ssh_user: centos
-#ansible_ssh_private_key_file: /Users/syodage/Projects/mesos-deployment/jetcloud.key
ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
user: centos
group: centos
-user_home: "/home/{{user}}"
-
-# Mesos related properties
-#mesos_version: "1.0.1"
-# mesos_version: "0.28.2"
-# mesos_name: "mesos"
-# mesos_url: "http://www.apache.org/dist/mesos/{{mesos_version}}/{{mesos_name}}-{{mesos_version}}.tar.gz"
-# mesos_deploy_dir: "{{user_home}}/{{mesos_name}}-{{mesos_version}}"
-# mesos_build_dir: "{{mesos_deploy_dir}}/build"
-
#Zookeeper related properties
zookeeper_client_port: 2181
http://git-wip-us.apache.org/repos/asf/airavata/blob/d5a9c8aa/roles/mesos-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/mesos-master/tasks/main.yml b/roles/mesos-master/tasks/main.yml
index 6afefe1..effb35a 100644
--- a/roles/mesos-master/tasks/main.yml
+++ b/roles/mesos-master/tasks/main.yml
@@ -21,11 +21,8 @@
state: enabled
immediate: yes
with_items:
- # - "{{ zk_client_port }}/tcp"
- # - "2888/tcp"
- # - "3888/tcp"
- "5050/tcp"
- # - "marathon/tcp"
+ - "8080/tcp"
become: yes
- name: install utility - TODO delete this
[33/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
new file mode 100644
index 0000000..dd20bf1
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -0,0 +1,817 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class Domain implements org.apache.thrift.TBase<Domain, Domain._Fields>, java.io.Serializable, Cloneable, Comparable<Domain> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Domain");
+
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new DomainStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DomainTupleSchemeFactory());
+ }
+
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ DOMAIN_ID((short)1, "domainId"),
+ NAME((short)2, "name"),
+ DESCRIPTION((short)3, "description"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 2: // NAME
+ return NAME;
+ case 3: // DESCRIPTION
+ return DESCRIPTION;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Domain.class, metaDataMap);
+ }
+
+ public Domain() {
+ this.domainId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Domain(Domain other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public Domain deepCopy() {
+ return new Domain(this);
+ }
+
+ @Override
+ public void clear() {
+ this.domainId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.name = null;
+ this.description = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public Domain setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Domain setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Domain setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Domain setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Domain setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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 DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Domain)
+ return this.equals((Domain)that);
+ return false;
+ }
+
+ public boolean equals(Domain that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Domain other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Domain(");
+ boolean first = true;
+
+ if (isSetDomainId()) {
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 DomainStandardSchemeFactory implements SchemeFactory {
+ public DomainStandardScheme getScheme() {
+ return new DomainStandardScheme();
+ }
+ }
+
+ private static class DomainStandardScheme extends StandardScheme<Domain> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Domain 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: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, Domain struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DomainTupleSchemeFactory implements SchemeFactory {
+ public DomainTupleScheme getScheme() {
+ return new DomainTupleScheme();
+ }
+ }
+
+ private static class DomainTupleScheme extends TupleScheme<Domain> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Domain struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetDomainId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Domain struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
new file mode 100644
index 0000000..f0ebba3
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
@@ -0,0 +1,1511 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, java.io.Serializable, Cloneable, Comparable<Entity> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entity");
+
+ private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField ENTITY_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField PARENT_ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentEntityId", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)8);
+ private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)9);
+ 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)10);
+ 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)11);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EntityStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EntityTupleSchemeFactory());
+ }
+
+ public String entityId; // optional
+ public String domainId; // optional
+ public String entityTypeId; // optional
+ public String ownerId; // optional
+ public String parentEntityId; // optional
+ public String name; // optional
+ public String description; // optional
+ public Map<String,String> metadata; // optional
+ public String fullText; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ENTITY_ID((short)1, "entityId"),
+ DOMAIN_ID((short)2, "domainId"),
+ ENTITY_TYPE_ID((short)3, "entityTypeId"),
+ OWNER_ID((short)4, "ownerId"),
+ PARENT_ENTITY_ID((short)5, "parentEntityId"),
+ NAME((short)6, "name"),
+ DESCRIPTION((short)7, "description"),
+ METADATA((short)8, "metadata"),
+ FULL_TEXT((short)9, "fullText"),
+ CREATED_TIME((short)10, "createdTime"),
+ UPDATED_TIME((short)11, "updatedTime");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ENTITY_ID
+ return ENTITY_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // ENTITY_TYPE_ID
+ return ENTITY_TYPE_ID;
+ case 4: // OWNER_ID
+ return OWNER_ID;
+ case 5: // PARENT_ENTITY_ID
+ return PARENT_ENTITY_ID;
+ case 6: // NAME
+ return NAME;
+ case 7: // DESCRIPTION
+ return DESCRIPTION;
+ case 8: // METADATA
+ return METADATA;
+ case 9: // FULL_TEXT
+ return FULL_TEXT;
+ case 10: // CREATED_TIME
+ return CREATED_TIME;
+ case 11: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.ENTITY_ID,_Fields.DOMAIN_ID,_Fields.ENTITY_TYPE_ID,_Fields.OWNER_ID,_Fields.PARENT_ENTITY_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.METADATA,_Fields.FULL_TEXT,_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);
+ tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PARENT_ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("parentEntityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.FULL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("fullText", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Entity.class, metaDataMap);
+ }
+
+ public Entity() {
+ this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Entity(Entity other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetEntityId()) {
+ this.entityId = other.entityId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetParentEntityId()) {
+ this.parentEntityId = other.parentEntityId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetMetadata()) {
+ Map<String,String> __this__metadata = new HashMap<String,String>(other.metadata);
+ this.metadata = __this__metadata;
+ }
+ if (other.isSetFullText()) {
+ this.fullText = other.fullText;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public Entity deepCopy() {
+ return new Entity(this);
+ }
+
+ @Override
+ public void clear() {
+ this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.entityTypeId = null;
+ this.ownerId = null;
+ this.parentEntityId = null;
+ this.name = null;
+ this.description = null;
+ this.metadata = null;
+ this.fullText = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getEntityId() {
+ return this.entityId;
+ }
+
+ public Entity setEntityId(String entityId) {
+ this.entityId = entityId;
+ return this;
+ }
+
+ public void unsetEntityId() {
+ this.entityId = null;
+ }
+
+ /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
+ public boolean isSetEntityId() {
+ return this.entityId != null;
+ }
+
+ public void setEntityIdIsSet(boolean value) {
+ if (!value) {
+ this.entityId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public Entity setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public Entity 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 String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public Entity setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getParentEntityId() {
+ return this.parentEntityId;
+ }
+
+ public Entity setParentEntityId(String parentEntityId) {
+ this.parentEntityId = parentEntityId;
+ return this;
+ }
+
+ public void unsetParentEntityId() {
+ this.parentEntityId = null;
+ }
+
+ /** Returns true if field parentEntityId is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentEntityId() {
+ return this.parentEntityId != null;
+ }
+
+ public void setParentEntityIdIsSet(boolean value) {
+ if (!value) {
+ this.parentEntityId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Entity setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Entity setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public int getMetadataSize() {
+ return (this.metadata == null) ? 0 : this.metadata.size();
+ }
+
+ public void putToMetadata(String key, String val) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<String,String>();
+ }
+ this.metadata.put(key, val);
+ }
+
+ public Map<String,String> getMetadata() {
+ return this.metadata;
+ }
+
+ public Entity setMetadata(Map<String,String> metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ public void unsetMetadata() {
+ this.metadata = null;
+ }
+
+ /** Returns true if field metadata is set (has been assigned a value) and false otherwise */
+ public boolean isSetMetadata() {
+ return this.metadata != null;
+ }
+
+ public void setMetadataIsSet(boolean value) {
+ if (!value) {
+ this.metadata = null;
+ }
+ }
+
+ public String getFullText() {
+ return this.fullText;
+ }
+
+ public Entity setFullText(String fullText) {
+ this.fullText = fullText;
+ return this;
+ }
+
+ public void unsetFullText() {
+ this.fullText = null;
+ }
+
+ /** Returns true if field fullText is set (has been assigned a value) and false otherwise */
+ public boolean isSetFullText() {
+ return this.fullText != null;
+ }
+
+ public void setFullTextIsSet(boolean value) {
+ if (!value) {
+ this.fullText = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Entity setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Entity setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ENTITY_ID:
+ if (value == null) {
+ unsetEntityId();
+ } else {
+ setEntityId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case PARENT_ENTITY_ID:
+ if (value == null) {
+ unsetParentEntityId();
+ } else {
+ setParentEntityId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case METADATA:
+ if (value == null) {
+ unsetMetadata();
+ } else {
+ setMetadata((Map<String,String>)value);
+ }
+ break;
+
+ case FULL_TEXT:
+ if (value == null) {
+ unsetFullText();
+ } else {
+ setFullText((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ENTITY_ID:
+ return getEntityId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case PARENT_ENTITY_ID:
+ return getParentEntityId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case METADATA:
+ return getMetadata();
+
+ case FULL_TEXT:
+ return getFullText();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case ENTITY_ID:
+ return isSetEntityId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case ENTITY_TYPE_ID:
+ return isSetEntityTypeId();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case PARENT_ENTITY_ID:
+ return isSetParentEntityId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case METADATA:
+ return isSetMetadata();
+ case FULL_TEXT:
+ return isSetFullText();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Entity)
+ return this.equals((Entity)that);
+ return false;
+ }
+
+ public boolean equals(Entity that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_entityId = true && this.isSetEntityId();
+ boolean that_present_entityId = true && that.isSetEntityId();
+ if (this_present_entityId || that_present_entityId) {
+ if (!(this_present_entityId && that_present_entityId))
+ return false;
+ if (!this.entityId.equals(that.entityId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ 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;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_parentEntityId = true && this.isSetParentEntityId();
+ boolean that_present_parentEntityId = true && that.isSetParentEntityId();
+ if (this_present_parentEntityId || that_present_parentEntityId) {
+ if (!(this_present_parentEntityId && that_present_parentEntityId))
+ return false;
+ if (!this.parentEntityId.equals(that.parentEntityId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_metadata = true && this.isSetMetadata();
+ boolean that_present_metadata = true && that.isSetMetadata();
+ if (this_present_metadata || that_present_metadata) {
+ if (!(this_present_metadata && that_present_metadata))
+ return false;
+ if (!this.metadata.equals(that.metadata))
+ return false;
+ }
+
+ boolean this_present_fullText = true && this.isSetFullText();
+ boolean that_present_fullText = true && that.isSetFullText();
+ if (this_present_fullText || that_present_fullText) {
+ if (!(this_present_fullText && that_present_fullText))
+ return false;
+ if (!this.fullText.equals(that.fullText))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_entityId = true && (isSetEntityId());
+ list.add(present_entityId);
+ if (present_entityId)
+ list.add(entityId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_entityTypeId = true && (isSetEntityTypeId());
+ list.add(present_entityTypeId);
+ if (present_entityTypeId)
+ list.add(entityTypeId);
+
+ boolean present_ownerId = true && (isSetOwnerId());
+ list.add(present_ownerId);
+ if (present_ownerId)
+ list.add(ownerId);
+
+ boolean present_parentEntityId = true && (isSetParentEntityId());
+ list.add(present_parentEntityId);
+ if (present_parentEntityId)
+ list.add(parentEntityId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_metadata = true && (isSetMetadata());
+ list.add(present_metadata);
+ if (present_metadata)
+ list.add(metadata);
+
+ boolean present_fullText = true && (isSetFullText());
+ list.add(present_fullText);
+ if (present_fullText)
+ list.add(fullText);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Entity other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(other.isSetEntityId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEntityId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, other.entityId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetParentEntityId()).compareTo(other.isSetParentEntityId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParentEntityId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentEntityId, other.parentEntityId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMetadata()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFullText()).compareTo(other.isSetFullText());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFullText()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullText, other.fullText);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Entity(");
+ boolean first = true;
+
+ if (isSetEntityId()) {
+ sb.append("entityId:");
+ if (this.entityId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetEntityTypeId()) {
+ if (!first) sb.append(", ");
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ }
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ if (isSetParentEntityId()) {
+ if (!first) sb.append(", ");
+ sb.append("parentEntityId:");
+ if (this.parentEntityId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parentEntityId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetMetadata()) {
+ if (!first) sb.append(", ");
+ sb.append("metadata:");
+ if (this.metadata == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.metadata);
+ }
+ first = false;
+ }
+ if (isSetFullText()) {
+ if (!first) sb.append(", ");
+ sb.append("fullText:");
+ if (this.fullText == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.fullText);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 EntityStandardSchemeFactory implements SchemeFactory {
+ public EntityStandardScheme getScheme() {
+ return new EntityStandardScheme();
+ }
+ }
+
+ private static class EntityStandardScheme extends StandardScheme<Entity> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Entity struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // ENTITY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityId = iprot.readString();
+ struct.setEntityIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ENTITY_TYPE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // PARENT_ENTITY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parentEntityId = iprot.readString();
+ struct.setParentEntityIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // METADATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+ struct.metadata = new HashMap<String,String>(2*_map0.size);
+ String _key1;
+ String _val2;
+ for (int _i3 = 0; _i3 < _map0.size; ++_i3)
+ {
+ _key1 = iprot.readString();
+ _val2 = iprot.readString();
+ struct.metadata.put(_key1, _val2);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setMetadataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // FULL_TEXT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.fullText = iprot.readString();
+ struct.setFullTextIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, Entity struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.entityId != null) {
+ if (struct.isSetEntityId()) {
+ oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
+ oprot.writeString(struct.entityId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.entityTypeId != null) {
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.parentEntityId != null) {
+ if (struct.isSetParentEntityId()) {
+ oprot.writeFieldBegin(PARENT_ENTITY_ID_FIELD_DESC);
+ oprot.writeString(struct.parentEntityId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.metadata != null) {
+ if (struct.isSetMetadata()) {
+ oprot.writeFieldBegin(METADATA_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
+ for (Map.Entry<String, String> _iter4 : struct.metadata.entrySet())
+ {
+ oprot.writeString(_iter4.getKey());
+ oprot.writeString(_iter4.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.fullText != null) {
+ if (struct.isSetFullText()) {
+ oprot.writeFieldBegin(FULL_TEXT_FIELD_DESC);
+ oprot.writeString(struct.fullText);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EntityTupleSchemeFactory implements SchemeFactory {
+ public EntityTupleScheme getScheme() {
+ return new EntityTupleScheme();
+ }
+ }
+
+ private static class EntityTupleScheme extends TupleScheme<Entity> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetEntityId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetEntityTypeId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetParentEntityId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetName()) {
+ optionals.set(5);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(6);
+ }
+ if (struct.isSetMetadata()) {
+ optionals.set(7);
+ }
+ if (struct.isSetFullText()) {
+ optionals.set(8);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(9);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(10);
+ }
+ oprot.writeBitSet(optionals, 11);
+ if (struct.isSetEntityId()) {
+ oprot.writeString(struct.entityId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeString(struct.entityTypeId);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetParentEntityId()) {
+ oprot.writeString(struct.parentEntityId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetMetadata()) {
+ {
+ oprot.writeI32(struct.metadata.size());
+ for (Map.Entry<String, String> _iter5 : struct.metadata.entrySet())
+ {
+ oprot.writeString(_iter5.getKey());
+ oprot.writeString(_iter5.getValue());
+ }
+ }
+ }
+ if (struct.isSetFullText()) {
+ oprot.writeString(struct.fullText);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(11);
+ if (incoming.get(0)) {
+ struct.entityId = iprot.readString();
+ struct.setEntityIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.parentEntityId = iprot.readString();
+ struct.setParentEntityIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(7)) {
+ {
+ org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.metadata = new HashMap<String,String>(2*_map6.size);
+ String _key7;
+ String _val8;
+ for (int _i9 = 0; _i9 < _map6.size; ++_i9)
+ {
+ _key7 = iprot.readString();
+ _val8 = iprot.readString();
+ struct.metadata.put(_key7, _val8);
+ }
+ }
+ struct.setMetadataIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.fullText = iprot.readString();
+ struct.setFullTextIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
[31/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
new file mode 100644
index 0000000..50bbe15
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
@@ -0,0 +1,924 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class PermissionType implements org.apache.thrift.TBase<PermissionType, PermissionType._Fields>, java.io.Serializable, Cloneable, Comparable<PermissionType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PermissionType");
+
+ 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 DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
+ 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)5);
+ 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)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new PermissionTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new PermissionTypeTupleSchemeFactory());
+ }
+
+ public String permissionTypeId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PERMISSION_TYPE_ID((short)1, "permissionTypeId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)4, "description"),
+ CREATED_TIME((short)5, "createdTime"),
+ UPDATED_TIME((short)6, "updatedTime");
+
+ 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: // PERMISSION_TYPE_ID
+ return PERMISSION_TYPE_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 4: // DESCRIPTION
+ return DESCRIPTION;
+ case 5: // CREATED_TIME
+ return CREATED_TIME;
+ case 6: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __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.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
+ tmpMap.put(_Fields.PERMISSION_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("permissionTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PermissionType.class, metaDataMap);
+ }
+
+ public PermissionType() {
+ this.permissionTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public PermissionType(PermissionType other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetPermissionTypeId()) {
+ this.permissionTypeId = other.permissionTypeId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public PermissionType deepCopy() {
+ return new PermissionType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.permissionTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ this.description = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getPermissionTypeId() {
+ return this.permissionTypeId;
+ }
+
+ public PermissionType setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ return this;
+ }
+
+ public void unsetPermissionTypeId() {
+ this.permissionTypeId = null;
+ }
+
+ /** Returns true if field permissionTypeId is set (has been assigned a value) and false otherwise */
+ public boolean isSetPermissionTypeId() {
+ return this.permissionTypeId != null;
+ }
+
+ public void setPermissionTypeIdIsSet(boolean value) {
+ if (!value) {
+ this.permissionTypeId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public PermissionType setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public PermissionType setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public PermissionType setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public PermissionType setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public PermissionType setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PERMISSION_TYPE_ID:
+ if (value == null) {
+ unsetPermissionTypeId();
+ } else {
+ setPermissionTypeId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PERMISSION_TYPE_ID:
+ return getPermissionTypeId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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_ID:
+ return isSetPermissionTypeId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof PermissionType)
+ return this.equals((PermissionType)that);
+ return false;
+ }
+
+ public boolean equals(PermissionType that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_permissionTypeId = true && this.isSetPermissionTypeId();
+ boolean that_present_permissionTypeId = true && that.isSetPermissionTypeId();
+ if (this_present_permissionTypeId || that_present_permissionTypeId) {
+ if (!(this_present_permissionTypeId && that_present_permissionTypeId))
+ return false;
+ if (!this.permissionTypeId.equals(that.permissionTypeId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_permissionTypeId = true && (isSetPermissionTypeId());
+ list.add(present_permissionTypeId);
+ if (present_permissionTypeId)
+ list.add(permissionTypeId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(PermissionType other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPermissionTypeId()).compareTo(other.isSetPermissionTypeId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPermissionTypeId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissionTypeId, other.permissionTypeId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("PermissionType(");
+ boolean first = true;
+
+ if (isSetPermissionTypeId()) {
+ sb.append("permissionTypeId:");
+ if (this.permissionTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.permissionTypeId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 PermissionTypeStandardSchemeFactory implements SchemeFactory {
+ public PermissionTypeStandardScheme getScheme() {
+ return new PermissionTypeStandardScheme();
+ }
+ }
+
+ private static class PermissionTypeStandardScheme extends StandardScheme<PermissionType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, PermissionType 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_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.permissionTypeId = iprot.readString();
+ struct.setPermissionTypeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, PermissionType struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.permissionTypeId != null) {
+ if (struct.isSetPermissionTypeId()) {
+ oprot.writeFieldBegin(PERMISSION_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.permissionTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class PermissionTypeTupleSchemeFactory implements SchemeFactory {
+ public PermissionTypeTupleScheme getScheme() {
+ return new PermissionTypeTupleScheme();
+ }
+ }
+
+ private static class PermissionTypeTupleScheme extends TupleScheme<PermissionType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, PermissionType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetPermissionTypeId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(3);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(4);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetPermissionTypeId()) {
+ oprot.writeString(struct.permissionTypeId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, PermissionType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.permissionTypeId = iprot.readString();
+ struct.setPermissionTypeIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/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
new file mode 100644
index 0000000..c7d07d6
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
@@ -0,0 +1,814 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields>, java.io.Serializable, Cloneable, Comparable<Sharing> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Sharing");
+
+ 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SharingStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SharingTupleSchemeFactory());
+ }
+
+ public String permissionTypeId; // optional
+ public String entityId; // optional
+ public String groupId; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ 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");
+
+ 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: // PERMISSION_TYPE_ID
+ return PERMISSION_TYPE_ID;
+ case 2: // ENTITY_ID
+ return ENTITY_ID;
+ case 3: // GROUP_ID
+ return GROUP_ID;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __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};
+ 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_ID, new org.apache.thrift.meta_data.FieldMetaData("permissionTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Sharing.class, metaDataMap);
+ }
+
+ public Sharing() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Sharing(Sharing other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetPermissionTypeId()) {
+ this.permissionTypeId = other.permissionTypeId;
+ }
+ if (other.isSetEntityId()) {
+ this.entityId = other.entityId;
+ }
+ if (other.isSetGroupId()) {
+ this.groupId = other.groupId;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public Sharing deepCopy() {
+ return new Sharing(this);
+ }
+
+ @Override
+ public void clear() {
+ this.permissionTypeId = null;
+ this.entityId = null;
+ this.groupId = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getPermissionTypeId() {
+ return this.permissionTypeId;
+ }
+
+ public Sharing setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ return this;
+ }
+
+ public void unsetPermissionTypeId() {
+ this.permissionTypeId = null;
+ }
+
+ /** Returns true if field permissionTypeId is set (has been assigned a value) and false otherwise */
+ public boolean isSetPermissionTypeId() {
+ return this.permissionTypeId != null;
+ }
+
+ public void setPermissionTypeIdIsSet(boolean value) {
+ if (!value) {
+ this.permissionTypeId = null;
+ }
+ }
+
+ public String getEntityId() {
+ return this.entityId;
+ }
+
+ public Sharing setEntityId(String entityId) {
+ this.entityId = entityId;
+ return this;
+ }
+
+ public void unsetEntityId() {
+ this.entityId = null;
+ }
+
+ /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
+ public boolean isSetEntityId() {
+ return this.entityId != null;
+ }
+
+ public void setEntityIdIsSet(boolean value) {
+ if (!value) {
+ this.entityId = null;
+ }
+ }
+
+ public String getGroupId() {
+ return this.groupId;
+ }
+
+ public Sharing setGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ public void unsetGroupId() {
+ this.groupId = null;
+ }
+
+ /** Returns true if field groupId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupId() {
+ return this.groupId != null;
+ }
+
+ public void setGroupIdIsSet(boolean value) {
+ if (!value) {
+ this.groupId = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Sharing setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Sharing setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PERMISSION_TYPE_ID:
+ if (value == null) {
+ unsetPermissionTypeId();
+ } else {
+ setPermissionTypeId((String)value);
+ }
+ break;
+
+ case ENTITY_ID:
+ if (value == null) {
+ unsetEntityId();
+ } else {
+ setEntityId((String)value);
+ }
+ break;
+
+ case GROUP_ID:
+ if (value == null) {
+ unsetGroupId();
+ } else {
+ setGroupId((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PERMISSION_TYPE_ID:
+ return getPermissionTypeId();
+
+ case ENTITY_ID:
+ return getEntityId();
+
+ case GROUP_ID:
+ return getGroupId();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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_ID:
+ return isSetPermissionTypeId();
+ case ENTITY_ID:
+ return isSetEntityId();
+ case GROUP_ID:
+ return isSetGroupId();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Sharing)
+ return this.equals((Sharing)that);
+ return false;
+ }
+
+ public boolean equals(Sharing that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_permissionTypeId = true && this.isSetPermissionTypeId();
+ boolean that_present_permissionTypeId = true && that.isSetPermissionTypeId();
+ if (this_present_permissionTypeId || that_present_permissionTypeId) {
+ if (!(this_present_permissionTypeId && that_present_permissionTypeId))
+ return false;
+ if (!this.permissionTypeId.equals(that.permissionTypeId))
+ return false;
+ }
+
+ boolean this_present_entityId = true && this.isSetEntityId();
+ boolean that_present_entityId = true && that.isSetEntityId();
+ if (this_present_entityId || that_present_entityId) {
+ if (!(this_present_entityId && that_present_entityId))
+ return false;
+ if (!this.entityId.equals(that.entityId))
+ return false;
+ }
+
+ boolean this_present_groupId = true && this.isSetGroupId();
+ boolean that_present_groupId = true && that.isSetGroupId();
+ if (this_present_groupId || that_present_groupId) {
+ if (!(this_present_groupId && that_present_groupId))
+ return false;
+ if (!this.groupId.equals(that.groupId))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_permissionTypeId = true && (isSetPermissionTypeId());
+ list.add(present_permissionTypeId);
+ if (present_permissionTypeId)
+ list.add(permissionTypeId);
+
+ boolean present_entityId = true && (isSetEntityId());
+ list.add(present_entityId);
+ if (present_entityId)
+ list.add(entityId);
+
+ boolean present_groupId = true && (isSetGroupId());
+ list.add(present_groupId);
+ if (present_groupId)
+ list.add(groupId);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Sharing other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPermissionTypeId()).compareTo(other.isSetPermissionTypeId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPermissionTypeId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissionTypeId, other.permissionTypeId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(other.isSetEntityId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEntityId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, other.entityId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Sharing(");
+ boolean first = true;
+
+ if (isSetPermissionTypeId()) {
+ sb.append("permissionTypeId:");
+ if (this.permissionTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.permissionTypeId);
+ }
+ first = false;
+ }
+ if (isSetEntityId()) {
+ if (!first) sb.append(", ");
+ sb.append("entityId:");
+ if (this.entityId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityId);
+ }
+ first = false;
+ }
+ if (isSetGroupId()) {
+ if (!first) sb.append(", ");
+ sb.append("groupId:");
+ if (this.groupId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupId);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 SharingStandardSchemeFactory implements SchemeFactory {
+ public SharingStandardScheme getScheme() {
+ return new SharingStandardScheme();
+ }
+ }
+
+ private static class SharingStandardScheme extends StandardScheme<Sharing> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Sharing 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_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.permissionTypeId = iprot.readString();
+ struct.setPermissionTypeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ENTITY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityId = iprot.readString();
+ struct.setEntityIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // GROUP_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, Sharing struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.permissionTypeId != null) {
+ if (struct.isSetPermissionTypeId()) {
+ oprot.writeFieldBegin(PERMISSION_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.permissionTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.entityId != null) {
+ if (struct.isSetEntityId()) {
+ oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
+ oprot.writeString(struct.entityId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.groupId != null) {
+ if (struct.isSetGroupId()) {
+ oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
+ oprot.writeString(struct.groupId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SharingTupleSchemeFactory implements SchemeFactory {
+ public SharingTupleScheme getScheme() {
+ return new SharingTupleScheme();
+ }
+ }
+
+ private static class SharingTupleScheme extends TupleScheme<Sharing> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Sharing struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetPermissionTypeId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetEntityId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetGroupId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetPermissionTypeId()) {
+ oprot.writeString(struct.permissionTypeId);
+ }
+ if (struct.isSetEntityId()) {
+ oprot.writeString(struct.entityId);
+ }
+ if (struct.isSetGroupId()) {
+ oprot.writeString(struct.groupId);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @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);
+ if (incoming.get(0)) {
+ struct.permissionTypeId = iprot.readString();
+ struct.setPermissionTypeIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.entityId = iprot.readString();
+ struct.setEntityIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
new file mode 100644
index 0000000..230be05
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
@@ -0,0 +1,817 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
+
+ private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserTupleSchemeFactory());
+ }
+
+ public String userId; // optional
+ public String domainId; // optional
+ public String userName; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_ID((short)1, "userId"),
+ DOMAIN_ID((short)2, "domainId"),
+ USER_NAME((short)3, "userName"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // USER_ID
+ return USER_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // USER_NAME
+ return USER_NAME;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.USER_ID,_Fields.DOMAIN_ID,_Fields.USER_NAME,_Fields.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);
+ tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
+ }
+
+ public User() {
+ this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public User(User other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetUserId()) {
+ this.userId = other.userId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public User deepCopy() {
+ return new User(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.userName = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getUserId() {
+ return this.userId;
+ }
+
+ public User setUserId(String userId) {
+ this.userId = userId;
+ return this;
+ }
+
+ public void unsetUserId() {
+ this.userId = null;
+ }
+
+ /** Returns true if field userId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserId() {
+ return this.userId != null;
+ }
+
+ public void setUserIdIsSet(boolean value) {
+ if (!value) {
+ this.userId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public User setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public User setUserName(String userName) {
+ this.userName = userName;
+ return this;
+ }
+
+ public void unsetUserName() {
+ this.userName = null;
+ }
+
+ /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserName() {
+ return this.userName != null;
+ }
+
+ public void setUserNameIsSet(boolean value) {
+ if (!value) {
+ this.userName = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public User setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public User setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_ID:
+ if (value == null) {
+ unsetUserId();
+ } else {
+ setUserId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_ID:
+ return getUserId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case USER_NAME:
+ return getUserName();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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 USER_ID:
+ return isSetUserId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case USER_NAME:
+ return isSetUserName();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof User)
+ return this.equals((User)that);
+ return false;
+ }
+
+ public boolean equals(User that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_userId = true && this.isSetUserId();
+ boolean that_present_userId = true && that.isSetUserId();
+ if (this_present_userId || that_present_userId) {
+ if (!(this_present_userId && that_present_userId))
+ return false;
+ if (!this.userId.equals(that.userId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_userName = true && this.isSetUserName();
+ boolean that_present_userName = true && that.isSetUserName();
+ if (this_present_userName || that_present_userName) {
+ if (!(this_present_userName && that_present_userName))
+ return false;
+ if (!this.userName.equals(that.userName))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_userId = true && (isSetUserId());
+ list.add(present_userId);
+ if (present_userId)
+ list.add(userId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_userName = true && (isSetUserName());
+ list.add(present_userName);
+ if (present_userName)
+ list.add(userName);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(User other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("User(");
+ boolean first = true;
+
+ if (isSetUserId()) {
+ sb.append("userId:");
+ if (this.userId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetUserName()) {
+ if (!first) sb.append(", ");
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 UserStandardSchemeFactory implements SchemeFactory {
+ public UserStandardScheme getScheme() {
+ return new UserStandardScheme();
+ }
+ }
+
+ private static class UserStandardScheme extends StandardScheme<User> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // USER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // USER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, User struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userId != null) {
+ if (struct.isSetUserId()) {
+ oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+ oprot.writeString(struct.userId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.userName != null) {
+ if (struct.isSetUserName()) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserTupleSchemeFactory implements SchemeFactory {
+ public UserTupleScheme getScheme() {
+ return new UserTupleScheme();
+ }
+ }
+
+ private static class UserTupleScheme extends TupleScheme<User> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUserName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetUserId()) {
+ oprot.writeString(struct.userId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetUserName()) {
+ oprot.writeString(struct.userName);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
[05/50] [abbrv] airavata git commit: Adding develop branch variables
Posted by sc...@apache.org.
Adding develop branch variables
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/475f6875
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/475f6875
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/475f6875
Branch: refs/heads/airavata-gov-registry
Commit: 475f687529e5547ef9ae3c13850536edea863012
Parents: fec0b37
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Tue Sep 13 13:36:03 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Tue Sep 13 13:36:03 2016 -0400
----------------------------------------------------------------------
group_vars/all.yml | 9 +++++----
roles/database/tasks/main.yml | 3 +--
site.yml | 8 ++++++++
3 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/475f6875/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index 615085a..b1efac4 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -1,7 +1,8 @@
---
ansible_connection: ssh
ansible_ssh_user: centos
-#ansible_ssh_private_key_file: /Users/syodage/Projects/scigap/JetCloud/jetcloud.key
+# ansible_ssh_user: root
+# ansible_ssh_private_key_file: /Users/syodage/Projects/scigap/JetCloud/jetcloud.key
ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
user: centos
@@ -9,11 +10,11 @@ group: centos
user_home: "/home/{{ user }}"
# deployment related variables
-deployment_dir: "{{ user_home }}/master-deployment"
+deployment_dir: "{{ user_home }}/dev-deployment"
airavata_source_dir: "{{ user_home }}/source"
airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
-git_branch: master
+git_branch: develop
# Database related variables
db_server: "{{ groups['database'][0] }}"
@@ -30,7 +31,7 @@ mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar"
# Rabbitmq related vareables
rabbitmq_server: "{{ groups['rabbitmq'][0] }}"
-rabbitmq_vhost: "master"
+rabbitmq_vhost: "develop"
rabbitmq_user: "airavata"
rabbitmq_password: "airavata"
rabbitmq_port: "5672"
http://git-wip-us.apache.org/repos/asf/airavata/blob/475f6875/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/main.yml b/roles/database/tasks/main.yml
index 4a75abb..8a02227 100644
--- a/roles/database/tasks/main.yml
+++ b/roles/database/tasks/main.yml
@@ -45,7 +45,7 @@
with_items:
- "{{ groups['api-orch'] }}"
- "{{ groups['gfac'] }}"
- tags: testdb
+ - "{{ groups['registry'] }}"
- name: create new user {{ db_user }} with all privilege
mysql_user: name="{{ db_user }}"
@@ -53,7 +53,6 @@
append_privs=yes
host_all=yes
priv=*.*:ALL,GRANT state=present
- tags: testdb
- name: open firewall port {{ db_server_port }}
firewalld: port="{{ db_server_port }}/tcp"
http://git-wip-us.apache.org/repos/asf/airavata/blob/475f6875/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index a9472dd..036229c 100644
--- a/site.yml
+++ b/site.yml
@@ -42,6 +42,14 @@
- common
- api-orch
+- hosts: registry
+ tags: registry, airavata
+ roles:
+ - env_setup
+ - java
+ - common
+ - registry
+
- hosts: pga
tags: pga
roles:
[11/50] [abbrv] airavata git commit: fixing gateway intialization
issue
Posted by sc...@apache.org.
fixing gateway intialization issue
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/83a0bf87
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/83a0bf87
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/83a0bf87
Branch: refs/heads/airavata-gov-registry
Commit: 83a0bf8795730d712449653af1f484d9cf152d3f
Parents: 264f616
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 22 12:54:39 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 22 12:54:39 2016 -0400
----------------------------------------------------------------------
.../core/experiment/catalog/resources/GatewayResource.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/83a0bf87/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
index 646594e..c745f4e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
@@ -20,6 +20,7 @@
*/
package org.apache.airavata.registry.core.experiment.catalog.resources;
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -461,6 +462,9 @@ public class GatewayResource extends AbstractExpCatResource {
Gateway existingGateway = em.find(Gateway.class, gatewayId);
em.close();
+ if(gatewayApprovalStatus == null || gatewayApprovalStatus.isEmpty())
+ gatewayApprovalStatus = GatewayApprovalStatus.APPROVED.toString();
+
em = ExpCatResourceUtils.getEntityManager();
em.getTransaction().begin();
Gateway gateway = new Gateway();
[34/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
new file mode 100644
index 0000000..259e22c
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
@@ -0,0 +1,98 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+import org.apache.airavata.sharing.registry.db.entities.GroupMembershipEntity;
+import org.apache.airavata.sharing.registry.db.entities.GroupMembershipEntityPK;
+import org.apache.airavata.sharing.registry.db.entities.UserEntity;
+import org.apache.airavata.sharing.registry.db.entities.UserGroupEntity;
+import org.apache.airavata.sharing.registry.db.utils.DBConstants;
+import org.apache.airavata.sharing.registry.models.*;
+
+import java.util.*;
+
+public class GroupMembershipRepository extends AbstractRepository<GroupMembership, GroupMembershipEntity, GroupMembershipEntityPK> {
+
+ public GroupMembershipRepository() {
+ super(GroupMembership.class, GroupMembershipEntity.class);
+ }
+
+ public List<GroupMembership> getChildMembershipsOfGroup(String parentId) throws GovRegistryException {
+ Map<String, String> filters = new HashMap<>();
+ filters.put(DBConstants.GroupMembershipTable.PARENT_ID, parentId);
+ return select(filters, 0, -1);
+ }
+
+ public List<User> getAllChildUsers(String groupId) throws GovRegistryException {
+ String queryString = "SELECT U FROM " + UserEntity.class.getSimpleName() + " U, " + GroupMembershipEntity.class.getSimpleName()
+ + " GM WHERE GM." + DBConstants.GroupMembershipTable.CHILD_ID + " = U." + DBConstants.UserTable.USER_ID + " AND " +
+ "gm." + DBConstants.GroupMembershipTable.PARENT_ID+"='"+groupId + "' AND gm." + DBConstants.GroupMembershipTable.CHILD_TYPE
+ + "='" + GroupChildType.USER.toString() + "'";
+ UserRepository userRepository = new UserRepository();
+ List<User> users = userRepository.select(queryString, 0, -1);
+ return users;
+ }
+
+ public List<UserGroup> getAllChildGroups(String groupId) throws GovRegistryException {
+ String queryString = "SELECT G FROM " + UserGroupEntity.class.getSimpleName() + " G, " + GroupMembershipEntity.class.getSimpleName()
+ + " GM WHERE GM." + DBConstants.GroupMembershipTable.CHILD_ID + " = G." + DBConstants.UserGroupTable.GROUP_ID + " AND " +
+ "GM." + DBConstants.GroupMembershipTable.PARENT_ID+"='"+groupId + "' AND GM." + DBConstants.GroupMembershipTable.CHILD_TYPE
+ + "='" + GroupChildType.GROUP.toString() + "'";
+ UserGroupRepository userGroupRepository = new UserGroupRepository();
+ List<UserGroup> groups = userGroupRepository.select(queryString, 0, -1);
+ return groups;
+ }
+
+ public List<GroupMembership> getAllParentMembershipsForChild(String childId) throws GovRegistryException {
+ List<GroupMembership> finalParentGroups = new ArrayList<>();
+ Map<String, String> filters = new HashMap<>();
+ filters.put(DBConstants.GroupMembershipTable.CHILD_ID, childId);
+ LinkedList<GroupMembership> temp = new LinkedList<>();
+ select(filters, 0, -1).stream().forEach(m -> temp.addLast(m));
+ while (temp.size() > 0){
+ GroupMembership gm = temp.pop();
+ filters = new HashMap<>();
+ filters.put(DBConstants.GroupMembershipTable.CHILD_ID, gm.parentId);
+ select(filters, 0, -1).stream().forEach(m -> temp.addLast(m));
+ finalParentGroups.add(gm);
+ }
+ return finalParentGroups;
+ }
+
+ public List<UserGroup> getAllParentGroupsForChild(String childId) throws GovRegistryException {
+ List<UserGroup> finalParentGroups = new ArrayList<>();
+ Map<String, String> filters = new HashMap<>();
+ filters.put(DBConstants.GroupMembershipTable.CHILD_ID, childId);
+ LinkedList<GroupMembership> temp = new LinkedList<>();
+ select(filters, 0, -1).stream().forEach(m -> temp.addLast(m));
+ UserGroupRepository userGroupRepository = new UserGroupRepository();
+ while (temp.size() > 0){
+ GroupMembership gm = temp.pop();
+ filters = new HashMap<>();
+ filters.put(DBConstants.GroupMembershipTable.CHILD_ID, gm.parentId);
+ select(filters, 0, -1).stream().forEach(m -> temp.addLast(m));
+ finalParentGroups.add(userGroupRepository.get(gm.parentId));
+ }
+ return finalParentGroups;
+ }
+
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
new file mode 100644
index 0000000..abc290a
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+import org.apache.airavata.sharing.registry.db.entities.PermissionTypeEntity;
+import org.apache.airavata.sharing.registry.models.PermissionType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class PermissionTypeRepository extends AbstractRepository<PermissionType, PermissionTypeEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(PermissionTypeRepository.class);
+
+ public PermissionTypeRepository() {
+ super(PermissionType.class, PermissionTypeEntity.class);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
new file mode 100644
index 0000000..1c45c31
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
+import org.apache.airavata.sharing.registry.models.Sharing;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SharingRepository extends AbstractRepository<Sharing, SharingEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(SharingRepository.class);
+
+ public SharingRepository() {
+ super(Sharing.class, SharingEntity.class);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
new file mode 100644
index 0000000..170b1fd
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+import org.apache.airavata.sharing.registry.db.entities.UserGroupEntity;
+import org.apache.airavata.sharing.registry.models.UserGroup;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroupEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(UserGroupRepository.class);
+
+ public UserGroupRepository() {
+ super(UserGroup.class, UserGroupEntity.class);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
new file mode 100644
index 0000000..f4ec03f
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
@@ -0,0 +1,35 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+
+import org.apache.airavata.sharing.registry.db.entities.UserEntity;
+import org.apache.airavata.sharing.registry.models.User;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserRepository extends AbstractRepository<User, UserEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(UserRepository.class);
+
+ public UserRepository() {
+ super(User.class, UserEntity.class);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java
new file mode 100644
index 0000000..ed8c9b3
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java
@@ -0,0 +1,27 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.utils;
+
+@FunctionalInterface
+public interface Committer<T, R> {
+
+ R commit(T t);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
new file mode 100644
index 0000000..f242b83
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
@@ -0,0 +1,57 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DBConstants {
+ private final static Logger logger = LoggerFactory.getLogger(DBConstants.class);
+
+ public static int SELECT_MAX_ROWS = 10000;
+
+ public static class DomainTable {
+ public static String DOMAIN_ID = "domainId";
+ public static String NAME = "name";
+ public static String DESCRIPTION = "description";
+ }
+
+ public static class UserTable {
+ public static String USER_ID = "userId";
+ public static String DOMAIN_ID = "domainId";
+ public static String USER_NAME = "userName";
+ }
+
+ public static class UserGroupTable {
+ public static String GROUP_ID = "groupId";
+ public static String DOMAIN_ID = "domainId";
+ public static String NAME = "name";
+ public static String DESCRIPTION = "description";
+ public static String OWNER_ID = "ownerId";
+ public static String GROUP_TYPE = "groupType";
+ }
+
+ public static class GroupMembershipTable {
+ public static String PARENT_ID = "parentId";
+ public static String CHILD_ID = "childId";
+ public static String CHILD_TYPE = "childType";
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
new file mode 100644
index 0000000..e1eba62
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
@@ -0,0 +1,111 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.utils;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.sharing.registry.models.GovRegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.util.HashMap;
+import java.util.Map;
+
+public class JPAUtils {
+ private final static Logger logger = LoggerFactory.getLogger(JPAUtils.class);
+
+ private static final String PERSISTENCE_UNIT_NAME = "airavata-gov-registry";
+ private static final String GOV_REG_JDBC_DRIVER = "appcatalog.jdbc.driver";
+ private static final String GOV_REG_JDBC_URL = "appcatalog.jdbc.url";
+ private static final String GOV_REG_JDBC_USER = "appcatalog.jdbc.user";
+ private static final String GOV_REG_JDBC_PWD = "appcatalog.jdbc.password";
+ private static final String GOV_REG_VALIDATION_QUERY = "appcatalog.validationQuery";
+ private static final String JPA_CACHE_SIZE = "jpa.cache.size";
+ private static final String JPA_CACHE_ENABLED = "cache.enable";
+
+ @PersistenceUnit(unitName = PERSISTENCE_UNIT_NAME)
+ protected static EntityManagerFactory factory;
+ @PersistenceContext(unitName = PERSISTENCE_UNIT_NAME)
+ private static EntityManager entityManager;
+
+ public static EntityManager getEntityManager() {
+ if (factory == null) {
+// String connectionProperties = "DriverClassName=" + readServerProperties(GOV_REG_JDBC_DRIVER) + "," +
+// "Url=" + readServerProperties(GOV_REG_JDBC_URL) + "?autoReconnect=true," +
+// "Username=" + readServerProperties(GOV_REG_JDBC_USER) + "," +
+// "Password=" + readServerProperties(GOV_REG_JDBC_PWD) +
+// ",validationQuery=" + readServerProperties(GOV_REG_VALIDATION_QUERY);
+//
+
+ String connectionProperties = "DriverClassName=com.mysql.jdbc.Driver," +
+ "Url=jdbc:mysql://localhost:3306/airavata_gov_registry?autoReconnect=true," +
+ "Username=root," +
+ "Password=," +
+ ",validationQuery=SELECT 1 FROM CONFIGURATION";
+
+ Map<String, String> properties = new HashMap<String, String>();
+ properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
+ properties.put("openjpa.ConnectionProperties", connectionProperties);
+ properties.put("openjpa.DynamicEnhancementAgent", "true");
+ properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
+ // For app catalog, we don't need caching
+// properties.put("openjpa.DataCache","" + readServerProperties(JPA_CACHE_ENABLED) + "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
+// properties.put("openjpa.QueryCache","" + readServerProperties(JPA_CACHE_ENABLED) + "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
+ properties.put("openjpa.RemoteCommitProvider", "sjvm");
+ properties.put("openjpa.Log", "DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
+ properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
+ properties.put("openjpa.jdbc.QuerySQLCache", "false");
+ properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
+ " PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000, autoReconnect=true");
+ properties.put("openjpa.RuntimeUnenhancedClasses", "warn");
+ factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
+ }
+ entityManager = factory.createEntityManager();
+ return entityManager;
+ }
+
+ private static String readServerProperties(String propertyName) throws GovRegistryException {
+ try {
+ return ServerSettings.getSetting(propertyName);
+ } catch (ApplicationSettingsException e) {
+ logger.error("Unable to read airavata-server.properties...", e);
+ throw new GovRegistryException("Unable to read airavata-server.properties...");
+ }
+ }
+
+ public static <R> R execute(Committer<EntityManager, R> committer) throws GovRegistryException {
+ EntityManager entityManager = JPAUtils.getEntityManager();
+ try {
+ entityManager.getTransaction().begin();
+ R r = committer.commit(entityManager);
+ entityManager.getTransaction().commit();
+ return r;
+ }finally {
+ if (entityManager != null && entityManager.isOpen()) {
+ if (entityManager.getTransaction().isActive()) {
+ entityManager.getTransaction().rollback();
+ }
+ entityManager.close();
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java
new file mode 100644
index 0000000..de6bea9
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java
@@ -0,0 +1,39 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.utils;
+
+import org.dozer.DozerBeanMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ObjectMapperSingleton extends DozerBeanMapper{
+ private final static Logger logger = LoggerFactory.getLogger(ObjectMapperSingleton.class);
+
+ private static ObjectMapperSingleton instance;
+
+ private ObjectMapperSingleton(){}
+
+ public static ObjectMapperSingleton getInstance(){
+ if(instance == null)
+ instance = new ObjectMapperSingleton();
+ return instance;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServer.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServer.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServer.java
new file mode 100644
index 0000000..276c99e
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServer.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GovRegistryServer {
+ private final static Logger logger = LoggerFactory.getLogger(GovRegistryServer.class);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/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
new file mode 100644
index 0000000..5af94a0
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/GovRegistryServerHandler.java
@@ -0,0 +1,223 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.server;
+
+import org.apache.airavata.sharing.registry.models.*;
+import org.apache.airavata.sharing.registry.service.cpi.GovRegistryService;
+import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+
+public class GovRegistryServerHandler implements GovRegistryService.Iface{
+ private final static Logger logger = LoggerFactory.getLogger(GovRegistryServerHandler.class);
+
+ /**
+ * * Domain Operations
+ * *
+ */
+ @Override
+ public boolean createDomain(Domain domain) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateDomain(Domain domain) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteDomain(String domainId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Domain getDomain(String domainId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Domain> getDomains(int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * User Operations
+ * *
+ */
+ @Override
+ public boolean registerUser(User user) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updatedUser(User user) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteUser(String userId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public User getUser(String userId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<User> getUsers(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * Group Operations
+ * *
+ */
+ @Override
+ public boolean createGroup(UserGroup group) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateGroup(UserGroup group) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteGroup(String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public UserGroup getGroup(String groupId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<UserGroup> getGroups(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ @Override
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Map<String, GroupType> getGroupMembers(String groupId) throws TException {
+ return null;
+ }
+
+ /**
+ * * EntityType Operations
+ * *
+ */
+ @Override
+ public boolean createEntityType(EntityType entityType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateEntityType(EntityType entityType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteEntityType(String entityTypeId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public EntityType getEntityType(String entityTypeId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<EntityType> getEntityTypes(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * Entity Operations
+ * *
+ */
+ @Override
+ public boolean registerEntity(Entity entity) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateEntity(Entity entity) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteEntity(String entityId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Entity getEntity(String entityId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Entity> searchEntities(String domain, String entityType, Map<String, String> filters, int offset, int limit) throws GovRegistryException, TException {
+ return null;
+ }
+
+ /**
+ * * EntityType Operations
+ * *
+ */
+ @Override
+ public boolean createPermissionType(PermissionType permisionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updatePermissionType(PermissionType permisionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deletePermissionType(String entityTypeId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public PermissionType getPermissionType(String permisionTypeId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<PermissionType> getPermissionTypes(String domain, int offset, int limit) throws GovRegistryException, TException {
+ return null;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/META-INF/persistence.xml b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..ceba398
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
+
+ <persistence-unit name="airavata-gov-registry">
+ <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+ <class>org.apache.airavata.sharing.registry.db.entities.DomainEntity</class>
+ <class>org.apache.airavata.sharing.registry.db.entities.EntityEntity</class>
+ <class>org.apache.airavata.sharing.registry.db.entities.EntityTypeEntity</class>
+ <class>org.apache.airavata.sharing.registry.db.entities.GroupMembershipEntity</class>
+ <class>org.apache.airavata.sharing.registry.db.entities.PermissionTypeEntity</class>
+ <class>org.apache.airavata.sharing.registry.db.entities.SharingEntity</class>
+ <class>org.apache.airavata.sharing.registry.db.entities.UserEntity</class>
+ <class>org.apache.airavata.sharing.registry.db.entities.UserGroupEntity</class>
+ </persistence-unit>
+</persistence>
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/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
new file mode 100644
index 0000000..7c03e0c
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql
@@ -0,0 +1,135 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+CREATE TABLE DOMAIN (
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ CREATED_TIME BIGINT,
+ UPDATED_TIME BIGINT,
+ PRIMARY KEY (DOMAIN_ID)
+);
+
+CREATE TABLE USER (
+ USER_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ USER_NAME VARCHAR(255),
+ CREATED_TIME BIGINT,
+ UPDATED_TIME BIGINT,
+ PRIMARY KEY (USER_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+CREATE TABLE USER_GROUP (
+ GROUP_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ OWNER_ID VARCHAR(255),
+ TYPE VARCHAR(255),
+ CREATED_TIME BIGINT,
+ UPDATED_TIME BIGINT,
+ PRIMARY KEY (GROUP_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+ FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+
+CREATE TABLE GROUP_MEMBERSHIP (
+ PARENT_ID VARCHAR(255),
+ CHILD_ID VARCHAR(255),
+ CHILD_TYPE VARCHAR(255),
+ CREATED_TIME BIGINT,
+ UPDATED_TIME BIGINT,
+ PRIMARY KEY (PARENT_ID, CHILD_ID),
+ FOREIGN KEY (PARENT_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+ FOREIGN KEY (CHILD_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+CREATE TABLE ENTITY_TYPE (
+ ENTITY_TYPE_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ CREATED_TIME BIGINT,
+ UPDATED_TIME BIGINT,
+ PRIMARY KEY (ENTITY_TYPE_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+CREATE TABLE PERMISSION_TYPE (
+ PERMISSION_TYPE_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ CREATED_TIME BIGINT,
+ UPDATED_TIME BIGINT,
+ PRIMARY KEY (PERMISSION_TYPE_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+CREATE TABLE ENTITY (
+ ENTITY_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ ENTITY_TYPE_ID VARCHAR(255),
+ OWNER_ID VARCHAR(255),
+ PARENT_ENTITY_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ FULL_TEXT TEXT,
+ CREATED_TIME BIGINT,
+ UPDATED_TIME BIGINT,
+ PRIMARY KEY (ENTITY_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+ FOREIGN KEY (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+ FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+ FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+CREATE TABLE ENTITY_METADATA (
+ ENTITY_ID VARCHAR (255),
+ META_KEY VARCHAR (255),
+ META_VALUE VARCHAR (255),
+ PRIMARY KEY (ENTITY_ID, META_KEY),
+ FOREIGN KEY (ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+CREATE TABLE SHARING (
+ PERMISSION_TYPE_ID VARCHAR(255),
+ ENTITY_TYPE_ID VARCHAR(255),
+ ENTITY_ID VARCHAR(255),
+ GROUP_ID VARCHAR(255),
+ CREATED_TIME BIGINT,
+ UPDATED_TIME BIGINT,
+ 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 (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+ FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+CREATE TABLE CONFIGURATION
+(
+ CONFIG_KEY VARCHAR(255),
+ CONFIG_VALUE VARCHAR(255),
+ PRIMARY KEY(CONFIG_KEY, CONFIG_VALUE)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VALUE) VALUES('sharing_reg_version', '0.17');
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/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
new file mode 100644
index 0000000..aeeaafb
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/db/RepositoriesTest.java
@@ -0,0 +1,353 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db;
+
+import junit.framework.Assert;
+import org.apache.airavata.sharing.registry.db.repositories.*;
+import org.apache.airavata.sharing.registry.db.utils.DBConstants;
+import org.apache.airavata.sharing.registry.models.*;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+public class RepositoriesTest {
+ private final static Logger logger = LoggerFactory.getLogger(RepositoriesTest.class);
+
+ @Test
+ public void test() throws GovRegistryException {
+
+ //Creating domain
+ Domain domain = new Domain();
+ String domainId = "test-domain."+System.currentTimeMillis();
+ domain.setDomainId(domainId);
+ domain.setName(domainId);
+ domain.setDescription("test domain description");
+ domain.setCreatedTime(System.currentTimeMillis());
+ domain.setUpdatedTime(System.currentTimeMillis());
+
+ DomainRepository domainRepository = new DomainRepository();
+ domain = domainRepository.create(domain);
+ Assert.assertNotNull(domain);
+
+ Map<String, String> filters = new HashMap<>();
+ filters.put(DBConstants.DomainTable.DESCRIPTION, "test");
+ Assert.assertTrue(domainRepository.select(filters, 0, 10).size() > 0);
+
+
+ //Creating users
+ User user1 = new User();
+ String userName1 = "test-user." + System.currentTimeMillis();
+ String userId1 = domainId + ":" + userName1;
+ user1.setUserId(userId1);
+ user1.setUserName(userName1);
+ user1.setDomainId(domainId);
+ user1.setCreatedTime(System.currentTimeMillis());
+ user1.setUpdatedTime(System.currentTimeMillis());
+
+ UserRepository userRepository = new UserRepository();
+ user1 = userRepository.create(user1);
+ Assert.assertNotNull(user1);
+
+ User user2 = new User();
+ String userName2 = "test-user." + System.currentTimeMillis();
+ String userId2 = domainId + ":" + userName2;
+ user2.setUserId(userId2);
+ user2.setUserName(userName2);
+ user2.setDomainId(domainId);
+ user2.setCreatedTime(System.currentTimeMillis());
+ user2.setUpdatedTime(System.currentTimeMillis());
+
+ userRepository.create(user2);
+
+ User user3 = new User();
+ String userName3 = "test-user." + System.currentTimeMillis();
+ String userId3 = domainId + ":" + userName3;
+ user3.setUserId(userId3);
+ user3.setUserName(userName3);
+ user3.setDomainId(domainId);
+ user3.setCreatedTime(System.currentTimeMillis());
+ user3.setUpdatedTime(System.currentTimeMillis());
+
+ userRepository.create(user3);
+
+ filters = new HashMap<>();
+ filters.put(DBConstants.UserTable.USER_NAME, "test");
+ Assert.assertTrue(userRepository.select(filters, 0, 10).size() > 0);
+
+ // Creating user groups
+ UserGroup userGroup1 = new UserGroup();
+ String groupName1 = "test-group";
+ String groupId1 = domainId + ":" + groupName1 + "." + System.currentTimeMillis();
+ userGroup1.setGroupId(groupId1);
+ userGroup1.setDomainId(domainId);
+ userGroup1.setName(groupName1);
+ userGroup1.setDescription("test group description");
+ userGroup1.setOwnerId(userId1);
+ userGroup1.setGroupType(GroupType.MULTI_USER);
+ userGroup1.setCreatedTime(System.currentTimeMillis());
+ userGroup1.setUpdatedTime(System.currentTimeMillis());
+
+ UserGroupRepository userGroupRepository = new UserGroupRepository();
+ userGroup1 = userGroupRepository.create(userGroup1);
+ Assert.assertNotNull(userGroup1);
+
+ UserGroup userGroup2 = new UserGroup();
+ String groupName2 = "test-group";
+ String groupId2 = domainId + ":" + groupName2 + "." + System.currentTimeMillis();
+ userGroup2.setGroupId(groupId2);
+ userGroup2.setDomainId(domainId);
+ userGroup2.setName(groupName2);
+ userGroup2.setDescription("test group description");
+ userGroup2.setOwnerId(userId2);
+ userGroup2.setGroupType(GroupType.MULTI_USER);
+ userGroup2.setCreatedTime(System.currentTimeMillis());
+ userGroup2.setUpdatedTime(System.currentTimeMillis());
+
+ userGroupRepository.create(userGroup2);
+
+ UserGroup userGroup3 = new UserGroup();
+ String groupName3 = "test-group";
+ String groupId3 = domainId + ":" + groupName3 + "." + System.currentTimeMillis();
+ userGroup3.setGroupId(groupId3);
+ userGroup3.setDomainId(domainId);
+ userGroup3.setName(groupName3);
+ userGroup3.setDescription("test group description");
+ userGroup3.setOwnerId(userId3);
+ userGroup3.setGroupType(GroupType.MULTI_USER);
+ userGroup3.setCreatedTime(System.currentTimeMillis());
+ userGroup3.setUpdatedTime(System.currentTimeMillis());
+
+ userGroupRepository.create(userGroup3);
+
+ //Creating Groups for users (This is an implementation level abstract)
+ UserGroup ug1 = new UserGroup();
+ String ug1Name = "user1-group-name";
+ String ug1GroupId = userId1;
+ ug1.setGroupId(ug1GroupId);
+ ug1.setDomainId(domainId);
+ ug1.setName(ug1Name);
+ ug1.setDescription("test group description");
+ ug1.setOwnerId(userId1);
+ ug1.setGroupType(GroupType.SINGLE_USER);
+ ug1.setCreatedTime(System.currentTimeMillis());
+ ug1.setUpdatedTime(System.currentTimeMillis());
+
+ userGroupRepository.create(ug1);
+
+ UserGroup ug2 = new UserGroup();
+ String ug2Name = "user2-group-name";
+ String ug2GroupId = userId2;
+ ug2.setGroupId(ug2GroupId);
+ ug2.setDomainId(domainId);
+ ug2.setName(ug2Name);
+ ug2.setDescription("test group description");
+ ug2.setOwnerId(userId1);
+ ug2.setGroupType(GroupType.SINGLE_USER);
+ ug2.setCreatedTime(System.currentTimeMillis());
+ ug2.setUpdatedTime(System.currentTimeMillis());
+
+ userGroupRepository.create(ug2);
+
+ UserGroup ug3 = new UserGroup();
+ String ug3Name = "user1-group-name";
+ String ug3GroupId = userId3;
+ ug3.setGroupId(ug3GroupId);
+ ug3.setDomainId(domainId);
+ ug3.setName(ug3Name);
+ ug3.setDescription("test group description");
+ ug3.setOwnerId(userId1);
+ ug3.setGroupType(GroupType.SINGLE_USER);
+ ug3.setCreatedTime(System.currentTimeMillis());
+ ug3.setUpdatedTime(System.currentTimeMillis());
+
+ userGroupRepository.create(ug3);
+
+ GroupMembership grpU2ToGrp2 = new GroupMembership();
+ grpU2ToGrp2.setParentId(groupId2);
+ grpU2ToGrp2.setChildId(userId2);
+ grpU2ToGrp2.setChildType(GroupChildType.USER);
+
+ GroupMembershipRepository groupMembershipRepository = new GroupMembershipRepository();
+ grpU2ToGrp2 = groupMembershipRepository.create(grpU2ToGrp2);
+ Assert.assertNotNull(grpU2ToGrp2);
+
+ GroupMembership grpU3ToGrp2 = new GroupMembership();
+ grpU3ToGrp2.setParentId(groupId2);
+ grpU3ToGrp2.setChildId(userId3);
+ grpU3ToGrp2.setChildType(GroupChildType.USER);
+
+ groupMembershipRepository.create(grpU3ToGrp2);
+
+ GroupMembership grpU1ToGrp1 = new GroupMembership();
+ grpU1ToGrp1.setParentId(groupId1);
+ grpU1ToGrp1.setChildId(userId1);
+ grpU1ToGrp1.setChildType(GroupChildType.USER);
+
+ groupMembershipRepository.create(grpU1ToGrp1);
+
+ GroupMembership grpG2ToGrp1 = new GroupMembership();
+ grpG2ToGrp1.setParentId(groupId1);
+ grpG2ToGrp1.setChildId(groupId2);
+ grpG2ToGrp1.setChildType(GroupChildType.GROUP);
+
+ groupMembershipRepository.create(grpG2ToGrp1);
+
+ filters = new HashMap<>();
+ filters.put(DBConstants.GroupMembershipTable.PARENT_ID, groupId2);
+ Assert.assertTrue(groupMembershipRepository.select(filters, 0, 10).size() == 2);
+
+ Assert.assertTrue(groupMembershipRepository.getChildMembershipsOfGroup(groupId2).size() == 2);
+ Assert.assertTrue(groupMembershipRepository.getAllChildUsers(groupId2).size() == 2);
+ Assert.assertTrue(groupMembershipRepository.getAllChildGroups(groupId1).size() == 1);
+
+ Assert.assertTrue(groupMembershipRepository.getAllParentMembershipsForChild(userId3).size() == 2);
+ Assert.assertTrue(groupMembershipRepository.getAllParentGroupsForChild(userId3).size() == 2);
+
+ //Creating permission types
+ PermissionType permissionType1 = new PermissionType();
+ String permissionName1 = "READ";
+ String permissionType1Id = domainId + ":" + permissionName1;
+ permissionType1.setPermissionTypeId(permissionType1Id);
+ permissionType1.setDomainId(domainId);
+ permissionType1.setName(permissionName1);
+ permissionType1.setDescription("READ description");
+ permissionType1.setCreatedTime(System.currentTimeMillis());
+ permissionType1.setUpdatedTime(System.currentTimeMillis());
+
+ PermissionTypeRepository permissionTypeRepository = new PermissionTypeRepository();
+ permissionType1 = permissionTypeRepository.create(permissionType1);
+ Assert.assertNotNull(permissionType1);
+
+ PermissionType permissionType2 = new PermissionType();
+ String permissionName2 = "WRITE";
+ String permissionType2Id = domainId + ":" + permissionName2;
+ permissionType2.setPermissionTypeId(permissionType2Id);
+ permissionType2.setDomainId(domainId);
+ permissionType2.setName(permissionName2);
+ permissionType2.setDescription("WRITE description");
+ permissionType2.setCreatedTime(System.currentTimeMillis());
+ permissionType2.setUpdatedTime(System.currentTimeMillis());
+ permissionTypeRepository.create(permissionType2);
+
+ //Creating entity types
+ EntityType entityType1 = new EntityType();
+ String entityType1Name = "Project";
+ String entityTypeId1 = domainId + ":" + entityType1Name;
+ entityType1.setEntityTypeId(entityTypeId1);
+ entityType1.setDomainId(domainId);
+ entityType1.setName(entityType1Name);
+ entityType1.setDescription("test entity type");
+ entityType1.setCreatedTime(System.currentTimeMillis());
+ entityType1.setUpdatedTime(System.currentTimeMillis());
+
+ EntityTypeRepository entityTypeRepository = new EntityTypeRepository();
+ entityType1 = entityTypeRepository.create(entityType1);
+ Assert.assertNotNull(entityType1);
+
+ EntityType entityType2 = new EntityType();
+ String entityType2Name = "Experiment";
+ String entityTypeId2 = domainId + ":" + entityType2Name;
+ entityType2.setEntityTypeId(entityTypeId2);
+ entityType2.setDomainId(domainId);
+ entityType2.setName(entityType2Name);
+ entityType2.setDescription("test entity type");
+ entityType2.setCreatedTime(System.currentTimeMillis());
+ entityType2.setUpdatedTime(System.currentTimeMillis());
+ entityTypeRepository.create(entityType2);
+
+ //Creating Entities
+ String entityId1 = UUID.randomUUID().toString();
+ Entity entity1 = new Entity();
+ entity1.setEntityId(entityId1);
+ entity1.setDomainId(domainId);
+ entity1.setEntityTypeId(entityTypeId1);
+ entity1.setOwnerId(userId1);
+ entity1.setName("Project name");
+ entity1.setDescription("Project description");
+ Map<String, String> metadataMap = new HashMap<>();
+ metadataMap.put("key", "val");
+ entity1.setMetadata(metadataMap);
+ entity1.setFullText("Project name project description");
+ entity1.setCreatedTime(System.currentTimeMillis());
+ entity1.setUpdatedTime(System.currentTimeMillis());
+
+ EntityRepository entityRepository = new EntityRepository();
+ entity1 = entityRepository.create(entity1);
+ Assert.assertNotNull(entity1);
+
+ String entityId2 = UUID.randomUUID().toString();
+ Entity entity2 = new Entity();
+ entity2.setEntityId(entityId2);
+ entity2.setDomainId(domainId);
+ entity2.setEntityTypeId(entityTypeId2);
+ entity2.setOwnerId(userId1);
+ entity2.setName("Experiment name");
+ entity2.setDescription("Experiment description");
+ entity2.setParentEntityId(entityId1);
+ metadataMap = new HashMap<>();
+ metadataMap.put("key", "val");
+ entity2.setMetadata(metadataMap);
+ entity2.setFullText("Project name project description");
+ entity2.setCreatedTime(System.currentTimeMillis());
+ entity2.setUpdatedTime(System.currentTimeMillis());
+
+ entityRepository.create(entity2);
+
+ String entityId3 = UUID.randomUUID().toString();
+ Entity entity3 = new Entity();
+ entity3.setEntityId(entityId3);
+ entity3.setDomainId(domainId);
+ entity3.setEntityTypeId(entityTypeId2);
+ entity3.setOwnerId(userId1);
+ entity3.setName("Experiment name");
+ entity3.setDescription("Experiment description");
+ entity3.setParentEntityId(entityId1);
+ metadataMap = new HashMap<>();
+ metadataMap.put("key", "val");
+ entity3.setMetadata(metadataMap);
+ entity3.setFullText("Project name project description");
+ entity3.setCreatedTime(System.currentTimeMillis());
+ entity3.setUpdatedTime(System.currentTimeMillis());
+
+ entityRepository.create(entity3);
+
+ // Creating sharing entries
+ Sharing sharing1 = new Sharing();
+ sharing1.setPermissionTypeId(permissionType1Id);
+ sharing1.setEntityId(entityId1);
+ sharing1.setGroupId(userId2);
+
+ SharingRepository sharingRepository = new SharingRepository();
+ sharing1 = sharingRepository.create(sharing1);
+ Assert.assertNotNull(sharing1);
+
+ Sharing sharing2 = new Sharing();
+ sharing2.setPermissionTypeId(permissionType1Id);
+ sharing2.setEntityId(entityId3);
+ sharing2.setGroupId(groupId2);
+
+ sharingRepository.create(sharing2);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/pom.xml b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/pom.xml
new file mode 100644
index 0000000..ff0334c
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>airavata-sharing-registry</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <relativePath>../pom.xml</relativePath>
+ <version>${global.version}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>airavata-sharing-registry-stubs</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>0.9.3</version>
+ </dependency>
+ </dependencies>
+
+
+</project>
\ No newline at end of file
[14/50] [abbrv] airavata git commit: Imported mesos ansible scripts
to airavata repo
Posted by sc...@apache.org.
Imported mesos ansible scripts to airavata repo
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/7071ef17
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/7071ef17
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/7071ef17
Branch: refs/heads/airavata-gov-registry
Commit: 7071ef173edaa0d4cbddcf8e2246a4d5f0c620cf
Parents: 43b3757 21545be
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Sep 23 21:45:32 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Sep 23 21:49:08 2016 -0400
----------------------------------------------------------------------
modules/cloud/ansible-playbooks/README.md | 82 +++++++++++++
.../cloud/ansible-playbooks/group_vars/all.yml | 19 +++
modules/cloud/ansible-playbooks/hosts | 13 +++
.../ansible-playbooks/roles/ec2/tasks/main.yml | 30 +++++
.../roles/ec2/vars/aws-credential.yml | 3 +
.../ansible-playbooks/roles/ec2/vars/main.yml | 8 ++
.../ansible-playbooks/roles/java/tasks/main.yml | 21 ++++
.../ansible-playbooks/roles/java/vars/main.yml | 15 +++
.../roles/mesos-master/tasks/backup_main.yml | 117 +++++++++++++++++++
.../roles/mesos-master/tasks/main.yml | 86 ++++++++++++++
.../roles/mesos-master/templates/quorum.j2 | 1 +
.../roles/mesos-master/templates/zk.j2 | 1 +
.../roles/mesos-slave/tasks/main.yml | 66 +++++++++++
.../roles/mesos-slave/templates/zk.j2 | 1 +
.../ansible-playbooks/roles/test/tasks/main.yml | 3 +
.../roles/zookeeper/handlers/main.yml | 15 +++
.../roles/zookeeper/tasks/main.yml | 98 ++++++++++++++++
.../roles/zookeeper/templates/myid.j2 | 1 +
.../roles/zookeeper/templates/zoo.cfg.j2 | 32 +++++
.../roles/zookeeper/vars/main.yml | 15 +++
modules/cloud/ansible-playbooks/site.yml | 19 +++
21 files changed, 646 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/README.md
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/README.md
index 0000000,0000000..9ce4e47
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/README.md
@@@ -1,0 -1,0 +1,82 @@@
++# mesos-deployment
++This project setup Apache Mesos master and slave clusters on Cloud Infrastructures using Anisble
++
++If you are working with new set of hosts which you haven't ssh login to those host from the machine you are suppose to run your Ansible play. It will prompt you to get permission to add to known_hosts list, if you wan't remove this prompt and you know the consequences of disabling this feature and you want tor remove this prompt behavior run this on your terminal `export ANSIBLE_HOST_KEY_CHECKING=False`
++
++## Configurations
++
++To run this ansible script you must have at least 4 instances. 3 instances to setup Mesos master , marathon and zookeeper clusters. Along with Mesos master we install marathon and zookeeper. Another one or more instance/s to setup mesos agent/s. You can use ec2 ansible role provided with this playbook to spin up aws instances. To do that you need to set valid aws credentials.
++
++1. set valid aws credentials in `roles/ec2/vars/aws-credential.yml` if it doesn't work add folowing to ec2 task in `roles/ec2/tasks/main.yml`
++
++ `aws_access_key: <your_valid_access_key>`
++
++ `aws_secret_key: <your_valid_secret_key?`
++
++2. Set ec2 instance names under ec2 task `with_items:` configurations
++
++ After you set valid aws credentials and instance names run following ansible playbook command to spin up require aws ec2 instances.
++
++ `ansible-palybook -i hosts site.yml -t "ec2"`
++
++3. You need to know public ips of all the nodes and private ips of all mesos-master nodes. List all mesos master public ips under `[mesos-master]` section in `hosts` file. List all mesos-slave *(mesos-agent)* public ips under `[mesos-slave]` section. You need to set `my_id` hosts variable along with mesos-master ip addresses. This will use to set zookeeper id.
++
++ > [mesos-master]
++
++ > *1.2.3.4 my_id=1*
++
++ > *11.22.33.44 my_id=2*
++
++ > ...
++
++ > [mesos-slave]
++
++ > *123.123.123.123*
++
++ > ...
++
++4. Use mesos-master private ip addresses to set zookeeper servers properties in `roles/zookeeper/vars/main.yml`
++
++ > zookeeper_servers:
++
++ > \- {id: "1", ip: "172.31.24.149"}
++
++ > \- {id: "2", ip: "172.31.19.49"}
++
++ > \- {id: "3", ip: "172.31.25.80"}
++
++5. Set Mesos-master zookeeper quorum value in `group_vars/all.yml` file
++
++ > zk_quorum: 2
++
++6. Now we are set to deploy Apache Mesos cluster (Mesos-master, marthon, zookeeper, mesos-slave). Following ansible playbook command respectively setup mesos-master cluster , Mesos-slaves, and both mesos-master cluster and mesos-slave
++
++ `ansible-playbook -i hosts site.yml -t "mesos-master"`
++
++ `ansible-playbook -i hosts site.yml -t "mesos-slave"`
++
++ `ansible-playbook -i hosts site.yml -t "mesos"`
++
++ If everything works without any error, now you have running mesos cluster on aws instances.
++
++## verifying installation
++
++1. If your plays works without any error. Now you can access Mesos master console using `http://<master-ip>:5050` run following in one of Mesos master node to find which instance is the leader of cluster.
++
++ ``mesos-resolve `cat /etc/mesos/zk` `` this will return master-ip. Then use it to access console
++
++2. To access marathon console use `http://<master-ip>:8080`
++
++3. If you want run simple task on mesos. run following command on one of master node.
++
++ ``MASTER=$(mesos-resolve `cat /etc/mesos/zk`)``
++
++ `mesos-execute --master=$MASTER --name="cluster-test" --command="sleep 5"`
++
++
++
++## Ansible roles
++- java - install oracle java 8
++- zookeeper - install zookeeper
++- mesos-master - install mesos mastera and marathon
++- mesos-slave - install mesos slave
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/group_vars/all.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/group_vars/all.yml
index 0000000,0000000..62c83dc
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/group_vars/all.yml
@@@ -1,0 -1,0 +1,19 @@@
++---
++ansible_connection: ssh
++ansible_ssh_user: centos
++ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
++
++user: centos
++group: centos
++
++#Zookeeper related properties
++zookeeper_client_port: 2181
++# zookeeper_servers:
++# - { index: 1, ip: "", ports: "2888:3888"}
++# - { index: 2, ip: "", ports: "2888:3888"}
++# - { index: 3, ip: "", ports: "2888:3888"}
++zk_1: "{{ groups['mesos-master'][0] }}"
++zk_2: "{{ groups['mesos-master'][1] }}"
++zk_3: "{{ groups['mesos-master'][2] }}"
++
++zk_quorum: 2
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/hosts
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/hosts
index 0000000,0000000..cc90239
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/hosts
@@@ -1,0 -1,0 +1,13 @@@
++---
++# inventory fie: production
++#[localhost]
++127.0.0.1
++
++[mesos-master]
++52.87.208.230 my_id=1
++54.172.21.138 my_id=2
++54.196.170.54 my_id=3
++
++
++[mesos-slave]
++54.175.143.203
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/ec2/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/ec2/tasks/main.yml
index 0000000,0000000..7a6eb3d
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/ec2/tasks/main.yml
@@@ -1,0 -1,0 +1,30 @@@
++---
++- name: include credentials
++ include_vars: vars/aws-credential.yml
++
++- name: create a aws instace/s
++ ec2:
++ key_name: "{{ key_name }}"
++ region: us-east-1
++ instance_type: t2.small
++ image: "{{centos_ami_7_2}}"
++ group: "{{ security_group }}"
++ instance_tags:
++ Name: "{{ item }}"
++ assign_public_ip: yes
++ state: present
++ count: 1
++ vpc_subnet_id: subnet-54f8f70c
++ volumes:
++ - device_name: /dev/sda1
++ volume_type: io1
++ iops: 200
++ volume_size: 50
++ delete_on_termination: true
++ wait: yes
++ with_items:
++ - Mesos-master-1
++ - Mesos-master-2
++ - Mesos-master-3
++ - Mesos-slave-1
++ register: ec2
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/ec2/vars/aws-credential.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/ec2/vars/aws-credential.yml
index 0000000,0000000..2e4c703
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/ec2/vars/aws-credential.yml
@@@ -1,0 -1,0 +1,3 @@@
++---
++aws_access_key: xxxxxxxxx
++aws_secret_key: xxxxxxxxx
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/ec2/vars/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/ec2/vars/main.yml
index 0000000,0000000..1f7d77a
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/ec2/vars/main.yml
@@@ -1,0 -1,0 +1,8 @@@
++---
++
++key_name: shameera
++ec2_name: Mesos28
++centos_ami_7_2: ami-6d1c2007
++ubutntu_ami_16_04: ami-29f96d3e
++
++security_group: Mesos-sec
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/java/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/java/tasks/main.yml
index 0000000,0000000..92f2039
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/java/tasks/main.yml
@@@ -1,0 -1,0 +1,21 @@@
++---
++# Install Orcal Java
++- name: download oracle java 8 rpm
++ get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
++ become: yes
++
++- name: Install oracle java 8
++ yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
++ become: yes
++
++- name: set Oracle Java {{ java_version_string }} as default
++ alternatives:
++ name="{{ item.exe }}"
++ link="/usr/bin/{{ item.exe }}"
++ path="{{ item.path }}/{{ item.exe }}"
++ with_items:
++ - { path: "{{ java_home }}/jre/bin", exe: 'java' }
++ - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
++ - { path: "{{ java_home }}/bin", exe: 'javac' }
++ - { path: "{{ java_home }}/bin", exe: 'javadoc' }
++ become: yes
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/java/vars/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/java/vars/main.yml
index 0000000,0000000..a995684
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/java/vars/main.yml
@@@ -1,0 -1,0 +1,15 @@@
++---
++#Variables associated with this role
++# Oracle Java 8
++java_dir_source: "/usr/local/src"
++
++java_version: 8
++java_version_update: 91
++java_version_build: '14'
++java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
++java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
++
++java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
++java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-master/tasks/backup_main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-master/tasks/backup_main.yml
index 0000000,0000000..1d0abd1
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-master/tasks/backup_main.yml
@@@ -1,0 -1,0 +1,117 @@@
++---
++
++- name: wait untill instance is up and running
++ local_action: wait_for port=22
++ host="{{ ansible_ssh_host | default(inventory_hostname) }}"
++ search_regex=OpenSSH delay=10
++- name: create group
++ group: name="{{group}}"
++ become: yes
++
++- name: create user
++ user: name="{{user}}"
++ become: yes
++
++# RedHat related things
++- name: install required packages
++ yum: name="{{item}}" state=latest
++ with_items:
++ - wget
++ - tar
++ - git
++ - epel-release
++ - firewalld
++ become: yes
++
++- name: updage systemd
++ yum: name=systemd state=latest
++ become: yes
++
++- name: get apache maven
++ get_url:
++ url: http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo
++ dest: /etc/yum.repos.d/epel-apache-maven.repo
++ become: yes
++
++- name: copy svn repo file
++ copy:
++ src: wandisco-svn.repo
++ dest: /etc/yum.repos.d/wandisco-svn.repo
++ become: yes
++
++- name: install development tools
++ yum: name="@Development tools" state=present
++ become: yes
++
++#Install other Mesos dependencies.
++- name: install mesos dependencies
++ yum: name="{{item}}" state=latest
++ with_items:
++ - apache-maven
++ - python-devel
++ - java-1.8.0-openjdk-devel
++ - zlib-devel
++ - libcurl-devel
++ - openssl-devel
++ - cyrus-sasl-devel
++ - cyrus-sasl-md5
++ - apr-devel
++ - apr-util-devel
++ - subversion-devel
++ become: yes
++
++- name: start firewall service
++ service: name=firewalld state=started enabled=yes
++ become: yes
++
++- name: download and unarchive mesos latest
++ unarchive:
++ src="{{mesos_url}}"
++ dest="{{user_home}}"
++ remote_src=yes
++ copy=no
++ creates="{{mesos_deploy_dir}}/configure"
++ owner="{{user}}"
++ group="{{group}}"
++
++ # Bootstrap (Only required if building from git repository).
++ # $ ./bootstrap
++
++- name: make build dir
++ file: path="{{mesos_build_dir}}" state=directory owner={{user}} group={{group}}
++
++# - name: create simlink to configure script
++# file: src="{{mesos_deploy_dir}}/configure"
++# dest="{{mesos_build_dir}}/configure"
++# state=link
++# owner={{user}}
++# group={{group}}
++# tags: test
++
++- name: configure and build mesos
++ command: ../configure chdir="{{mesos_build_dir}}"
++ register: build
++
++- name: run make
++ command: make chdir="{{mesos_build_dir}}"
++ when: build|success
++ register: make
++
++# - name: run make tests
++# command: make check chdir="{{mesos_build_dir}}"
++# when: make|success
++
++- name: open firewall port
++ firewalld: port=5050/tcp zone=public permanent=true state=enabled immediate=yes
++ become: yes
++
++- name: create working dir
++ file: path="{{mesos_work_dir}}" state=directory user={{user}} group={{group}}
++
++- name: start mesos master
++ command: ./bin/mesos-master.sh --ip={{inventory_hostname}} --work_dir={{mesos_work_dir}} &
++ chdir={{mesos_build_dir}}
++
++- name: start mesos agent
++ command: /bin/mesos-agent.sh --master={{inventory_hostname}}:5050 --work_dir={{mesos_work_dir}} &
++ chdir={{mesos_build_dir}}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-master/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-master/tasks/main.yml
index 0000000,0000000..effb35a
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-master/tasks/main.yml
@@@ -1,0 -1,0 +1,86 @@@
++---
++# reference: https://open.mesosphere.com/getting-started/install/
++- name: install firewalld
++ yum:
++ name: firewalld
++ state: latest
++ become: yes
++
++- name: start firewalld
++ service:
++ name: firewalld
++ state: started
++ enabled: yes
++ become: yes
++
++- name: open ports
++ firewalld:
++ port: "{{ item }}"
++ zone: public
++ permanent: true
++ state: enabled
++ immediate: yes
++ with_items:
++ - "5050/tcp"
++ - "8080/tcp"
++ become: yes
++
++- name: install utility - TODO delete this
++ yum:
++ name: "{{ item }}"
++ state: latest
++ with_items:
++ - vim
++ become: yes
++
++# Setup repository
++- name: add mesosphere rpm
++ yum:
++ name: http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
++ state: present
++ become: yes
++
++- name: install mesos and marathon
++ yum:
++ name: "{{ item }}"
++ state: latest
++ with_items:
++ - mesos
++ - marathon
++ # - mesosphere-zookeeper
++ become: yes
++
++# configurations
++
++- name: set zk file for mesos master and marathon
++ template:
++ src: zk.j2
++ dest: /etc/mesos/zk
++ force: yes
++ become: yes
++
++- name: set zookeeper quorum
++ template:
++ src: quorum.j2
++ dest: /etc/mesos-master/quorum
++ force: yes
++ become: yes
++
++- name: stop and disable mesos slave
++ service:
++ name: mesos-slave
++ enabled: no
++ state: stopped
++ become: yes
++
++- name: restart mesos master
++ service:
++ name: mesos-master
++ state: restarted
++ become: yes
++
++- name: restart marathon
++ service:
++ name: marathon
++ state: restarted
++ become: yes
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-master/templates/quorum.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-master/templates/quorum.j2
index 0000000,0000000..c1d54ef
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-master/templates/quorum.j2
@@@ -1,0 -1,0 +1,1 @@@
++{{zk_quorum}}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-master/templates/zk.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-master/templates/zk.j2
index 0000000,0000000..e82fe65
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-master/templates/zk.j2
@@@ -1,0 -1,0 +1,1 @@@
++zk://{{zk_1}}:{{zookeeper_client_port}},{{zk_2}}:{{zookeeper_client_port}},{{zk_3}}:{{zookeeper_client_port}}/mesos
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-slave/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-slave/tasks/main.yml
index 0000000,0000000..f6890fe
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-slave/tasks/main.yml
@@@ -1,0 -1,0 +1,66 @@@
++---
++- name: install firewalld
++ yum:
++ name: firewalld
++ state: latest
++ update_cache: yes
++ become: yes
++
++- name: start firewalld
++ service:
++ name: firewalld
++ state: started
++ enabled: yes
++ become: yes
++
++- name: open ports
++ firewalld:
++ port: "{{ item }}"
++ zone: public
++ permanent: true
++ state: enabled
++ immediate: yes
++ with_items:
++ - "5051/tcp"
++ become: yes
++
++# setup mesos slave
++- name: add mesosphere rpm
++ yum:
++ name: http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
++ state: present
++ become: yes
++
++- name: install mesos
++ yum:
++ name: mesos
++ state: latest
++ become: yes
++
++# zookeeper will be pulled in and isntall as a depencency automatically
++# - name: disable zookeeper
++# service:
++# name: mesosphere-zookeeper
++# state: stopped
++# enabled: no
++# become: yes
++
++- name: set zk file for mesos master and marathon
++ template:
++ src: zk.j2
++ dest: /etc/mesos/zk
++ force: yes
++ become: yes
++
++- name: disable mesos-master
++ service:
++ name: mesos-master
++ state: stopped
++ enabled: no
++ become: yes
++
++- name: restart mesos slave
++ service:
++ name: mesos-slave
++ state: restarted
++ become: yes
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/mesos-slave/templates/zk.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/mesos-slave/templates/zk.j2
index 0000000,0000000..e82fe65
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/mesos-slave/templates/zk.j2
@@@ -1,0 -1,0 +1,1 @@@
++zk://{{zk_1}}:{{zookeeper_client_port}},{{zk_2}}:{{zookeeper_client_port}},{{zk_3}}:{{zookeeper_client_port}}/mesos
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/test/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/test/tasks/main.yml
index 0000000,0000000..f0548b1
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/test/tasks/main.yml
@@@ -1,0 -1,0 +1,3 @@@
++- debug: msg="ding {{ inventory_hostname }}"
++
++- debug: msg="{{ inventory }}"
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/handlers/main.yml
index 0000000,0000000..f1ea4be
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/handlers/main.yml
@@@ -1,0 -1,0 +1,15 @@@
++---
++- name: start zookeeper
++ command: bin/zkServer.sh start
++ args:
++ chdir: "{{zookeeper_dir}}"
++
++- name: restart zookeeper
++ command: bin/zkServer.sh restart
++ args:
++ chdir: "{{zookeeper_dir}}"
++
++- name: stop zookeeper
++ command: bin/zkServer.sh stop
++ args:
++ chdir: "{{zookeeper_dir}}"
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/tasks/main.yml
index 0000000,0000000..02c246f
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/tasks/main.yml
@@@ -1,0 -1,0 +1,98 @@@
++---
++- name: install pre-requities
++ yum:
++ name: "{{item}}"
++ state: latest
++ with_items:
++ - firewalld
++ - vim
++ become: yes
++
++- name: start firewalld
++ service:
++ name: firewalld
++ state: started
++ become: yes
++
++- name: open zookeeper port
++ firewalld:
++ port: "{{item}}"
++ zone: public
++ permanent: true
++ state: enabled
++ immediate: yes
++ with_items:
++ - "{{zookeeper_client_port}}/tcp"
++ - 2888/tcp
++ - 3888/tcp
++ become: yes
++
++# - name: get ip4 address
++# command: hostname -i
++# register: _ip4
++# tags: ttt
++
++# - debug:
++# msg: "{{_ip4.stdout}}"
++# tags: ttt
++
++######################
++- name: Download and unarchive zookeeper
++ unarchive:
++ src: "{{ zookeeper_url }}"
++ dest: /opt
++ copy: no
++ creates: /opt/zookeeper-{{ zookeeper_version }}
++ owner: "{{ user }}"
++ group: "{{ group }}"
++ become: yes
++
++- name: Link to Zookeeper Directory
++ file:
++ src: "/opt/zookeeper-{{ zookeeper_version }}"
++ dest: "{{zookeeper_dir}}"
++ state: link
++ force: yes
++ become: yes
++
++- name: Create Zookeeper Log Dir
++ file:
++ path: "{{zookeeper_log_dir}}"
++ owner: "{{ user }}"
++ group: "{{ group }}"
++ recurse: yes
++ state: directory
++ mode: 0644
++ become: yes
++
++- name: Create Zookeeper DataStore Dir
++ file:
++ path: "{{zookeeper_datastore_dir}}"
++ owner: "{{ user }}"
++ group: "{{ group }}"
++ recurse: yes
++ state: directory
++ mode: 0755
++ become: yes
++
++- name: Copy zoo.cfg file
++ template:
++ src: zoo.cfg.j2
++ # dest: "{{zookeeper_conf_dir}}/zoo.cfg"
++ dest: "{{zookeeper_dir}}/conf/zoo.cfg"
++ owner: "{{ user }}"
++ group: "{{ group }}"
++ mode: "u=rw,g=r,o=r"
++ notify:
++ - restart zookeeper
++
++
++- name: Copy myid file
++ template:
++ src: myid.j2
++ dest: "{{zookeeper_datastore_dir}}/myid"
++ owner: "{{ user }}"
++ group: "{{ group }}"
++ mode: "u=rw,g=r,o=r"
++ notify:
++ - restart zookeeper
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/templates/myid.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/templates/myid.j2
index 0000000,0000000..78a0bd7
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/templates/myid.j2
@@@ -1,0 -1,0 +1,1 @@@
++{{ my_id }}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/templates/zoo.cfg.j2
index 0000000,0000000..4845a71
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/templates/zoo.cfg.j2
@@@ -1,0 -1,0 +1,32 @@@
++# Licensed to the Apache Software Foundation (ASF) under one or more
++# contributor license agreements. See the NOTICE file distributed with
++# this work for additional information regarding copyright ownership.
++# The ASF licenses this file to You under the Apache License, Version 2.0
++# (the "License"); you may not use this file except in compliance with
++# the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++
++maxClientCnxns=50
++# The number of milliseconds of each tick
++tickTime=2000
++# The number of ticks that the initial
++# synchronization phase can take
++initLimit=10
++# The number of ticks that can pass between
++# sending a request and getting an acknowledgement
++syncLimit=5
++# the directory where the snapshot is stored.
++dataDir={{zookeeper_datastore_dir}}
++# the port at which the clients will connect
++clientPort={{zookeeper_client_port}}
++
++{% for server in zookeeper_servers %}
++server.{{ server.id }}={{ server.ip }}:2888:3888
++{% endfor %}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/roles/zookeeper/vars/main.yml
index 0000000,0000000..07f9ca1
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/roles/zookeeper/vars/main.yml
@@@ -1,0 -1,0 +1,15 @@@
++---
++zookeeper_version: 3.4.8
++#zookeeper_conf_dir: /etc/zookeeper/conf
++zookeeper_log_dir: /var/log/zookeeper
++zookeeper_datastore_dir: /var/lib/zookeeper
++zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
++zookeeper_dir: /opt/zookeeper
++#zookeeper_client_port: 2181
++
++zookeeper_servers:
++ - {id: "1", ip: "172.31.24.149"}
++ - {id: "2", ip: "172.31.19.49"}
++ - {id: "3", ip: "172.31.25.80"}
++#exhibitor_version: 1.5.5
++#exhibitor_install_dir: /opt/exhibitor
http://git-wip-us.apache.org/repos/asf/airavata/blob/7071ef17/modules/cloud/ansible-playbooks/site.yml
----------------------------------------------------------------------
diff --cc modules/cloud/ansible-playbooks/site.yml
index 0000000,0000000..17258bd
new file mode 100644
--- /dev/null
+++ b/modules/cloud/ansible-playbooks/site.yml
@@@ -1,0 -1,0 +1,19 @@@
++---
++- hosts: localhost
++ tags: ec2
++ roles:
++ - ec2
++
++- hosts: mesos-master
++ tags: mesos, mesos-master
++ roles:
++ - java
++ - zookeeper
++ - mesos-master
++
++- hosts: mesos-slave
++ tags: mesos, mesos-slave
++ roles:
++ - mesos-slave
++
++...
[47/50] [abbrv] airavata git commit: WIP in gov registry
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
index 587891d..93059c4 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
@@ -42,12 +42,13 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ENTITY_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)7);
- private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)9);
- 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)10);
+ private static final org.apache.thrift.protocol.TField PARENT_ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentEntityId", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)8);
+ private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)9);
+ 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)10);
+ 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)11);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -59,6 +60,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
public String domainId; // optional
public String entityTypeId; // optional
public String ownerId; // optional
+ public String parentEntityId; // optional
public String name; // optional
public String description; // optional
public Map<String,String> metadata; // optional
@@ -72,12 +74,13 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
DOMAIN_ID((short)2, "domainId"),
ENTITY_TYPE_ID((short)3, "entityTypeId"),
OWNER_ID((short)4, "ownerId"),
- NAME((short)5, "name"),
- DESCRIPTION((short)6, "description"),
- METADATA((short)7, "metadata"),
- FULL_TEXT((short)8, "fullText"),
- CREATED_TIME((short)9, "createdTime"),
- UPDATED_TIME((short)10, "updatedTime");
+ PARENT_ENTITY_ID((short)5, "parentEntityId"),
+ NAME((short)6, "name"),
+ DESCRIPTION((short)7, "description"),
+ METADATA((short)8, "metadata"),
+ FULL_TEXT((short)9, "fullText"),
+ CREATED_TIME((short)10, "createdTime"),
+ UPDATED_TIME((short)11, "updatedTime");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -100,17 +103,19 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
return ENTITY_TYPE_ID;
case 4: // OWNER_ID
return OWNER_ID;
- case 5: // NAME
+ case 5: // PARENT_ENTITY_ID
+ return PARENT_ENTITY_ID;
+ case 6: // NAME
return NAME;
- case 6: // DESCRIPTION
+ case 7: // DESCRIPTION
return DESCRIPTION;
- case 7: // METADATA
+ case 8: // METADATA
return METADATA;
- case 8: // FULL_TEXT
+ case 9: // FULL_TEXT
return FULL_TEXT;
- case 9: // CREATED_TIME
+ case 10: // CREATED_TIME
return CREATED_TIME;
- case 10: // UPDATED_TIME
+ case 11: // UPDATED_TIME
return UPDATED_TIME;
default:
return null;
@@ -155,7 +160,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._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.ENTITY_ID,_Fields.DOMAIN_ID,_Fields.ENTITY_TYPE_ID,_Fields.OWNER_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.METADATA,_Fields.FULL_TEXT,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
+ private static final _Fields optionals[] = {_Fields.ENTITY_ID,_Fields.DOMAIN_ID,_Fields.ENTITY_TYPE_ID,_Fields.OWNER_ID,_Fields.PARENT_ENTITY_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.METADATA,_Fields.FULL_TEXT,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -167,6 +172,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PARENT_ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("parentEntityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -207,6 +214,9 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
if (other.isSetOwnerId()) {
this.ownerId = other.ownerId;
}
+ if (other.isSetParentEntityId()) {
+ this.parentEntityId = other.parentEntityId;
+ }
if (other.isSetName()) {
this.name = other.name;
}
@@ -235,6 +245,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
this.domainId = null;
this.entityTypeId = null;
this.ownerId = null;
+ this.parentEntityId = null;
this.name = null;
this.description = null;
this.metadata = null;
@@ -341,6 +352,30 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
}
}
+ public String getParentEntityId() {
+ return this.parentEntityId;
+ }
+
+ public Entity setParentEntityId(String parentEntityId) {
+ this.parentEntityId = parentEntityId;
+ return this;
+ }
+
+ public void unsetParentEntityId() {
+ this.parentEntityId = null;
+ }
+
+ /** Returns true if field parentEntityId is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentEntityId() {
+ return this.parentEntityId != null;
+ }
+
+ public void setParentEntityIdIsSet(boolean value) {
+ if (!value) {
+ this.parentEntityId = null;
+ }
+ }
+
public String getName() {
return this.name;
}
@@ -528,6 +563,14 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
}
break;
+ case PARENT_ENTITY_ID:
+ if (value == null) {
+ unsetParentEntityId();
+ } else {
+ setParentEntityId((String)value);
+ }
+ break;
+
case NAME:
if (value == null) {
unsetName();
@@ -593,6 +636,9 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
case OWNER_ID:
return getOwnerId();
+ case PARENT_ENTITY_ID:
+ return getParentEntityId();
+
case NAME:
return getName();
@@ -630,6 +676,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
return isSetEntityTypeId();
case OWNER_ID:
return isSetOwnerId();
+ case PARENT_ENTITY_ID:
+ return isSetParentEntityId();
case NAME:
return isSetName();
case DESCRIPTION:
@@ -695,6 +743,15 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
return false;
}
+ boolean this_present_parentEntityId = true && this.isSetParentEntityId();
+ boolean that_present_parentEntityId = true && that.isSetParentEntityId();
+ if (this_present_parentEntityId || that_present_parentEntityId) {
+ if (!(this_present_parentEntityId && that_present_parentEntityId))
+ return false;
+ if (!this.parentEntityId.equals(that.parentEntityId))
+ return false;
+ }
+
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
@@ -776,6 +833,11 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
if (present_ownerId)
list.add(ownerId);
+ boolean present_parentEntityId = true && (isSetParentEntityId());
+ list.add(present_parentEntityId);
+ if (present_parentEntityId)
+ list.add(parentEntityId);
+
boolean present_name = true && (isSetName());
list.add(present_name);
if (present_name)
@@ -857,6 +919,16 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetParentEntityId()).compareTo(other.isSetParentEntityId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParentEntityId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentEntityId, other.parentEntityId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
@@ -976,6 +1048,16 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
}
first = false;
}
+ if (isSetParentEntityId()) {
+ if (!first) sb.append(", ");
+ sb.append("parentEntityId:");
+ if (this.parentEntityId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parentEntityId);
+ }
+ first = false;
+ }
if (isSetName()) {
if (!first) sb.append(", ");
sb.append("name:");
@@ -1105,7 +1187,15 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 5: // NAME
+ case 5: // PARENT_ENTITY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parentEntityId = iprot.readString();
+ struct.setParentEntityIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
@@ -1113,7 +1203,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 6: // DESCRIPTION
+ case 7: // DESCRIPTION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.description = iprot.readString();
struct.setDescriptionIsSet(true);
@@ -1121,7 +1211,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 7: // METADATA
+ case 8: // METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
@@ -1141,7 +1231,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 8: // FULL_TEXT
+ case 9: // FULL_TEXT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.fullText = iprot.readString();
struct.setFullTextIsSet(true);
@@ -1149,7 +1239,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 9: // CREATED_TIME
+ case 10: // CREATED_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.createdTime = iprot.readI64();
struct.setCreatedTimeIsSet(true);
@@ -1157,7 +1247,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 10: // UPDATED_TIME
+ case 11: // UPDATED_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.updatedTime = iprot.readI64();
struct.setUpdatedTimeIsSet(true);
@@ -1208,6 +1298,13 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
oprot.writeFieldEnd();
}
}
+ if (struct.parentEntityId != null) {
+ if (struct.isSetParentEntityId()) {
+ oprot.writeFieldBegin(PARENT_ENTITY_ID_FIELD_DESC);
+ oprot.writeString(struct.parentEntityId);
+ oprot.writeFieldEnd();
+ }
+ }
if (struct.name != null) {
if (struct.isSetName()) {
oprot.writeFieldBegin(NAME_FIELD_DESC);
@@ -1284,25 +1381,28 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
if (struct.isSetOwnerId()) {
optionals.set(3);
}
- if (struct.isSetName()) {
+ if (struct.isSetParentEntityId()) {
optionals.set(4);
}
- if (struct.isSetDescription()) {
+ if (struct.isSetName()) {
optionals.set(5);
}
- if (struct.isSetMetadata()) {
+ if (struct.isSetDescription()) {
optionals.set(6);
}
- if (struct.isSetFullText()) {
+ if (struct.isSetMetadata()) {
optionals.set(7);
}
- if (struct.isSetCreatedTime()) {
+ if (struct.isSetFullText()) {
optionals.set(8);
}
- if (struct.isSetUpdatedTime()) {
+ if (struct.isSetCreatedTime()) {
optionals.set(9);
}
- oprot.writeBitSet(optionals, 10);
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(10);
+ }
+ oprot.writeBitSet(optionals, 11);
if (struct.isSetEntityId()) {
oprot.writeString(struct.entityId);
}
@@ -1315,6 +1415,9 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
if (struct.isSetOwnerId()) {
oprot.writeString(struct.ownerId);
}
+ if (struct.isSetParentEntityId()) {
+ oprot.writeString(struct.parentEntityId);
+ }
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
@@ -1345,7 +1448,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(10);
+ BitSet incoming = iprot.readBitSet(11);
if (incoming.get(0)) {
struct.entityId = iprot.readString();
struct.setEntityIdIsSet(true);
@@ -1363,14 +1466,18 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
struct.setOwnerIdIsSet(true);
}
if (incoming.get(4)) {
+ struct.parentEntityId = iprot.readString();
+ struct.setParentEntityIdIsSet(true);
+ }
+ if (incoming.get(5)) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
}
- if (incoming.get(5)) {
+ if (incoming.get(6)) {
struct.description = iprot.readString();
struct.setDescriptionIsSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(7)) {
{
org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.metadata = new HashMap<String,String>(2*_map6.size);
@@ -1385,15 +1492,15 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
}
struct.setMetadataIsSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(8)) {
struct.fullText = iprot.readString();
struct.setFullTextIsSet(true);
}
- if (incoming.get(8)) {
+ if (incoming.get(9)) {
struct.createdTime = iprot.readI64();
struct.setCreatedTimeIsSet(true);
}
- if (incoming.get(9)) {
+ if (incoming.get(10)) {
struct.updatedTime = iprot.readI64();
struct.setUpdatedTimeIsSet(true);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/thrift_models/gov_reg_models.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_reg_models.thrift b/airavata-gov-registry/thrift_models/gov_reg_models.thrift
index ef4acb9..ad081ae 100644
--- a/airavata-gov-registry/thrift_models/gov_reg_models.thrift
+++ b/airavata-gov-registry/thrift_models/gov_reg_models.thrift
@@ -70,12 +70,13 @@ struct Entity {
2: optional string domainId,
3: optional string entityTypeId,
4: optional string ownerId,
- 5: optional string name,
- 6: optional string description,
- 7: optional map<string,string> metadata,
- 8: optional string fullText,
- 9: optional i64 createdTime,
- 10: optional i64 updatedTime
+ 5: optional string parentEntityId,
+ 6: optional string name,
+ 7: optional string description,
+ 8: optional map<string,string> metadata,
+ 9: optional string fullText,
+ 10: optional i64 createdTime,
+ 11: optional i64 updatedTime
}
struct PermissionType {
[18/50] [abbrv] airavata git commit: changing document root
Posted by sc...@apache.org.
changing document root
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/59142dd7
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/59142dd7
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/59142dd7
Branch: refs/heads/airavata-gov-registry
Commit: 59142dd7d878f2cced3647ba89b24879f578f005
Parents: b7a7920
Author: scnakandala <su...@gmail.com>
Authored: Tue Sep 27 15:08:14 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Tue Sep 27 15:08:14 2016 -0400
----------------------------------------------------------------------
dev-tools/ansible/roles/pga/templates/httpd.conf.j2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/59142dd7/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
----------------------------------------------------------------------
diff --git a/dev-tools/ansible/roles/pga/templates/httpd.conf.j2 b/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
index 37c05e2..febb204 100644
--- a/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
+++ b/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
@@ -116,7 +116,7 @@ ServerAdmin root@localhost
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
-DocumentRoot "/var/www/html"
+DocumentRoot "/var/www/html/php-gateway/public"
#
# Relax access to content within /var/www.
[09/50] [abbrv] airavata git commit: fixing sharing issue
Posted by sc...@apache.org.
fixing sharing issue
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/c0846835
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/c0846835
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/c0846835
Branch: refs/heads/airavata-gov-registry
Commit: c084683579ee27290db8a9b67051ea11726e2335
Parents: f3b8e02
Author: scnakandala <su...@gmail.com>
Authored: Wed Sep 21 22:07:20 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Sep 21 22:07:20 2016 -0400
----------------------------------------------------------------------
.../airavata/api/server/handler/AiravataServerHandler.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/c0846835/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 74c4eb3..5ccf874 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -499,12 +499,16 @@ public class AiravataServerHandler implements Airavata.Iface {
try {
String projectId = getRegistryServiceClient().createProject(gatewayId, project);
- GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
Resource projResource = new Resource(projectId, org.apache.airavata.grouper.resource.ResourceType.PROJECT);
projResource.setOwnerId(project.getOwner() + "@" + project.getGatewayId());
projResource.setName(project.getName());
projResource.setDescription(project.getDescription());
- groupManager.createResource(projResource);
+
+ if(ServerSettings.isEnableSharing()){
+ GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
+ groupManager.createResource(projResource);
+ }
+
logger.debug("Airavata created project with project Id : " + projectId + " for gateway Id : " + gatewayId);
return projectId;
} catch (Exception e) {
[12/50] [abbrv] airavata git commit: fixing gateway intialization
issue
Posted by sc...@apache.org.
fixing gateway intialization issue
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/43b3757d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/43b3757d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/43b3757d
Branch: refs/heads/airavata-gov-registry
Commit: 43b3757d6c1b759a47603189e0ac0ad97339fd8b
Parents: 83a0bf8
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 22 13:20:55 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 22 13:20:55 2016 -0400
----------------------------------------------------------------------
.../core/experiment/catalog/impl/ExperimentCatalogImpl.java | 3 ---
.../core/experiment/catalog/resources/GatewayResource.java | 4 ----
.../registry/api/service/util/ExperimentCatalogInitUtil.java | 2 ++
3 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
index 53bd52b..5264158 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
@@ -38,7 +38,6 @@ import org.apache.airavata.model.status.ProcessStatus;
import org.apache.airavata.model.status.TaskStatus;
import org.apache.airavata.model.task.TaskModel;
import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.model.workspace.GatewayApprovalStatus;
import org.apache.airavata.model.workspace.Notification;
import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
@@ -66,7 +65,6 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
if (!ExpCatResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
gatewayResource = (GatewayResource) ExpCatResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
gatewayResource.setGatewayName(ServerSettings.getDefaultUserGateway());
- gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
gatewayResource.save();
}else {
gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
@@ -92,7 +90,6 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
if (!ExpCatResourceUtils.isGatewayExist(gateway)){
gatewayResource = (GatewayResource) ExpCatResourceUtils.createGateway(gateway);
gatewayResource.setGatewayName(gateway);
- gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
gatewayResource.save();
}else {
gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(gateway);
http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
index c745f4e..646594e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
@@ -20,7 +20,6 @@
*/
package org.apache.airavata.registry.core.experiment.catalog.resources;
-import org.apache.airavata.model.workspace.GatewayApprovalStatus;
import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -462,9 +461,6 @@ public class GatewayResource extends AbstractExpCatResource {
Gateway existingGateway = em.find(Gateway.class, gatewayId);
em.close();
- if(gatewayApprovalStatus == null || gatewayApprovalStatus.isEmpty())
- gatewayApprovalStatus = GatewayApprovalStatus.APPROVED.toString();
-
em = ExpCatResourceUtils.getEntityManager();
em.getTransaction().begin();
Gateway gateway = new Gateway();
http://git-wip-us.apache.org/repos/asf/airavata/blob/43b3757d/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
index 1ae5448..6f9fdb4 100644
--- a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
+++ b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/util/ExperimentCatalogInitUtil.java
@@ -23,6 +23,7 @@ package org.apache.airavata.registry.api.service.util;
import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
import org.apache.airavata.registry.core.experiment.catalog.resources.GatewayResource;
@@ -87,6 +88,7 @@ public class ExperimentCatalogInitUtil {
GatewayResource gateway;
if (!ExpCatResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
gateway = (GatewayResource)ExpCatResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
+ gateway.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
gateway.save();
}else {
gateway = (GatewayResource)ExpCatResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
[40/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/pom.xml b/airavata-gov-registry/airavata-sharing-registry-core/pom.xml
new file mode 100644
index 0000000..84ca5ff
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>gov-registry</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <relativePath>../pom.xml</relativePath>
+ <version>${global.version}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>airavata-gov-registry-core</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>0.9.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-gov-registry-stubs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-commons</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.dozer</groupId>
+ <artifactId>dozer</artifactId>
+ <version>5.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-all</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.34</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>2.2.0</version>
+ <configuration>
+ <includes>**/entities/*.class</includes>
+ <excludes>**/entities/XML*.class</excludes>
+ <addDefaultConstructor>true</addDefaultConstructor>
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>enhancer</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
new file mode 100644
index 0000000..0de9d62
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
@@ -0,0 +1,113 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "DOMAIN", schema = "" )
+public class DomainEntity {
+ private final static Logger logger = LoggerFactory.getLogger(DomainEntity.class);
+ private String domainId;
+ private String name;
+ private String description;
+ private String createdTime;
+ private String updatedTime;
+
+ @Id
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ DomainEntity that = (DomainEntity) o;
+
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = domainId != null ? domainId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
new file mode 100644
index 0000000..e472790
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
@@ -0,0 +1,186 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.util.Arrays;
+
+@Entity
+@Table(name = "ENTITY", schema = "")
+public class EntityEntity {
+ private final static Logger logger = LoggerFactory.getLogger(EntityEntity.class);
+ private String entityId;
+ private String domainId;
+ private String parentEntityId;
+ private String name;
+ private String description;
+ private byte[] metadata;
+ private String fullText;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+ private EntityEntity entityByParentEntityId;
+
+ @Id
+ @Column(name = "ENTITY_ID")
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "PARENT_ENTITY_ID")
+ public String getParentEntityId() {
+ return parentEntityId;
+ }
+
+ public void setParentEntityId(String parentEntityId) {
+ this.parentEntityId = parentEntityId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "METADATA")
+ public byte[] getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(byte[] metadata) {
+ this.metadata = metadata;
+ }
+
+ @Basic
+ @Column(name = "FULL_TEXT")
+ public String getFullText() {
+ return fullText;
+ }
+
+ public void setFullText(String fullText) {
+ this.fullText = fullText;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EntityEntity that = (EntityEntity) o;
+
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (parentEntityId != null ? !parentEntityId.equals(that.parentEntityId) : that.parentEntityId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (!Arrays.equals(metadata, that.metadata)) return false;
+ if (fullText != null ? !fullText.equals(that.fullText) : that.fullText != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = entityId != null ? entityId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (metadata != null ? Arrays.hashCode(metadata) : 0);
+ result = 31 * result + (fullText != null ? fullText.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "PARENT_ENTITY_ID", referencedColumnName = "ENTITY_ID")
+ public EntityEntity getEntityByParentEntityId() {
+ return entityByParentEntityId;
+ }
+
+ public void setEntityByParentEntityId(EntityEntity entityByParentEntityId) {
+ this.entityByParentEntityId = entityByParentEntityId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
new file mode 100644
index 0000000..63c5e2f
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
@@ -0,0 +1,136 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "ENTITY_TYPE", schema = "")
+public class EntityTypeEntity {
+ private final static Logger logger = LoggerFactory.getLogger(EntityTypeEntity.class);
+ private String entityTypeId;
+ private String domainId;
+ private String name;
+ private String description;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "ENTITY_TYPE_ID")
+ public String getEntityTypeId() {
+ return entityTypeId;
+ }
+
+ public void setEntityTypeId(String entityTypeId) {
+ this.entityTypeId = entityTypeId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EntityTypeEntity that = (EntityTypeEntity) o;
+
+ if (entityTypeId != null ? !entityTypeId.equals(that.entityTypeId) : that.entityTypeId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = entityTypeId != null ? entityTypeId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
new file mode 100644
index 0000000..8fd9329
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
@@ -0,0 +1,88 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "GROUP_MEMBERSHIP", schema = "")
+@IdClass(GroupMembershipEntityPK.class)
+public class GroupMembershipEntity {
+ private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntity.class);
+ private String parentId;
+ private String childId;
+ private String childType;
+
+ @Id
+ @Column(name = "PARENT_ID")
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ @Id
+ @Column(name = "CHILD_ID")
+ public String getChildId() {
+ return childId;
+ }
+
+ public void setChildId(String childId) {
+ this.childId = childId;
+ }
+
+ @Basic
+ @Column(name = "CHILD_TYPE")
+ public String getChildType() {
+ return childType;
+ }
+
+ public void setChildType(String childType) {
+ this.childType = childType;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ GroupMembershipEntity that = (GroupMembershipEntity) o;
+
+ if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
+ if (childId != null ? !childId.equals(that.childId) : that.childId != null) return false;
+ if (childType != null ? !childType.equals(that.childType) : that.childType != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = parentId != null ? parentId.hashCode() : 0;
+ result = 31 * result + (childId != null ? childId.hashCode() : 0);
+ result = 31 * result + (childType != null ? childType.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
new file mode 100644
index 0000000..2dfbefb
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class GroupMembershipEntityPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntityPK.class);
+ private String parentId;
+ private String childId;
+
+ @Column(name = "PARENT_ID")
+ @Id
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ @Column(name = "CHILD_ID")
+ @Id
+ public String getChildId() {
+ return childId;
+ }
+
+ public void setChildId(String childId) {
+ this.childId = childId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ GroupMembershipEntityPK that = (GroupMembershipEntityPK) o;
+
+ if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
+ if (childId != null ? !childId.equals(that.childId) : that.childId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = parentId != null ? parentId.hashCode() : 0;
+ result = 31 * result + (childId != null ? childId.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
new file mode 100644
index 0000000..ecc37b6
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
@@ -0,0 +1,124 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "PERMISSION_TYPE", schema = "")
+public class PermissionTypeEntity {
+ private final static Logger logger = LoggerFactory.getLogger(PermissionTypeEntity.class);
+ private String permissionTypeId;
+ private String domainId;
+ private String name;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "PERMISSION_TYPE_ID")
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ PermissionTypeEntity that = (PermissionTypeEntity) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
new file mode 100644
index 0000000..e9b949d
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
@@ -0,0 +1,111 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "SHARING", schema = "")
+@IdClass(SharingEntityPK.class)
+public class SharingEntity {
+ private final static Logger logger = LoggerFactory.getLogger(SharingEntity.class);
+ private String permissionTypeId;
+ private String entityId;
+ private String groupId;
+ private PermissionTypeEntity permissionTypeByPermissionTypeId;
+ private EntityTypeEntity entityTypeByEntityTypeId;
+
+ @Id
+ @Column(name = "PERMISSION_TYPE_ID")
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Id
+ @Column(name = "ENTITY_ID")
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Id
+ @Column(name = "GROUP_ID")
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ SharingEntity that = (SharingEntity) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
+ result = 31 * result + (groupId != null ? groupId.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "PERMISSION_TYPE_ID", referencedColumnName = "PERMISSION_TYPE_ID", nullable = false)
+ public PermissionTypeEntity getPermissionTypeByPermissionTypeId() {
+ return permissionTypeByPermissionTypeId;
+ }
+
+ public void setPermissionTypeByPermissionTypeId(PermissionTypeEntity permissionTypeByPermissionTypeId) {
+ this.permissionTypeByPermissionTypeId = permissionTypeByPermissionTypeId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "ENTITY_TYPE_ID", referencedColumnName = "ENTITY_TYPE_ID")
+ public EntityTypeEntity getEntityTypeByEntityTypeId() {
+ return entityTypeByEntityTypeId;
+ }
+
+ public void setEntityTypeByEntityTypeId(EntityTypeEntity entityTypeByEntityTypeId) {
+ this.entityTypeByEntityTypeId = entityTypeByEntityTypeId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
new file mode 100644
index 0000000..8274904
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
@@ -0,0 +1,88 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class SharingEntityPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(SharingEntityPK.class);
+ private String permissionTypeId;
+ private String entityId;
+ private String groupId;
+
+ @Column(name = "PERMISSION_TYPE_ID")
+ @Id
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Column(name = "ENTITY_ID")
+ @Id
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Column(name = "GROUP_ID")
+ @Id
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ SharingEntityPK that = (SharingEntityPK) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
+ result = 31 * result + (groupId != null ? groupId.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
new file mode 100644
index 0000000..7201651
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
@@ -0,0 +1,123 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "USER", schema = "")
+public class UserEntity {
+ private final static Logger logger = LoggerFactory.getLogger(UserEntity.class);
+ private String userId;
+ private String domainId;
+ private String userName;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "USER_ID")
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "USER_NAME")
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ UserEntity that = (UserEntity) o;
+
+ if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = userId != null ? userId.hashCode() : 0;
+ result = 31 * result + (userName != null ? userName.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
new file mode 100644
index 0000000..aacf263
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
@@ -0,0 +1,172 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "USER_GROUP", schema = "")
+public class UserGroupEntity {
+ private final static Logger logger = LoggerFactory.getLogger(UserGroupEntity.class);
+ private String groupId;
+ private String domainId;
+ private String name;
+ private String description;
+ private String ownerId;
+ private String type;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+ private UserEntity userByOwnerId;
+
+ @Id
+ @Column(name = "GROUP_ID")
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "OWNER_ID")
+ public String getOwnerId() {
+ return ownerId;
+ }
+
+ public void setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "TYPE")
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ UserGroupEntity that = (UserGroupEntity) o;
+
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (ownerId != null ? !ownerId.equals(that.ownerId) : that.ownerId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (type != null ? !type.equals(that.type) : that.type != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = groupId != null ? groupId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (type != null ? type.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "OWNER_ID", referencedColumnName = "USER_ID")
+ public UserEntity getUserByOwnerId() {
+ return userByOwnerId;
+ }
+
+ public void setUserByOwnerId(UserEntity userByOwnerId) {
+ this.userByOwnerId = userByOwnerId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
new file mode 100644
index 0000000..b78060c
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
@@ -0,0 +1,85 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.repositories;
+
+import org.apache.airavata.gov.registry.db.utils.JPAUtils;
+import org.apache.airavata.gov.registry.db.utils.ObjectMapperSingleton;
+import org.apache.airavata.gov.registry.db.utils.QueryGenerator;
+import org.apache.airavata.gov.registry.models.GovRegistryException;
+import org.dozer.Mapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public abstract class AbstractRepository<T, E, Id> {
+ private final static Logger logger = LoggerFactory.getLogger(AbstractRepository.class);
+
+ private Class<T> thriftGenericClass;
+ private Class<E> dbEntityGenericClass;
+ private QueryGenerator queryGenerator;
+
+ public AbstractRepository(Class<T> thriftGenericClass, Class<E> dbEntityGenericClass){
+ this.thriftGenericClass = thriftGenericClass;
+ this.dbEntityGenericClass = dbEntityGenericClass;
+ this.queryGenerator = new QueryGenerator(dbEntityGenericClass.getSimpleName());
+ }
+
+ public T create(T t) throws GovRegistryException {
+ return update(t);
+ }
+
+ public T update(T t) throws GovRegistryException {
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ E entity = mapper.map(t, dbEntityGenericClass);
+ E persistedCopy = JPAUtils.execute(entityManager -> entityManager.merge(entity));
+ return mapper.map(persistedCopy, thriftGenericClass);
+ }
+
+ public boolean delete(Id id) throws GovRegistryException {
+ JPAUtils.execute(entityManager -> {
+ E entity = entityManager.find(dbEntityGenericClass, id);
+ entityManager.remove(entity);
+ return entity;
+ });
+ return true;
+ }
+
+ public T get(Id id) throws GovRegistryException {
+ E entity = JPAUtils.execute(entityManager -> entityManager
+ .find(dbEntityGenericClass, id));
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ return mapper.map(entity, thriftGenericClass);
+ }
+
+ public List<T> select(Map<String, String> filters, int offset, int limit) throws GovRegistryException {
+ String queryString = queryGenerator.getSelectQuery(filters);
+
+ List resultSet = JPAUtils.execute(entityManager -> entityManager.createQuery(queryString).setFirstResult(offset)
+ .setMaxResults(limit).getResultList());
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ List<T> gatewayList = new ArrayList<>();
+ resultSet.stream().forEach(rs -> gatewayList.add(mapper.map(rs, thriftGenericClass)));
+ return gatewayList;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
new file mode 100644
index 0000000..5442c58
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.repositories;
+
+import org.apache.airavata.gov.registry.db.entities.DomainEntity;
+import org.apache.airavata.gov.registry.models.Domain;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DomainRepository extends AbstractRepository<Domain, DomainEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(DomainRepository.class);
+
+ public DomainRepository(Class<Domain> thriftGenericClass, Class<DomainEntity> dbEntityGenericClass) {
+ super(thriftGenericClass, dbEntityGenericClass);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
new file mode 100644
index 0000000..c1a8bae
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.repositories;
+
+import org.apache.airavata.gov.registry.db.entities.UserGroupEntity;
+import org.apache.airavata.gov.registry.models.UserGroup;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroupEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(UserGroupRepository.class);
+
+ public UserGroupRepository(Class<UserGroup> thriftGenericClass, Class<UserGroupEntity> dbEntityGenericClass) {
+ super(thriftGenericClass, dbEntityGenericClass);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
new file mode 100644
index 0000000..44af810
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.repositories;
+
+import org.apache.airavata.gov.registry.db.entities.UserEntity;
+import org.apache.airavata.gov.registry.models.User;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserRepository extends AbstractRepository<User, UserEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(UserRepository.class);
+
+ public UserRepository(Class<User> thriftGenericClass, Class<UserEntity> dbEntityGenericClass) {
+ super(thriftGenericClass, dbEntityGenericClass);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
new file mode 100644
index 0000000..ae9feda
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
@@ -0,0 +1,27 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+@FunctionalInterface
+public interface Committer<T, R> {
+
+ R commit(T t);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
new file mode 100644
index 0000000..6045806
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DBConstants {
+ private final static Logger logger = LoggerFactory.getLogger(DBConstants.class);
+
+ public static class DomainTable {
+ public static String DOMAIN_ID = "domainId";
+ public static String NAME = "name";
+ public static String DESCRIPTION = "description";
+ }
+
+ public static class UserTable {
+ public static String USER_ID = "userId";
+ public static String DOMAIN_ID = "domainId";
+ public static String USER_NAME = "userName";
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
new file mode 100644
index 0000000..6e8d11c
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
@@ -0,0 +1,111 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gov.registry.models.GovRegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.util.HashMap;
+import java.util.Map;
+
+public class JPAUtils {
+ private final static Logger logger = LoggerFactory.getLogger(JPAUtils.class);
+
+ private static final String PERSISTENCE_UNIT_NAME = "airavata-gov-registry";
+ private static final String GOV_REG_JDBC_DRIVER = "appcatalog.jdbc.driver";
+ private static final String GOV_REG_JDBC_URL = "appcatalog.jdbc.url";
+ private static final String GOV_REG_JDBC_USER = "appcatalog.jdbc.user";
+ private static final String GOV_REG_JDBC_PWD = "appcatalog.jdbc.password";
+ private static final String GOV_REG_VALIDATION_QUERY = "appcatalog.validationQuery";
+ private static final String JPA_CACHE_SIZE = "jpa.cache.size";
+ private static final String JPA_CACHE_ENABLED = "cache.enable";
+
+ @PersistenceUnit(unitName = PERSISTENCE_UNIT_NAME)
+ protected static EntityManagerFactory factory;
+ @PersistenceContext(unitName = PERSISTENCE_UNIT_NAME)
+ private static EntityManager entityManager;
+
+ public static EntityManager getEntityManager() {
+ if (factory == null) {
+// String connectionProperties = "DriverClassName=" + readServerProperties(GOV_REG_JDBC_DRIVER) + "," +
+// "Url=" + readServerProperties(GOV_REG_JDBC_URL) + "?autoReconnect=true," +
+// "Username=" + readServerProperties(GOV_REG_JDBC_USER) + "," +
+// "Password=" + readServerProperties(GOV_REG_JDBC_PWD) +
+// ",validationQuery=" + readServerProperties(GOV_REG_VALIDATION_QUERY);
+//
+
+ String connectionProperties = "DriverClassName=com.mysql.jdbc.Driver," +
+ "Url=jdbc:mysql://localhost:3306/airavata_gov_registry?autoReconnect=true," +
+ "Username=root," +
+ "Password=," +
+ ",validationQuery=SELECT 1 FROM CONFIGURATION";
+
+ Map<String, String> properties = new HashMap<String, String>();
+ properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
+ properties.put("openjpa.ConnectionProperties", connectionProperties);
+ properties.put("openjpa.DynamicEnhancementAgent", "true");
+ properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
+ // For app catalog, we don't need caching
+// properties.put("openjpa.DataCache","" + readServerProperties(JPA_CACHE_ENABLED) + "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
+// properties.put("openjpa.QueryCache","" + readServerProperties(JPA_CACHE_ENABLED) + "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
+ properties.put("openjpa.RemoteCommitProvider", "sjvm");
+ properties.put("openjpa.Log", "DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
+ properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
+ properties.put("openjpa.jdbc.QuerySQLCache", "false");
+ properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
+ " PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000, autoReconnect=true");
+ properties.put("openjpa.RuntimeUnenhancedClasses", "warn");
+ factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
+ }
+ entityManager = factory.createEntityManager();
+ return entityManager;
+ }
+
+ private static String readServerProperties(String propertyName) throws GovRegistryException {
+ try {
+ return ServerSettings.getSetting(propertyName);
+ } catch (ApplicationSettingsException e) {
+ logger.error("Unable to read airavata-server.properties...", e);
+ throw new GovRegistryException("Unable to read airavata-server.properties...");
+ }
+ }
+
+ public static <R> R execute(Committer<EntityManager, R> committer) throws GovRegistryException {
+ EntityManager entityManager = JPAUtils.getEntityManager();
+ try {
+ entityManager.getTransaction().begin();
+ R r = committer.commit(entityManager);
+ entityManager.getTransaction().commit();
+ return r;
+ }finally {
+ if (entityManager != null && entityManager.isOpen()) {
+ if (entityManager.getTransaction().isActive()) {
+ entityManager.getTransaction().rollback();
+ }
+ entityManager.close();
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
new file mode 100644
index 0000000..d6c4d4d
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
@@ -0,0 +1,39 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+import org.dozer.DozerBeanMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ObjectMapperSingleton extends DozerBeanMapper{
+ private final static Logger logger = LoggerFactory.getLogger(ObjectMapperSingleton.class);
+
+ private static ObjectMapperSingleton instance;
+
+ private ObjectMapperSingleton(){}
+
+ public static ObjectMapperSingleton getInstance(){
+ if(instance == null)
+ instance = new ObjectMapperSingleton();
+ return instance;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
new file mode 100644
index 0000000..2844a4a
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
@@ -0,0 +1,53 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+
+public class QueryGenerator {
+ private final static Logger logger = LoggerFactory.getLogger(QueryGenerator.class);
+
+ private String tableName;
+
+
+ public QueryGenerator(String tableName){
+ this.tableName = tableName;
+ }
+
+ public String getSelectQuery(Map<String, String> filters){
+ String query = "SELECT p from " + tableName + " as p WHERE ";
+ if(filters == null || filters.size() == 0){
+ query += "1";
+ }else{
+ for(String k : filters.keySet()){
+ query += "p." + k + " LIKE '%" + filters.get(k) + "%' AND ";
+ }
+ query = query.substring(0, query.length()-5);
+ }
+
+ query += " ORDER BY p.createdTime DESC";
+
+ return query;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
new file mode 100644
index 0000000..276c99e
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GovRegistryServer {
+ private final static Logger logger = LoggerFactory.getLogger(GovRegistryServer.class);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
new file mode 100644
index 0000000..57d9093
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
@@ -0,0 +1,223 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.server;
+
+import org.apache.airavata.gov.registry.models.*;
+import org.apache.airavata.gov.registry.service.cpi.GovRegistryService;
+import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+
+public class GovRegistryServerHandler implements GovRegistryService.Iface{
+ private final static Logger logger = LoggerFactory.getLogger(GovRegistryServerHandler.class);
+
+ /**
+ * * Domain Operations
+ * *
+ */
+ @Override
+ public boolean createDomain(Domain domain) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateDomain(Domain domain) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteDomain(String domainId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Domain getDomain(String domainId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Domain> getDomains(int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * User Operations
+ * *
+ */
+ @Override
+ public boolean registerUser(User user) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updatedUser(User user) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteUser(String userId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public User getUser(String userId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<User> getUsers(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * Group Operations
+ * *
+ */
+ @Override
+ public boolean createGroup(Group group) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateGroup(Group group) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteGroup(String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Group getGroup(String groupId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Group> getGroups(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ @Override
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Map<String, GroupType> getGroupMembers(String groupId) throws TException {
+ return null;
+ }
+
+ /**
+ * * EntityType Operations
+ * *
+ */
+ @Override
+ public boolean createEntityType(EntityType entityType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateEntityType(EntityType entityType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteEntityType(String entityTypeId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public EntityType getEntityType(String entityTypeId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<EntityType> getEntityTypes(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * Entity Operations
+ * *
+ */
+ @Override
+ public boolean registerEntity(Entity entity) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateEntity(Entity entity) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteEntity(String entityId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Entity getEntity(String entityId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Entity> searchEntities(String domain, String entityType, Map<String, String> filters, int offset, int limit) throws GovRegistryException, TException {
+ return null;
+ }
+
+ /**
+ * * EntityType Operations
+ * *
+ */
+ @Override
+ public boolean createPermissionType(PermissionType permisionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updatePermissionType(PermissionType permisionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deletePermissionType(String entityTypeId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public PermissionType getPermissionType(String permisionTypeId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<PermissionType> getPermissionTypes(String domain, int offset, int limit) throws GovRegistryException, TException {
+ return null;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/resources/META-INF/persistence.xml b/airavata-gov-registry/airavata-sharing-registry-core/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..4a89174
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
+
+ <persistence-unit name="airavata-gov-registry">
+ <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+ <class>org.apache.airavata.gov.registry.db.entities.DomainEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.EntityEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.EntityTypeEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.GroupMembershipEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.PermissionTypeEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.SharingEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.UserEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.UserGroupEntity</class>
+ </persistence-unit>
+</persistence>
[13/50] [abbrv] airavata git commit: Update configuratios
Posted by sc...@apache.org.
Update configuratios
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f513f569
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f513f569
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f513f569
Branch: refs/heads/airavata-gov-registry
Commit: f513f5693582a0cddb062264c1d91e8a7bdc48b9
Parents: 72f35c1
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Sep 23 12:07:42 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Sep 23 12:07:42 2016 -0400
----------------------------------------------------------------------
group_vars/all.yml | 3 ++-
roles/api-orch/templates/airavata-server.properties.j2 | 2 +-
roles/gfac/templates/airavata-server.properties.j2 | 2 +-
roles/pga/tasks/main.yml | 12 +++++++++---
roles/pga/vars/main.yml | 4 ++--
roles/registry/templates/airavata-server.properties.j2 | 2 +-
6 files changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index d49f583..5a159c3 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -47,7 +47,7 @@ api_server_port: "8930"
api_secured: "false"
tls_enable: "false"
api_server_tls_port: "9930"
-enable_sharing: false
+enable_sharing: "false"
# Orchestrator related variables
orchestrator_name: "orchestrator-node0"
@@ -60,6 +60,7 @@ registry_name: regserver-node0
registry_host: "{{groups['registry'][0]}}"
registry_port: 8970
registry_dir: "{{ deployment_dir }}/registry"
+default_gateway: "php_reference_gateway"
# Credential and keystore related variables
#authorization_server: "https://{{ groups['wso2is'][0]}}:9443/services/"
http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index e36b029..b8d093e 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -49,7 +49,7 @@ enable.sharing={{enable_sharing}}
default.registry.user=admin
default.registry.password=admin
default.registry.password.hash.method=SHA
-default.registry.gateway=default
+default.registry.gateway={{ default_gateway }}
###########################################################################
# Application Catalog DB Configuration
http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index e36b029..b8d093e 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -49,7 +49,7 @@ enable.sharing={{enable_sharing}}
default.registry.user=admin
default.registry.password=admin
default.registry.password.hash.method=SHA
-default.registry.gateway=default
+default.registry.gateway={{ default_gateway }}
###########################################################################
# Application Catalog DB Configuration
http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/tasks/main.yml b/roles/pga/tasks/main.yml
index 6fe1df5..b267119 100644
--- a/roles/pga/tasks/main.yml
+++ b/roles/pga/tasks/main.yml
@@ -39,19 +39,21 @@
- name: delete previous deployments
file: path="{{ doc_root_dir }}" state=absent
+
- name: Git clone php gateway
git: repo=https://github.com/apache/airavata-php-gateway.git
- dest="{{ doc_root_dir }}" version=master
+ dest="{{ doc_root_dir }}" version="{{ git_branch }}"
become: yes
- name: Create user data dir {{ user_data_dir }}
- file: path="{{ user_data_dir }}" state=directory
+ file: path="{{ user_data_dir }}" state=directory owner="{{user}}" group="{{group}}" mode=0777 recurse=yes
become: yes
#Make sure selinux is dissabled in remote machine
- name: Disable selinux
selinux: state=disabled
become: yes
+ register: selinux_disable
# need to restart after disable selinux
- name: restart machine
@@ -60,9 +62,13 @@
poll: 0
become: yes
ignore_errors: true
+ when: (selinux_disable|success) and (selinux_disable.changed == true)
+ register: restart
- name: waiting for server to come back
local_action: wait_for host={{ inventory_hostname }} state=started delay=30 timeout=60
+ when: (restart|success) and (restart.changed == true)
+
- name: Run composer update
composer: command=update working_dir="{{ doc_root_dir }}"
@@ -79,7 +85,7 @@
become: yes
- name: give write permissions to storage dir
- file: path="{{ doc_root_dir }}/app/storage" state=directory mode=0777 recurse=yes
+ file: path="{{ doc_root_dir }}/app/storage" state=directory mode=0777 owner="{{user}}" group="{{group}}" recurse=yes
become: yes
- name: Eanble https and http service on public zone
http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/vars/main.yml b/roles/pga/vars/main.yml
index 35c5122..298e897 100644
--- a/roles/pga/vars/main.yml
+++ b/roles/pga/vars/main.yml
@@ -17,10 +17,10 @@ oauth_client_secret: "vD9yi2ANkChzgWiih3RahrIcfsoa"
#airavata_server: "tls://gw77.iu.xsede.org"
airavata_server: "{{ groups['api-orch'][0] }}"
airavata_port: "8930"
-gateway_id: "default"
+gateway_id: "{{ default_gateway }}"
# relative to document root dir
experiment_data_dir: "{{ user_data_dir }}"
-gateway_data_store_resource_id: "gw75.iu.xsede.org_3e40e62b-be11-4590-bf24-b1b6796c3572"
+gateway_data_store_resource_id: "js-170-103.jetstream-cloud.org_6497a464-3121-4b64-a7cb-d195b0a26c19"
## Portal related variables
super_admin_portal: "true"
http://git-wip-us.apache.org/repos/asf/airavata/blob/f513f569/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/registry/templates/airavata-server.properties.j2 b/roles/registry/templates/airavata-server.properties.j2
index e36b029..b8d093e 100644
--- a/roles/registry/templates/airavata-server.properties.j2
+++ b/roles/registry/templates/airavata-server.properties.j2
@@ -49,7 +49,7 @@ enable.sharing={{enable_sharing}}
default.registry.user=admin
default.registry.password=admin
default.registry.password.hash.method=SHA
-default.registry.gateway=default
+default.registry.gateway={{ default_gateway }}
###########################################################################
# Application Catalog DB Configuration
[16/50] [abbrv] airavata git commit: Imported ansible-airavata repo
to airavata repo
Posted by sc...@apache.org.
Imported ansible-airavata repo to airavata repo
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/514567c8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/514567c8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/514567c8
Branch: refs/heads/airavata-gov-registry
Commit: 514567c8baeb61846c198a7b111f988bab037284
Parents: 7071ef1 f513f56
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Sep 23 21:55:35 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Sep 23 21:58:00 2016 -0400
----------------------------------------------------------------------
dev-tools/ansible/NOTE | 5 +
dev-tools/ansible/README.md | 31 +
dev-tools/ansible/group_vars/all.yml | 88 +++
dev-tools/ansible/hosts | 26 +
.../files/mysql-connector-java-5.1.37-bin.jar | Bin 0 -> 985603 bytes
.../ansible/roles/api-orch/handlers/main.yml | 14 +
dev-tools/ansible/roles/api-orch/tasks/main.yml | 71 ++
.../templates/airavata-server.properties.j2 | 281 ++++++++
.../api-orch/templates/gfac-config.yaml.j2 | 111 +++
.../ansible/roles/common/files/airavata.jks | Bin 0 -> 2289 bytes
.../ansible/roles/common/files/airavata_sym.jks | Bin 0 -> 501 bytes
dev-tools/ansible/roles/common/tasks/main.yml | 55 ++
dev-tools/ansible/roles/common/vars/main.yml | 4 +
.../ansible/roles/database/handlers/main.yml | 14 +
dev-tools/ansible/roles/database/tasks/main.yml | 60 ++
.../roles/database/tasks/secure_install.yml | 23 +
.../ansible/roles/database/templates/my.cnf.j2 | 4 +
dev-tools/ansible/roles/database/vars/main.yml | 21 +
.../ansible/roles/env_setup/tasks/main.yml | 28 +
.../ansible/roles/env_setup/tasks/redhat.yml | 12 +
.../files/mysql-connector-java-5.1.37-bin.jar | Bin 0 -> 985603 bytes
dev-tools/ansible/roles/gfac/handlers/main.yml | 8 +
dev-tools/ansible/roles/gfac/tasks/main.yml | 67 ++
.../templates/airavata-server.properties.j2 | 281 ++++++++
.../roles/gfac/templates/gfac-config.yaml.j2 | 111 +++
dev-tools/ansible/roles/java/tasks/main.yml | 21 +
dev-tools/ansible/roles/java/vars/main.yml | 15 +
dev-tools/ansible/roles/pga/handlers/main.yml | 13 +
dev-tools/ansible/roles/pga/tasks/main.yml | 112 +++
.../ansible/roles/pga/templates/httpd.conf.j2 | 353 ++++++++++
.../roles/pga/templates/pga_config.php.j2 | 248 +++++++
dev-tools/ansible/roles/pga/vars/main.yml | 30 +
.../ansible/roles/rabbitmq/handlers/main.yml | 13 +
dev-tools/ansible/roles/rabbitmq/tasks/main.yml | 60 ++
dev-tools/ansible/roles/rabbitmq/vars/main.yml | 2 +
.../files/mysql-connector-java-5.1.37-bin.jar | Bin 0 -> 985603 bytes
dev-tools/ansible/roles/registry/tasks/main.yml | 59 ++
.../templates/airavata-server.properties.j2 | 281 ++++++++
dev-tools/ansible/roles/wso2_is/tasks/main.yml | 41 ++
.../roles/wso2_is/templates/carbon.xml.j2 | 688 +++++++++++++++++++
dev-tools/ansible/roles/wso2_is/vars/main.yml | 18 +
.../ansible/roles/zookeeper/handlers/main.yml | 12 +
.../ansible/roles/zookeeper/tasks/main.yml | 34 +
.../roles/zookeeper/templates/zoo.cfg.j2 | 28 +
.../zookeeper/templates/zookeeper.service.j2 | 15 +
dev-tools/ansible/roles/zookeeper/vars/main.yml | 17 +
dev-tools/ansible/site.yml | 76 ++
47 files changed, 3451 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/NOTE
----------------------------------------------------------------------
diff --cc dev-tools/ansible/NOTE
index 0000000,0000000..b4979b5
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/NOTE
@@@ -1,0 -1,0 +1,5 @@@
++#Bind to 'hostname -f' output to access from outside.
++
++#aws
++add new tcp rule under associate security group to open ports
++disable or add firewall rule to open ports
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/README.md
----------------------------------------------------------------------
diff --cc dev-tools/ansible/README.md
index 0000000,0000000..f497fb5
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/README.md
@@@ -1,0 -1,0 +1,31 @@@
++# airavata-ansible
++
++Ansible script to deploy Apache Airavata
++
++## Support OS
++
++- Centos 7
++
++## Roles
++
++- **env_setup** :- Create user and group, install oracle java 8
++- **zookeeper** :- Download and install zookeeper.
++- **rabbitmq** :- Download and install rabbitmq as service.
++- **common** :- Checkout Airavata source from git and run maven build. Move keystore files.
++- **gfac** :- Setup Gfac deployment and Change configurations.
++- **api-orch** :- Setup Api-Orch deployment and Change configurations.
++- **pga** :- Deploy Airavata PHP Gateway._(Under development)_
++
++## Useful commands
++
++- `ansible-playbook -i hosts site.yml`
++- `ansible-playbook -i hosts site.yml -t "tags"`
++- `ansible-playbook -i hosts site.yml --start-at-task="name of the ansible task"`
++
++To deploy pga run following. see site.yml (playbook) file for other available tags.
++
++- `ansible-playbook -i hosts site.yml -t "pga"`
++
++## Configurations
++
++- Set correct private key file to `ansible_ssh_private_key_file` property in group_vars/all
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/group_vars/all.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/group_vars/all.yml
index 0000000,0000000..5a159c3
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/group_vars/all.yml
@@@ -1,0 -1,0 +1,88 @@@
++---
++ansible_connection: ssh
++# ansible_ssh_user: centos
++ansible_ssh_user: root
++ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/dev-deployment-key.pem
++# ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
++
++user: centos
++group: centos
++user_home: "/home/{{ user }}"
++
++# deployment related variables
++deployment_dir: "{{ user_home }}/dev-deployment"
++airavata_source_dir: "{{ user_home }}/source"
++airavata_dist: "apache-airavata-server-0.17-SNAPSHOT"
++airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
++git_branch: develop
++
++# Database related variables
++db_server: "{{ groups['database'][0] }}"
++db_server_port: "3306"
++db_user: "airavata"
++db_password: "airavata"
++app_catalog: "app_catalog"
++exp_catalog: "exp_catalog"
++replica_catalog: "replica_catalog"
++workflow_catalog: "wf_catalog"
++credential_store: "credential_store"
++
++mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar"
++
++# Rabbitmq related vareables
++rabbitmq_server: "{{ groups['rabbitmq'][0] }}"
++rabbitmq_vhost: "develop"
++rabbitmq_user: "airavata"
++rabbitmq_password: "airavata"
++rabbitmq_port: "5672"
++rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabbitmq_server}}:{{ rabbitmq_port }}/{{ rabbitmq_vhost }}"
++
++# Zoookeeper related variables
++zookeeper_client_port: 2181
++zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
++# API Server related variables
++api_server_name: "apiserver-node0"
++api_server_host: "{{ansible_fqdn}}"
++api_server_port: "8930"
++api_secured: "false"
++tls_enable: "false"
++api_server_tls_port: "9930"
++enable_sharing: "false"
++
++# Orchestrator related variables
++orchestrator_name: "orchestrator-node0"
++orchestrator_host: "{{ansible_fqdn}}"
++orchestrator_port: "8940"
++api_orch_dir: "{{ deployment_dir }}/api-orchestrator"
++
++# registry related variables
++registry_name: regserver-node0
++registry_host: "{{groups['registry'][0]}}"
++registry_port: 8970
++registry_dir: "{{ deployment_dir }}/registry"
++default_gateway: "php_reference_gateway"
++
++# Credential and keystore related variables
++#authorization_server: "https://{{ groups['wso2is'][0]}}:9443/services/"
++authorization_server: "https://idp.scigap.org:9443/services/"
++keystore: "airavata.jks"
++keystore_passwd: "airavata"
++#client_truststore: "client_truststore.jks"
++client_truststore: "airavata.jks"
++client_truststore_passwd: "airavata"
++cred_keystore: "airavata_sym.jks"
++cred_keystore_passwd: "airavata"
++cred_keystore_alias: "airavata"
++cred_store_server_host: "{{ ansible_fqdn }}"
++cred_store_port: "8960"
++keystores_location: "{{ deployment_dir }}/keystores"
++
++# Gfac related variables
++gfac_name: "gfac-node0"
++gfac_host: "{{ ansible_fqdn }}"
++gfac_port: "8950"
++gfac_dir: "{{ deployment_dir }}/gfac-instance"
++
++# Monitoring variables
++monitor_email_address: "test.airavata@gmail.com"
++monitor_email_password: "airavata"
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/hosts
----------------------------------------------------------------------
diff --cc dev-tools/ansible/hosts
index 0000000,0000000..4fc8675
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/hosts
@@@ -1,0 -1,0 +1,26 @@@
++---
++# inventory file : production
++
++[zookeeper]
++54.221.13.4
++
++[rabbitmq]
++54.221.13.4
++
++[database]
++54.196.189.115
++
++[wso2is]
++#52.87.209.219
++
++[registry]
++54.89.119.195
++
++[api-orch]
++54.89.119.195
++
++[gfac]
++54.165.169.111
++
++[pga]
++#54.237.220.234
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/files/mysql-connector-java-5.1.37-bin.jar
index 0000000,0000000..465af67
new file mode 100644
Binary files differ
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/handlers/main.yml
index 0000000,0000000..a2288d9
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/api-orch/handlers/main.yml
@@@ -1,0 -1,0 +1,14 @@@
++---
++
++# Api server, Orchestrator related handlers
++- name: start api-orch
++ command: ./bin/airavata-server-start.sh api-orch -d
++ chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++ creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: stop api-orch
++ command: ./bin/airavata-server-stop.sh -f
++ chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++ removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/tasks/main.yml
index 0000000,0000000..c9c5227
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/api-orch/tasks/main.yml
@@@ -1,0 -1,0 +1,71 @@@
++---
++################################################################################
++# api-orch deployment
++- name: Create api-orchestrator deployment directory
++ file: path="{{ api_orch_dir }}" state=directory owner="{{ user }}" group="{{ group }}"
++ when: build|success
++
++- name: Check previous deployments
++ stat: path="{{ api_orch_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
++ register: check
++
++- name: stop api-orch
++ command: ./bin/airavata-server-stop.sh -f
++ chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++ removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++ when: check.stat.exists == True
++
++- name: Delete previous deployments
++ file: path="{{ api_orch_dir }}/{{ airavata_dist }}" state=absent
++
++- name: Copy distribution to api-orcheatrator deployment directory
++ unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name }}"
++ dest="{{ api_orch_dir }}/"
++ copy=no
++
++- name: set api-orch private ip
++ set_fact:
++ api_server_host: "{{ ansible_eth0.ipv4.address }}"
++ orchestrator_host: "{{ ansible_eth0.ipv4.address }}"
++ cred_store_server_host: "{{ ansible_eth0.ipv4.address }}"
++
++
++- name: Copy Airavata server properties file
++ template: src=airavata-server.properties.j2
++ dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
++ owner={{ user }}
++ group={{ group }}
++ mode="u=rw,g=r,o=r"
++
++- name: Copy Gfac configuration file
++ template: src=gfac-config.yaml.j2
++ dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml"
++ owner={{ user }}
++ group={{ group }}
++ mode="u=rw,g=r,o=r"
++
++- name: Copy Mysql jar to lib
++ copy: src={{ mysql_connector_jar }}
++ dest="{{ api_orch_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
++ owner={{ user }}
++ group={{ group }}
++
++- name: Open firwall ports
++ firewalld: port={{ item }} zone=public permanent=true state=enabled immediate=yes
++ with_items:
++ - "{{ api_server_port }}/tcp"
++ - "{{ orchestrator_port }}/tcp"
++ - "{{ cred_store_port }}/tcp"
++ become_user: root
++
++- name: stop api-orch
++ command: ./bin/airavata-server-stop.sh -f
++ chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++ removes="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: start api-orch
++ command: ./bin/airavata-server-start.sh api-orch -d
++ chdir="{{ api_orch_dir }}/{{ airavata_dist }}/"
++ creates="{{ api_orch_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
index 0000000,0000000..b8d093e
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/api-orch/templates/airavata-server.properties.j2
@@@ -1,0 -1,0 +1,281 @@@
++#
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++###########################################################################
++#
++# This properties file provides configuration for all Airavata Services:
++# API Server, Registry, Workflow Interpreter, GFac, Orchestrator
++#
++###########################################################################
++
++###########################################################################
++# API Server Registry Configuration
++###########################################################################
++
++#for derby [AiravataJPARegistry]
++#registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++registry.jdbc.driver=com.mysql.jdbc.Driver
++registry.jdbc.url=jdbc:mysql://{{ db_server }}:{{ db_server_port }}/{{ exp_catalog }}
++registry.jdbc.user={{ db_user }}
++registry.jdbc.password={{ db_password }}
++#FIXME: Probably the following property should be removed.
++start.derby.server.mode=false
++validationQuery=SELECT 1 from CONFIGURATION
++cache.enable=false
++jpa.cache.size=-1
++#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
++enable.sharing={{enable_sharing}}
++
++# Properties for default user mode
++default.registry.user=admin
++default.registry.password=admin
++default.registry.password.hash.method=SHA
++default.registry.gateway={{ default_gateway }}
++
++###########################################################################
++# Application Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++appcatalog.jdbc.driver=com.mysql.jdbc.Driver
++appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ app_catalog }}
++appcatalog.jdbc.user={{ db_user }}
++appcatalog.jdbc.password={{ db_password }}
++appcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++##########################################################################
++# Replica Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#replicacatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#replicacatalog.jdbc.url=jdbc:derby://localhost:1527/replica_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
++replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++replicacatalog.jdbc.user={{ db_user }}
++replicacatalog.jdbc.password={{ db_password }}
++replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++# Workflow Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
++workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++workflowcatalog.jdbc.user={{ db_user }}
++workflowcatalog.jdbc.password={{ db_password }}
++workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++# User Profile MongoDB Configuration
++###########################################################################
++userprofile.mongodb.host=localhost
++userprofile.mongodb.port=27017
++
++
++###########################################################################
++# Server module Configuration
++###########################################################################
++#credential store server should be started before API server
++#This is obsolete property with new script files.
++#servers=credentialstore,apiserver,orchestrator
++
++
++###########################################################################
++# API Server Configurations
++###########################################################################
++apiserver=org.apache.airavata.api.server.AiravataAPIServer
++apiserver.name={{ api_server_name }}
++apiserver.host={{ api_server_host }}
++apiserver.port={{ api_server_port }}
++apiserver.min.threads=50
++
++###########################################################################
++# Orchestrator Server Configurations
++###########################################################################
++orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
++orchestrator.server.name={{ orchestrator_name }}
++orchestrator.server.host={{ orchestrator_host }}
++orchestrator.server.port={{ orchestrator_port }}
++orchestrator.server.min.threads=50
++job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
++submitter.interval=10000
++threadpool.size=10
++start.submitter=true
++embedded.mode=true
++enable.validation=true
++
++###########################################################################
++# Registry Server Configurations
++###########################################################################
++regserver=org.apache.airavata.registry.api.service.RegistryAPIServer
++regserver.server.name={{registry_name}}
++regserver.server.host={{registry_host}}
++regserver.server.port={{registry_port}}
++regserver.server.min.threads=50
++
++###########################################################################
++# GFac Server Configurations
++###########################################################################
++gfac=org.apache.airavata.gfac.server.GfacServer
++gfac.server.name={{ gfac_name }}
++gfac.server.host={{ gfac_host }}
++gfac.server.port={{ gfac_port }}
++gfac.thread.pool.size=50
++host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
++
++
++
++###########################################################################
++# Airavata Workflow Interpreter Configurations
++###########################################################################
++workflowserver=org.apache.airavata.api.server.WorkflowServer
++enactment.thread.pool.size=10
++
++#to define custom workflow parser user following property
++#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
++
++
++
++###########################################################################
++# Job Scheduler can send informative email messages to you about the status of your job.
++# Specify a string which consists of either the single character "n" (no mail), or one or more
++# of the characters "a" (send mail when job is aborted), "b" (send mail when job begins),
++# and "e" (send mail when job terminates). The default is "a" if not specified.
++###########################################################################
++
++job.notification.enable=true
++#Provide comma separated email ids as a string if more than one
++job.notification.emailids=
++job.notification.flags=abe
++
++###########################################################################
++# Credential Store module Configuration
++###########################################################################
++credential.store.keystore.url={{ keystores_location }}/{{ cred_keystore }}
++credential.store.keystore.alias={{ cred_keystore_alias }}
++credential.store.keystore.password={{ cred_keystore_passwd }}
++credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
++credential.store.jdbc.user={{ db_user }}
++credential.store.jdbc.password={{ db_password }}
++credential.store.jdbc.driver=com.mysql.jdbc.Driver
++credential.store.server.host={{ cred_store_server_host }}
++credential.store.server.port={{ cred_store_port }}
++credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
++credential.stroe.jdbc.validationQuery=SELECT 1 from CONFIGURATION
++
++# these properties used by credential store email notifications
++email.server=smtp.googlemail.com
++email.server.port=465
++email.user=airavata
++email.password=xxx
++email.ssl=true
++email.from=airavata@apache.org
++
++# SSH PKI key pair or ssh password can be used SSH based sshKeyAuthentication is used.
++# if user specify both password sshKeyAuthentication gets the higher preference
++
++################# ---------- For ssh key pair sshKeyAuthentication ------------------- ################
++#ssh.public.key=/path to public key for ssh
++#ssh.private.key=/path to private key file for ssh
++#ssh.keypass=passphrase for the private key
++#ssh.username=username for ssh connection
++## If you set "yes" for ssh.strict.hostKey.checking, then you must provide known hosts file path
++#ssh.strict.hostKey.checking=yes/no
++#ssh.known.hosts.file=/path to known hosts file
++### Incase of password sshKeyAuthentication.
++#ssh.password=Password for ssh connection
++
++################ ---------- BES Properties ------------------- ###############
++#bes.ca.cert.path=<location>/certificates/cacert.pem
++#bes.ca.key.path=<location>/certificates/cakey.pem
++#bes.ca.key.pass=passphrase
++
++###########################################################################
++# Monitoring module Configuration
++###########################################################################
++
++#This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
++#mechanisms and one would be able to start a monitor
++monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
++
++#These properties will used to enable email base monitoring
++email.based.monitor.host=imap.gmail.com
++email.based.monitor.address={{ monitor_email_address }}
++email.based.monitor.password={{ monitor_email_password }}
++email.based.monitor.folder.name=INBOX
++# either imaps or pop3
++email.based.monitor.store.protocol=imaps
++#These property will be used to query the email server periodically. value in milliseconds(ms).
++email.based.monitoring.period=10000
++
++###########################################################################
++# AMQP Notification Configuration
++###########################################################################
++#for simple scenarios we can use the guest user
++#rabbitmq.broker.url=amqp://localhost:5672
++#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
++# and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
++rabbitmq.broker.url={{ rabbitmq_broker_url }}
++rabbitmq.status.exchange.name=status_exchange
++rabbitmq.process.exchange.name=process_exchange
++rabbitmq.experiment.exchange.name=experiment_exchange
++durable.queue=false
++prefetch.count=200
++process.launch.queue.name=process.launch.queue
++experiment.launch..queue.name=experiment.launch.queue
++
++###########################################################################
++# Zookeeper Server Configuration
++###########################################################################
++embedded.zk=false
++zookeeper.server.connection={{ zookeeper_url }}
++zookeeper.timeout=30000
++
++########################################################################
++## API Security Configuration
++########################################################################
++api.secured={{ api_secured }}
++security.manager.class=org.apache.airavata.api.server.security.DefaultAiravataSecurityManager
++### TLS related configuration ####
++TLS.enabled={{ tls_enable }}
++TLS.api.server.port={{ api_server_tls_port }}
++TLS.client.timeout=10000
++#### keystore configuration ####
++keystore.path={{ keystores_location }}/{{ keystore }}
++keystore.password={{ keystore_passwd }}
++#### trust store configuration ####
++trust.store={{ keystores_location }}/{{ client_truststore }}
++trust.store.password=airavata
++#### remote authorization server url ####
++remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
++#### xacml based authorization policy ####
++authorization.policy=airavata-default-xacml-policy
++#### authorization cache related configuration ####
++authz.cache.enabled=true
++authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
++in.memory.cache.size=1000
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/api-orch/templates/gfac-config.yaml.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/api-orch/templates/gfac-config.yaml.j2
index 0000000,0000000..3df5832
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/api-orch/templates/gfac-config.yaml.j2
@@@ -1,0 -1,0 +1,111 @@@
++##################################################################
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++################################################################
++
++jobSubmitters:
++ - submissionProtocol: SSH
++ taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
++# properties:
++# - userName: airavata
++# passPhrase: airavata
++# privateKey: /path/to/the/privatekey
++# publicKey: /path/to/the/publickey
++# hostName: remote.client.hostName
++
++ - submissionProtocol: SSH_FORK
++ taskClass: org.apache.airavata.gfac.impl.task.ForkJobSubmissionTask
++
++ - submissionProtocol: LOCAL
++ taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
++
++# Following job subbmitters are not yet implemented.
++
++ # - submissionProtocol: GSISSH
++ # taskClass: org.apache.airavata.task.adapters.GSISSHJobSubmissionTask
++commonTasks:
++ - type: SETUP
++ taskClass: org.apache.airavata.task.common.SetupTask
++
++ - type: CLEANUP
++ taskClass: org.apache.airavata.task.common.CleanupTask
++
++fileTransferTasks:
++# - transferProtocol: SCP
++# taskClass: org.apache.airavata.gfac.impl.task.DataStageTask
++
++# If your client doen't run the same instance where airavata server is running then you need to comment above
++# DataStageTask and uncomment SCPDataStageTask. To work with SCPDataStageTask, you either need to
++# provide ssh keys or password.
++
++ - transferProtocol: SCP
++ taskClass: org.apache.airavata.gfac.impl.task.SCPDataStageTask
++ properties:
++ - userName: root
++ passPhrase: ultrascan
++ privateKeyPath: /home/airavata/.ssh/id_rsa
++ publicKeyPath: /home/airavata/.ssh/id_rsa.pub
++ hostName: gw75.iu.xsede.org
++ inputPath: /var/www/portal/experimentData/
++# password: password
++
++# Following transfer tasks are not yet implemented.
++ #- transferProtocol: SFTP
++ # taskClass: org.apache.airavata.task.adapters.SFTPFileTransferTask
++
++ #- transferProtocol: GRIDFTP
++ # taskClass: org.apache.airavata.task.adapters.GRIDFTPFileTransferTask
++
++ #- transferProtocol: LOCAL
++ # taskClass: org.apache.airavata.task.adapters.LocalFileTransferTask
++
++resources:
++ - jobManagerType: PBS
++ commandOutputParser: org.apache.airavata.gfac.impl.job.PBSOutputParser
++ emailParser: org.apache.airavata.gfac.monitor.email.parser.PBSEmailParser
++ resourceEmailAddresses:
++ - pbsconsult@sdsc.edu # gordon
++ - adm@trident.bigred2.uits.iu.edu # Bigred2
++ - root <ad...@trident.bigred2.uits.iu.edu> # Bigred2
++ - root <ad...@scyld.localdomain> # alamo
++ - root <ad...@m2.karst.uits.iu.edu> #karst
++
++ - jobManagerType: SLURM
++ commandOutputParser: org.apache.airavata.gfac.impl.job.SlurmOutputParser
++ emailParser: org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser
++ resourceEmailAddresses:
++ - SDSC Admin <sl...@comet-fe3.sdsc.edu> # comet
++ - slurm@batch1.stampede.tacc.utexas.edu # stampede
++ - SDSC Admin <sl...@comet-fe4.sdsc.edu> # comet new
++ - Slurm <sl...@psc.edu> # bridges
++ - Slurm Daemon <sl...@odin.oscer.ou.edu> # OU Schooner
++
++ - jobManagerType: UGE
++ commandOutputParser: org.apache.airavata.gfac.impl.job.UGEOutputParser
++ emailParser: org.apache.airavata.gfac.monitor.email.parser.UGEEmailParser
++ resourceEmailAddresses:
++ - ls4.tacc.utexas.edu # contain Lonestar
++
++ - jobManagerType: LSF
++ commandOutputParser: org.apache.airavata.gfac.impl.job.LSFOutputParser
++ emailParser: org.apache.airavata.gfac.monitor.email.parser.LSFEmailParser
++ resourceEmailAddresses:
++ - iu.xsede.edu # test resource mail address
++
++ - jobManagerType: FORK
++ commandOutputParser: org.apache.airavata.gfac.impl.job.ForkOutputParser
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/common/files/airavata.jks
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/common/files/airavata.jks
index 0000000,0000000..685cc00
new file mode 100644
Binary files differ
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/common/files/airavata_sym.jks
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/common/files/airavata_sym.jks
index 0000000,0000000..3dd27d6
new file mode 100644
Binary files differ
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/common/tasks/main.yml
index 0000000,0000000..eac1a60
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/common/tasks/main.yml
@@@ -1,0 -1,0 +1,55 @@@
++---
++- name: Install Airavata pre-requireties
++ yum: name={{ item }} state=latest update_cache=yes
++ with_items:
++ - git
++ - maven
++ become_user: root
++
++# Setup airavata source
++- name: Create deployment directory {{ deployment_dir }}
++ file: path={{ deployment_dir }} state=directory mode=0755
++
++- name: Create source directory
++ file: path={{airavata_source_dir}}
++ state=directory
++ mode=0755
++ owner={{ user }}
++ group={{ group }}
++
++- name: git checkout from airavata github
++ git: repo=https://git-wip-us.apache.org/repos/asf/airavata.git
++ dest="{{ airavata_source_dir }}"
++ version="{{ git_branch }}"
++ register: checkout
++ tags: update
++
++- name: Run maven build
++ command: mvn clean install -Dmaven.test.skip=true chdir="{{ airavata_source_dir }}/"
++ environment:
++ MAVEN_OPTS: "-Xmx2048m"
++ register: build
++ tags: update
++ # when: (checkout|success) and (checkout.changed == true)
++
++################################################################################
++# copy key store and trust store files
++- name: Create KeyStores directory
++ file: path={{ keystores_location }}
++ state=directory
++ owner={{ user }} group={{ group }}
++
++- name: Transfer airavata.jks KeyStore file
++ copy: src={{ keystore }}
++ dest="{{ keystores_location }}/{{ keystore }}"
++ owner={{ user }} group={{ group }}
++
++- name: Transfer airavata_sym.jks KeyStore file
++ copy: src={{ cred_keystore }}
++ dest="{{ keystores_location }}/{{ cred_keystore }}"
++ owner={{ user }} group={{ group }}
++
++- name: Transfer client trust store KeyStore file
++ copy: src={{ client_truststore }}
++ dest="{{ keystores_location }}/{{ client_truststore }}"
++ owner={{ user }} group={{ group }}
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/common/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/common/vars/main.yml
index 0000000,0000000..e2d93e7
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/common/vars/main.yml
@@@ -1,0 -1,0 +1,4 @@@
++---
++# Common variables
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/handlers/main.yml
index 0000000,0000000..1906365
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/handlers/main.yml
@@@ -1,0 -1,0 +1,14 @@@
++---
++- name: start mariadb
++ service: name=mariadb state=started enabled=yes
++ become: yes
++
++- name: stop mariadb
++ service: name=mariadb state=stopped
++ become: yes
++
++- name: restart mariadb
++ service: name=mariadb state=restarted enabled=yes
++ become: yes
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/tasks/main.yml
index 0000000,0000000..17e5b0d
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/tasks/main.yml
@@@ -1,0 -1,0 +1,60 @@@
++---
++# - name: yum update
++# yum: name=* state=latest
++
++# Install Mysql
++- name: install epel release
++ yum: name=epel-release state=present
++ become_user: root
++
++- name: install pip
++ yum: name=python-pip state=latest update_cache=yes
++ become_user: root
++
++- name: install pexpect
++ pip: name=pexpect
++ become_user: root
++
++# - name: Adds Python MySQL support on Debian/Ubuntu
++# apt: pkg="python-mysqldb" state=present
++# when: ansible_os_family == 'Debian'
++
++- name: Adds Python MySQL support on RedHat/CentOS
++ yum: name=MySQL-python state=present
++ become_user: root
++ # when: ansible_os_family == 'RedHat'
++
++- name: install mariadb
++ yum: name="{{ item }}" state=latest update_cache=yes
++ with_items: "{{ mysql_packages }}"
++ become_user: root
++
++- name: start mariadb
++ service: name=mariadb state=started enabled=yes
++ become_user: root
++
++- include: secure_install.yml
++
++- name: create databases
++ mysql_db: name="{{ item }}" state=present
++ with_items:
++ - "{{ mysql_databases }}"
++
++- name: give access to {{ db_user }} from remote
++ mysql_user: name="{{ db_user }}" password="{{ db_password }}" host="{{ item }}"
++ with_items:
++ - "{{ groups['api-orch'] }}"
++ - "{{ groups['gfac'] }}"
++ - "{{ groups['registry'] }}"
++
++- name: create new user {{ db_user }} with all privilege
++ mysql_user: name="{{ db_user }}"
++ password="{{ db_password }}"
++ append_privs=yes
++ host_all=yes
++ priv=*.*:ALL,GRANT state=present
++
++- name: open firewall port {{ db_server_port }}
++ firewalld: port="{{ db_server_port }}/tcp"
++ zone=public permanent=true state=enabled immediate=yes
++ become_user: root
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/tasks/secure_install.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/tasks/secure_install.yml
index 0000000,0000000..a747419
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/tasks/secure_install.yml
@@@ -1,0 -1,0 +1,23 @@@
++---
++# This is ansible equivalent for mysql_secure_installation
++- name: Sets the root password
++ mysql_user: user=root
++ password="{{ mysql_root_password }}"
++ host=localhost
++ login_user=root
++ # login_password="{{ mysql_root_password }}"
++
++- name: Copy .my.cnf file
++ template: src=my.cnf.j2 dest="{{ user_home }}/.my.cnf"
++ # become: yes
++
++- name: Removes all anonymous user accounts
++ mysql_user: name='' host_all=yes state=absent
++
++- name: Secures the MySQL root user for all hosts
++ mysql_user: user=root password="{{ mysql_root_password }}" host_all=yes
++
++- name: Removes the MySQL test database
++ mysql_db: db=test state=absent
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/templates/my.cnf.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/templates/my.cnf.j2
index 0000000,0000000..ebe5b5b
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/templates/my.cnf.j2
@@@ -1,0 -1,0 +1,4 @@@
++# Example .my.cnf file for setting the root password
++[client]
++user=root
++password="{{ mysql_root_password }}"
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/database/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/database/vars/main.yml
index 0000000,0000000..1f37424
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/database/vars/main.yml
@@@ -1,0 -1,0 +1,21 @@@
++---
++mysql_packages:
++ - mariadb-server
++ - mariadb
++mysql_root_password: "admin"
++
++mysql_databases:
++ - "{{ app_catalog }}"
++ - "{{ exp_catalog }}"
++ - "{{ replica_catalog }}"
++ - "{{ workflow_catalog }}"
++ - "{{ credential_store }}"
++
++mysql_privs:
++ - "{{ app_catalog }}.*:ALL"
++ - "{{ exp_catalog }}.*:ALL"
++ - "{{ replica_catalog }}.*:ALL"
++ - "{{ workflow_catalog }}.*:ALL"
++ - "{{ credential_store }}.*:ALL"
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/env_setup/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/env_setup/tasks/main.yml
index 0000000,0000000..a3ecb8c
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/env_setup/tasks/main.yml
@@@ -1,0 -1,0 +1,28 @@@
++---
++#Tasks file can include smaller files if wanted
++#All commons tasks goes here
++- name: Create a new user group "{{ group }}"
++ group: name={{ group }}
++ become: yes
++
++- name: Create a new user "{{ user }}"
++ user: name={{ user }} group={{ group }}
++ become: yes
++
++- name: Install Firewalld
++ yum: name=firewalld state=latest update_cache=yes
++ become: yes
++
++ # TODO: stop iptables service, can't have both iptables and firewalld on same host
++ # if we try to stop non existing service ansible fails.
++# - name: Stop iptables, ip6tables services
++# service: name="{{ item }}" state=stopped
++# with_items:
++# - iptables
++# - ip6tables
++
++- name: Start firewalld service
++ service: name=firewalld state=started
++ become: yes
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/env_setup/tasks/redhat.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/env_setup/tasks/redhat.yml
index 0000000,0000000..a0e56c7
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/env_setup/tasks/redhat.yml
@@@ -1,0 -1,0 +1,12 @@@
++---
++- name: Install git latest version
++ yum: name=git state=latest update_cache=yes
++# become: true
++# become_user: airavata
++ tags: env_setup
++
++- name: Install maven latest version
++ yum: name=maven state=latest update_cache=yes
++ tags: env_setup
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/files/mysql-connector-java-5.1.37-bin.jar
index 0000000,0000000..465af67
new file mode 100644
Binary files differ
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/handlers/main.yml
index 0000000,0000000..b3d85a9
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/gfac/handlers/main.yml
@@@ -1,0 -1,0 +1,8 @@@
++---
++
++# Gfac related handlers
++- name: start gfac
++ command: ./bin/airavata-server-start.sh gfac -d chdir="{{ gfac_dir }}/{{ airavata_dist }}/" creates="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: stop gfac
++ command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/tasks/main.yml
index 0000000,0000000..30874e6
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/gfac/tasks/main.yml
@@@ -1,0 -1,0 +1,67 @@@
++---
++
++################################################################################
++# gfac deployments
++- name: Create Gfac deployment directory
++ file: path="{{ gfac_dir }}" state=directory owner={{ user }} group={{ group }}
++ when: build|success
++
++- name: Check previous deployments
++ stat: path="{{ gfac_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
++ register: check
++
++- name: stop gfac
++ command: ./bin/airavata-server-stop.sh -f
++ chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
++ removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
++ when: check.stat.exists == True
++
++- name: Delete previous deployments
++ file: path="{{ gfac_dir }}/{{ airavata_dist }}" state=absent
++
++- name: Copy distribution to gfac deployment directory
++ unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name }}"
++ dest="{{ gfac_dir }}/"
++ copy=no
++
++- name: set gfac private ip
++ set_fact:
++ gfac_host: "{{ ansible_eth0.ipv4.address }}"
++
++- name: Copy Airavata server properties file
++ template: src=airavata-server.properties.j2
++ dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
++ owner={{ user }}
++ group={{ group }}
++ mode="u=rw,g=r,o=r"
++
++- name: Copy Gfac configuration file
++ template: src=gfac-config.yaml.j2
++ dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/gfac-config.yaml"
++ owner={{ user }}
++ group={{ group }}
++ mode="u=rw,g=r,o=r"
++
++- name: Copy Mysql jar to lib
++ copy: src="{{ mysql_connector_jar }}"
++ dest="{{ gfac_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
++ owner={{ user }}
++ group={{ group }}
++
++
++- name: Open firwall ports
++ firewalld: port="{{ gfac_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
++ become_user: root
++
++- name: stop gfac
++ command: ./bin/airavata-server-stop.sh -f
++ chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
++ removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: start gfac
++ command: ./bin/airavata-server-start.sh gfac -d
++ chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
++ creates="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
index 0000000,0000000..b8d093e
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/gfac/templates/airavata-server.properties.j2
@@@ -1,0 -1,0 +1,281 @@@
++#
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++###########################################################################
++#
++# This properties file provides configuration for all Airavata Services:
++# API Server, Registry, Workflow Interpreter, GFac, Orchestrator
++#
++###########################################################################
++
++###########################################################################
++# API Server Registry Configuration
++###########################################################################
++
++#for derby [AiravataJPARegistry]
++#registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++registry.jdbc.driver=com.mysql.jdbc.Driver
++registry.jdbc.url=jdbc:mysql://{{ db_server }}:{{ db_server_port }}/{{ exp_catalog }}
++registry.jdbc.user={{ db_user }}
++registry.jdbc.password={{ db_password }}
++#FIXME: Probably the following property should be removed.
++start.derby.server.mode=false
++validationQuery=SELECT 1 from CONFIGURATION
++cache.enable=false
++jpa.cache.size=-1
++#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
++enable.sharing={{enable_sharing}}
++
++# Properties for default user mode
++default.registry.user=admin
++default.registry.password=admin
++default.registry.password.hash.method=SHA
++default.registry.gateway={{ default_gateway }}
++
++###########################################################################
++# Application Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++appcatalog.jdbc.driver=com.mysql.jdbc.Driver
++appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ app_catalog }}
++appcatalog.jdbc.user={{ db_user }}
++appcatalog.jdbc.password={{ db_password }}
++appcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++##########################################################################
++# Replica Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#replicacatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#replicacatalog.jdbc.url=jdbc:derby://localhost:1527/replica_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
++replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++replicacatalog.jdbc.user={{ db_user }}
++replicacatalog.jdbc.password={{ db_password }}
++replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++# Workflow Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
++workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++workflowcatalog.jdbc.user={{ db_user }}
++workflowcatalog.jdbc.password={{ db_password }}
++workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++# User Profile MongoDB Configuration
++###########################################################################
++userprofile.mongodb.host=localhost
++userprofile.mongodb.port=27017
++
++
++###########################################################################
++# Server module Configuration
++###########################################################################
++#credential store server should be started before API server
++#This is obsolete property with new script files.
++#servers=credentialstore,apiserver,orchestrator
++
++
++###########################################################################
++# API Server Configurations
++###########################################################################
++apiserver=org.apache.airavata.api.server.AiravataAPIServer
++apiserver.name={{ api_server_name }}
++apiserver.host={{ api_server_host }}
++apiserver.port={{ api_server_port }}
++apiserver.min.threads=50
++
++###########################################################################
++# Orchestrator Server Configurations
++###########################################################################
++orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
++orchestrator.server.name={{ orchestrator_name }}
++orchestrator.server.host={{ orchestrator_host }}
++orchestrator.server.port={{ orchestrator_port }}
++orchestrator.server.min.threads=50
++job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
++submitter.interval=10000
++threadpool.size=10
++start.submitter=true
++embedded.mode=true
++enable.validation=true
++
++###########################################################################
++# Registry Server Configurations
++###########################################################################
++regserver=org.apache.airavata.registry.api.service.RegistryAPIServer
++regserver.server.name={{registry_name}}
++regserver.server.host={{registry_host}}
++regserver.server.port={{registry_port}}
++regserver.server.min.threads=50
++
++###########################################################################
++# GFac Server Configurations
++###########################################################################
++gfac=org.apache.airavata.gfac.server.GfacServer
++gfac.server.name={{ gfac_name }}
++gfac.server.host={{ gfac_host }}
++gfac.server.port={{ gfac_port }}
++gfac.thread.pool.size=50
++host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
++
++
++
++###########################################################################
++# Airavata Workflow Interpreter Configurations
++###########################################################################
++workflowserver=org.apache.airavata.api.server.WorkflowServer
++enactment.thread.pool.size=10
++
++#to define custom workflow parser user following property
++#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
++
++
++
++###########################################################################
++# Job Scheduler can send informative email messages to you about the status of your job.
++# Specify a string which consists of either the single character "n" (no mail), or one or more
++# of the characters "a" (send mail when job is aborted), "b" (send mail when job begins),
++# and "e" (send mail when job terminates). The default is "a" if not specified.
++###########################################################################
++
++job.notification.enable=true
++#Provide comma separated email ids as a string if more than one
++job.notification.emailids=
++job.notification.flags=abe
++
++###########################################################################
++# Credential Store module Configuration
++###########################################################################
++credential.store.keystore.url={{ keystores_location }}/{{ cred_keystore }}
++credential.store.keystore.alias={{ cred_keystore_alias }}
++credential.store.keystore.password={{ cred_keystore_passwd }}
++credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
++credential.store.jdbc.user={{ db_user }}
++credential.store.jdbc.password={{ db_password }}
++credential.store.jdbc.driver=com.mysql.jdbc.Driver
++credential.store.server.host={{ cred_store_server_host }}
++credential.store.server.port={{ cred_store_port }}
++credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
++credential.stroe.jdbc.validationQuery=SELECT 1 from CONFIGURATION
++
++# these properties used by credential store email notifications
++email.server=smtp.googlemail.com
++email.server.port=465
++email.user=airavata
++email.password=xxx
++email.ssl=true
++email.from=airavata@apache.org
++
++# SSH PKI key pair or ssh password can be used SSH based sshKeyAuthentication is used.
++# if user specify both password sshKeyAuthentication gets the higher preference
++
++################# ---------- For ssh key pair sshKeyAuthentication ------------------- ################
++#ssh.public.key=/path to public key for ssh
++#ssh.private.key=/path to private key file for ssh
++#ssh.keypass=passphrase for the private key
++#ssh.username=username for ssh connection
++## If you set "yes" for ssh.strict.hostKey.checking, then you must provide known hosts file path
++#ssh.strict.hostKey.checking=yes/no
++#ssh.known.hosts.file=/path to known hosts file
++### Incase of password sshKeyAuthentication.
++#ssh.password=Password for ssh connection
++
++################ ---------- BES Properties ------------------- ###############
++#bes.ca.cert.path=<location>/certificates/cacert.pem
++#bes.ca.key.path=<location>/certificates/cakey.pem
++#bes.ca.key.pass=passphrase
++
++###########################################################################
++# Monitoring module Configuration
++###########################################################################
++
++#This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
++#mechanisms and one would be able to start a monitor
++monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
++
++#These properties will used to enable email base monitoring
++email.based.monitor.host=imap.gmail.com
++email.based.monitor.address={{ monitor_email_address }}
++email.based.monitor.password={{ monitor_email_password }}
++email.based.monitor.folder.name=INBOX
++# either imaps or pop3
++email.based.monitor.store.protocol=imaps
++#These property will be used to query the email server periodically. value in milliseconds(ms).
++email.based.monitoring.period=10000
++
++###########################################################################
++# AMQP Notification Configuration
++###########################################################################
++#for simple scenarios we can use the guest user
++#rabbitmq.broker.url=amqp://localhost:5672
++#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
++# and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
++rabbitmq.broker.url={{ rabbitmq_broker_url }}
++rabbitmq.status.exchange.name=status_exchange
++rabbitmq.process.exchange.name=process_exchange
++rabbitmq.experiment.exchange.name=experiment_exchange
++durable.queue=false
++prefetch.count=200
++process.launch.queue.name=process.launch.queue
++experiment.launch..queue.name=experiment.launch.queue
++
++###########################################################################
++# Zookeeper Server Configuration
++###########################################################################
++embedded.zk=false
++zookeeper.server.connection={{ zookeeper_url }}
++zookeeper.timeout=30000
++
++########################################################################
++## API Security Configuration
++########################################################################
++api.secured={{ api_secured }}
++security.manager.class=org.apache.airavata.api.server.security.DefaultAiravataSecurityManager
++### TLS related configuration ####
++TLS.enabled={{ tls_enable }}
++TLS.api.server.port={{ api_server_tls_port }}
++TLS.client.timeout=10000
++#### keystore configuration ####
++keystore.path={{ keystores_location }}/{{ keystore }}
++keystore.password={{ keystore_passwd }}
++#### trust store configuration ####
++trust.store={{ keystores_location }}/{{ client_truststore }}
++trust.store.password=airavata
++#### remote authorization server url ####
++remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
++#### xacml based authorization policy ####
++authorization.policy=airavata-default-xacml-policy
++#### authorization cache related configuration ####
++authz.cache.enabled=true
++authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
++in.memory.cache.size=1000
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/gfac/templates/gfac-config.yaml.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/gfac/templates/gfac-config.yaml.j2
index 0000000,0000000..3df5832
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/gfac/templates/gfac-config.yaml.j2
@@@ -1,0 -1,0 +1,111 @@@
++##################################################################
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++################################################################
++
++jobSubmitters:
++ - submissionProtocol: SSH
++ taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
++# properties:
++# - userName: airavata
++# passPhrase: airavata
++# privateKey: /path/to/the/privatekey
++# publicKey: /path/to/the/publickey
++# hostName: remote.client.hostName
++
++ - submissionProtocol: SSH_FORK
++ taskClass: org.apache.airavata.gfac.impl.task.ForkJobSubmissionTask
++
++ - submissionProtocol: LOCAL
++ taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
++
++# Following job subbmitters are not yet implemented.
++
++ # - submissionProtocol: GSISSH
++ # taskClass: org.apache.airavata.task.adapters.GSISSHJobSubmissionTask
++commonTasks:
++ - type: SETUP
++ taskClass: org.apache.airavata.task.common.SetupTask
++
++ - type: CLEANUP
++ taskClass: org.apache.airavata.task.common.CleanupTask
++
++fileTransferTasks:
++# - transferProtocol: SCP
++# taskClass: org.apache.airavata.gfac.impl.task.DataStageTask
++
++# If your client doen't run the same instance where airavata server is running then you need to comment above
++# DataStageTask and uncomment SCPDataStageTask. To work with SCPDataStageTask, you either need to
++# provide ssh keys or password.
++
++ - transferProtocol: SCP
++ taskClass: org.apache.airavata.gfac.impl.task.SCPDataStageTask
++ properties:
++ - userName: root
++ passPhrase: ultrascan
++ privateKeyPath: /home/airavata/.ssh/id_rsa
++ publicKeyPath: /home/airavata/.ssh/id_rsa.pub
++ hostName: gw75.iu.xsede.org
++ inputPath: /var/www/portal/experimentData/
++# password: password
++
++# Following transfer tasks are not yet implemented.
++ #- transferProtocol: SFTP
++ # taskClass: org.apache.airavata.task.adapters.SFTPFileTransferTask
++
++ #- transferProtocol: GRIDFTP
++ # taskClass: org.apache.airavata.task.adapters.GRIDFTPFileTransferTask
++
++ #- transferProtocol: LOCAL
++ # taskClass: org.apache.airavata.task.adapters.LocalFileTransferTask
++
++resources:
++ - jobManagerType: PBS
++ commandOutputParser: org.apache.airavata.gfac.impl.job.PBSOutputParser
++ emailParser: org.apache.airavata.gfac.monitor.email.parser.PBSEmailParser
++ resourceEmailAddresses:
++ - pbsconsult@sdsc.edu # gordon
++ - adm@trident.bigred2.uits.iu.edu # Bigred2
++ - root <ad...@trident.bigred2.uits.iu.edu> # Bigred2
++ - root <ad...@scyld.localdomain> # alamo
++ - root <ad...@m2.karst.uits.iu.edu> #karst
++
++ - jobManagerType: SLURM
++ commandOutputParser: org.apache.airavata.gfac.impl.job.SlurmOutputParser
++ emailParser: org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser
++ resourceEmailAddresses:
++ - SDSC Admin <sl...@comet-fe3.sdsc.edu> # comet
++ - slurm@batch1.stampede.tacc.utexas.edu # stampede
++ - SDSC Admin <sl...@comet-fe4.sdsc.edu> # comet new
++ - Slurm <sl...@psc.edu> # bridges
++ - Slurm Daemon <sl...@odin.oscer.ou.edu> # OU Schooner
++
++ - jobManagerType: UGE
++ commandOutputParser: org.apache.airavata.gfac.impl.job.UGEOutputParser
++ emailParser: org.apache.airavata.gfac.monitor.email.parser.UGEEmailParser
++ resourceEmailAddresses:
++ - ls4.tacc.utexas.edu # contain Lonestar
++
++ - jobManagerType: LSF
++ commandOutputParser: org.apache.airavata.gfac.impl.job.LSFOutputParser
++ emailParser: org.apache.airavata.gfac.monitor.email.parser.LSFEmailParser
++ resourceEmailAddresses:
++ - iu.xsede.edu # test resource mail address
++
++ - jobManagerType: FORK
++ commandOutputParser: org.apache.airavata.gfac.impl.job.ForkOutputParser
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/java/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/java/tasks/main.yml
index 0000000,0000000..92f2039
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/java/tasks/main.yml
@@@ -1,0 -1,0 +1,21 @@@
++---
++# Install Orcal Java
++- name: download oracle java 8 rpm
++ get_url: url="{{ java_rpm_url }}" dest="{{ java_dir_source }}" headers='Cookie:oraclelicense=accept-securebackup-cookie'
++ become: yes
++
++- name: Install oracle java 8
++ yum: name="{{ java_dir_source }}/{{ java_rpm_filename }}" state=present
++ become: yes
++
++- name: set Oracle Java {{ java_version_string }} as default
++ alternatives:
++ name="{{ item.exe }}"
++ link="/usr/bin/{{ item.exe }}"
++ path="{{ item.path }}/{{ item.exe }}"
++ with_items:
++ - { path: "{{ java_home }}/jre/bin", exe: 'java' }
++ - { path: "{{ java_home }}/jre/bin", exe: 'keytool' }
++ - { path: "{{ java_home }}/bin", exe: 'javac' }
++ - { path: "{{ java_home }}/bin", exe: 'javadoc' }
++ become: yes
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/java/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/java/vars/main.yml
index 0000000,0000000..a995684
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/java/vars/main.yml
@@@ -1,0 -1,0 +1,15 @@@
++---
++#Variables associated with this role
++# Oracle Java 8
++java_dir_source: "/usr/local/src"
++
++java_version: 8
++java_version_update: 91
++java_version_build: '14'
++java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
++java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
++
++java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
++java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/handlers/main.yml
index 0000000,0000000..9c6c12f
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/handlers/main.yml
@@@ -1,0 -1,0 +1,13 @@@
++---
++
++- name: composer update
++ composer: command=update working_dir="{{ doc_root_dir }}"
++ become: yes
++
++- name: start httpd
++ service: name=httpd state=started
++ become: yes
++
++- name: restart httpd
++ service: name=httpd state=restarted
++ become: yes
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/tasks/main.yml
index 0000000,0000000..b267119
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/tasks/main.yml
@@@ -1,0 -1,0 +1,112 @@@
++---
++- name: Create root directory
++ file: path="{{ doc_root_dir }}" state=directory
++ become: yes
++
++- name: Install pre-requireties
++ yum: name="{{ item }}" state=latest update_cache=yes
++ with_items:
++ - git
++ - httpd
++ - php
++ - php-soap
++ - libselinux-python
++ - php-pdo
++ become: yes
++
++# - name: Allow selinux outbound connection from web server
++ # command: setsebool -P httpd_can_network_connect 1
++
++- name: install composer
++ shell: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
++ args:
++ creates: /usr/local/bin/composer
++ become: yes
++
++- name: install epel release
++ yum: name=epel-release state=present
++ become: yes
++
++# depend on epel release
++- name: install mcrypt
++ yum: name=php-mcrypt state=latest update_cache=yes
++ become: yes
++
++# - name: Check previous deployments
++# stat: path="{{ doc_root_dir }}" get_md5=no get_checksum=no
++# register: check
++
++- name: delete previous deployments
++ file: path="{{ doc_root_dir }}" state=absent
++
++
++- name: Git clone php gateway
++ git: repo=https://github.com/apache/airavata-php-gateway.git
++ dest="{{ doc_root_dir }}" version="{{ git_branch }}"
++ become: yes
++
++- name: Create user data dir {{ user_data_dir }}
++ file: path="{{ user_data_dir }}" state=directory owner="{{user}}" group="{{group}}" mode=0777 recurse=yes
++ become: yes
++
++ #Make sure selinux is dissabled in remote machine
++- name: Disable selinux
++ selinux: state=disabled
++ become: yes
++ register: selinux_disable
++
++# need to restart after disable selinux
++- name: restart machine
++ shell: sleep 2 && shutdown -r now "Ansible updates triggered"
++ async: 1
++ poll: 0
++ become: yes
++ ignore_errors: true
++ when: (selinux_disable|success) and (selinux_disable.changed == true)
++ register: restart
++
++- name: waiting for server to come back
++ local_action: wait_for host={{ inventory_hostname }} state=started delay=30 timeout=60
++ when: (restart|success) and (restart.changed == true)
++
++
++- name: Run composer update
++ composer: command=update working_dir="{{ doc_root_dir }}"
++ become: yes
++
++# step 6: Change pga configurations
++- name: Copy pga config file
++ template: src=pga_config.php.j2 dest="{{ doc_root_dir }}/app/config/pga_config.php"
++ become: yes
++
++# give write permission to storage directory
++- name: give read permissions to doc root
++ file: path="{{ doc_root_dir }}" state=directory mode=0755 recurse=yes
++ become: yes
++
++- name: give write permissions to storage dir
++ file: path="{{ doc_root_dir }}/app/storage" state=directory mode=0777 owner="{{user}}" group="{{group}}" recurse=yes
++ become: yes
++
++- name: Eanble https and http service on public zone
++ firewalld: service="{{ item }}" permanent=true state=enabled zone=public immediate=True
++ with_items:
++ - http
++ - https
++ become: yes
++
++# - name: Edit file
++# lineinfile: dest="{{ httpd_conf_file }}" regexp="#\n\s*AllowOverride None" line="#\nAllowOverride All"
++# notify:
++# - restart httpd
++# become: yes
++
++- name: copy httpd.conf file
++ template: src=httpd.conf.j2 dest="{{ httpd_conf_file_location }}/httpd.conf"
++ become: yes
++ notify:
++ - restart httpd
++
++- name: start httpd service
++ service: name=httpd state=started
++ become: yes
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/templates/httpd.conf.j2
index 0000000,0000000..37c05e2
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/templates/httpd.conf.j2
@@@ -1,0 -1,0 +1,353 @@@
++#
++# This is the main Apache HTTP server configuration file. It contains the
++# configuration directives that give the server its instructions.
++# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
++# In particular, see
++# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
++# for a discussion of each configuration directive.
++#
++# Do NOT simply read the instructions in here without understanding
++# what they do. They're here only as hints or reminders. If you are unsure
++# consult the online docs. You have been warned.
++#
++# Configuration and logfile names: If the filenames you specify for many
++# of the server's control files begin with "/" (or "drive:/" for Win32), the
++# server will use that explicit path. If the filenames do *not* begin
++# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
++# with ServerRoot set to '/www' will be interpreted by the
++# server as '/www/log/access_log', where as '/log/access_log' will be
++# interpreted as '/log/access_log'.
++
++#
++# ServerRoot: The top of the directory tree under which the server's
++# configuration, error, and log files are kept.
++#
++# Do not add a slash at the end of the directory path. If you point
++# ServerRoot at a non-local disk, be sure to specify a local disk on the
++# Mutex directive, if file-based mutexes are used. If you wish to share the
++# same ServerRoot for multiple httpd daemons, you will need to change at
++# least PidFile.
++#
++ServerRoot "/etc/httpd"
++
++#
++# Listen: Allows you to bind Apache to specific IP addresses and/or
++# ports, instead of the default. See also the <VirtualHost>
++# directive.
++#
++# Change this to Listen on specific IP addresses as shown below to
++# prevent Apache from glomming onto all bound IP addresses.
++#
++#Listen 12.34.56.78:80
++Listen 80
++
++#
++# Dynamic Shared Object (DSO) Support
++#
++# To be able to use the functionality of a module which was built as a DSO you
++# have to place corresponding `LoadModule' lines at this location so the
++# directives contained in it are actually available _before_ they are used.
++# Statically compiled modules (those listed by `httpd -l') do not need
++# to be loaded here.
++#
++# Example:
++# LoadModule foo_module modules/mod_foo.so
++#
++Include conf.modules.d/*.conf
++
++#
++# If you wish httpd to run as a different user or group, you must run
++# httpd as root initially and it will switch.
++#
++# User/Group: The name (or #number) of the user/group to run httpd as.
++# It is usually good practice to create a dedicated user and group for
++# running httpd, as with most system services.
++#
++User apache
++Group apache
++
++# 'Main' server configuration
++#
++# The directives in this section set up the values used by the 'main'
++# server, which responds to any requests that aren't handled by a
++# <VirtualHost> definition. These values also provide defaults for
++# any <VirtualHost> containers you may define later in the file.
++#
++# All of these directives may appear inside <VirtualHost> containers,
++# in which case these default settings will be overridden for the
++# virtual host being defined.
++#
++
++#
++# ServerAdmin: Your address, where problems with the server should be
++# e-mailed. This address appears on some server-generated pages, such
++# as error documents. e.g. admin@your-domain.com
++#
++ServerAdmin root@localhost
++
++#
++# ServerName gives the name and port that the server uses to identify itself.
++# This can often be determined automatically, but we recommend you specify
++# it explicitly to prevent problems during startup.
++#
++# If your host doesn't have a registered DNS name, enter its IP address here.
++#
++#ServerName www.example.com:80
++
++#
++# Deny access to the entirety of your server's filesystem. You must
++# explicitly permit access to web content directories in other
++# <Directory> blocks below.
++#
++<Directory />
++ AllowOverride none
++ Require all denied
++</Directory>
++
++#
++# Note that from this point forward you must specifically allow
++# particular features to be enabled - so if something's not working as
++# you might expect, make sure that you have specifically enabled it
++# below.
++#
++
++#
++# DocumentRoot: The directory out of which you will serve your
++# documents. By default, all requests are taken from this directory, but
++# symbolic links and aliases may be used to point to other locations.
++#
++DocumentRoot "/var/www/html"
++
++#
++# Relax access to content within /var/www.
++#
++<Directory "/var/www">
++ AllowOverride None
++ # Allow open access:
++ Require all granted
++</Directory>
++
++# Further relax access to the default document root:
++<Directory "/var/www/html">
++ #
++ # Possible values for the Options directive are "None", "All",
++ # or any combination of:
++ # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
++ #
++ # Note that "MultiViews" must be named *explicitly* --- "Options All"
++ # doesn't give it to you.
++ #
++ # The Options directive is both complicated and important. Please see
++ # http://httpd.apache.org/docs/2.4/mod/core.html#options
++ # for more information.
++ #
++ Options Indexes FollowSymLinks
++
++ #
++ # AllowOverride controls what directives may be placed in .htaccess files.
++ # It can be "All", "None", or any combination of the keywords:
++ # Options FileInfo AuthConfig Limit
++ #
++ AllowOverride All
++
++ #
++ # Controls who can get stuff from this server.
++ #
++ Require all granted
++</Directory>
++
++#
++# DirectoryIndex: sets the file that Apache will serve if a directory
++# is requested.
++#
++<IfModule dir_module>
++ DirectoryIndex index.html
++</IfModule>
++
++#
++# The following lines prevent .htaccess and .htpasswd files from being
++# viewed by Web clients.
++#
++<Files ".ht*">
++ Require all denied
++</Files>
++
++#
++# ErrorLog: The location of the error log file.
++# If you do not specify an ErrorLog directive within a <VirtualHost>
++# container, error messages relating to that virtual host will be
++# logged here. If you *do* define an error logfile for a <VirtualHost>
++# container, that host's errors will be logged there and not here.
++#
++ErrorLog "logs/error_log"
++
++#
++# LogLevel: Control the number of messages logged to the error_log.
++# Possible values include: debug, info, notice, warn, error, crit,
++# alert, emerg.
++#
++LogLevel warn
++
++<IfModule log_config_module>
++ #
++ # The following directives define some format nicknames for use with
++ # a CustomLog directive (see below).
++ #
++ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
++ LogFormat "%h %l %u %t \"%r\" %>s %b" common
++
++ <IfModule logio_module>
++ # You need to enable mod_logio.c to use %I and %O
++ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
++ </IfModule>
++
++ #
++ # The location and format of the access logfile (Common Logfile Format).
++ # If you do not define any access logfiles within a <VirtualHost>
++ # container, they will be logged here. Contrariwise, if you *do*
++ # define per-<VirtualHost> access logfiles, transactions will be
++ # logged therein and *not* in this file.
++ #
++ #CustomLog "logs/access_log" common
++
++ #
++ # If you prefer a logfile with access, agent, and referer information
++ # (Combined Logfile Format) you can use the following directive.
++ #
++ CustomLog "logs/access_log" combined
++</IfModule>
++
++<IfModule alias_module>
++ #
++ # Redirect: Allows you to tell clients about documents that used to
++ # exist in your server's namespace, but do not anymore. The client
++ # will make a new request for the document at its new location.
++ # Example:
++ # Redirect permanent /foo http://www.example.com/bar
++
++ #
++ # Alias: Maps web paths into filesystem paths and is used to
++ # access content that does not live under the DocumentRoot.
++ # Example:
++ # Alias /webpath /full/filesystem/path
++ #
++ # If you include a trailing / on /webpath then the server will
++ # require it to be present in the URL. You will also likely
++ # need to provide a <Directory> section to allow access to
++ # the filesystem path.
++
++ #
++ # ScriptAlias: This controls which directories contain server scripts.
++ # ScriptAliases are essentially the same as Aliases, except that
++ # documents in the target directory are treated as applications and
++ # run by the server when requested rather than as documents sent to the
++ # client. The same rules about trailing "/" apply to ScriptAlias
++ # directives as to Alias.
++ #
++ ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
++
++</IfModule>
++
++#
++# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
++# CGI directory exists, if you have that configured.
++#
++<Directory "/var/www/cgi-bin">
++ AllowOverride None
++ Options None
++ Require all granted
++</Directory>
++
++<IfModule mime_module>
++ #
++ # TypesConfig points to the file containing the list of mappings from
++ # filename extension to MIME-type.
++ #
++ TypesConfig /etc/mime.types
++
++ #
++ # AddType allows you to add to or override the MIME configuration
++ # file specified in TypesConfig for specific file types.
++ #
++ #AddType application/x-gzip .tgz
++ #
++ # AddEncoding allows you to have certain browsers uncompress
++ # information on the fly. Note: Not all browsers support this.
++ #
++ #AddEncoding x-compress .Z
++ #AddEncoding x-gzip .gz .tgz
++ #
++ # If the AddEncoding directives above are commented-out, then you
++ # probably should define those extensions to indicate media types:
++ #
++ AddType application/x-compress .Z
++ AddType application/x-gzip .gz .tgz
++
++ #
++ # AddHandler allows you to map certain file extensions to "handlers":
++ # actions unrelated to filetype. These can be either built into the server
++ # or added with the Action directive (see below)
++ #
++ # To use CGI scripts outside of ScriptAliased directories:
++ # (You will also need to add "ExecCGI" to the "Options" directive.)
++ #
++ #AddHandler cgi-script .cgi
++
++ # For type maps (negotiated resources):
++ #AddHandler type-map var
++
++ #
++ # Filters allow you to process content before it is sent to the client.
++ #
++ # To parse .shtml files for server-side includes (SSI):
++ # (You will also need to add "Includes" to the "Options" directive.)
++ #
++ AddType text/html .shtml
++ AddOutputFilter INCLUDES .shtml
++</IfModule>
++
++#
++# Specify a default charset for all content served; this enables
++# interpretation of all content as UTF-8 by default. To use the
++# default browser choice (ISO-8859-1), or to allow the META tags
++# in HTML content to override this choice, comment out this
++# directive:
++#
++AddDefaultCharset UTF-8
++
++<IfModule mime_magic_module>
++ #
++ # The mod_mime_magic module allows the server to use various hints from the
++ # contents of the file itself to determine its type. The MIMEMagicFile
++ # directive tells the module where the hint definitions are located.
++ #
++ MIMEMagicFile conf/magic
++</IfModule>
++
++#
++# Customizable error responses come in three flavors:
++# 1) plain text 2) local redirects 3) external redirects
++#
++# Some examples:
++#ErrorDocument 500 "The server made a boo boo."
++#ErrorDocument 404 /missing.html
++#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
++#ErrorDocument 402 http://www.example.com/subscription_info.html
++#
++
++#
++# EnableMMAP and EnableSendfile: On systems that support it,
++# memory-mapping or the sendfile syscall may be used to deliver
++# files. This usually improves server performance, but must
++# be turned off when serving from networked-mounted
++# filesystems or if support for these functions is otherwise
++# broken on your system.
++# Defaults if commented: EnableMMAP On, EnableSendfile Off
++#
++#EnableMMAP off
++EnableSendfile on
++
++# Supplemental configuration
++#
++# Load config files in the "/etc/httpd/conf.d" directory, if any.
++IncludeOptional conf.d/*.conf
[21/50] [abbrv] airavata git commit: initial commit
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
new file mode 100644
index 0000000..76ef8b6
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
@@ -0,0 +1,817 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
+
+ private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserTupleSchemeFactory());
+ }
+
+ public String userId; // optional
+ public String domainId; // optional
+ public String userName; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_ID((short)1, "userId"),
+ DOMAIN_ID((short)2, "domainId"),
+ USER_NAME((short)3, "userName"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // USER_ID
+ return USER_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // USER_NAME
+ return USER_NAME;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.USER_ID,_Fields.DOMAIN_ID,_Fields.USER_NAME,_Fields.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);
+ tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
+ }
+
+ public User() {
+ this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public User(User other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetUserId()) {
+ this.userId = other.userId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public User deepCopy() {
+ return new User(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.userName = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getUserId() {
+ return this.userId;
+ }
+
+ public User setUserId(String userId) {
+ this.userId = userId;
+ return this;
+ }
+
+ public void unsetUserId() {
+ this.userId = null;
+ }
+
+ /** Returns true if field userId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserId() {
+ return this.userId != null;
+ }
+
+ public void setUserIdIsSet(boolean value) {
+ if (!value) {
+ this.userId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public User setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public User setUserName(String userName) {
+ this.userName = userName;
+ return this;
+ }
+
+ public void unsetUserName() {
+ this.userName = null;
+ }
+
+ /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserName() {
+ return this.userName != null;
+ }
+
+ public void setUserNameIsSet(boolean value) {
+ if (!value) {
+ this.userName = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public User setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public User setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_ID:
+ if (value == null) {
+ unsetUserId();
+ } else {
+ setUserId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_ID:
+ return getUserId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case USER_NAME:
+ return getUserName();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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 USER_ID:
+ return isSetUserId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case USER_NAME:
+ return isSetUserName();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof User)
+ return this.equals((User)that);
+ return false;
+ }
+
+ public boolean equals(User that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_userId = true && this.isSetUserId();
+ boolean that_present_userId = true && that.isSetUserId();
+ if (this_present_userId || that_present_userId) {
+ if (!(this_present_userId && that_present_userId))
+ return false;
+ if (!this.userId.equals(that.userId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_userName = true && this.isSetUserName();
+ boolean that_present_userName = true && that.isSetUserName();
+ if (this_present_userName || that_present_userName) {
+ if (!(this_present_userName && that_present_userName))
+ return false;
+ if (!this.userName.equals(that.userName))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_userId = true && (isSetUserId());
+ list.add(present_userId);
+ if (present_userId)
+ list.add(userId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_userName = true && (isSetUserName());
+ list.add(present_userName);
+ if (present_userName)
+ list.add(userName);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(User other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("User(");
+ boolean first = true;
+
+ if (isSetUserId()) {
+ sb.append("userId:");
+ if (this.userId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetUserName()) {
+ if (!first) sb.append(", ");
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 UserStandardSchemeFactory implements SchemeFactory {
+ public UserStandardScheme getScheme() {
+ return new UserStandardScheme();
+ }
+ }
+
+ private static class UserStandardScheme extends StandardScheme<User> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // USER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // USER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, User struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userId != null) {
+ if (struct.isSetUserId()) {
+ oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+ oprot.writeString(struct.userId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.userName != null) {
+ if (struct.isSetUserName()) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserTupleSchemeFactory implements SchemeFactory {
+ public UserTupleScheme getScheme() {
+ return new UserTupleScheme();
+ }
+ }
+
+ private static class UserTupleScheme extends TupleScheme<User> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUserName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetUserId()) {
+ oprot.writeString(struct.userId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetUserName()) {
+ oprot.writeString(struct.userName);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
new file mode 100644
index 0000000..d24734b
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
@@ -0,0 +1,41 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+public class gov_reg_modelsConstants {
+
+ public static final String DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID";
+
+}
[17/50] [abbrv] airavata git commit: changing ansible ports
Posted by sc...@apache.org.
changing ansible ports
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b7a79203
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b7a79203
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b7a79203
Branch: refs/heads/airavata-gov-registry
Commit: b7a79203d79046339377cbe5820a3a6bc380fb6c
Parents: 514567c
Author: scnakandala <su...@gmail.com>
Authored: Tue Sep 27 14:21:27 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Tue Sep 27 14:21:27 2016 -0400
----------------------------------------------------------------------
dev-tools/ansible/hosts | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/b7a79203/dev-tools/ansible/hosts
----------------------------------------------------------------------
diff --git a/dev-tools/ansible/hosts b/dev-tools/ansible/hosts
index 4fc8675..9dbec9c 100644
--- a/dev-tools/ansible/hosts
+++ b/dev-tools/ansible/hosts
@@ -2,25 +2,25 @@
# inventory file : production
[zookeeper]
-54.221.13.4
+149.165.171.13
[rabbitmq]
-54.221.13.4
+149.165.171.12
[database]
-54.196.189.115
+149.165.171.1
-[wso2is]
+#[wso2is]
#52.87.209.219
[registry]
-54.89.119.195
+149.165.171.0
[api-orch]
-54.89.119.195
+149.165.170.105
[gfac]
-54.165.169.111
+149.165.170.104
[pga]
-#54.237.220.234
+149.165.170.103
[45/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
deleted file mode 100644
index 57d9093..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.server;
-
-import org.apache.airavata.gov.registry.models.*;
-import org.apache.airavata.gov.registry.service.cpi.GovRegistryService;
-import org.apache.thrift.TException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.Map;
-
-public class GovRegistryServerHandler implements GovRegistryService.Iface{
- private final static Logger logger = LoggerFactory.getLogger(GovRegistryServerHandler.class);
-
- /**
- * * Domain Operations
- * *
- */
- @Override
- public boolean createDomain(Domain domain) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean updateDomain(Domain domain) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean deleteDomain(String domainId) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public Domain getDomain(String domainId) throws GovRegistryException, TException {
- return null;
- }
-
- @Override
- public List<Domain> getDomains(int offset, int limit) throws TException {
- return null;
- }
-
- /**
- * * User Operations
- * *
- */
- @Override
- public boolean registerUser(User user) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean updatedUser(User user) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean deleteUser(String userId) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public User getUser(String userId) throws GovRegistryException, TException {
- return null;
- }
-
- @Override
- public List<User> getUsers(String domain, int offset, int limit) throws TException {
- return null;
- }
-
- /**
- * * Group Operations
- * *
- */
- @Override
- public boolean createGroup(Group group) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean updateGroup(Group group) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean deleteGroup(String groupId) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public Group getGroup(String groupId) throws GovRegistryException, TException {
- return null;
- }
-
- @Override
- public List<Group> getGroups(String domain, int offset, int limit) throws TException {
- return null;
- }
-
- @Override
- public boolean addUsersToGroup(List<String> userIds, String groupId) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public Map<String, GroupType> getGroupMembers(String groupId) throws TException {
- return null;
- }
-
- /**
- * * EntityType Operations
- * *
- */
- @Override
- public boolean createEntityType(EntityType entityType) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean updateEntityType(EntityType entityType) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean deleteEntityType(String entityTypeId) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public EntityType getEntityType(String entityTypeId) throws GovRegistryException, TException {
- return null;
- }
-
- @Override
- public List<EntityType> getEntityTypes(String domain, int offset, int limit) throws TException {
- return null;
- }
-
- /**
- * * Entity Operations
- * *
- */
- @Override
- public boolean registerEntity(Entity entity) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean updateEntity(Entity entity) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean deleteEntity(String entityId) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public Entity getEntity(String entityId) throws GovRegistryException, TException {
- return null;
- }
-
- @Override
- public List<Entity> searchEntities(String domain, String entityType, Map<String, String> filters, int offset, int limit) throws GovRegistryException, TException {
- return null;
- }
-
- /**
- * * EntityType Operations
- * *
- */
- @Override
- public boolean createPermissionType(PermissionType permisionType) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean updatePermissionType(PermissionType permisionType) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public boolean deletePermissionType(String entityTypeId) throws GovRegistryException, TException {
- return false;
- }
-
- @Override
- public PermissionType getPermissionType(String permisionTypeId) throws GovRegistryException, TException {
- return null;
- }
-
- @Override
- public List<PermissionType> getPermissionTypes(String domain, int offset, int limit) throws GovRegistryException, TException {
- return null;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/META-INF/persistence.xml b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/META-INF/persistence.xml
deleted file mode 100644
index 4a89174..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
-
- <persistence-unit name="airavata-gov-registry">
- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.airavata.gov.registry.db.entities.DomainEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.EntityEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.EntityTypeEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.GroupMembershipEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.PermissionTypeEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.SharingEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.UserEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.UserGroupEntity</class>
- </persistence-unit>
-</persistence>
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
deleted file mode 100644
index a9ca3dc..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-CREATE TABLE DOMAIN (
- DOMAIN_ID VARCHAR(255),
- NAME VARCHAR(255),
- DESCRIPTION VARCHAR(255),
- CREATED_TIME LONG,
- UPDATED_TIME LONG,
- PRIMARY KEY (DOMAIN_ID)
-);
-
-CREATE TABLE USER (
- USER_ID VARCHAR(255),
- DOMAIN_ID VARCHAR(255),
- USER_NAME VARCHAR(255),
- CREATED_TIME LONG,
- UPDATED_TIME LONG,
- PRIMARY KEY (USER_ID),
- FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
-);
-
-CREATE TABLE USER_GROUP (
- GROUP_ID VARCHAR(255),
- DOMAIN_ID VARCHAR(255),
- NAME VARCHAR(255),
- DESCRIPTION VARCHAR(255),
- OWNER_ID VARCHAR(255),
- TYPE VARCHAR(255),
- CREATED_TIME LONG,
- UPDATED_TIME LONG,
- PRIMARY KEY (GROUP_ID),
- FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID),
- FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID)
-);
-
-
-CREATE TABLE GROUP_MEMBERSHIP (
- PARENT_ID VARCHAR(255),
- CHILD_ID VARCHAR(255),
- CHILD_TYPE VARCHAR(255),
- PRIMARY KEY (PARENT_ID, CHILD_ID),
- FOREIGN KEY (PARENT_ID) REFERENCES USER_GROUP(GROUP_ID),
- FOREIGN KEY (CHILD_ID) REFERENCES USER_GROUP(GROUP_ID)
-);
-
-CREATE TABLE ENTITY_TYPE (
- ENTITY_TYPE_ID VARCHAR(255),
- DOMAIN_ID VARCHAR(255),
- NAME VARCHAR(255),
- DESCRIPTION VARCHAR(255),
- CREATED_TIME LONG,
- UPDATED_TIME LONG,
- PRIMARY KEY (ENTITY_TYPE_ID),
- FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
-);
-
-CREATE TABLE PERMISSION_TYPE (
- PERMISSION_TYPE_ID VARCHAR(255),
- DOMAIN_ID VARCHAR(255),
- NAME VARCHAR(255),
- CREATED_TIME LONG,
- UPDATED_TIME LONG,
- PRIMARY KEY (PERMISSION_TYPE_ID),
- FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
-);
-
-CREATE TABLE ENTITY (
- ENTITY_ID VARCHAR(255),
- DOMAIN_ID VARCHAR(255),
- ENITY_TYPE VARCHAR(255),
- OWNER_ID VARCHAR(255),
- PARENT_ENTITY_ID VARCHAR(255),
- NAME VARCHAR(255),
- DESCRIPTION VARCHAR(255),
- METADATA BLOB,
- FULL_TEXT TEXT,
- CREATED_TIME LONG,
- UPDATED_TIME LONG,
- PRIMARY KEY (ENTITY_ID),
- FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID),
- FOREIGN KEY (ENITY_TYPE) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
- FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID),
- FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID)
-);
-
-CREATE TABLE SHARING (
- PERMISSION_TYPE_ID VARCHAR(255),
- ENTITY_TYPE_ID VARCHAR(255),
- ENTITY_ID VARCHAR(255),
- GROUP_ID VARCHAR(255),
- PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID),
- FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID),
- FOREIGN KEY (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
- FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID)
-)
-
-CREATE TABLE CONFIGURATION
-(
- CONFIG_KEY VARCHAR(255),
- CONFIG_VALUE VARCHAR(255),
- PRIMARY KEY(CONFIG_KEY, CONFIG_VALUE)
-);
-
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VALUE) VALUES('gov_reg_version', '0.17');
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java b/airavata-gov-registry/airavata-gov-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
deleted file mode 100644
index 0b0da15..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db;
-
-import junit.framework.Assert;
-import org.apache.airavata.gov.registry.db.entities.DomainEntity;
-import org.apache.airavata.gov.registry.db.entities.UserEntity;
-import org.apache.airavata.gov.registry.db.repositories.DomainRepository;
-import org.apache.airavata.gov.registry.db.repositories.UserRepository;
-import org.apache.airavata.gov.registry.db.utils.DBConstants;
-import org.apache.airavata.gov.registry.models.Domain;
-import org.apache.airavata.gov.registry.models.GovRegistryException;
-import org.apache.airavata.gov.registry.models.User;
-import org.apache.airavata.gov.registry.models.UserGroup;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class RepositoriesTest {
- private final static Logger logger = LoggerFactory.getLogger(RepositoriesTest.class);
-
- @Test
- public void test() throws GovRegistryException {
-
- //Creating domain
- Domain domain = new Domain();
- String domainId = "test-domain."+System.currentTimeMillis();
- domain.setDomainId(domainId);
- domain.setName(domainId);
- domain.setDescription("test domain description");
- domain.setCreatedTime(System.currentTimeMillis());
- domain.setUpdatedTime(System.currentTimeMillis());
-
- DomainRepository domainRepository = new DomainRepository(Domain.class, DomainEntity.class);
- domain = domainRepository.create(domain);
- Assert.assertNotNull(domain);
-
- Map<String, String> filters = new HashMap<>();
- filters.put(DBConstants.DomainTable.DESCRIPTION, "test");
- Assert.assertTrue(domainRepository.select(filters, 0, 10).size() > 0);
-
-
- //Creating users
- User user1 = new User();
- String userName1 = "test-user." + System.currentTimeMillis();
- String userId1 = domainId + ":" + userName1;
- user1.setUserId(userId1);
- user1.setUserName(userName1);
- user1.setDomainId(domainId);
- user1.setCreatedTime(System.currentTimeMillis());
- user1.setUpdatedTime(System.currentTimeMillis());
-
- UserRepository userRepository = new UserRepository(User.class, UserEntity.class);
- user1 = userRepository.create(user1);
- Assert.assertNotNull(user1);
-
- User user2 = new User();
- String userName2 = "test-user." + System.currentTimeMillis();
- String userId2 = domainId + ":" + userName2;
- user2.setUserId(userId2);
- user2.setUserName(userName2);
- user2.setDomainId(domainId);
- user2.setCreatedTime(System.currentTimeMillis());
- user2.setUpdatedTime(System.currentTimeMillis());
-
- User user3 = new User();
- String userName3 = "test-user." + System.currentTimeMillis();
- String userId3 = domainId + ":" + userName3;
- user3.setUserId(userId3);
- user3.setUserName(userName3);
- user3.setDomainId(domainId);
- user3.setCreatedTime(System.currentTimeMillis());
- user3.setUpdatedTime(System.currentTimeMillis());
-
- filters = new HashMap<>();
- filters.put(DBConstants.UserTable.USER_NAME, "test");
- Assert.assertTrue(userRepository.select(filters, 0, 10).size() > 0);
-
- //Creating Groups
- UserGroup userGroup1 = new UserGroup();
- String groupName1 = "test-group";
- String groupId1 = domainId + ":" + groupName1 + "." + System.currentTimeMillis();
- userGroup1.setGroupId(groupId1);
- userGroup1.setDomainId(domainId);
- userGroup1.setName(groupName1);
- userGroup1.setDescription("test group description");
- userGroup1.setOwnerId(userId1);
- userGroup1.setCreatedTime(System.currentTimeMillis());
- userGroup1.setUpdatedTime(System.currentTimeMillis());
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml b/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
deleted file mode 100644
index 51aab58..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>gov-registry</artifactId>
- <groupId>org.apache.airavata</groupId>
- <relativePath>../pom.xml</relativePath>
- <version>${global.version}</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>airavata-gov-registry-stubs</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- <version>0.9.3</version>
- </dependency>
- </dependencies>
-
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
deleted file mode 100644
index a373892..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
+++ /dev/null
@@ -1,800 +0,0 @@
-/**
- * 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.gov.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 javax.annotation.Generated;
-import java.util.*;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
-public class Domain implements org.apache.thrift.TBase<Domain, Domain._Fields>, java.io.Serializable, Cloneable, Comparable<Domain> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Domain");
-
- private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DomainStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DomainTupleSchemeFactory());
- }
-
- public String domainId; // optional
- public String name; // optional
- public String description; // optional
- public long createdTime; // optional
- public long updatedTime; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- DOMAIN_ID((short)1, "domainId"),
- NAME((short)2, "name"),
- DESCRIPTION((short)3, "description"),
- CREATED_TIME((short)4, "createdTime"),
- UPDATED_TIME((short)5, "updatedTime");
-
- 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: // DOMAIN_ID
- return DOMAIN_ID;
- case 2: // NAME
- return NAME;
- case 3: // DESCRIPTION
- return DESCRIPTION;
- case 4: // CREATED_TIME
- return CREATED_TIME;
- case 5: // UPDATED_TIME
- return UPDATED_TIME;
- 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 __CREATEDTIME_ISSET_ID = 0;
- private static final int __UPDATEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
- tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Domain.class, metaDataMap);
- }
-
- public Domain() {
- this.domainId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public Domain(Domain other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetDomainId()) {
- this.domainId = other.domainId;
- }
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- this.createdTime = other.createdTime;
- this.updatedTime = other.updatedTime;
- }
-
- public Domain deepCopy() {
- return new Domain(this);
- }
-
- @Override
- public void clear() {
- this.domainId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- this.name = null;
- this.description = null;
- setCreatedTimeIsSet(false);
- this.createdTime = 0;
- setUpdatedTimeIsSet(false);
- this.updatedTime = 0;
- }
-
- public String getDomainId() {
- return this.domainId;
- }
-
- public Domain setDomainId(String domainId) {
- this.domainId = domainId;
- return this;
- }
-
- public void unsetDomainId() {
- this.domainId = null;
- }
-
- /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
- public boolean isSetDomainId() {
- return this.domainId != null;
- }
-
- public void setDomainIdIsSet(boolean value) {
- if (!value) {
- this.domainId = null;
- }
- }
-
- public String getName() {
- return this.name;
- }
-
- public Domain setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public Domain setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public long getCreatedTime() {
- return this.createdTime;
- }
-
- public Domain setCreatedTime(long createdTime) {
- this.createdTime = createdTime;
- setCreatedTimeIsSet(true);
- return this;
- }
-
- public void unsetCreatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- public void setCreatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
- }
-
- public long getUpdatedTime() {
- return this.updatedTime;
- }
-
- public Domain setUpdatedTime(long updatedTime) {
- this.updatedTime = updatedTime;
- setUpdatedTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- public void setUpdatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case DOMAIN_ID:
- if (value == null) {
- unsetDomainId();
- } else {
- setDomainId((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case CREATED_TIME:
- if (value == null) {
- unsetCreatedTime();
- } else {
- setCreatedTime((Long)value);
- }
- break;
-
- case UPDATED_TIME:
- if (value == null) {
- unsetUpdatedTime();
- } else {
- setUpdatedTime((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case DOMAIN_ID:
- return getDomainId();
-
- case NAME:
- return getName();
-
- case DESCRIPTION:
- return getDescription();
-
- case CREATED_TIME:
- return getCreatedTime();
-
- case UPDATED_TIME:
- return getUpdatedTime();
-
- }
- 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 DOMAIN_ID:
- return isSetDomainId();
- case NAME:
- return isSetName();
- case DESCRIPTION:
- return isSetDescription();
- case CREATED_TIME:
- return isSetCreatedTime();
- case UPDATED_TIME:
- return isSetUpdatedTime();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof Domain)
- return this.equals((Domain)that);
- return false;
- }
-
- public boolean equals(Domain that) {
- if (that == null)
- return false;
-
- boolean this_present_domainId = true && this.isSetDomainId();
- boolean that_present_domainId = true && that.isSetDomainId();
- if (this_present_domainId || that_present_domainId) {
- if (!(this_present_domainId && that_present_domainId))
- return false;
- if (!this.domainId.equals(that.domainId))
- return false;
- }
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- boolean this_present_createdTime = true && this.isSetCreatedTime();
- boolean that_present_createdTime = true && that.isSetCreatedTime();
- if (this_present_createdTime || that_present_createdTime) {
- if (!(this_present_createdTime && that_present_createdTime))
- return false;
- if (this.createdTime != that.createdTime)
- return false;
- }
-
- boolean this_present_updatedTime = true && this.isSetUpdatedTime();
- boolean that_present_updatedTime = true && that.isSetUpdatedTime();
- if (this_present_updatedTime || that_present_updatedTime) {
- if (!(this_present_updatedTime && that_present_updatedTime))
- return false;
- if (this.updatedTime != that.updatedTime)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_domainId = true && (isSetDomainId());
- list.add(present_domainId);
- if (present_domainId)
- list.add(domainId);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- boolean present_createdTime = true && (isSetCreatedTime());
- list.add(present_createdTime);
- if (present_createdTime)
- list.add(createdTime);
-
- boolean present_updatedTime = true && (isSetUpdatedTime());
- list.add(present_updatedTime);
- if (present_updatedTime)
- list.add(updatedTime);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(Domain other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDomainId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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("Domain(");
- boolean first = true;
-
- if (isSetDomainId()) {
- sb.append("domainId:");
- if (this.domainId == null) {
- sb.append("null");
- } else {
- sb.append(this.domainId);
- }
- first = false;
- }
- if (isSetName()) {
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- }
- if (isSetDescription()) {
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- }
- if (isSetCreatedTime()) {
- if (!first) sb.append(", ");
- sb.append("createdTime:");
- sb.append(this.createdTime);
- first = false;
- }
- if (isSetUpdatedTime()) {
- if (!first) sb.append(", ");
- sb.append("updatedTime:");
- sb.append(this.updatedTime);
- 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 DomainStandardSchemeFactory implements SchemeFactory {
- public DomainStandardScheme getScheme() {
- return new DomainStandardScheme();
- }
- }
-
- private static class DomainStandardScheme extends StandardScheme<Domain> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, Domain 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: // DOMAIN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CREATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // UPDATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(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, Domain struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.domainId != null) {
- if (struct.isSetDomainId()) {
- oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
- oprot.writeString(struct.domainId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.name != null) {
- if (struct.isSetName()) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- }
- if (struct.description != null) {
- if (struct.isSetDescription()) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.createdTime);
- oprot.writeFieldEnd();
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.updatedTime);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class DomainTupleSchemeFactory implements SchemeFactory {
- public DomainTupleScheme getScheme() {
- return new DomainTupleScheme();
- }
- }
-
- private static class DomainTupleScheme extends TupleScheme<Domain> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Domain struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetDomainId()) {
- optionals.set(0);
- }
- if (struct.isSetName()) {
- optionals.set(1);
- }
- if (struct.isSetDescription()) {
- optionals.set(2);
- }
- if (struct.isSetCreatedTime()) {
- optionals.set(3);
- }
- if (struct.isSetUpdatedTime()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetDomainId()) {
- oprot.writeString(struct.domainId);
- }
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeI64(struct.createdTime);
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeI64(struct.updatedTime);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Domain struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(3)) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- }
- if (incoming.get(4)) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- }
- }
- }
-
-}
-
[50/50] [abbrv] airavata git commit: merge
Posted by sc...@apache.org.
merge
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d14df923
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d14df923
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d14df923
Branch: refs/heads/airavata-gov-registry
Commit: d14df923cdbb1cd8496b41bafe3bfbbc5079ae6c
Parents: f3c365a ac819e5
Author: scnakandala <su...@gmail.com>
Authored: Mon Oct 3 11:38:09 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Oct 3 11:38:09 2016 -0400
----------------------------------------------------------------------
----------------------------------------------------------------------
[48/50] [abbrv] airavata git commit: WIP in gov registry
Posted by sc...@apache.org.
WIP in gov registry
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/1737f867
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/1737f867
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/1737f867
Branch: refs/heads/airavata-gov-registry
Commit: 1737f8676002e478f144bf88f2525b4d9e25b167
Parents: 4f9e7dc
Author: scnakandala <su...@gmail.com>
Authored: Tue Sep 20 16:34:47 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Oct 3 11:33:14 2016 -0400
----------------------------------------------------------------------
.../airavata-gov-registry-core/pom.xml | 5 +
.../gov/registry/db/entities/EntityEntity.java | 24 +
.../registry/db/entities/EntityTypeEntity.java | 12 +
.../db/entities/PermissionTypeEntity.java | 12 +
.../gov/registry/db/entities/UserEntity.java | 12 +
.../registry/db/entities/UserGroupEntity.java | 24 +
.../db/repositories/AbstractRepository.java | 79 +
.../db/repositories/UserRepository.java | 34 +
.../gov/registry/db/utils/Committer.java | 27 +
.../gov/registry/db/utils/JPAUtils.java | 24 +-
.../db/utils/ObjectMapperSingleton.java | 39 +
.../server/GovRegistryServerHandler.java | 197 ++-
.../src/main/resources/gov-registry.sql | 2 -
.../airavata-gov-registry-stubs/pom.xml | 7 +
.../airavata/gov/registry/models/Entitiy.java | 1401 ------------------
.../airavata/gov/registry/models/Entity.java | 183 ++-
.../thrift_models/gov_reg_models.thrift | 13 +-
17 files changed, 644 insertions(+), 1451 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/pom.xml b/airavata-gov-registry/airavata-gov-registry-core/pom.xml
index b0aac88..d986ebe 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/pom.xml
+++ b/airavata-gov-registry/airavata-gov-registry-core/pom.xml
@@ -32,6 +32,11 @@
<artifactId>airavata-commons</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>net.sf.dozer</groupId>
+ <artifactId>dozer</artifactId>
+ <version>5.4.0</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
index 6abed54..e472790 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
@@ -31,6 +31,8 @@ import java.util.Arrays;
public class EntityEntity {
private final static Logger logger = LoggerFactory.getLogger(EntityEntity.class);
private String entityId;
+ private String domainId;
+ private String parentEntityId;
private String name;
private String description;
private byte[] metadata;
@@ -51,6 +53,26 @@ public class EntityEntity {
}
@Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "PARENT_ENTITY_ID")
+ public String getParentEntityId() {
+ return parentEntityId;
+ }
+
+ public void setParentEntityId(String parentEntityId) {
+ this.parentEntityId = parentEntityId;
+ }
+
+ @Basic
@Column(name = "NAME")
public String getName() {
return name;
@@ -118,6 +140,8 @@ public class EntityEntity {
EntityEntity that = (EntityEntity) o;
if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (parentEntityId != null ? !parentEntityId.equals(that.parentEntityId) : that.parentEntityId != null) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (description != null ? !description.equals(that.description) : that.description != null) return false;
if (!Arrays.equals(metadata, that.metadata)) return false;
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
index f54eb91..63c5e2f 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
@@ -30,6 +30,7 @@ import javax.persistence.*;
public class EntityTypeEntity {
private final static Logger logger = LoggerFactory.getLogger(EntityTypeEntity.class);
private String entityTypeId;
+ private String domainId;
private String name;
private String description;
private String createdTime;
@@ -47,6 +48,16 @@ public class EntityTypeEntity {
}
@Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
@Column(name = "NAME")
public String getName() {
return name;
@@ -94,6 +105,7 @@ public class EntityTypeEntity {
EntityTypeEntity that = (EntityTypeEntity) o;
if (entityTypeId != null ? !entityTypeId.equals(that.entityTypeId) : that.entityTypeId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (description != null ? !description.equals(that.description) : that.description != null) return false;
if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
index 198bc9e..ecc37b6 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
@@ -30,6 +30,7 @@ import javax.persistence.*;
public class PermissionTypeEntity {
private final static Logger logger = LoggerFactory.getLogger(PermissionTypeEntity.class);
private String permissionTypeId;
+ private String domainId;
private String name;
private String createdTime;
private String updatedTime;
@@ -46,6 +47,16 @@ public class PermissionTypeEntity {
}
@Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
@Column(name = "NAME")
public String getName() {
return name;
@@ -84,6 +95,7 @@ public class PermissionTypeEntity {
if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
index a19321f..d4598d5 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
@@ -30,6 +30,7 @@ import javax.persistence.*;
public class UserEntity {
private final static Logger logger = LoggerFactory.getLogger(UserEntity.class);
private String userId;
+ private String domainId;
private String userName;
private String createdTime;
private String updatedTime;
@@ -45,6 +46,16 @@ public class UserEntity {
this.userId = userId;
}
+ @Id
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
@Basic
@Column(name = "USER_NAME")
public String getUserName() {
@@ -83,6 +94,7 @@ public class UserEntity {
UserEntity that = (UserEntity) o;
if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
index d0a6bbb..560f171 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
@@ -30,8 +30,10 @@ import javax.persistence.*;
public class UserGroupEntity {
private final static Logger logger = LoggerFactory.getLogger(UserGroupEntity.class);
private String groupId;
+ private String domainId;
private String name;
private String description;
+ private String ownerId;
private String type;
private String createdTime;
private String updatedTime;
@@ -48,6 +50,26 @@ public class UserGroupEntity {
this.groupId = groupId;
}
+ @Id
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Id
+ @Column(name = "OWNER_ID")
+ public String getOwnerId() {
+ return ownerId;
+ }
+
+ public void setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ }
+
@Basic
@Column(name = "NAME")
public String getName() {
@@ -106,6 +128,8 @@ public class UserGroupEntity {
UserGroupEntity that = (UserGroupEntity) o;
if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (ownerId != null ? !ownerId.equals(that.ownerId) : that.ownerId != null) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (description != null ? !description.equals(that.description) : that.description != null) return false;
if (type != null ? !type.equals(that.type) : that.type != null) return false;
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
new file mode 100644
index 0000000..03c3b41
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
@@ -0,0 +1,79 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.repositories;
+
+import org.apache.airavata.gov.registry.db.utils.JPAUtils;
+import org.apache.airavata.gov.registry.db.utils.ObjectMapperSingleton;
+import org.apache.airavata.gov.registry.models.GovRegistryException;
+import org.dozer.Mapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class AbstractRepository<T, E, Id> {
+ private final static Logger logger = LoggerFactory.getLogger(AbstractRepository.class);
+
+ private Class<T> thriftGenericClass;
+ private Class<E> dbEntityGenericClass;
+
+ public AbstractRepository(Class<T> thriftGenericClass, Class<E> dbEntityGenericClass){
+ this.thriftGenericClass = thriftGenericClass;
+ this.dbEntityGenericClass = dbEntityGenericClass;
+ }
+
+ public T create(T t) throws GovRegistryException {
+ return update(t);
+ }
+
+ public T update(T t) throws GovRegistryException {
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ E entity = mapper.map(t, dbEntityGenericClass);
+ E persistedCopy = JPAUtils.execute(entityManager -> entityManager.merge(entity));
+ return mapper.map(persistedCopy, thriftGenericClass);
+ }
+
+ public boolean delete(Id id) throws GovRegistryException {
+ JPAUtils.execute(entityManager -> {
+ E entity = entityManager.find(dbEntityGenericClass, id);
+ entityManager.remove(entity);
+ return entity;
+ });
+ return true;
+ }
+
+ public T get(Id id) throws GovRegistryException {
+ E entity = JPAUtils.execute(entityManager -> entityManager
+ .find(dbEntityGenericClass, id));
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ return mapper.map(entity, thriftGenericClass);
+ }
+
+ public List<T> select(String query, int limit, int offset) throws GovRegistryException {
+ List resultSet = JPAUtils.execute(entityManager -> entityManager.createQuery(query).setFirstResult(offset)
+ .setMaxResults(offset).getResultList());
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ List<T> gatewayList = new ArrayList<>();
+ resultSet.stream().forEach(rs -> gatewayList.add(mapper.map(rs, thriftGenericClass)));
+ return gatewayList;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
new file mode 100644
index 0000000..44af810
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.repositories;
+
+import org.apache.airavata.gov.registry.db.entities.UserEntity;
+import org.apache.airavata.gov.registry.models.User;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserRepository extends AbstractRepository<User, UserEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(UserRepository.class);
+
+ public UserRepository(Class<User> thriftGenericClass, Class<UserEntity> dbEntityGenericClass) {
+ super(thriftGenericClass, dbEntityGenericClass);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
new file mode 100644
index 0000000..ae9feda
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
@@ -0,0 +1,27 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+@FunctionalInterface
+public interface Committer<T, R> {
+
+ R commit(T t);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
index d94a0eb..0d8b78f 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
@@ -22,6 +22,7 @@ package org.apache.airavata.gov.registry.db.utils;
import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gov.registry.models.GovRegistryException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -46,7 +47,7 @@ public class JPAUtils {
@PersistenceContext(unitName = "airavata-gov-registry")
private static EntityManager appCatEntityManager;
- public static EntityManager getEntityManager() throws ApplicationSettingsException {
+ public static EntityManager getEntityManager() {
if (factory == null) {
// String connectionProperties = "DriverClassName=" + readServerProperties(GOV_REG_JDBC_DRIVER) + "," +
// "Url=" + readServerProperties(GOV_REG_JDBC_URL) + "?autoReconnect=true," +
@@ -76,12 +77,29 @@ public class JPAUtils {
return appCatEntityManager;
}
- private static String readServerProperties(String propertyName) throws ApplicationSettingsException {
+ private static String readServerProperties(String propertyName) throws GovRegistryException {
try {
return ServerSettings.getSetting(propertyName);
} catch (ApplicationSettingsException e) {
logger.error("Unable to read airavata-server.properties...", e);
- throw new ApplicationSettingsException("Unable to read airavata-server.properties...");
+ throw new GovRegistryException("Unable to read airavata-server.properties...");
+ }
+ }
+
+ public static <R> R execute(Committer<EntityManager, R> committer) throws GovRegistryException {
+ EntityManager entityManager = JPAUtils.getEntityManager();
+ try {
+ entityManager.getTransaction().begin();
+ R r = committer.commit(entityManager);
+ entityManager.getTransaction().commit();
+ return r;
+ }finally {
+ if (entityManager != null && entityManager.isOpen()) {
+ if (entityManager.getTransaction().isActive()) {
+ entityManager.getTransaction().rollback();
+ }
+ entityManager.close();
+ }
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
new file mode 100644
index 0000000..d6c4d4d
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
@@ -0,0 +1,39 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+import org.dozer.DozerBeanMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ObjectMapperSingleton extends DozerBeanMapper{
+ private final static Logger logger = LoggerFactory.getLogger(ObjectMapperSingleton.class);
+
+ private static ObjectMapperSingleton instance;
+
+ private ObjectMapperSingleton(){}
+
+ public static ObjectMapperSingleton getInstance(){
+ if(instance == null)
+ instance = new ObjectMapperSingleton();
+ return instance;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
index 2fdfb7e..57d9093 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
@@ -20,9 +20,204 @@
*/
package org.apache.airavata.gov.registry.server;
+import org.apache.airavata.gov.registry.models.*;
+import org.apache.airavata.gov.registry.service.cpi.GovRegistryService;
+import org.apache.thrift.TException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class GovRegistryServerHandler {
+import java.util.List;
+import java.util.Map;
+
+public class GovRegistryServerHandler implements GovRegistryService.Iface{
private final static Logger logger = LoggerFactory.getLogger(GovRegistryServerHandler.class);
+
+ /**
+ * * Domain Operations
+ * *
+ */
+ @Override
+ public boolean createDomain(Domain domain) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateDomain(Domain domain) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteDomain(String domainId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Domain getDomain(String domainId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Domain> getDomains(int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * User Operations
+ * *
+ */
+ @Override
+ public boolean registerUser(User user) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updatedUser(User user) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteUser(String userId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public User getUser(String userId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<User> getUsers(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * Group Operations
+ * *
+ */
+ @Override
+ public boolean createGroup(Group group) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateGroup(Group group) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteGroup(String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Group getGroup(String groupId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Group> getGroups(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ @Override
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Map<String, GroupType> getGroupMembers(String groupId) throws TException {
+ return null;
+ }
+
+ /**
+ * * EntityType Operations
+ * *
+ */
+ @Override
+ public boolean createEntityType(EntityType entityType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateEntityType(EntityType entityType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteEntityType(String entityTypeId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public EntityType getEntityType(String entityTypeId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<EntityType> getEntityTypes(String domain, int offset, int limit) throws TException {
+ return null;
+ }
+
+ /**
+ * * Entity Operations
+ * *
+ */
+ @Override
+ public boolean registerEntity(Entity entity) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updateEntity(Entity entity) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deleteEntity(String entityId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public Entity getEntity(String entityId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<Entity> searchEntities(String domain, String entityType, Map<String, String> filters, int offset, int limit) throws GovRegistryException, TException {
+ return null;
+ }
+
+ /**
+ * * EntityType Operations
+ * *
+ */
+ @Override
+ public boolean createPermissionType(PermissionType permisionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean updatePermissionType(PermissionType permisionType) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public boolean deletePermissionType(String entityTypeId) throws GovRegistryException, TException {
+ return false;
+ }
+
+ @Override
+ public PermissionType getPermissionType(String permisionTypeId) throws GovRegistryException, TException {
+ return null;
+ }
+
+ @Override
+ public List<PermissionType> getPermissionTypes(String domain, int offset, int limit) throws GovRegistryException, TException {
+ return null;
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
index 239ecde..68e1a95 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
@@ -88,7 +88,6 @@ CREATE TABLE ENTITY (
DOMAIN_ID VARCHAR(255),
ENITY_TYPE VARCHAR(255),
OWNER_ID VARCHAR(255),
- PARENT_ENTITY_TYPE VARCHAR(255),
PARENT_ENTITY_ID VARCHAR(255),
NAME VARCHAR(255),
DESCRIPTION VARCHAR(255),
@@ -100,7 +99,6 @@ CREATE TABLE ENTITY (
FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID),
FOREIGN KEY (ENITY_TYPE) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID),
- FOREIGN KEY (PARENT_ENTITY_TYPE) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID)
);
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml b/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
index 72ec866..51aab58 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
@@ -11,6 +11,13 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>airavata-gov-registry-stubs</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>0.9.3</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/1737f867/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entitiy.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entitiy.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entitiy.java
deleted file mode 100644
index 9787ae7..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entitiy.java
+++ /dev/null
@@ -1,1401 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-19")
-public class Entitiy implements org.apache.thrift.TBase<Entitiy, Entitiy._Fields>, java.io.Serializable, Cloneable, Comparable<Entitiy> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entitiy");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField DOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("domain", org.apache.thrift.protocol.TType.STRING, (short)2);
- 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)3);
- private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)7);
- private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)9);
- 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)10);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new EntitiyStandardSchemeFactory());
- schemes.put(TupleScheme.class, new EntitiyTupleSchemeFactory());
- }
-
- public String id; // optional
- public String domain; // optional
- public String entityTypeId; // optional
- public String ownerId; // optional
- public String name; // optional
- public String description; // optional
- public Map<String,String> metadata; // optional
- public String fullText; // optional
- public long createdTime; // optional
- public long updatedTime; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ID((short)1, "id"),
- DOMAIN((short)2, "domain"),
- ENTITY_TYPE_ID((short)3, "entityTypeId"),
- OWNER_ID((short)4, "ownerId"),
- NAME((short)5, "name"),
- DESCRIPTION((short)6, "description"),
- METADATA((short)7, "metadata"),
- FULL_TEXT((short)8, "fullText"),
- CREATED_TIME((short)9, "createdTime"),
- UPDATED_TIME((short)10, "updatedTime");
-
- 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: // ID
- return ID;
- case 2: // DOMAIN
- return DOMAIN;
- case 3: // ENTITY_TYPE_ID
- return ENTITY_TYPE_ID;
- case 4: // OWNER_ID
- return OWNER_ID;
- case 5: // NAME
- return NAME;
- case 6: // DESCRIPTION
- return DESCRIPTION;
- case 7: // METADATA
- return METADATA;
- case 8: // FULL_TEXT
- return FULL_TEXT;
- case 9: // CREATED_TIME
- return CREATED_TIME;
- case 10: // UPDATED_TIME
- return UPDATED_TIME;
- 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 __CREATEDTIME_ISSET_ID = 0;
- private static final int __UPDATEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.ID,_Fields.DOMAIN,_Fields.ENTITY_TYPE_ID,_Fields.OWNER_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.METADATA,_Fields.FULL_TEXT,_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);
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.FULL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("fullText", 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Entitiy.class, metaDataMap);
- }
-
- public Entitiy() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public Entitiy(Entitiy other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetDomain()) {
- this.domain = other.domain;
- }
- if (other.isSetEntityTypeId()) {
- this.entityTypeId = other.entityTypeId;
- }
- if (other.isSetOwnerId()) {
- this.ownerId = other.ownerId;
- }
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- if (other.isSetMetadata()) {
- Map<String,String> __this__metadata = new HashMap<String,String>(other.metadata);
- this.metadata = __this__metadata;
- }
- if (other.isSetFullText()) {
- this.fullText = other.fullText;
- }
- this.createdTime = other.createdTime;
- this.updatedTime = other.updatedTime;
- }
-
- public Entitiy deepCopy() {
- return new Entitiy(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- this.domain = null;
- this.entityTypeId = null;
- this.ownerId = null;
- this.name = null;
- this.description = null;
- this.metadata = null;
- this.fullText = null;
- setCreatedTimeIsSet(false);
- this.createdTime = 0;
- setUpdatedTimeIsSet(false);
- this.updatedTime = 0;
- }
-
- public String getId() {
- return this.id;
- }
-
- public Entitiy setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getDomain() {
- return this.domain;
- }
-
- public Entitiy setDomain(String domain) {
- this.domain = domain;
- return this;
- }
-
- public void unsetDomain() {
- this.domain = null;
- }
-
- /** Returns true if field domain is set (has been assigned a value) and false otherwise */
- public boolean isSetDomain() {
- return this.domain != null;
- }
-
- public void setDomainIsSet(boolean value) {
- if (!value) {
- this.domain = null;
- }
- }
-
- public String getEntityTypeId() {
- return this.entityTypeId;
- }
-
- public Entitiy 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 String getOwnerId() {
- return this.ownerId;
- }
-
- public Entitiy setOwnerId(String ownerId) {
- this.ownerId = ownerId;
- return this;
- }
-
- public void unsetOwnerId() {
- this.ownerId = null;
- }
-
- /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
- public boolean isSetOwnerId() {
- return this.ownerId != null;
- }
-
- public void setOwnerIdIsSet(boolean value) {
- if (!value) {
- this.ownerId = null;
- }
- }
-
- public String getName() {
- return this.name;
- }
-
- public Entitiy setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public Entitiy setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public int getMetadataSize() {
- return (this.metadata == null) ? 0 : this.metadata.size();
- }
-
- public void putToMetadata(String key, String val) {
- if (this.metadata == null) {
- this.metadata = new HashMap<String,String>();
- }
- this.metadata.put(key, val);
- }
-
- public Map<String,String> getMetadata() {
- return this.metadata;
- }
-
- public Entitiy setMetadata(Map<String,String> metadata) {
- this.metadata = metadata;
- return this;
- }
-
- public void unsetMetadata() {
- this.metadata = null;
- }
-
- /** Returns true if field metadata is set (has been assigned a value) and false otherwise */
- public boolean isSetMetadata() {
- return this.metadata != null;
- }
-
- public void setMetadataIsSet(boolean value) {
- if (!value) {
- this.metadata = null;
- }
- }
-
- public String getFullText() {
- return this.fullText;
- }
-
- public Entitiy setFullText(String fullText) {
- this.fullText = fullText;
- return this;
- }
-
- public void unsetFullText() {
- this.fullText = null;
- }
-
- /** Returns true if field fullText is set (has been assigned a value) and false otherwise */
- public boolean isSetFullText() {
- return this.fullText != null;
- }
-
- public void setFullTextIsSet(boolean value) {
- if (!value) {
- this.fullText = null;
- }
- }
-
- public long getCreatedTime() {
- return this.createdTime;
- }
-
- public Entitiy setCreatedTime(long createdTime) {
- this.createdTime = createdTime;
- setCreatedTimeIsSet(true);
- return this;
- }
-
- public void unsetCreatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- public void setCreatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
- }
-
- public long getUpdatedTime() {
- return this.updatedTime;
- }
-
- public Entitiy setUpdatedTime(long updatedTime) {
- this.updatedTime = updatedTime;
- setUpdatedTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- public void setUpdatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case DOMAIN:
- if (value == null) {
- unsetDomain();
- } else {
- setDomain((String)value);
- }
- break;
-
- case ENTITY_TYPE_ID:
- if (value == null) {
- unsetEntityTypeId();
- } else {
- setEntityTypeId((String)value);
- }
- break;
-
- case OWNER_ID:
- if (value == null) {
- unsetOwnerId();
- } else {
- setOwnerId((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case METADATA:
- if (value == null) {
- unsetMetadata();
- } else {
- setMetadata((Map<String,String>)value);
- }
- break;
-
- case FULL_TEXT:
- if (value == null) {
- unsetFullText();
- } else {
- setFullText((String)value);
- }
- break;
-
- case CREATED_TIME:
- if (value == null) {
- unsetCreatedTime();
- } else {
- setCreatedTime((Long)value);
- }
- break;
-
- case UPDATED_TIME:
- if (value == null) {
- unsetUpdatedTime();
- } else {
- setUpdatedTime((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ID:
- return getId();
-
- case DOMAIN:
- return getDomain();
-
- case ENTITY_TYPE_ID:
- return getEntityTypeId();
-
- case OWNER_ID:
- return getOwnerId();
-
- case NAME:
- return getName();
-
- case DESCRIPTION:
- return getDescription();
-
- case METADATA:
- return getMetadata();
-
- case FULL_TEXT:
- return getFullText();
-
- case CREATED_TIME:
- return getCreatedTime();
-
- case UPDATED_TIME:
- return getUpdatedTime();
-
- }
- 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 ID:
- return isSetId();
- case DOMAIN:
- return isSetDomain();
- case ENTITY_TYPE_ID:
- return isSetEntityTypeId();
- case OWNER_ID:
- return isSetOwnerId();
- case NAME:
- return isSetName();
- case DESCRIPTION:
- return isSetDescription();
- case METADATA:
- return isSetMetadata();
- case FULL_TEXT:
- return isSetFullText();
- case CREATED_TIME:
- return isSetCreatedTime();
- case UPDATED_TIME:
- return isSetUpdatedTime();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof Entitiy)
- return this.equals((Entitiy)that);
- return false;
- }
-
- public boolean equals(Entitiy that) {
- if (that == null)
- return false;
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_domain = true && this.isSetDomain();
- boolean that_present_domain = true && that.isSetDomain();
- if (this_present_domain || that_present_domain) {
- if (!(this_present_domain && that_present_domain))
- return false;
- if (!this.domain.equals(that.domain))
- 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;
- }
-
- boolean this_present_ownerId = true && this.isSetOwnerId();
- boolean that_present_ownerId = true && that.isSetOwnerId();
- if (this_present_ownerId || that_present_ownerId) {
- if (!(this_present_ownerId && that_present_ownerId))
- return false;
- if (!this.ownerId.equals(that.ownerId))
- return false;
- }
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- boolean this_present_metadata = true && this.isSetMetadata();
- boolean that_present_metadata = true && that.isSetMetadata();
- if (this_present_metadata || that_present_metadata) {
- if (!(this_present_metadata && that_present_metadata))
- return false;
- if (!this.metadata.equals(that.metadata))
- return false;
- }
-
- boolean this_present_fullText = true && this.isSetFullText();
- boolean that_present_fullText = true && that.isSetFullText();
- if (this_present_fullText || that_present_fullText) {
- if (!(this_present_fullText && that_present_fullText))
- return false;
- if (!this.fullText.equals(that.fullText))
- return false;
- }
-
- boolean this_present_createdTime = true && this.isSetCreatedTime();
- boolean that_present_createdTime = true && that.isSetCreatedTime();
- if (this_present_createdTime || that_present_createdTime) {
- if (!(this_present_createdTime && that_present_createdTime))
- return false;
- if (this.createdTime != that.createdTime)
- return false;
- }
-
- boolean this_present_updatedTime = true && this.isSetUpdatedTime();
- boolean that_present_updatedTime = true && that.isSetUpdatedTime();
- if (this_present_updatedTime || that_present_updatedTime) {
- if (!(this_present_updatedTime && that_present_updatedTime))
- return false;
- if (this.updatedTime != that.updatedTime)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_id = true && (isSetId());
- list.add(present_id);
- if (present_id)
- list.add(id);
-
- boolean present_domain = true && (isSetDomain());
- list.add(present_domain);
- if (present_domain)
- list.add(domain);
-
- boolean present_entityTypeId = true && (isSetEntityTypeId());
- list.add(present_entityTypeId);
- if (present_entityTypeId)
- list.add(entityTypeId);
-
- boolean present_ownerId = true && (isSetOwnerId());
- list.add(present_ownerId);
- if (present_ownerId)
- list.add(ownerId);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- boolean present_metadata = true && (isSetMetadata());
- list.add(present_metadata);
- if (present_metadata)
- list.add(metadata);
-
- boolean present_fullText = true && (isSetFullText());
- list.add(present_fullText);
- if (present_fullText)
- list.add(fullText);
-
- boolean present_createdTime = true && (isSetCreatedTime());
- list.add(present_createdTime);
- if (present_createdTime)
- list.add(createdTime);
-
- boolean present_updatedTime = true && (isSetUpdatedTime());
- list.add(present_updatedTime);
- if (present_updatedTime)
- list.add(updatedTime);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(Entitiy other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDomain()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain, other.domain);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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;
- }
- }
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOwnerId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMetadata()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFullText()).compareTo(other.isSetFullText());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFullText()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullText, other.fullText);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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("Entitiy(");
- boolean first = true;
-
- if (isSetId()) {
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- }
- if (isSetDomain()) {
- if (!first) sb.append(", ");
- sb.append("domain:");
- if (this.domain == null) {
- sb.append("null");
- } else {
- sb.append(this.domain);
- }
- first = false;
- }
- if (isSetEntityTypeId()) {
- if (!first) sb.append(", ");
- sb.append("entityTypeId:");
- if (this.entityTypeId == null) {
- sb.append("null");
- } else {
- sb.append(this.entityTypeId);
- }
- first = false;
- }
- if (isSetOwnerId()) {
- if (!first) sb.append(", ");
- sb.append("ownerId:");
- if (this.ownerId == null) {
- sb.append("null");
- } else {
- sb.append(this.ownerId);
- }
- first = false;
- }
- if (isSetName()) {
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- }
- if (isSetDescription()) {
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- }
- if (isSetMetadata()) {
- if (!first) sb.append(", ");
- sb.append("metadata:");
- if (this.metadata == null) {
- sb.append("null");
- } else {
- sb.append(this.metadata);
- }
- first = false;
- }
- if (isSetFullText()) {
- if (!first) sb.append(", ");
- sb.append("fullText:");
- if (this.fullText == null) {
- sb.append("null");
- } else {
- sb.append(this.fullText);
- }
- first = false;
- }
- if (isSetCreatedTime()) {
- if (!first) sb.append(", ");
- sb.append("createdTime:");
- sb.append(this.createdTime);
- first = false;
- }
- if (isSetUpdatedTime()) {
- if (!first) sb.append(", ");
- sb.append("updatedTime:");
- sb.append(this.updatedTime);
- 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 EntitiyStandardSchemeFactory implements SchemeFactory {
- public EntitiyStandardScheme getScheme() {
- return new EntitiyStandardScheme();
- }
- }
-
- private static class EntitiyStandardScheme extends StandardScheme<Entitiy> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, Entitiy 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: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DOMAIN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.domain = iprot.readString();
- struct.setDomainIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // ENTITY_TYPE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.entityTypeId = iprot.readString();
- struct.setEntityTypeIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // OWNER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.ownerId = iprot.readString();
- struct.setOwnerIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // METADATA
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
- struct.metadata = new HashMap<String,String>(2*_map0.size);
- String _key1;
- String _val2;
- for (int _i3 = 0; _i3 < _map0.size; ++_i3)
- {
- _key1 = iprot.readString();
- _val2 = iprot.readString();
- struct.metadata.put(_key1, _val2);
- }
- iprot.readMapEnd();
- }
- struct.setMetadataIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // FULL_TEXT
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.fullText = iprot.readString();
- struct.setFullTextIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // CREATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // UPDATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(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, Entitiy struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.id != null) {
- if (struct.isSetId()) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- }
- if (struct.domain != null) {
- if (struct.isSetDomain()) {
- oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
- oprot.writeString(struct.domain);
- oprot.writeFieldEnd();
- }
- }
- if (struct.entityTypeId != null) {
- if (struct.isSetEntityTypeId()) {
- oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
- oprot.writeString(struct.entityTypeId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.ownerId != null) {
- if (struct.isSetOwnerId()) {
- oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
- oprot.writeString(struct.ownerId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.name != null) {
- if (struct.isSetName()) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- }
- if (struct.description != null) {
- if (struct.isSetDescription()) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- }
- if (struct.metadata != null) {
- if (struct.isSetMetadata()) {
- oprot.writeFieldBegin(METADATA_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
- for (Map.Entry<String, String> _iter4 : struct.metadata.entrySet())
- {
- oprot.writeString(_iter4.getKey());
- oprot.writeString(_iter4.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (struct.fullText != null) {
- if (struct.isSetFullText()) {
- oprot.writeFieldBegin(FULL_TEXT_FIELD_DESC);
- oprot.writeString(struct.fullText);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.createdTime);
- oprot.writeFieldEnd();
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.updatedTime);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class EntitiyTupleSchemeFactory implements SchemeFactory {
- public EntitiyTupleScheme getScheme() {
- return new EntitiyTupleScheme();
- }
- }
-
- private static class EntitiyTupleScheme extends TupleScheme<Entitiy> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Entitiy struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetId()) {
- optionals.set(0);
- }
- if (struct.isSetDomain()) {
- optionals.set(1);
- }
- if (struct.isSetEntityTypeId()) {
- optionals.set(2);
- }
- if (struct.isSetOwnerId()) {
- optionals.set(3);
- }
- if (struct.isSetName()) {
- optionals.set(4);
- }
- if (struct.isSetDescription()) {
- optionals.set(5);
- }
- if (struct.isSetMetadata()) {
- optionals.set(6);
- }
- if (struct.isSetFullText()) {
- optionals.set(7);
- }
- if (struct.isSetCreatedTime()) {
- optionals.set(8);
- }
- if (struct.isSetUpdatedTime()) {
- optionals.set(9);
- }
- oprot.writeBitSet(optionals, 10);
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetDomain()) {
- oprot.writeString(struct.domain);
- }
- if (struct.isSetEntityTypeId()) {
- oprot.writeString(struct.entityTypeId);
- }
- if (struct.isSetOwnerId()) {
- oprot.writeString(struct.ownerId);
- }
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetMetadata()) {
- {
- oprot.writeI32(struct.metadata.size());
- for (Map.Entry<String, String> _iter5 : struct.metadata.entrySet())
- {
- oprot.writeString(_iter5.getKey());
- oprot.writeString(_iter5.getValue());
- }
- }
- }
- if (struct.isSetFullText()) {
- oprot.writeString(struct.fullText);
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeI64(struct.createdTime);
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeI64(struct.updatedTime);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Entitiy struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(10);
- if (incoming.get(0)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.domain = iprot.readString();
- struct.setDomainIsSet(true);
- }
- if (incoming.get(2)) {
- struct.entityTypeId = iprot.readString();
- struct.setEntityTypeIdIsSet(true);
- }
- if (incoming.get(3)) {
- struct.ownerId = iprot.readString();
- struct.setOwnerIdIsSet(true);
- }
- if (incoming.get(4)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(5)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(6)) {
- {
- org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.metadata = new HashMap<String,String>(2*_map6.size);
- String _key7;
- String _val8;
- for (int _i9 = 0; _i9 < _map6.size; ++_i9)
- {
- _key7 = iprot.readString();
- _val8 = iprot.readString();
- struct.metadata.put(_key7, _val8);
- }
- }
- struct.setMetadataIsSet(true);
- }
- if (incoming.get(7)) {
- struct.fullText = iprot.readString();
- struct.setFullTextIsSet(true);
- }
- if (incoming.get(8)) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- }
- if (incoming.get(9)) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- }
- }
- }
-
-}
-
[25/50] [abbrv] airavata git commit: initial commit
Posted by sc...@apache.org.
initial commit
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/4f9e7dcd
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/4f9e7dcd
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/4f9e7dcd
Branch: refs/heads/airavata-gov-registry
Commit: 4f9e7dcd8e08d95d410de580a8398b2a77e3e49f
Parents: 59142dd
Author: scnakandala <su...@gmail.com>
Authored: Tue Sep 20 15:51:18 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Oct 3 11:33:13 2016 -0400
----------------------------------------------------------------------
.../airavata-gov-registry-core/pom.xml | 37 +
.../src/main/java/META-INF/persistence.xml | 15 +
.../gov/registry/db/entities/DomainEntity.java | 113 +
.../gov/registry/db/entities/EntityEntity.java | 162 +
.../registry/db/entities/EntityTypeEntity.java | 124 +
.../db/entities/GroupMembershipEntity.java | 88 +
.../db/entities/GroupMembershipEntityPK.java | 74 +
.../db/entities/PermissionTypeEntity.java | 112 +
.../gov/registry/db/entities/SharingEntity.java | 111 +
.../registry/db/entities/SharingEntityPK.java | 88 +
.../gov/registry/db/entities/UserEntity.java | 111 +
.../registry/db/entities/UserGroupEntity.java | 148 +
.../gov/registry/db/utils/JPAUtils.java | 87 +
.../gov/registry/server/GovRegistryServer.java | 28 +
.../server/GovRegistryServerHandler.java | 28 +
.../src/main/resources/gov-registry.sql | 116 +
.../airavata-gov-registry-stubs/pom.xml | 16 +
.../airavata/gov/registry/models/Domain.java | 817 +
.../airavata/gov/registry/models/Entitiy.java | 1401 +
.../airavata/gov/registry/models/Entity.java | 1404 +
.../gov/registry/models/EntityType.java | 924 +
.../registry/models/GovRegistryException.java | 391 +
.../airavata/gov/registry/models/Group.java | 1154 +
.../airavata/gov/registry/models/GroupType.java | 45 +
.../gov/registry/models/PermissionType.java | 817 +
.../airavata/gov/registry/models/User.java | 817 +
.../models/gov_reg_modelsConstants.java | 41 +
.../service/cpi/GovRegistryService.java | 33673 +++++++++++++++++
airavata-gov-registry/pom.xml | 21 +
.../thrift_models/gov_reg_cpi.thrift | 85 +
.../thrift_models/gov_reg_models.thrift | 91 +
.../thrift_models/thrift-gen.sh | 16 +
32 files changed, 43155 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/pom.xml b/airavata-gov-registry/airavata-gov-registry-core/pom.xml
new file mode 100644
index 0000000..b0aac88
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>gov-registry</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <relativePath>../pom.xml</relativePath>
+ <version>${global.version}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>airavata-gov-registry-core</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>0.9.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-gov-registry-stubs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-commons</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/META-INF/persistence.xml b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/META-INF/persistence.xml
new file mode 100644
index 0000000..4a89174
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/META-INF/persistence.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
+
+ <persistence-unit name="airavata-gov-registry">
+ <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+ <class>org.apache.airavata.gov.registry.db.entities.DomainEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.EntityEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.EntityTypeEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.GroupMembershipEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.PermissionTypeEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.SharingEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.UserEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.UserGroupEntity</class>
+ </persistence-unit>
+</persistence>
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
new file mode 100644
index 0000000..0de9d62
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
@@ -0,0 +1,113 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "DOMAIN", schema = "" )
+public class DomainEntity {
+ private final static Logger logger = LoggerFactory.getLogger(DomainEntity.class);
+ private String domainId;
+ private String name;
+ private String description;
+ private String createdTime;
+ private String updatedTime;
+
+ @Id
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ DomainEntity that = (DomainEntity) o;
+
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = domainId != null ? domainId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
new file mode 100644
index 0000000..6abed54
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
@@ -0,0 +1,162 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.util.Arrays;
+
+@Entity
+@Table(name = "ENTITY", schema = "")
+public class EntityEntity {
+ private final static Logger logger = LoggerFactory.getLogger(EntityEntity.class);
+ private String entityId;
+ private String name;
+ private String description;
+ private byte[] metadata;
+ private String fullText;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+ private EntityEntity entityByParentEntityId;
+
+ @Id
+ @Column(name = "ENTITY_ID")
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "METADATA")
+ public byte[] getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(byte[] metadata) {
+ this.metadata = metadata;
+ }
+
+ @Basic
+ @Column(name = "FULL_TEXT")
+ public String getFullText() {
+ return fullText;
+ }
+
+ public void setFullText(String fullText) {
+ this.fullText = fullText;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EntityEntity that = (EntityEntity) o;
+
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (!Arrays.equals(metadata, that.metadata)) return false;
+ if (fullText != null ? !fullText.equals(that.fullText) : that.fullText != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = entityId != null ? entityId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (metadata != null ? Arrays.hashCode(metadata) : 0);
+ result = 31 * result + (fullText != null ? fullText.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "PARENT_ENTITY_ID", referencedColumnName = "ENTITY_ID")
+ public EntityEntity getEntityByParentEntityId() {
+ return entityByParentEntityId;
+ }
+
+ public void setEntityByParentEntityId(EntityEntity entityByParentEntityId) {
+ this.entityByParentEntityId = entityByParentEntityId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
new file mode 100644
index 0000000..f54eb91
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
@@ -0,0 +1,124 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "ENTITY_TYPE", schema = "")
+public class EntityTypeEntity {
+ private final static Logger logger = LoggerFactory.getLogger(EntityTypeEntity.class);
+ private String entityTypeId;
+ private String name;
+ private String description;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "ENTITY_TYPE_ID")
+ public String getEntityTypeId() {
+ return entityTypeId;
+ }
+
+ public void setEntityTypeId(String entityTypeId) {
+ this.entityTypeId = entityTypeId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EntityTypeEntity that = (EntityTypeEntity) o;
+
+ if (entityTypeId != null ? !entityTypeId.equals(that.entityTypeId) : that.entityTypeId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = entityTypeId != null ? entityTypeId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
new file mode 100644
index 0000000..8fd9329
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
@@ -0,0 +1,88 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "GROUP_MEMBERSHIP", schema = "")
+@IdClass(GroupMembershipEntityPK.class)
+public class GroupMembershipEntity {
+ private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntity.class);
+ private String parentId;
+ private String childId;
+ private String childType;
+
+ @Id
+ @Column(name = "PARENT_ID")
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ @Id
+ @Column(name = "CHILD_ID")
+ public String getChildId() {
+ return childId;
+ }
+
+ public void setChildId(String childId) {
+ this.childId = childId;
+ }
+
+ @Basic
+ @Column(name = "CHILD_TYPE")
+ public String getChildType() {
+ return childType;
+ }
+
+ public void setChildType(String childType) {
+ this.childType = childType;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ GroupMembershipEntity that = (GroupMembershipEntity) o;
+
+ if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
+ if (childId != null ? !childId.equals(that.childId) : that.childId != null) return false;
+ if (childType != null ? !childType.equals(that.childType) : that.childType != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = parentId != null ? parentId.hashCode() : 0;
+ result = 31 * result + (childId != null ? childId.hashCode() : 0);
+ result = 31 * result + (childType != null ? childType.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
new file mode 100644
index 0000000..2dfbefb
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class GroupMembershipEntityPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntityPK.class);
+ private String parentId;
+ private String childId;
+
+ @Column(name = "PARENT_ID")
+ @Id
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ @Column(name = "CHILD_ID")
+ @Id
+ public String getChildId() {
+ return childId;
+ }
+
+ public void setChildId(String childId) {
+ this.childId = childId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ GroupMembershipEntityPK that = (GroupMembershipEntityPK) o;
+
+ if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
+ if (childId != null ? !childId.equals(that.childId) : that.childId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = parentId != null ? parentId.hashCode() : 0;
+ result = 31 * result + (childId != null ? childId.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
new file mode 100644
index 0000000..198bc9e
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
@@ -0,0 +1,112 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "PERMISSION_TYPE", schema = "")
+public class PermissionTypeEntity {
+ private final static Logger logger = LoggerFactory.getLogger(PermissionTypeEntity.class);
+ private String permissionTypeId;
+ private String name;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "PERMISSION_TYPE_ID")
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ PermissionTypeEntity that = (PermissionTypeEntity) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
new file mode 100644
index 0000000..e9b949d
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
@@ -0,0 +1,111 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "SHARING", schema = "")
+@IdClass(SharingEntityPK.class)
+public class SharingEntity {
+ private final static Logger logger = LoggerFactory.getLogger(SharingEntity.class);
+ private String permissionTypeId;
+ private String entityId;
+ private String groupId;
+ private PermissionTypeEntity permissionTypeByPermissionTypeId;
+ private EntityTypeEntity entityTypeByEntityTypeId;
+
+ @Id
+ @Column(name = "PERMISSION_TYPE_ID")
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Id
+ @Column(name = "ENTITY_ID")
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Id
+ @Column(name = "GROUP_ID")
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ SharingEntity that = (SharingEntity) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
+ result = 31 * result + (groupId != null ? groupId.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "PERMISSION_TYPE_ID", referencedColumnName = "PERMISSION_TYPE_ID", nullable = false)
+ public PermissionTypeEntity getPermissionTypeByPermissionTypeId() {
+ return permissionTypeByPermissionTypeId;
+ }
+
+ public void setPermissionTypeByPermissionTypeId(PermissionTypeEntity permissionTypeByPermissionTypeId) {
+ this.permissionTypeByPermissionTypeId = permissionTypeByPermissionTypeId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "ENTITY_TYPE_ID", referencedColumnName = "ENTITY_TYPE_ID")
+ public EntityTypeEntity getEntityTypeByEntityTypeId() {
+ return entityTypeByEntityTypeId;
+ }
+
+ public void setEntityTypeByEntityTypeId(EntityTypeEntity entityTypeByEntityTypeId) {
+ this.entityTypeByEntityTypeId = entityTypeByEntityTypeId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
new file mode 100644
index 0000000..8274904
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
@@ -0,0 +1,88 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class SharingEntityPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(SharingEntityPK.class);
+ private String permissionTypeId;
+ private String entityId;
+ private String groupId;
+
+ @Column(name = "PERMISSION_TYPE_ID")
+ @Id
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Column(name = "ENTITY_ID")
+ @Id
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Column(name = "GROUP_ID")
+ @Id
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ SharingEntityPK that = (SharingEntityPK) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
+ result = 31 * result + (groupId != null ? groupId.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
new file mode 100644
index 0000000..a19321f
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
@@ -0,0 +1,111 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "USER", schema = "")
+public class UserEntity {
+ private final static Logger logger = LoggerFactory.getLogger(UserEntity.class);
+ private String userId;
+ private String userName;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "USER_ID")
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ @Basic
+ @Column(name = "USER_NAME")
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ UserEntity that = (UserEntity) o;
+
+ if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
+ if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = userId != null ? userId.hashCode() : 0;
+ result = 31 * result + (userName != null ? userName.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
new file mode 100644
index 0000000..d0a6bbb
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
@@ -0,0 +1,148 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "USER_GROUP", schema = "")
+public class UserGroupEntity {
+ private final static Logger logger = LoggerFactory.getLogger(UserGroupEntity.class);
+ private String groupId;
+ private String name;
+ private String description;
+ private String type;
+ private String createdTime;
+ private String updatedTime;
+ private DomainEntity domainByDomainId;
+ private UserEntity userByOwnerId;
+
+ @Id
+ @Column(name = "GROUP_ID")
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "TYPE")
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public String getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(String createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public String getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(String updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ UserGroupEntity that = (UserGroupEntity) o;
+
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (type != null ? !type.equals(that.type) : that.type != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = groupId != null ? groupId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (type != null ? type.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "OWNER_ID", referencedColumnName = "USER_ID")
+ public UserEntity getUserByOwnerId() {
+ return userByOwnerId;
+ }
+
+ public void setUserByOwnerId(UserEntity userByOwnerId) {
+ this.userByOwnerId = userByOwnerId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
new file mode 100644
index 0000000..d94a0eb
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
@@ -0,0 +1,87 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.util.HashMap;
+import java.util.Map;
+
+public class JPAUtils {
+ private final static Logger logger = LoggerFactory.getLogger(JPAUtils.class);
+
+ private static final String PERSISTENCE_UNIT_NAME = "appcatalog_data";
+ private static final String GOV_REG_JDBC_DRIVER = "appcatalog.jdbc.driver";
+ private static final String GOV_REG_JDBC_URL = "appcatalog.jdbc.url";
+ private static final String GOV_REG_JDBC_USER = "appcatalog.jdbc.user";
+ private static final String GOV_REG_JDBC_PWD = "appcatalog.jdbc.password";
+ private static final String GOV_REG_VALIDATION_QUERY = "appcatalog.validationQuery";
+ private static final String JPA_CACHE_SIZE = "jpa.cache.size";
+ private static final String JPA_CACHE_ENABLED = "cache.enable";
+
+ @PersistenceUnit(unitName = "airavata-gov-registry")
+ protected static EntityManagerFactory factory;
+ @PersistenceContext(unitName = "airavata-gov-registry")
+ private static EntityManager appCatEntityManager;
+
+ public static EntityManager getEntityManager() throws ApplicationSettingsException {
+ if (factory == null) {
+// String connectionProperties = "DriverClassName=" + readServerProperties(GOV_REG_JDBC_DRIVER) + "," +
+// "Url=" + readServerProperties(GOV_REG_JDBC_URL) + "?autoReconnect=true," +
+// "Username=" + readServerProperties(GOV_REG_JDBC_USER) + "," +
+// "Password=" + readServerProperties(GOV_REG_JDBC_PWD) +
+// ",validationQuery=" + readServerProperties(GOV_REG_VALIDATION_QUERY);
+//
+ String connectionProperties = "jdbc:mysql://localhost:3306/airavata_gov_registry;create=true;user=root;password=";
+
+ Map<String, String> properties = new HashMap<String, String>();
+ properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
+ properties.put("openjpa.ConnectionProperties", connectionProperties);
+ properties.put("openjpa.DynamicEnhancementAgent", "true");
+ properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
+ // For app catalog, we don't need caching
+// properties.put("openjpa.DataCache","" + readServerProperties(JPA_CACHE_ENABLED) + "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
+// properties.put("openjpa.QueryCache","" + readServerProperties(JPA_CACHE_ENABLED) + "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
+ properties.put("openjpa.RemoteCommitProvider", "sjvm");
+ properties.put("openjpa.Log", "DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
+ properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
+ properties.put("openjpa.jdbc.QuerySQLCache", "false");
+ properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
+ " PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000, autoReconnect=true");
+ factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
+ }
+ appCatEntityManager = factory.createEntityManager();
+ return appCatEntityManager;
+ }
+
+ private static String readServerProperties(String propertyName) throws ApplicationSettingsException {
+ try {
+ return ServerSettings.getSetting(propertyName);
+ } catch (ApplicationSettingsException e) {
+ logger.error("Unable to read airavata-server.properties...", e);
+ throw new ApplicationSettingsException("Unable to read airavata-server.properties...");
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
new file mode 100644
index 0000000..276c99e
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GovRegistryServer {
+ private final static Logger logger = LoggerFactory.getLogger(GovRegistryServer.class);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
new file mode 100644
index 0000000..2fdfb7e
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServerHandler.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GovRegistryServerHandler {
+ private final static Logger logger = LoggerFactory.getLogger(GovRegistryServerHandler.class);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
new file mode 100644
index 0000000..239ecde
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
@@ -0,0 +1,116 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+CREATE TABLE DOMAIN (
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (DOMAIN_ID)
+);
+
+CREATE TABLE USER (
+ USER_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ USER_NAME VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (USER_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
+);
+
+CREATE TABLE USER_GROUP (
+ GROUP_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ OWNER_ID VARCHAR(255),
+ TYPE VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (GROUP_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID),
+ FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID)
+);
+
+
+CREATE TABLE GROUP_MEMBERSHIP (
+ PARENT_ID VARCHAR(255),
+ CHILD_ID VARCHAR(255),
+ CHILD_TYPE VARCHAR(255),
+ PRIMARY KEY (PARENT_ID, CHILD_ID),
+ FOREIGN KEY (PARENT_ID) REFERENCES USER_GROUP(GROUP_ID),
+ FOREIGN KEY (CHILD_ID) REFERENCES USER_GROUP(GROUP_ID)
+);
+
+CREATE TABLE ENTITY_TYPE (
+ ENTITY_TYPE_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (ENTITY_TYPE_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
+);
+
+CREATE TABLE PERMISSION_TYPE (
+ PERMISSION_TYPE_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (PERMISSION_TYPE_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
+);
+
+CREATE TABLE ENTITY (
+ ENTITY_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ ENITY_TYPE VARCHAR(255),
+ OWNER_ID VARCHAR(255),
+ PARENT_ENTITY_TYPE VARCHAR(255),
+ PARENT_ENTITY_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ METADATA BLOB,
+ FULL_TEXT TEXT,
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (ENTITY_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID),
+ FOREIGN KEY (ENITY_TYPE) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
+ FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID),
+ FOREIGN KEY (PARENT_ENTITY_TYPE) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
+ FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID)
+);
+
+CREATE TABLE SHARING (
+ PERMISSION_TYPE_ID VARCHAR(255),
+ ENTITY_TYPE_ID VARCHAR(255),
+ ENTITY_ID VARCHAR(255),
+ GROUP_ID VARCHAR(255),
+ PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID),
+ FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID),
+ FOREIGN KEY (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
+ FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID)
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml b/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
new file mode 100644
index 0000000..72ec866
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/pom.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>gov-registry</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <relativePath>../pom.xml</relativePath>
+ <version>${global.version}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>airavata-gov-registry-stubs</artifactId>
+
+
+</project>
\ No newline at end of file
[23/50] [abbrv] airavata git commit: initial commit
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
new file mode 100644
index 0000000..587891d
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
@@ -0,0 +1,1404 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, java.io.Serializable, Cloneable, Comparable<Entity> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entity");
+
+ private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField ENTITY_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)7);
+ private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)9);
+ 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)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EntityStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EntityTupleSchemeFactory());
+ }
+
+ public String entityId; // optional
+ public String domainId; // optional
+ public String entityTypeId; // optional
+ public String ownerId; // optional
+ public String name; // optional
+ public String description; // optional
+ public Map<String,String> metadata; // optional
+ public String fullText; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ENTITY_ID((short)1, "entityId"),
+ DOMAIN_ID((short)2, "domainId"),
+ ENTITY_TYPE_ID((short)3, "entityTypeId"),
+ OWNER_ID((short)4, "ownerId"),
+ NAME((short)5, "name"),
+ DESCRIPTION((short)6, "description"),
+ METADATA((short)7, "metadata"),
+ FULL_TEXT((short)8, "fullText"),
+ CREATED_TIME((short)9, "createdTime"),
+ UPDATED_TIME((short)10, "updatedTime");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ENTITY_ID
+ return ENTITY_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // ENTITY_TYPE_ID
+ return ENTITY_TYPE_ID;
+ case 4: // OWNER_ID
+ return OWNER_ID;
+ case 5: // NAME
+ return NAME;
+ case 6: // DESCRIPTION
+ return DESCRIPTION;
+ case 7: // METADATA
+ return METADATA;
+ case 8: // FULL_TEXT
+ return FULL_TEXT;
+ case 9: // CREATED_TIME
+ return CREATED_TIME;
+ case 10: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.ENTITY_ID,_Fields.DOMAIN_ID,_Fields.ENTITY_TYPE_ID,_Fields.OWNER_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.METADATA,_Fields.FULL_TEXT,_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);
+ tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.FULL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("fullText", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Entity.class, metaDataMap);
+ }
+
+ public Entity() {
+ this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Entity(Entity other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetEntityId()) {
+ this.entityId = other.entityId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetMetadata()) {
+ Map<String,String> __this__metadata = new HashMap<String,String>(other.metadata);
+ this.metadata = __this__metadata;
+ }
+ if (other.isSetFullText()) {
+ this.fullText = other.fullText;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public Entity deepCopy() {
+ return new Entity(this);
+ }
+
+ @Override
+ public void clear() {
+ this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.entityTypeId = null;
+ this.ownerId = null;
+ this.name = null;
+ this.description = null;
+ this.metadata = null;
+ this.fullText = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getEntityId() {
+ return this.entityId;
+ }
+
+ public Entity setEntityId(String entityId) {
+ this.entityId = entityId;
+ return this;
+ }
+
+ public void unsetEntityId() {
+ this.entityId = null;
+ }
+
+ /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
+ public boolean isSetEntityId() {
+ return this.entityId != null;
+ }
+
+ public void setEntityIdIsSet(boolean value) {
+ if (!value) {
+ this.entityId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public Entity setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public Entity 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 String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public Entity setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Entity setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Entity setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public int getMetadataSize() {
+ return (this.metadata == null) ? 0 : this.metadata.size();
+ }
+
+ public void putToMetadata(String key, String val) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<String,String>();
+ }
+ this.metadata.put(key, val);
+ }
+
+ public Map<String,String> getMetadata() {
+ return this.metadata;
+ }
+
+ public Entity setMetadata(Map<String,String> metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ public void unsetMetadata() {
+ this.metadata = null;
+ }
+
+ /** Returns true if field metadata is set (has been assigned a value) and false otherwise */
+ public boolean isSetMetadata() {
+ return this.metadata != null;
+ }
+
+ public void setMetadataIsSet(boolean value) {
+ if (!value) {
+ this.metadata = null;
+ }
+ }
+
+ public String getFullText() {
+ return this.fullText;
+ }
+
+ public Entity setFullText(String fullText) {
+ this.fullText = fullText;
+ return this;
+ }
+
+ public void unsetFullText() {
+ this.fullText = null;
+ }
+
+ /** Returns true if field fullText is set (has been assigned a value) and false otherwise */
+ public boolean isSetFullText() {
+ return this.fullText != null;
+ }
+
+ public void setFullTextIsSet(boolean value) {
+ if (!value) {
+ this.fullText = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Entity setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Entity setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ENTITY_ID:
+ if (value == null) {
+ unsetEntityId();
+ } else {
+ setEntityId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case METADATA:
+ if (value == null) {
+ unsetMetadata();
+ } else {
+ setMetadata((Map<String,String>)value);
+ }
+ break;
+
+ case FULL_TEXT:
+ if (value == null) {
+ unsetFullText();
+ } else {
+ setFullText((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ENTITY_ID:
+ return getEntityId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case METADATA:
+ return getMetadata();
+
+ case FULL_TEXT:
+ return getFullText();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case ENTITY_ID:
+ return isSetEntityId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case ENTITY_TYPE_ID:
+ return isSetEntityTypeId();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case METADATA:
+ return isSetMetadata();
+ case FULL_TEXT:
+ return isSetFullText();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Entity)
+ return this.equals((Entity)that);
+ return false;
+ }
+
+ public boolean equals(Entity that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_entityId = true && this.isSetEntityId();
+ boolean that_present_entityId = true && that.isSetEntityId();
+ if (this_present_entityId || that_present_entityId) {
+ if (!(this_present_entityId && that_present_entityId))
+ return false;
+ if (!this.entityId.equals(that.entityId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ 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;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_metadata = true && this.isSetMetadata();
+ boolean that_present_metadata = true && that.isSetMetadata();
+ if (this_present_metadata || that_present_metadata) {
+ if (!(this_present_metadata && that_present_metadata))
+ return false;
+ if (!this.metadata.equals(that.metadata))
+ return false;
+ }
+
+ boolean this_present_fullText = true && this.isSetFullText();
+ boolean that_present_fullText = true && that.isSetFullText();
+ if (this_present_fullText || that_present_fullText) {
+ if (!(this_present_fullText && that_present_fullText))
+ return false;
+ if (!this.fullText.equals(that.fullText))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_entityId = true && (isSetEntityId());
+ list.add(present_entityId);
+ if (present_entityId)
+ list.add(entityId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_entityTypeId = true && (isSetEntityTypeId());
+ list.add(present_entityTypeId);
+ if (present_entityTypeId)
+ list.add(entityTypeId);
+
+ boolean present_ownerId = true && (isSetOwnerId());
+ list.add(present_ownerId);
+ if (present_ownerId)
+ list.add(ownerId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_metadata = true && (isSetMetadata());
+ list.add(present_metadata);
+ if (present_metadata)
+ list.add(metadata);
+
+ boolean present_fullText = true && (isSetFullText());
+ list.add(present_fullText);
+ if (present_fullText)
+ list.add(fullText);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Entity other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(other.isSetEntityId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEntityId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, other.entityId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMetadata()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFullText()).compareTo(other.isSetFullText());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFullText()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullText, other.fullText);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Entity(");
+ boolean first = true;
+
+ if (isSetEntityId()) {
+ sb.append("entityId:");
+ if (this.entityId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetEntityTypeId()) {
+ if (!first) sb.append(", ");
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ }
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetMetadata()) {
+ if (!first) sb.append(", ");
+ sb.append("metadata:");
+ if (this.metadata == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.metadata);
+ }
+ first = false;
+ }
+ if (isSetFullText()) {
+ if (!first) sb.append(", ");
+ sb.append("fullText:");
+ if (this.fullText == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.fullText);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 EntityStandardSchemeFactory implements SchemeFactory {
+ public EntityStandardScheme getScheme() {
+ return new EntityStandardScheme();
+ }
+ }
+
+ private static class EntityStandardScheme extends StandardScheme<Entity> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Entity struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // ENTITY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityId = iprot.readString();
+ struct.setEntityIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ENTITY_TYPE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // METADATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+ struct.metadata = new HashMap<String,String>(2*_map0.size);
+ String _key1;
+ String _val2;
+ for (int _i3 = 0; _i3 < _map0.size; ++_i3)
+ {
+ _key1 = iprot.readString();
+ _val2 = iprot.readString();
+ struct.metadata.put(_key1, _val2);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setMetadataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // FULL_TEXT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.fullText = iprot.readString();
+ struct.setFullTextIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, Entity struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.entityId != null) {
+ if (struct.isSetEntityId()) {
+ oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
+ oprot.writeString(struct.entityId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.entityTypeId != null) {
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.metadata != null) {
+ if (struct.isSetMetadata()) {
+ oprot.writeFieldBegin(METADATA_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
+ for (Map.Entry<String, String> _iter4 : struct.metadata.entrySet())
+ {
+ oprot.writeString(_iter4.getKey());
+ oprot.writeString(_iter4.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.fullText != null) {
+ if (struct.isSetFullText()) {
+ oprot.writeFieldBegin(FULL_TEXT_FIELD_DESC);
+ oprot.writeString(struct.fullText);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EntityTupleSchemeFactory implements SchemeFactory {
+ public EntityTupleScheme getScheme() {
+ return new EntityTupleScheme();
+ }
+ }
+
+ private static class EntityTupleScheme extends TupleScheme<Entity> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetEntityId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetEntityTypeId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetName()) {
+ optionals.set(4);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(5);
+ }
+ if (struct.isSetMetadata()) {
+ optionals.set(6);
+ }
+ if (struct.isSetFullText()) {
+ optionals.set(7);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(8);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(9);
+ }
+ oprot.writeBitSet(optionals, 10);
+ if (struct.isSetEntityId()) {
+ oprot.writeString(struct.entityId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeString(struct.entityTypeId);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetMetadata()) {
+ {
+ oprot.writeI32(struct.metadata.size());
+ for (Map.Entry<String, String> _iter5 : struct.metadata.entrySet())
+ {
+ oprot.writeString(_iter5.getKey());
+ oprot.writeString(_iter5.getValue());
+ }
+ }
+ }
+ if (struct.isSetFullText()) {
+ oprot.writeString(struct.fullText);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(10);
+ if (incoming.get(0)) {
+ struct.entityId = iprot.readString();
+ struct.setEntityIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(6)) {
+ {
+ org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.metadata = new HashMap<String,String>(2*_map6.size);
+ String _key7;
+ String _val8;
+ for (int _i9 = 0; _i9 < _map6.size; ++_i9)
+ {
+ _key7 = iprot.readString();
+ _val8 = iprot.readString();
+ struct.metadata.put(_key7, _val8);
+ }
+ }
+ struct.setMetadataIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.fullText = iprot.readString();
+ struct.setFullTextIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
new file mode 100644
index 0000000..689453f
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
@@ -0,0 +1,924 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+public class EntityType implements org.apache.thrift.TBase<EntityType, EntityType._Fields>, java.io.Serializable, Cloneable, Comparable<EntityType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EntityType");
+
+ 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 org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
+ 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)5);
+ 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)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EntityTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EntityTypeTupleSchemeFactory());
+ }
+
+ public String entityTypeId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ENTITY_TYPE_ID((short)1, "entityTypeId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)4, "description"),
+ CREATED_TIME((short)5, "createdTime"),
+ UPDATED_TIME((short)6, "updatedTime");
+
+ 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;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 4: // DESCRIPTION
+ return DESCRIPTION;
+ case 5: // CREATED_TIME
+ return CREATED_TIME;
+ case 6: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.ENTITY_TYPE_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
+ tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EntityType.class, metaDataMap);
+ }
+
+ public EntityType() {
+ this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public EntityType(EntityType other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public EntityType deepCopy() {
+ return new EntityType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ this.description = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public EntityType 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 String getDomainId() {
+ return this.domainId;
+ }
+
+ public EntityType setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public EntityType setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public EntityType setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public EntityType setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public EntityType setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof EntityType)
+ return this.equals((EntityType)that);
+ return false;
+ }
+
+ public boolean equals(EntityType 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;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ 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);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(EntityType 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("EntityType(");
+ boolean first = true;
+
+ if (isSetEntityTypeId()) {
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 EntityTypeStandardSchemeFactory implements SchemeFactory {
+ public EntityTypeStandardScheme getScheme() {
+ return new EntityTypeStandardScheme();
+ }
+ }
+
+ private static class EntityTypeStandardScheme extends StandardScheme<EntityType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, EntityType 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;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, EntityType struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.entityTypeId != null) {
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EntityTypeTupleSchemeFactory implements SchemeFactory {
+ public EntityTypeTupleScheme getScheme() {
+ return new EntityTypeTupleScheme();
+ }
+ }
+
+ private static class EntityTypeTupleScheme extends TupleScheme<EntityType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, EntityType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetEntityTypeId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(3);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(4);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeString(struct.entityTypeId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, EntityType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
[15/50] [abbrv] airavata git commit: Imported ansible-airavata repo
to airavata repo
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/templates/pga_config.php.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/templates/pga_config.php.j2
index 0000000,0000000..7b38575
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/templates/pga_config.php.j2
@@@ -1,0 -1,0 +1,248 @@@
++<?php
++return array(
++ /**
++ * *****************************************************************
++ * WSO2 Identity Server Related Configurations
++ * *****************************************************************
++ */
++
++ 'wsis' => [
++
++ /**
++ * Admin Role Name
++ */
++ 'admin-role-name' => 'admin',
++
++ /**
++ * Read only Admin Role Name
++ */
++ 'read-only-admin-role-name' => 'admin-read-only',
++
++ /**
++ * Gateway user role
++ */
++ 'user-role-name' => 'gateway-user',
++
++ /**
++ * Tenant Domain
++ */
++ 'tenant-domain' => '{{ tenant_domain }}',
++
++ /**
++ * Tenant admin's username
++ */
++ 'admin-username' => '{{ admin_username }}',
++
++ /**
++ * Tenant admin's password
++ */
++ 'admin-password' => '{{ admin_password }}',
++
++ /**
++ * OAuth client key
++ */
++ 'oauth-client-key' => '{{ oauth_client_key }}',
++
++ /**
++ * OAuth client secret
++ */
++ 'oauth-client-secret' => '{{ oauth_client_secret }}',
++
++ /**
++ * OAuth Grant Type (password or authorization_code)
++ */
++ 'oauth-grant-type' => 'password',
++
++ /**
++ * Identity server domain
++ */
++ 'server' => 'idp.scigap.org',
++
++ /**
++ * Identity server url
++ */
++ 'service-url' => 'https://idp.scigap.org:9443/',
++
++ /**
++ * Enable HTTPS server verification
++ */
++ 'verify-peer' => true,
++
++ /**
++ * Path to the server certificate file
++ */
++ 'cafile-path' => app_path() . '/resources/security/idp_scigap_org.pem',
++
++ /**
++ * Allow self signed server certificates
++ */
++ 'allow-self-signed-cert' => false
++ ],
++
++
++ /**
++ * *****************************************************************
++ * Airavata Client Configurations
++ * *****************************************************************
++ */
++ 'airavata' => [
++
++ /**
++ * Airavata API server location. Use tls:// as the protocol to
++ * connect TLS enabled Airavata
++ */
++ 'airavata-server' => '{{ airavata_server }}',
++
++ /**
++ * Airavata API server port
++ */
++ 'airavata-port' => '{{ airavata_port }}',
++
++ /**
++ * Airavata API server thrift communication timeout
++ */
++ 'airavata-timeout' => '1000000',
++
++ /**
++ * PGA Gateway ID
++ */
++ 'gateway-id' => '{{ gateway_id }}',
++
++ /**
++ * Maximum size of a file which is allowed to upload to the server
++ */
++ 'server-allowed-file-size' => 64,
++
++ /**
++ * absolute path of the data dir
++ */
++ 'experiment-data-absolute-path' => '{{ experiment_data_dir }}',
++
++ /**
++ * Advanced experiments options
++ */
++ 'advanced-experiment-options' => '',
++
++ /**
++ * Default queue name
++ */
++ 'queue-name' => 'long',
++
++ /**
++ * Default node count
++ */
++ 'node-count' => '1',
++
++ /**
++ * Default total core count
++ */
++ 'total-cpu-count' => '16',
++
++ /**
++ * Default wall time limit
++ */
++ 'wall-time-limit' => '30',
++
++ /**
++ * Enable app-catalog cache
++ */
++ 'enable-app-catalog-cache' => true,
++
++ /**
++ * Life time of app catalog data cache in minutes
++ */
++ 'app-catalog-cache-duration' => 5,
++
++ /**
++ * Gateway data store resource id
++ */
++ 'gateway-data-store-resource-id' => '{{ gateway_data_store_resource_id }}',
++
++ /**
++ * Data Sharing enabled
++ */
++ 'data-sharing-enabled' => false
++ ],
++
++ /**
++ * *****************************************************************
++ * Portal Related Configurations
++ * *****************************************************************
++ */
++ 'portal' => [
++ /**
++ * Whether this portal is the SciGaP admin portal
++ */
++ 'super-admin-portal' => {{ super_admin_portal }},
++
++ /**
++ * Set the name of theme in use here
++ */
++ 'theme' => 'base',
++
++ /**
++ * Portal title
++ */
++ 'portal-title' => 'Airavata PHP Gateway',
++
++ /**
++ * Email address of the portal admin. Portal admin well get email notifications for events
++ * such as new user creation
++ */
++ 'admin-emails' => [{{ admin_emails }}],
++
++ /**
++ * Email account that the portal should login to send emails
++ */
++ 'portal-email-username' => '{{ portal_email_username }}',
++
++ /**
++ * Password for the portal's email account
++ */
++ 'portal-email-password' => '{{ portal_email_password }}',
++
++ /**
++ * SMTP server on which the portal should connect
++ */
++ 'portal-smtp-server-host' => 'smtp.gmail.com',
++
++ /**
++ * SMTP server port on which the portal should connect
++ */
++ 'portal-smtp-server-port' => '587',
++
++ /**
++ * Set JIRA Issue Collector scripts here.
++ */
++ 'jira-help' =>
++ [
++ /**
++ * Report Issue Script issued for your app by Atlassian JIRA
++ */
++ 'report-issue-script' => '',
++ /**
++ * Collector id at the end of the above script
++ */
++ 'report-issue-collector-id' => '',
++ /**
++ * Create Report Script issued for your app by Atlassian JIRA
++ */
++ 'request-feature-script' => '',
++ /**
++ * Collector id at the end of the above script
++ */
++ 'request-feature-collector-id' => ''
++ ],
++
++ /**
++ * Set Google Analytics Id here. ID format that generates from
++ * creating tracker object should be
++ *
++ * UA-XXXXX-Y
++ *
++ * for it to be working correctly. Currently it is only set for
++ * sending pageviews.
++ */
++ 'google-analytics-id' => ''
++ ]
++);
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/pga/vars/main.yml
index 0000000,0000000..298e897
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/pga/vars/main.yml
@@@ -1,0 -1,0 +1,30 @@@
++---
++pga_user: "pga"
++pga_group: "pga"
++doc_root_dir: "/var/www/html/php-gateway"
++user_data_dir: "/var/www/user_data"
++#httpd_conf_file: "/etc/httpd/conf/httpd.conf"
++httpd_conf_file_location: "/etc/httpd/conf"
++
++## WSO2 IS related variables
++tenant_domain: "prod.testdrive"
++admin_username: "tdaadmin"
++admin_password: "SciDeploy"
++oauth_client_key: "RuLl_Uw7i_KXaLoAGJkiasTfyBYa"
++oauth_client_secret: "vD9yi2ANkChzgWiih3RahrIcfsoa"
++
++## Airavata Client related variables
++#airavata_server: "tls://gw77.iu.xsede.org"
++airavata_server: "{{ groups['api-orch'][0] }}"
++airavata_port: "8930"
++gateway_id: "{{ default_gateway }}"
++# relative to document root dir
++experiment_data_dir: "{{ user_data_dir }}"
++gateway_data_store_resource_id: "js-170-103.jetstream-cloud.org_6497a464-3121-4b64-a7cb-d195b0a26c19"
++
++## Portal related variables
++super_admin_portal: "true"
++admin_emails: "'sgg@iu.edu'"
++portal_email_username: "pga.airavata@gmail.com"
++portal_email_password: "airavata12"
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/rabbitmq/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/rabbitmq/handlers/main.yml
index 0000000,0000000..fef807a
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/rabbitmq/handlers/main.yml
@@@ -1,0 -1,0 +1,13 @@@
++---
++# Rabbitmq related handlers
++- name: start rabbitmq
++ service: name=rabbitmq-server state=started enabled=yes
++ become: yes
++
++- name: stop rabbitmq
++ service: name=rabbitmq-server state=stopped
++ become: yes
++
++- name: restart rabbitmq
++ service: name=rabbitmq-server state=restarted enabled=yes
++ become: yes
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/rabbitmq/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/rabbitmq/tasks/main.yml
index 0000000,0000000..f44a0a6
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/rabbitmq/tasks/main.yml
@@@ -1,0 -1,0 +1,60 @@@
++---
++################################################################################
++# Setup and run rabbitmq
++- name: Install erlang latest version
++ yum: name=https://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm state=present
++ become: yes
++
++- name: Install Rabbitmq rpm
++ yum: name=https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.3/rabbitmq-server-3.6.3-1.noarch.rpm state=present
++ become: yes
++
++ # add hostname to /etc/hosts file
++- name: get ip4 address
++ # command: dig +short myip.opendns.com @resolver1.opendns.com
++ command: hostname -i
++ register: _ip4
++
++- name: open rabbitmq ports
++ firewalld: port={{ item }} zone=public permanent=true state=enabled immediate=yes
++ with_items:
++ - "{{ rabbitmq_port }}/tcp"
++ - "{{ management_plugin_port }}/tcp"
++ become: yes
++
++- name: Edit /etc/hosts file
++ lineinfile: dest=/etc/hosts line="{{ _ip4.stdout }} {{ ansible_fqdn }}"
++ notify:
++ - restart rabbitmq
++ become: yes
++
++- name: Start Rabbitmq server
++ service: name=rabbitmq-server state=started enabled=yes
++ become: yes
++
++- name: Enable rabbitmq management plugin
++ rabbitmq_plugin: names=rabbitmq_management state=enabled
++ notify:
++ - restart rabbitmq
++ become: yes
++
++- name: Create rabbitmq vhost {{ rabbitmq_vhost }}
++ rabbitmq_vhost: name="{{ rabbitmq_vhost }}" state=present
++ become: yes
++
++- name: Add user {{ rabbitmq_user }} to vhost {{ rabbitmq_vhost }} and give permission
++ rabbitmq_user: user="{{ rabbitmq_user }}"
++ password="{{ rabbitmq_password }}"
++ vhost="{{ rabbitmq_vhost }}"
++ tags="administrator"
++ configure_priv=.*
++ read_priv=.*
++ write_priv=.*
++ state=present
++ become: yes
++
++- name: restart rabbitmq
++ service: name=rabbitmq-server state=restarted
++ become: yes
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/rabbitmq/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/rabbitmq/vars/main.yml
index 0000000,0000000..c5ab904
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/rabbitmq/vars/main.yml
@@@ -1,0 -1,0 +1,2 @@@
++---
++management_plugin_port: "15672"
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/registry/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/registry/files/mysql-connector-java-5.1.37-bin.jar
index 0000000,0000000..465af67
new file mode 100644
Binary files differ
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/registry/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/registry/tasks/main.yml
index 0000000,0000000..9bd2784
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/registry/tasks/main.yml
@@@ -1,0 -1,0 +1,59 @@@
++---
++
++################################################################################
++- name: Create registry deployment directory
++ file: path="{{ registry_dir }}" state=directory owner={{ user }} group={{ group }}
++ when: build|success
++
++- name: Check previous deployments
++ stat: path="{{ registry_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
++ register: check
++
++- name: stop registry
++ command: ./bin/airavata-server-stop.sh -f
++ chdir="{{ registry_dir }}/{{ airavata_dist }}/"
++ removes="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
++ when: check.stat.exists == True
++
++- name: Delete previous deployments
++ file: path="{{ registry_dir }}/{{ airavata_dist }}" state=absent
++
++- name: Copy distribution to registry deployment directory
++ unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name }}"
++ dest="{{ registry_dir }}/"
++ copy=no
++
++- name: set gfac private ip
++ set_fact:
++ registry_host: "{{ ansible_eth0.ipv4.address }}"
++
++- name: Copy Airavata server properties file
++ template: src=airavata-server.properties.j2
++ dest="{{ registry_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
++ owner={{ user }}
++ group={{ group }}
++ mode="u=rw,g=r,o=r"
++
++- name: Copy Mysql jar to lib
++ copy: src="{{ mysql_connector_jar }}"
++ dest="{{ registry_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
++ owner={{ user }}
++ group={{ group }}
++
++
++- name: Open firwall ports
++ firewalld: port="{{ registry_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
++ become_user: root
++
++- name: stop registry
++ command: ./bin/airavata-server-stop.sh -f
++ chdir="{{ registry_dir }}/{{ airavata_dist }}/"
++ removes="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++- name: start registry
++ command: ./bin/airavata-server-start.sh regserver -d
++ chdir="{{ registry_dir }}/{{ airavata_dist }}/"
++ creates="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
index 0000000,0000000..b8d093e
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/registry/templates/airavata-server.properties.j2
@@@ -1,0 -1,0 +1,281 @@@
++#
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++###########################################################################
++#
++# This properties file provides configuration for all Airavata Services:
++# API Server, Registry, Workflow Interpreter, GFac, Orchestrator
++#
++###########################################################################
++
++###########################################################################
++# API Server Registry Configuration
++###########################################################################
++
++#for derby [AiravataJPARegistry]
++#registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++registry.jdbc.driver=com.mysql.jdbc.Driver
++registry.jdbc.url=jdbc:mysql://{{ db_server }}:{{ db_server_port }}/{{ exp_catalog }}
++registry.jdbc.user={{ db_user }}
++registry.jdbc.password={{ db_password }}
++#FIXME: Probably the following property should be removed.
++start.derby.server.mode=false
++validationQuery=SELECT 1 from CONFIGURATION
++cache.enable=false
++jpa.cache.size=-1
++#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
++enable.sharing={{enable_sharing}}
++
++# Properties for default user mode
++default.registry.user=admin
++default.registry.password=admin
++default.registry.password.hash.method=SHA
++default.registry.gateway={{ default_gateway }}
++
++###########################################################################
++# Application Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++appcatalog.jdbc.driver=com.mysql.jdbc.Driver
++appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ app_catalog }}
++appcatalog.jdbc.user={{ db_user }}
++appcatalog.jdbc.password={{ db_password }}
++appcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++##########################################################################
++# Replica Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#replicacatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#replicacatalog.jdbc.url=jdbc:derby://localhost:1527/replica_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
++replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++replicacatalog.jdbc.user={{ db_user }}
++replicacatalog.jdbc.password={{ db_password }}
++replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++# Workflow Catalog DB Configuration
++###########################################################################
++#for derby [AiravataJPARegistry]
++#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
++#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
++# MySql database configuration
++workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
++workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
++workflowcatalog.jdbc.user={{ db_user }}
++workflowcatalog.jdbc.password={{ db_password }}
++workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
++
++###########################################################################
++# User Profile MongoDB Configuration
++###########################################################################
++userprofile.mongodb.host=localhost
++userprofile.mongodb.port=27017
++
++
++###########################################################################
++# Server module Configuration
++###########################################################################
++#credential store server should be started before API server
++#This is obsolete property with new script files.
++#servers=credentialstore,apiserver,orchestrator
++
++
++###########################################################################
++# API Server Configurations
++###########################################################################
++apiserver=org.apache.airavata.api.server.AiravataAPIServer
++apiserver.name={{ api_server_name }}
++apiserver.host={{ api_server_host }}
++apiserver.port={{ api_server_port }}
++apiserver.min.threads=50
++
++###########################################################################
++# Orchestrator Server Configurations
++###########################################################################
++orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
++orchestrator.server.name={{ orchestrator_name }}
++orchestrator.server.host={{ orchestrator_host }}
++orchestrator.server.port={{ orchestrator_port }}
++orchestrator.server.min.threads=50
++job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
++submitter.interval=10000
++threadpool.size=10
++start.submitter=true
++embedded.mode=true
++enable.validation=true
++
++###########################################################################
++# Registry Server Configurations
++###########################################################################
++regserver=org.apache.airavata.registry.api.service.RegistryAPIServer
++regserver.server.name={{registry_name}}
++regserver.server.host={{registry_host}}
++regserver.server.port={{registry_port}}
++regserver.server.min.threads=50
++
++###########################################################################
++# GFac Server Configurations
++###########################################################################
++gfac=org.apache.airavata.gfac.server.GfacServer
++gfac.server.name={{ gfac_name }}
++gfac.server.host={{ gfac_host }}
++gfac.server.port={{ gfac_port }}
++gfac.thread.pool.size=50
++host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
++
++
++
++###########################################################################
++# Airavata Workflow Interpreter Configurations
++###########################################################################
++workflowserver=org.apache.airavata.api.server.WorkflowServer
++enactment.thread.pool.size=10
++
++#to define custom workflow parser user following property
++#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
++
++
++
++###########################################################################
++# Job Scheduler can send informative email messages to you about the status of your job.
++# Specify a string which consists of either the single character "n" (no mail), or one or more
++# of the characters "a" (send mail when job is aborted), "b" (send mail when job begins),
++# and "e" (send mail when job terminates). The default is "a" if not specified.
++###########################################################################
++
++job.notification.enable=true
++#Provide comma separated email ids as a string if more than one
++job.notification.emailids=
++job.notification.flags=abe
++
++###########################################################################
++# Credential Store module Configuration
++###########################################################################
++credential.store.keystore.url={{ keystores_location }}/{{ cred_keystore }}
++credential.store.keystore.alias={{ cred_keystore_alias }}
++credential.store.keystore.password={{ cred_keystore_passwd }}
++credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
++credential.store.jdbc.user={{ db_user }}
++credential.store.jdbc.password={{ db_password }}
++credential.store.jdbc.driver=com.mysql.jdbc.Driver
++credential.store.server.host={{ cred_store_server_host }}
++credential.store.server.port={{ cred_store_port }}
++credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
++credential.stroe.jdbc.validationQuery=SELECT 1 from CONFIGURATION
++
++# these properties used by credential store email notifications
++email.server=smtp.googlemail.com
++email.server.port=465
++email.user=airavata
++email.password=xxx
++email.ssl=true
++email.from=airavata@apache.org
++
++# SSH PKI key pair or ssh password can be used SSH based sshKeyAuthentication is used.
++# if user specify both password sshKeyAuthentication gets the higher preference
++
++################# ---------- For ssh key pair sshKeyAuthentication ------------------- ################
++#ssh.public.key=/path to public key for ssh
++#ssh.private.key=/path to private key file for ssh
++#ssh.keypass=passphrase for the private key
++#ssh.username=username for ssh connection
++## If you set "yes" for ssh.strict.hostKey.checking, then you must provide known hosts file path
++#ssh.strict.hostKey.checking=yes/no
++#ssh.known.hosts.file=/path to known hosts file
++### Incase of password sshKeyAuthentication.
++#ssh.password=Password for ssh connection
++
++################ ---------- BES Properties ------------------- ###############
++#bes.ca.cert.path=<location>/certificates/cacert.pem
++#bes.ca.key.path=<location>/certificates/cakey.pem
++#bes.ca.key.pass=passphrase
++
++###########################################################################
++# Monitoring module Configuration
++###########################################################################
++
++#This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
++#mechanisms and one would be able to start a monitor
++monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
++
++#These properties will used to enable email base monitoring
++email.based.monitor.host=imap.gmail.com
++email.based.monitor.address={{ monitor_email_address }}
++email.based.monitor.password={{ monitor_email_password }}
++email.based.monitor.folder.name=INBOX
++# either imaps or pop3
++email.based.monitor.store.protocol=imaps
++#These property will be used to query the email server periodically. value in milliseconds(ms).
++email.based.monitoring.period=10000
++
++###########################################################################
++# AMQP Notification Configuration
++###########################################################################
++#for simple scenarios we can use the guest user
++#rabbitmq.broker.url=amqp://localhost:5672
++#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
++# and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
++rabbitmq.broker.url={{ rabbitmq_broker_url }}
++rabbitmq.status.exchange.name=status_exchange
++rabbitmq.process.exchange.name=process_exchange
++rabbitmq.experiment.exchange.name=experiment_exchange
++durable.queue=false
++prefetch.count=200
++process.launch.queue.name=process.launch.queue
++experiment.launch..queue.name=experiment.launch.queue
++
++###########################################################################
++# Zookeeper Server Configuration
++###########################################################################
++embedded.zk=false
++zookeeper.server.connection={{ zookeeper_url }}
++zookeeper.timeout=30000
++
++########################################################################
++## API Security Configuration
++########################################################################
++api.secured={{ api_secured }}
++security.manager.class=org.apache.airavata.api.server.security.DefaultAiravataSecurityManager
++### TLS related configuration ####
++TLS.enabled={{ tls_enable }}
++TLS.api.server.port={{ api_server_tls_port }}
++TLS.client.timeout=10000
++#### keystore configuration ####
++keystore.path={{ keystores_location }}/{{ keystore }}
++keystore.password={{ keystore_passwd }}
++#### trust store configuration ####
++trust.store={{ keystores_location }}/{{ client_truststore }}
++trust.store.password=airavata
++#### remote authorization server url ####
++remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
++#### xacml based authorization policy ####
++authorization.policy=airavata-default-xacml-policy
++#### authorization cache related configuration ####
++authz.cache.enabled=true
++authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
++in.memory.cache.size=1000
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/wso2_is/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/wso2_is/tasks/main.yml
index 0000000,0000000..1e506c2
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/wso2_is/tasks/main.yml
@@@ -1,0 -1,0 +1,41 @@@
++---
++- name: install role pre-requireties
++ yum: name=unzip state=latest update_cache=yes
++ become: yes
++
++# downlaod wso2 is
++# extract it
++# - name: Download and unarchive wso2 is
++# unarchive: src="{{ zookeeper_url }}" dest="{{ user_home }}" copy=no owner="{{ user }}" group="{{ group }}"
++# for now wso2is from localhost
++
++- name: copy WSO2 IS
++ unarchive: >
++ src="{{ wso2_is_dist }}"
++ dest="{{ user_home }}/"
++ owner="{{ user }}"
++ group="{{ group }}"
++ creates="{{ user_home }}/{{ wso2_is_dir }}/bin/wso2server.sh"
++
++- name: copy carbon.xml
++ template: >
++ src=carbon.xml.j2
++ dest="{{ user_home }}/{{ wso2_is_dir }}/repository/conf/carbon.xml"
++ owner="{{ user }}"
++ group="{{ group }}"
++ mode="u=rw,g=r,o=r"
++
++- name: open carabon management console port
++ firewalld: port=9443/tcp zone=public permanent=true state=enabled immediate=yes
++ become: yes
++
++# start wso2 is server
++- name: start wso2 is
++ command: ./bin/wso2server.sh start chdir="{{ user_home }}/{{ wso2_is_dir }}/" creates="{{ user_home }}/{{ wso2_is_dir }}/wso2carbon.pid"
++ environment:
++ JAVA_HOME: "{{ java_home }}"
++
++# - name: stop wso2 is
++ # command: ./bin/airavata-server-stop.sh -f chdir="{{ gfac_dir }}/{{ airavata_dist }}/" removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/wso2_is/templates/carbon.xml.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/wso2_is/templates/carbon.xml.j2
index 0000000,0000000..5f421f2
new file mode 100755
--- /dev/null
+++ b/dev-tools/ansible/roles/wso2_is/templates/carbon.xml.j2
@@@ -1,0 -1,0 +1,688 @@@
++<?xml version="1.0" encoding="ISO-8859-1"?>
++<!--
++ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
++
++ Licensed under the Apache License, Version 2.0 (the "License");
++ you may not use this file except in compliance with the License.
++ You may obtain a copy of the License at
++
++ http://www.apache.org/licenses/LICENSE-2.0
++
++ Unless required by applicable law or agreed to in writing, software
++ distributed under the License is distributed on an "AS IS" BASIS,
++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ See the License for the specific language governing permissions and
++ limitations under the License.
++-->
++
++<!--
++ This is the main server configuration file
++
++ ${carbon.home} represents the carbon.home system property.
++ Other system properties can be specified in a similar manner.
++-->
++<Server xmlns="http://wso2.org/projects/carbon/carbon.xml">
++
++ <!--
++ Product Name
++ -->
++ <Name>WSO2 Identity Server</Name>
++
++ <!--
++ machine readable unique key to identify each product
++ -->
++ <ServerKey>IS</ServerKey>
++
++ <!--
++ Product Version
++ -->
++ <Version>5.1.0</Version>
++
++ <!--
++ Host name or IP address of the machine hosting this server
++ e.g. www.wso2.org, 192.168.1.10
++ This is will become part of the End Point Reference of the
++ services deployed on this server instance.
++ -->
++ <HostName>{{ ansible_fqdn }}</HostName>
++
++ <!--
++ Host name to be used for the Carbon management console
++ -->
++ <MgtHostName>localhost</MgtHostName>
++
++ <!--
++ The URL of the back end server. This is where the admin services are hosted and
++ will be used by the clients in the front end server.
++ This is required only for the Front-end server. This is used when seperating BE server from FE server
++ -->
++ <ServerURL>local:/${carbon.context}/services/</ServerURL>
++ <!--
++ <ServerURL>https://localhost:${carbon.management.port}${carbon.context}/services/</ServerURL>
++ -->
++ <!--
++ The URL of the index page. This is where the user will be redirected after signing in to the
++ carbon server.
++ -->
++ <!-- IndexPageURL>/carbon/admin/index.jsp</IndexPageURL-->
++
++ <!--
++ For cApp deployment, we have to identify the roles that can be acted by the current server.
++ The following property is used for that purpose. Any number of roles can be defined here.
++ Regular expressions can be used in the role.
++ Ex : <Role>.*</Role> means this server can act any role
++ -->
++ <ServerRoles>
++ <Role>IdentityServer</Role>
++ </ServerRoles>
++
++ <!-- uncommnet this line to subscribe to a bam instance automatically -->
++ <!--<BamServerURL>https://bamhost:bamport/services/</BamServerURL>-->
++
++ <!--
++ The fully qualified name of the server
++ -->
++ <Package>org.wso2.carbon</Package>
++
++ <!--
++ Webapp context root of WSO2 Carbon management console.
++ -->
++ <WebContextRoot>/</WebContextRoot>
++
++ <!--
++ Proxy context path is a useful parameter to add a proxy path when a Carbon server is fronted by reverse proxy. In addtion
++ to the proxy host and proxy port this parameter allows you add a path component to external URLs. e.g.
++ URL of the Carbon server -> https://10.100.1.1:9443/carbon
++ URL of the reverse proxy -> https://prod.abc.com/appserver/carbon
++
++ appserver - proxy context path. This specially required whenever you are generating URLs to displace in
++ Carbon UI components.
++ -->
++ <!--
++ <MgtProxyContextPath></MgtProxyContextPath>
++ <ProxyContextPath></ProxyContextPath>
++ -->
++
++ <!-- In-order to get the registry http Port from the back-end when the default http transport is not the same-->
++ <!--RegistryHttpPort>9763</RegistryHttpPort-->
++
++ <!--
++ Number of items to be displayed on a management console page. This is used at the
++ backend server for pagination of various items.
++ -->
++ <ItemsPerPage>15</ItemsPerPage>
++
++ <!-- The endpoint URL of the cloud instance management Web service -->
++ <!--<InstanceMgtWSEndpoint>https://ec2.amazonaws.com/</InstanceMgtWSEndpoint>-->
++
++ <!--
++ Ports used by this server
++ -->
++ <Ports>
++
++ <!-- Ports offset. This entry will set the value of the ports defined below to
++ the define value + Offset.
++ e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445
++ -->
++ <Offset>0</Offset>
++
++ <!-- The JMX Ports -->
++ <JMX>
++ <!--The port RMI registry is exposed-->
++ <RMIRegistryPort>9999</RMIRegistryPort>
++ <!--The port RMI server should be exposed-->
++ <RMIServerPort>11111</RMIServerPort>
++ </JMX>
++
++ <!-- Embedded LDAP server specific ports -->
++ <EmbeddedLDAP>
++ <!-- Port which embedded LDAP server runs -->
++ <LDAPServerPort>10389</LDAPServerPort>
++ <!-- Port which KDC (Kerberos Key Distribution Center) server runs -->
++ <KDCServerPort>8000</KDCServerPort>
++ </EmbeddedLDAP>
++
++ <!--
++ Override datasources JNDIproviderPort defined in bps.xml and datasources.properties files
++ -->
++ <!--<JNDIProviderPort>2199</JNDIProviderPort>-->
++ <!--Override receive port of thrift based entitlement service.-->
++ <ThriftEntitlementReceivePort>10500</ThriftEntitlementReceivePort>
++
++ <!--
++ This is the proxy port of the worker cluster. These need to be configured in a scenario where
++ manager node is not exposed through the load balancer through which the workers are exposed
++ therefore doesn't have a proxy port.
++ <WorkerHttpProxyPort>80</WorkerHttpProxyPort>
++ <WorkerHttpsProxyPort>443</WorkerHttpsProxyPort>
++ -->
++
++ </Ports>
++
++ <!--
++ JNDI Configuration
++ -->
++ <JNDI>
++ <!--
++ The fully qualified name of the default initial context factory
++ -->
++ <DefaultInitialContextFactory>org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory</DefaultInitialContextFactory>
++ <!--
++ The restrictions that are done to various JNDI Contexts in a Multi-tenant environment
++ -->
++ <Restrictions>
++ <!--
++ Contexts that will be available only to the super-tenant
++ -->
++ <!-- <SuperTenantOnly>
++ <UrlContexts>
++ <UrlContext>
++ <Scheme>foo</Scheme>
++ </UrlContext>
++ <UrlContext>
++ <Scheme>bar</Scheme>
++ </UrlContext>
++ </UrlContexts>
++ </SuperTenantOnly> -->
++ <!--
++ Contexts that are common to all tenants
++ -->
++ <AllTenants>
++ <UrlContexts>
++ <UrlContext>
++ <Scheme>java</Scheme>
++ </UrlContext>
++ <!-- <UrlContext>
++ <Scheme>foo</Scheme>
++ </UrlContext> -->
++ </UrlContexts>
++ </AllTenants>
++ <!--
++ All other contexts not mentioned above will be available on a per-tenant basis
++ (i.e. will not be shared among tenants)
++ -->
++ </Restrictions>
++ </JNDI>
++
++ <!--
++ Property to determine if the server is running an a cloud deployment environment.
++ This property should only be used to determine deployment specific details that are
++ applicable only in a cloud deployment, i.e when the server deployed *-as-a-service.
++ -->
++ <IsCloudDeployment>false</IsCloudDeployment>
++
++ <!--
++ Property to determine whether usage data should be collected for metering purposes
++ -->
++ <EnableMetering>false</EnableMetering>
++
++ <!-- The Max time a thread should take for execution in seconds -->
++ <MaxThreadExecutionTime>600</MaxThreadExecutionTime>
++
++ <!--
++ A flag to enable or disable Ghost Deployer. By default this is set to false. That is
++ because the Ghost Deployer works only with the HTTP/S transports. If you are using
++ other transports, don't enable Ghost Deployer.
++ -->
++ <GhostDeployment>
++ <Enabled>false</Enabled>
++ </GhostDeployment>
++
++
++ <!--
++ Eager loading or lazy loading is a design pattern commonly used in computer programming which
++ will initialize an object upon creation or load on-demand. In carbon, lazy loading is used to
++ load tenant when a request is received only. Similarly Eager loading is used to enable load
++ existing tenants after carbon server starts up. Using this feature, you will be able to include
++ or exclude tenants which are to be loaded when server startup.
++
++ We can enable only one LoadingPolicy at a given time.
++
++ 1. Tenant Lazy Loading
++ This is the default behaviour and enabled by default. With this policy, tenants are not loaded at
++ server startup, but loaded based on-demand (i.e when a request is received for a tenant).
++ The default tenant idle time is 30 minutes.
++
++ 2. Tenant Eager Loading
++ This is by default not enabled. It can be be enabled by un-commenting the <EagerLoading> section.
++ The eager loading configurations supported are as below. These configurations can be given as the
++ value for <Include> element with eager loading.
++ (i)Load all tenants when server startup - *
++ (ii)Load all tenants except foo.com & bar.com - *,!foo.com,!bar.com
++ (iii)Load only foo.com & bar.com to be included - foo.com,bar.com
++ -->
++ <Tenant>
++ <LoadingPolicy>
++ <LazyLoading>
++ <IdleTime>30</IdleTime>
++ </LazyLoading>
++ <!-- <EagerLoading>
++ <Include>*,!foo.com,!bar.com</Include>
++ </EagerLoading>-->
++ </LoadingPolicy>
++ </Tenant>
++
++ <!--
++ Caching related configurations
++ -->
++ <Cache>
++ <!-- Default cache timeout in minutes -->
++ <DefaultCacheTimeout>15</DefaultCacheTimeout>
++ </Cache>
++
++ <!--
++ Axis2 related configurations
++ -->
++ <Axis2Config>
++ <!--
++ Location of the Axis2 Services & Modules repository
++
++ This can be a directory in the local file system, or a URL.
++
++ e.g.
++ 1. /home/wso2wsas/repository/ - An absolute path
++ 2. repository - In this case, the path is relative to CARBON_HOME
++ 3. file:///home/wso2wsas/repository/
++ 4. http://wso2wsas/repository/
++ -->
++ <RepositoryLocation>${carbon.home}/repository/deployment/server/</RepositoryLocation>
++
++ <!--
++ Deployment update interval in seconds. This is the interval between repository listener
++ executions.
++ -->
++ <DeploymentUpdateInterval>15</DeploymentUpdateInterval>
++
++ <!--
++ Location of the main Axis2 configuration descriptor file, a.k.a. axis2.xml file
++
++ This can be a file on the local file system, or a URL
++
++ e.g.
++ 1. /home/repository/axis2.xml - An absolute path
++ 2. conf/axis2.xml - In this case, the path is relative to CARBON_HOME
++ 3. file:///home/carbon/repository/axis2.xml
++ 4. http://repository/conf/axis2.xml
++ -->
++ <ConfigurationFile>${carbon.home}/repository/conf/axis2/axis2.xml</ConfigurationFile>
++
++ <!--
++ ServiceGroupContextIdleTime, which will be set in ConfigurationContex
++ for multiple clients which are going to access the same ServiceGroupContext
++ Default Value is 30 Sec.
++ -->
++ <ServiceGroupContextIdleTime>30000</ServiceGroupContextIdleTime>
++
++ <!--
++ This repository location is used to crete the client side configuration
++ context used by the server when calling admin services.
++ -->
++ <ClientRepositoryLocation>${carbon.home}/repository/deployment/client/</ClientRepositoryLocation>
++ <!-- This axis2 xml is used in createing the configuration context by the FE server
++ calling to BE server -->
++ <clientAxis2XmlLocation>${carbon.home}/repository/conf/axis2/axis2_client.xml</clientAxis2XmlLocation>
++ <!-- If this parameter is set, the ?wsdl on an admin service will not give the admin service wsdl. -->
++ <HideAdminServiceWSDLs>true</HideAdminServiceWSDLs>
++
++ <!--WARNING-Use With Care! Uncommenting bellow parameter would expose all AdminServices in HTTP transport.
++ With HTTP transport your credentials and data routed in public channels are vulnerable for sniffing attacks.
++ Use bellow parameter ONLY if your communication channels are confirmed to be secured by other means -->
++ <!--HttpAdminServices>*</HttpAdminServices-->
++
++ </Axis2Config>
++
++ <!--
++ The default user roles which will be created when the server
++ is started up for the first time.
++ -->
++ <ServiceUserRoles>
++ <Role>
++ <Name>admin</Name>
++ <Description>Default Administrator Role</Description>
++ </Role>
++ <Role>
++ <Name>user</Name>
++ <Description>Default User Role</Description>
++ </Role>
++ </ServiceUserRoles>
++
++ <!--
++ Enable following config to allow Emails as usernames.
++ -->
++ <!--EnableEmailUserName>true</EnableEmailUserName-->
++
++ <!--
++ Security configurations
++ -->
++ <Security>
++ <!--
++ KeyStore which will be used for encrypting/decrypting passwords
++ and other sensitive information.
++ -->
++ <KeyStore>
++ <!-- Keystore file location-->
++ <Location>${carbon.home}/repository/resources/security/wso2carbon.jks</Location>
++ <!-- Keystore type (JKS/PKCS12 etc.)-->
++ <Type>JKS</Type>
++ <!-- Keystore password-->
++ <Password>wso2carbon</Password>
++ <!-- Private Key alias-->
++ <KeyAlias>wso2carbon</KeyAlias>
++ <!-- Private Key password-->
++ <KeyPassword>wso2carbon</KeyPassword>
++ </KeyStore>
++
++ <!--
++ System wide trust-store which is used to maintain the certificates of all
++ the trusted parties.
++ -->
++ <TrustStore>
++ <!-- trust-store file location -->
++ <Location>${carbon.home}/repository/resources/security/client-truststore.jks</Location>
++ <!-- trust-store type (JKS/PKCS12 etc.) -->
++ <Type>JKS</Type>
++ <!-- trust-store password -->
++ <Password>wso2carbon</Password>
++ </TrustStore>
++
++ <!--
++ The Authenticator configuration to be used at the JVM level. We extend the
++ java.net.Authenticator to make it possible to authenticate to given servers and
++ proxies.
++ -->
++ <NetworkAuthenticatorConfig>
++ <!--
++ Below is a sample configuration for a single authenticator. Please note that
++ all child elements are mandatory. Not having some child elements would lead to
++ exceptions at runtime.
++ -->
++ <!-- <Credential> -->
++ <!--
++ the pattern that would match a subset of URLs for which this authenticator
++ would be used
++ -->
++ <!-- <Pattern>regularExpression</Pattern> -->
++ <!--
++ the type of this authenticator. Allowed values are:
++ 1. server
++ 2. proxy
++ -->
++ <!-- <Type>proxy</Type> -->
++ <!-- the username used to log in to server/proxy -->
++ <!-- <Username>username</Username> -->
++ <!-- the password used to log in to server/proxy -->
++ <!-- <Password>password</Password> -->
++ <!-- </Credential> -->
++ </NetworkAuthenticatorConfig>
++
++ <!--
++ The Tomcat realm to be used for hosted Web applications. Allowed values are;
++ 1. UserManager
++ 2. Memory
++
++ If this is set to 'UserManager', the realm will pick users & roles from the system's
++ WSO2 User Manager. If it is set to 'memory', the realm will pick users & roles from
++ CARBON_HOME/repository/conf/tomcat/tomcat-users.xml
++ -->
++ <TomcatRealm>UserManager</TomcatRealm>
++
++ <!--Option to disable storing of tokens issued by STS-->
++ <DisableTokenStore>false</DisableTokenStore>
++
++ <!--
++ Security token store class name. If this is not set, default class will be
++ org.wso2.carbon.security.util.SecurityTokenStore
++ -->
++ <TokenStoreClassName>org.wso2.carbon.identity.sts.store.DBTokenStore</TokenStoreClassName>
++
++
++
++ <!-- Configurations to avoid Cross Site Request Forgery vulnerabilities -->
++ <CSRFPreventionConfig>
++ <!-- CSRFPreventionFilter configurations that adopts Synchronizer Token Pattern -->
++ <CSRFPreventionFilter>
++ <!-- Set below to true to enable the CSRFPreventionFilter -->
++ <Enabled>false</Enabled>
++ <!-- Url Pattern to skip application of CSRF protection-->
++ <SkipUrlPattern>(.*)(/images|/css|/js|/docs)(.*)</SkipUrlPattern>
++ </CSRFPreventionFilter>
++ </CSRFPreventionConfig>
++
++ <!-- Configuration to enable or disable CR and LF sanitization filter-->
++ <CRLFPreventionConfig>
++ <!--Set below to true to enable the CRLFPreventionFilter-->
++ <Enabled>true</Enabled>
++ </CRLFPreventionConfig>
++ </Security>
++
++ <!--
++ The temporary work directory
++ -->
++ <WorkDirectory>${carbon.home}/tmp/work</WorkDirectory>
++
++ <!--
++ House-keeping configuration
++ -->
++ <HouseKeeping>
++
++ <!--
++ true - Start House-keeping thread on server startup
++ false - Do not start House-keeping thread on server startup.
++ The user will run it manually as and when he wishes.
++ -->
++ <AutoStart>true</AutoStart>
++
++ <!--
++ The interval in *minutes*, between house-keeping runs
++ -->
++ <Interval>10</Interval>
++
++ <!--
++ The maximum time in *minutes*, temp files are allowed to live
++ in the system. Files/directories which were modified more than
++ "MaxTempFileLifetime" minutes ago will be removed by the
++ house-keeping task
++ -->
++ <MaxTempFileLifetime>30</MaxTempFileLifetime>
++ </HouseKeeping>
++
++ <!--
++ Configuration for handling different types of file upload & other file uploading related
++ config parameters.
++ To map all actions to a particular FileUploadExecutor, use
++ <Action>*</Action>
++ -->
++ <FileUploadConfig>
++ <!--
++ The total file upload size limit in MB
++ -->
++ <TotalFileSizeLimit>100</TotalFileSizeLimit>
++
++ <Mapping>
++ <Actions>
++ <Action>keystore</Action>
++ <Action>certificate</Action>
++ <Action>*</Action>
++ </Actions>
++ <Class>org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor</Class>
++ </Mapping>
++
++ <Mapping>
++ <Actions>
++ <Action>jarZip</Action>
++ </Actions>
++ <Class>org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor</Class>
++ </Mapping>
++ <Mapping>
++ <Actions>
++ <Action>dbs</Action>
++ </Actions>
++ <Class>org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor</Class>
++ </Mapping>
++ <Mapping>
++ <Actions>
++ <Action>tools</Action>
++ </Actions>
++ <Class>org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor</Class>
++ </Mapping>
++ <Mapping>
++ <Actions>
++ <Action>toolsAny</Action>
++ </Actions>
++ <Class>org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor</Class>
++ </Mapping>
++ </FileUploadConfig>
++
++ <!-- FileNameRegEx is used to validate the file input/upload/write-out names.
++ e.g.
++ <FileNameRegEx>^(?!(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\.[^.])?$)[^<>:"/\\|?*\x00-\x1F][^<>:"/\\|?*\x00-\x1F\ .]$</FileNameRegEx>
++ -->
++ <!--<FileNameRegEx></FileNameRegEx>-->
++
++ <!--
++ Processors which process special HTTP GET requests such as ?wsdl, ?policy etc.
++
++ In order to plug in a processor to handle a special request, simply add an entry to this
++ section.
++
++ The value of the Item element is the first parameter in the query string(e.g. ?wsdl)
++ which needs special processing
++
++ The value of the Class element is a class which implements
++ org.wso2.carbon.transport.HttpGetRequestProcessor
++ -->
++ <HttpGetRequestProcessors>
++ <Processor>
++ <Item>info</Item>
++ <Class>org.wso2.carbon.core.transports.util.InfoProcessor</Class>
++ </Processor>
++ <Processor>
++ <Item>wsdl</Item>
++ <Class>org.wso2.carbon.core.transports.util.Wsdl11Processor</Class>
++ </Processor>
++ <Processor>
++ <Item>wsdl2</Item>
++ <Class>org.wso2.carbon.core.transports.util.Wsdl20Processor</Class>
++ </Processor>
++ <Processor>
++ <Item>xsd</Item>
++ <Class>org.wso2.carbon.core.transports.util.XsdProcessor</Class>
++ </Processor>
++ </HttpGetRequestProcessors>
++
++ <!-- Deployment Synchronizer Configuration. t Enabled value to true when running with "svn based" dep sync.
++ In master nodes you need to set both AutoCommit and AutoCheckout to true
++ and in worker nodes set only AutoCheckout to true.
++ -->
++ <DeploymentSynchronizer>
++ <Enabled>false</Enabled>
++ <AutoCommit>false</AutoCommit>
++ <AutoCheckout>true</AutoCheckout>
++ <RepositoryType>svn</RepositoryType>
++ <SvnUrl>http://svnrepo.example.com/repos/</SvnUrl>
++ <SvnUser>username</SvnUser>
++ <SvnPassword>password</SvnPassword>
++ <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
++ </DeploymentSynchronizer>
++
++ <!-- Deployment Synchronizer Configuration. Uncomment the following section when running with "registry based" dep sync.
++ In master nodes you need to set both AutoCommit and AutoCheckout to true
++ and in worker nodes set only AutoCheckout to true.
++ -->
++ <!--<DeploymentSynchronizer>
++ <Enabled>true</Enabled>
++ <AutoCommit>false</AutoCommit>
++ <AutoCheckout>true</AutoCheckout>
++ </DeploymentSynchronizer>-->
++
++ <!-- Mediation persistence configurations. Only valid if mediation features are available i.e. ESB -->
++ <!--<MediationConfig>
++ <LoadFromRegistry>false</LoadFromRegistry>
++ <SaveToFile>false</SaveToFile>
++ <Persistence>enabled</Persistence>
++ <RegistryPersistence>enabled</RegistryPersistence>
++ </MediationConfig>-->
++
++ <!--
++ Server intializing code, specified as implementation classes of org.wso2.carbon.core.ServerInitializer.
++ This code will be run when the Carbon server is initialized
++ -->
++ <ServerInitializers>
++ <!--<Initializer></Initializer>-->
++ </ServerInitializers>
++
++ <!--
++ Indicates whether the Carbon Servlet is required by the system, and whether it should be
++ registered
++ -->
++ <RequireCarbonServlet>${require.carbon.servlet}</RequireCarbonServlet>
++
++ <!--
++ Carbon H2 OSGI Configuration
++ By default non of the servers start.
++ name="web" - Start the web server with the H2 Console
++ name="webPort" - The port (default: 8082)
++ name="webAllowOthers" - Allow other computers to connect
++ name="webSSL" - Use encrypted (HTTPS) connections
++ name="tcp" - Start the TCP server
++ name="tcpPort" - The port (default: 9092)
++ name="tcpAllowOthers" - Allow other computers to connect
++ name="tcpSSL" - Use encrypted (SSL) connections
++ name="pg" - Start the PG server
++ name="pgPort" - The port (default: 5435)
++ name="pgAllowOthers" - Allow other computers to connect
++ name="trace" - Print additional trace information; for all servers
++ name="baseDir" - The base directory for H2 databases; for all servers
++ -->
++ <!--H2DatabaseConfiguration>
++ <property name="web" />
++ <property name="webPort">8082</property>
++ <property name="webAllowOthers" />
++ <property name="webSSL" />
++ <property name="tcp" />
++ <property name="tcpPort">9092</property>
++ <property name="tcpAllowOthers" />
++ <property name="tcpSSL" />
++ <property name="pg" />
++ <property name="pgPort">5435</property>
++ <property name="pgAllowOthers" />
++ <property name="trace" />
++ <property name="baseDir">${carbon.home}</property>
++ </H2DatabaseConfiguration-->
++ <!--Disabling statistics reporter by default-->
++ <StatisticsReporterDisabled>true</StatisticsReporterDisabled>
++
++ <!-- Enable accessing Admin Console via HTTP -->
++ <!-- EnableHTTPAdminConsole>true</EnableHTTPAdminConsole -->
++
++ <!--
++ Default Feature Repository of WSO2 Carbon.
++ -->
++ <FeatureRepository>
++ <RepositoryName>default repository</RepositoryName>
++ <RepositoryURL>http://product-dist.wso2.com/p2/carbon/releases/wilkes/</RepositoryURL>
++ </FeatureRepository>
++
++ <!--
++ Configure API Management
++ -->
++ <APIManagement>
++
++ <!--Uses the embedded API Manager by default. If you want to use an external
++ API Manager instance to manage APIs, configure below externalAPIManager-->
++
++ <Enabled>true</Enabled>
++
++ <!--Uncomment and configure API Gateway and
++ Publisher URLs to use external API Manager instance-->
++
++ <!--ExternalAPIManager>
++
++ <APIGatewayURL>http://localhost:8281</APIGatewayURL>
++ <APIPublisherURL>http://localhost:8281/publisher</APIPublisherURL>
++
++ </ExternalAPIManager-->
++
++ <LoadAPIContextsInServerStartup>true</LoadAPIContextsInServerStartup>
++ </APIManagement>
++</Server>
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/wso2_is/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/wso2_is/vars/main.yml
index 0000000,0000000..f7b4eb7
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/wso2_is/vars/main.yml
@@@ -1,0 -1,0 +1,18 @@@
++---
++#Variables associated with this role
++# Oracle Java 8
++java_dir_source: "/usr/local/src"
++
++java_version: 8
++java_version_update: 91
++java_version_build: '14'
++java_version_string: "1.{{ java_version }}.0_{{ java_version_update }}"
++java_home: "/usr/java/jdk1.{{ java_version }}.0_{{ java_version_update }}"
++
++java_rpm_filename: "jdk-{{ java_version }}u{{ java_version_update }}-linux-x64.rpm"
++java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/{{ java_version }}u{{ java_version_update }}-b{{ java_version_build }}/{{ java_rpm_filename }}"
++
++wso2_is_rul: http://wso2.com/products/identity-server/#download
++wso2_is_dist: wso2is-5.1.0.zip
++wso2_is_dir: wso2is-5.1.0
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/handlers/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/handlers/main.yml
index 0000000,0000000..daefebe
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/handlers/main.yml
@@@ -1,0 -1,0 +1,12 @@@
++---
++- name: start zookeeper
++ service: name=zookeeper state=started enabled=yes
++ become: yes
++
++- name: stop zookeeper
++ service: name=zookeeper state=stopped
++ become: yes
++
++- name: restart zookeeper
++ service: name=zookeeper state=restarted enabled=yes
++ become: yes
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/tasks/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/tasks/main.yml
index 0000000,0000000..78bcec2
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/tasks/main.yml
@@@ -1,0 -1,0 +1,34 @@@
++---
++################################################################################
++# Setup and run Zookeeper
++- name: Download and unarchive zookeeper
++ unarchive: src="{{ zookeeper_url }}"
++ dest="{{ user_home }}"
++ copy=no
++ owner="{{ user }}"
++ group="{{ group }}"
++
++- name: open zookeeper port
++ firewalld: port=2181/tcp zone=public permanent=true state=enabled immediate=yes
++ become: yes
++
++- name: Copy zoo.cfg file
++ template: src=zoo.cfg.j2 dest="{{ zookeeper_dir }}/conf/zoo.cfg" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r"
++ notify:
++ - restart zookeeper
++
++- name: Check if systemd exists
++ stat: path=/usr/lib/systemd/system/
++ register: systemd_check
++
++- name: Systemd script.
++ template: src=zookeeper.service.j2 dest=/usr/lib/systemd/system/zookeeper.service
++ when: systemd_check.stat.exists == true
++ notify:
++ - restart zookeeper
++ become: yes
++
++- name: reload systemd daemons
++ command: systemctl daemon-reload
++ become: yes
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/templates/zoo.cfg.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/templates/zoo.cfg.j2
index 0000000,0000000..8426b98
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/templates/zoo.cfg.j2
@@@ -1,0 -1,0 +1,28 @@@
++# The number of milliseconds of each tick
++tickTime={{tick_time}}
++# The number of ticks that the initial
++# synchronization phase can take
++initLimit={{init_limit}}
++# The number of ticks that can pass between
++# sending a request and getting an acknowledgement
++syncLimit={{sync_limit}}
++# the directory where the snapshot is stored.
++# do not use /tmp for storage, /tmp here is just
++# example sakes.
++dataDir={{zookeeper_data_dir}}
++# the port at which the clients will connect
++clientPort={{ client_port }}
++# the maximum number of client connections.
++# increase this if you need to handle more clients
++#maxClientCnxns=60
++#
++# Be sure to read the maintenance section of the
++# administrator guide before turning on autopurge.
++#
++# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
++#
++# The number of snapshots to retain in dataDir
++#autopurge.snapRetainCount=3
++# Purge task interval in hours
++# Set to "0" to disable auto purge feature
++#autopurge.purgeInterval=1
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/templates/zookeeper.service.j2
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/templates/zookeeper.service.j2
index 0000000,0000000..19c3718
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/templates/zookeeper.service.j2
@@@ -1,0 -1,0 +1,15 @@@
++# {{ansible_managed}}
++
++[Unit]
++Description=ZooKeeper
++
++
++[Service]
++Type=forking
++ExecStart={{zookeeper_dir}}/bin/zkServer.sh start
++ExecStop={{ zookeeper_dir }}/bin/zkServer.sh stop
++Restart=always
++TimeoutSec=300
++
++[Install]
++WantedBy=multi-user.target
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/roles/zookeeper/vars/main.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/roles/zookeeper/vars/main.yml
index 0000000,0000000..a3e10db
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/roles/zookeeper/vars/main.yml
@@@ -1,0 -1,0 +1,17 @@@
++---
++#Variables associated with this role
++# zookeeper related variable
++zookeeper_version: 3.4.8
++zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
++
++apt_cache_timeout: 3600
++client_port: "{{ zookeeper_client_port }}"
++init_limit: 5
++sync_limit: 2
++tick_time: 2000
++data_dir: /var/lib/zookeeper
++log_dir: /var/log/zookeeper
++zookeeper_dir: "{{ user_home }}/zookeeper-{{zookeeper_version}}"
++zookeeper_data_dir: "{{ zookeeper_dir }}/data"
++
++...
http://git-wip-us.apache.org/repos/asf/airavata/blob/514567c8/dev-tools/ansible/site.yml
----------------------------------------------------------------------
diff --cc dev-tools/ansible/site.yml
index 0000000,0000000..69ff15b
new file mode 100644
--- /dev/null
+++ b/dev-tools/ansible/site.yml
@@@ -1,0 -1,0 +1,76 @@@
++---
++#Master playbook
++- hosts: zookeeper
++ tags: zookeeper, airavata
++ roles:
++ - env_setup
++ - java
++ - zookeeper
++
++- hosts: rabbitmq
++ tags: rabbitmq, airavata
++ roles:
++ - env_setup
++ - rabbitmq
++
++- hosts: database
++ tags: mysql , airavata
++ roles:
++ - env_setup
++ - role: database
++ become: yes
++ become_user: "{{user}}"
++
++- hosts: wso2is
++ tags: wso2is
++ roles:
++ - env_setup
++ - java
++ - role: wso2_is
++ become: yes
++ become_user: "{{user}}"
++
++
++- hosts: gfac
++ tags: gfac, airavata
++ roles:
++ - env_setup
++ - java
++ - role: common
++ become: yes
++ become_user: "{{user}}"
++ - role: gfac
++ become: yes
++ become_user: "{{user}}"
++
++- hosts: api-orch
++ tags: api-orch, airavata
++ roles:
++ - env_setup
++ - java
++ - role: common
++ become: yes
++ become_user: "{{user}}"
++ - role: api-orch
++ become: yes
++ become_user: "{{user}}"
++
++- hosts: registry
++ tags: registry, airavata
++ roles:
++ - env_setup
++ - java
++ - role: common
++ become: yes
++ become_user: "{{user}}"
++ - role: registry
++ become: yes
++ become_user: "{{user}}"
++
++- hosts: pga
++ tags: pga
++ roles:
++ - env_setup
++ - pga
++
++...
[24/50] [abbrv] airavata git commit: initial commit
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
new file mode 100644
index 0000000..0bebf24
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
@@ -0,0 +1,817 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+public class Domain implements org.apache.thrift.TBase<Domain, Domain._Fields>, java.io.Serializable, Cloneable, Comparable<Domain> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Domain");
+
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new DomainStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DomainTupleSchemeFactory());
+ }
+
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ DOMAIN_ID((short)1, "domainId"),
+ NAME((short)2, "name"),
+ DESCRIPTION((short)3, "description"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 2: // NAME
+ return NAME;
+ case 3: // DESCRIPTION
+ return DESCRIPTION;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Domain.class, metaDataMap);
+ }
+
+ public Domain() {
+ this.domainId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Domain(Domain other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public Domain deepCopy() {
+ return new Domain(this);
+ }
+
+ @Override
+ public void clear() {
+ this.domainId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.name = null;
+ this.description = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public Domain setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Domain setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Domain setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Domain setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Domain setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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 DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Domain)
+ return this.equals((Domain)that);
+ return false;
+ }
+
+ public boolean equals(Domain that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Domain other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Domain(");
+ boolean first = true;
+
+ if (isSetDomainId()) {
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 DomainStandardSchemeFactory implements SchemeFactory {
+ public DomainStandardScheme getScheme() {
+ return new DomainStandardScheme();
+ }
+ }
+
+ private static class DomainStandardScheme extends StandardScheme<Domain> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Domain 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: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, Domain struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DomainTupleSchemeFactory implements SchemeFactory {
+ public DomainTupleScheme getScheme() {
+ return new DomainTupleScheme();
+ }
+ }
+
+ private static class DomainTupleScheme extends TupleScheme<Domain> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Domain struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetDomainId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Domain struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entitiy.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entitiy.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entitiy.java
new file mode 100644
index 0000000..9787ae7
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entitiy.java
@@ -0,0 +1,1401 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-19")
+public class Entitiy implements org.apache.thrift.TBase<Entitiy, Entitiy._Fields>, java.io.Serializable, Cloneable, Comparable<Entitiy> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entitiy");
+
+ private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("domain", org.apache.thrift.protocol.TType.STRING, (short)2);
+ 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)3);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)7);
+ private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)9);
+ 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)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EntitiyStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EntitiyTupleSchemeFactory());
+ }
+
+ public String id; // optional
+ public String domain; // optional
+ public String entityTypeId; // optional
+ public String ownerId; // optional
+ public String name; // optional
+ public String description; // optional
+ public Map<String,String> metadata; // optional
+ public String fullText; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ID((short)1, "id"),
+ DOMAIN((short)2, "domain"),
+ ENTITY_TYPE_ID((short)3, "entityTypeId"),
+ OWNER_ID((short)4, "ownerId"),
+ NAME((short)5, "name"),
+ DESCRIPTION((short)6, "description"),
+ METADATA((short)7, "metadata"),
+ FULL_TEXT((short)8, "fullText"),
+ CREATED_TIME((short)9, "createdTime"),
+ UPDATED_TIME((short)10, "updatedTime");
+
+ 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: // ID
+ return ID;
+ case 2: // DOMAIN
+ return DOMAIN;
+ case 3: // ENTITY_TYPE_ID
+ return ENTITY_TYPE_ID;
+ case 4: // OWNER_ID
+ return OWNER_ID;
+ case 5: // NAME
+ return NAME;
+ case 6: // DESCRIPTION
+ return DESCRIPTION;
+ case 7: // METADATA
+ return METADATA;
+ case 8: // FULL_TEXT
+ return FULL_TEXT;
+ case 9: // CREATED_TIME
+ return CREATED_TIME;
+ case 10: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.ID,_Fields.DOMAIN,_Fields.ENTITY_TYPE_ID,_Fields.OWNER_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.METADATA,_Fields.FULL_TEXT,_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);
+ tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.FULL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("fullText", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Entitiy.class, metaDataMap);
+ }
+
+ public Entitiy() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Entitiy(Entitiy other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetId()) {
+ this.id = other.id;
+ }
+ if (other.isSetDomain()) {
+ this.domain = other.domain;
+ }
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetMetadata()) {
+ Map<String,String> __this__metadata = new HashMap<String,String>(other.metadata);
+ this.metadata = __this__metadata;
+ }
+ if (other.isSetFullText()) {
+ this.fullText = other.fullText;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public Entitiy deepCopy() {
+ return new Entitiy(this);
+ }
+
+ @Override
+ public void clear() {
+ this.id = null;
+ this.domain = null;
+ this.entityTypeId = null;
+ this.ownerId = null;
+ this.name = null;
+ this.description = null;
+ this.metadata = null;
+ this.fullText = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ public Entitiy setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ public void unsetId() {
+ this.id = null;
+ }
+
+ /** Returns true if field id is set (has been assigned a value) and false otherwise */
+ public boolean isSetId() {
+ return this.id != null;
+ }
+
+ public void setIdIsSet(boolean value) {
+ if (!value) {
+ this.id = null;
+ }
+ }
+
+ public String getDomain() {
+ return this.domain;
+ }
+
+ public Entitiy setDomain(String domain) {
+ this.domain = domain;
+ return this;
+ }
+
+ public void unsetDomain() {
+ this.domain = null;
+ }
+
+ /** Returns true if field domain is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomain() {
+ return this.domain != null;
+ }
+
+ public void setDomainIsSet(boolean value) {
+ if (!value) {
+ this.domain = null;
+ }
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public Entitiy 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 String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public Entitiy setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Entitiy setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Entitiy setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public int getMetadataSize() {
+ return (this.metadata == null) ? 0 : this.metadata.size();
+ }
+
+ public void putToMetadata(String key, String val) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<String,String>();
+ }
+ this.metadata.put(key, val);
+ }
+
+ public Map<String,String> getMetadata() {
+ return this.metadata;
+ }
+
+ public Entitiy setMetadata(Map<String,String> metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ public void unsetMetadata() {
+ this.metadata = null;
+ }
+
+ /** Returns true if field metadata is set (has been assigned a value) and false otherwise */
+ public boolean isSetMetadata() {
+ return this.metadata != null;
+ }
+
+ public void setMetadataIsSet(boolean value) {
+ if (!value) {
+ this.metadata = null;
+ }
+ }
+
+ public String getFullText() {
+ return this.fullText;
+ }
+
+ public Entitiy setFullText(String fullText) {
+ this.fullText = fullText;
+ return this;
+ }
+
+ public void unsetFullText() {
+ this.fullText = null;
+ }
+
+ /** Returns true if field fullText is set (has been assigned a value) and false otherwise */
+ public boolean isSetFullText() {
+ return this.fullText != null;
+ }
+
+ public void setFullTextIsSet(boolean value) {
+ if (!value) {
+ this.fullText = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Entitiy setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Entitiy setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ID:
+ if (value == null) {
+ unsetId();
+ } else {
+ setId((String)value);
+ }
+ break;
+
+ case DOMAIN:
+ if (value == null) {
+ unsetDomain();
+ } else {
+ setDomain((String)value);
+ }
+ break;
+
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case METADATA:
+ if (value == null) {
+ unsetMetadata();
+ } else {
+ setMetadata((Map<String,String>)value);
+ }
+ break;
+
+ case FULL_TEXT:
+ if (value == null) {
+ unsetFullText();
+ } else {
+ setFullText((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ID:
+ return getId();
+
+ case DOMAIN:
+ return getDomain();
+
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case METADATA:
+ return getMetadata();
+
+ case FULL_TEXT:
+ return getFullText();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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 ID:
+ return isSetId();
+ case DOMAIN:
+ return isSetDomain();
+ case ENTITY_TYPE_ID:
+ return isSetEntityTypeId();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case METADATA:
+ return isSetMetadata();
+ case FULL_TEXT:
+ return isSetFullText();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Entitiy)
+ return this.equals((Entitiy)that);
+ return false;
+ }
+
+ public boolean equals(Entitiy that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_id = true && this.isSetId();
+ boolean that_present_id = true && that.isSetId();
+ if (this_present_id || that_present_id) {
+ if (!(this_present_id && that_present_id))
+ return false;
+ if (!this.id.equals(that.id))
+ return false;
+ }
+
+ boolean this_present_domain = true && this.isSetDomain();
+ boolean that_present_domain = true && that.isSetDomain();
+ if (this_present_domain || that_present_domain) {
+ if (!(this_present_domain && that_present_domain))
+ return false;
+ if (!this.domain.equals(that.domain))
+ 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;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_metadata = true && this.isSetMetadata();
+ boolean that_present_metadata = true && that.isSetMetadata();
+ if (this_present_metadata || that_present_metadata) {
+ if (!(this_present_metadata && that_present_metadata))
+ return false;
+ if (!this.metadata.equals(that.metadata))
+ return false;
+ }
+
+ boolean this_present_fullText = true && this.isSetFullText();
+ boolean that_present_fullText = true && that.isSetFullText();
+ if (this_present_fullText || that_present_fullText) {
+ if (!(this_present_fullText && that_present_fullText))
+ return false;
+ if (!this.fullText.equals(that.fullText))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_id = true && (isSetId());
+ list.add(present_id);
+ if (present_id)
+ list.add(id);
+
+ boolean present_domain = true && (isSetDomain());
+ list.add(present_domain);
+ if (present_domain)
+ list.add(domain);
+
+ boolean present_entityTypeId = true && (isSetEntityTypeId());
+ list.add(present_entityTypeId);
+ if (present_entityTypeId)
+ list.add(entityTypeId);
+
+ boolean present_ownerId = true && (isSetOwnerId());
+ list.add(present_ownerId);
+ if (present_ownerId)
+ list.add(ownerId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_metadata = true && (isSetMetadata());
+ list.add(present_metadata);
+ if (present_metadata)
+ list.add(metadata);
+
+ boolean present_fullText = true && (isSetFullText());
+ list.add(present_fullText);
+ if (present_fullText)
+ list.add(fullText);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Entitiy other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomain()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain, other.domain);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMetadata()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFullText()).compareTo(other.isSetFullText());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFullText()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullText, other.fullText);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Entitiy(");
+ boolean first = true;
+
+ if (isSetId()) {
+ sb.append("id:");
+ if (this.id == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.id);
+ }
+ first = false;
+ }
+ if (isSetDomain()) {
+ if (!first) sb.append(", ");
+ sb.append("domain:");
+ if (this.domain == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domain);
+ }
+ first = false;
+ }
+ if (isSetEntityTypeId()) {
+ if (!first) sb.append(", ");
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ }
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetMetadata()) {
+ if (!first) sb.append(", ");
+ sb.append("metadata:");
+ if (this.metadata == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.metadata);
+ }
+ first = false;
+ }
+ if (isSetFullText()) {
+ if (!first) sb.append(", ");
+ sb.append("fullText:");
+ if (this.fullText == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.fullText);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 EntitiyStandardSchemeFactory implements SchemeFactory {
+ public EntitiyStandardScheme getScheme() {
+ return new EntitiyStandardScheme();
+ }
+ }
+
+ private static class EntitiyStandardScheme extends StandardScheme<Entitiy> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Entitiy 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: // ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.id = iprot.readString();
+ struct.setIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domain = iprot.readString();
+ struct.setDomainIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ENTITY_TYPE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // METADATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+ struct.metadata = new HashMap<String,String>(2*_map0.size);
+ String _key1;
+ String _val2;
+ for (int _i3 = 0; _i3 < _map0.size; ++_i3)
+ {
+ _key1 = iprot.readString();
+ _val2 = iprot.readString();
+ struct.metadata.put(_key1, _val2);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setMetadataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // FULL_TEXT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.fullText = iprot.readString();
+ struct.setFullTextIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, Entitiy struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.id != null) {
+ if (struct.isSetId()) {
+ oprot.writeFieldBegin(ID_FIELD_DESC);
+ oprot.writeString(struct.id);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domain != null) {
+ if (struct.isSetDomain()) {
+ oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
+ oprot.writeString(struct.domain);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.entityTypeId != null) {
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.metadata != null) {
+ if (struct.isSetMetadata()) {
+ oprot.writeFieldBegin(METADATA_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
+ for (Map.Entry<String, String> _iter4 : struct.metadata.entrySet())
+ {
+ oprot.writeString(_iter4.getKey());
+ oprot.writeString(_iter4.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.fullText != null) {
+ if (struct.isSetFullText()) {
+ oprot.writeFieldBegin(FULL_TEXT_FIELD_DESC);
+ oprot.writeString(struct.fullText);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EntitiyTupleSchemeFactory implements SchemeFactory {
+ public EntitiyTupleScheme getScheme() {
+ return new EntitiyTupleScheme();
+ }
+ }
+
+ private static class EntitiyTupleScheme extends TupleScheme<Entitiy> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Entitiy struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomain()) {
+ optionals.set(1);
+ }
+ if (struct.isSetEntityTypeId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetName()) {
+ optionals.set(4);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(5);
+ }
+ if (struct.isSetMetadata()) {
+ optionals.set(6);
+ }
+ if (struct.isSetFullText()) {
+ optionals.set(7);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(8);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(9);
+ }
+ oprot.writeBitSet(optionals, 10);
+ if (struct.isSetId()) {
+ oprot.writeString(struct.id);
+ }
+ if (struct.isSetDomain()) {
+ oprot.writeString(struct.domain);
+ }
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeString(struct.entityTypeId);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetMetadata()) {
+ {
+ oprot.writeI32(struct.metadata.size());
+ for (Map.Entry<String, String> _iter5 : struct.metadata.entrySet())
+ {
+ oprot.writeString(_iter5.getKey());
+ oprot.writeString(_iter5.getValue());
+ }
+ }
+ }
+ if (struct.isSetFullText()) {
+ oprot.writeString(struct.fullText);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Entitiy struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(10);
+ if (incoming.get(0)) {
+ struct.id = iprot.readString();
+ struct.setIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domain = iprot.readString();
+ struct.setDomainIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(6)) {
+ {
+ org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.metadata = new HashMap<String,String>(2*_map6.size);
+ String _key7;
+ String _val8;
+ for (int _i9 = 0; _i9 < _map6.size; ++_i9)
+ {
+ _key7 = iprot.readString();
+ _val8 = iprot.readString();
+ struct.metadata.put(_key7, _val8);
+ }
+ }
+ struct.setMetadataIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.fullText = iprot.readString();
+ struct.setFullTextIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
[36/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
new file mode 100644
index 0000000..0fb6325
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
@@ -0,0 +1,33673 @@
+/**
+ * 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.gov.registry.service.cpi;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class GovRegistryService {
+
+ public interface Iface {
+
+ /**
+ * * Domain Operations
+ * *
+ *
+ * @param domain
+ */
+ public boolean createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * User Operations
+ * *
+ *
+ * @param user
+ */
+ public boolean registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.User getUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * Group Operations
+ * *
+ *
+ * @param group
+ */
+ public boolean createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public Map<String,org.apache.airavata.gov.registry.models.GroupType> getGroupMembers(String groupId) throws org.apache.thrift.TException;
+
+ /**
+ * * EntityType Operations
+ * *
+ *
+ * @param entityType
+ */
+ public boolean createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * Entity Operations
+ * *
+ *
+ * @param entity
+ */
+ public boolean registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.Entity> searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ /**
+ * * EntityType Operations
+ * *
+ *
+ * @param permisionType
+ */
+ public boolean createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.PermissionType getPermissionType(String permisionTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void createDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void registerUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updatedUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroupMembers(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntityTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void registerEntity(org.apache.airavata.gov.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateEntity(org.apache.airavata.gov.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deletePermissionType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getPermissionType(String permisionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public boolean createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createDomain(domain);
+ return recv_createDomain();
+ }
+
+ public void send_createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.thrift.TException
+ {
+ createDomain_args args = new createDomain_args();
+ args.setDomain(domain);
+ sendBase("createDomain", args);
+ }
+
+ public boolean recv_createDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createDomain_result result = new createDomain_result();
+ receiveBase(result, "createDomain");
+ 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, "createDomain failed: unknown result");
+ }
+
+ public boolean updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateDomain(domain);
+ return recv_updateDomain();
+ }
+
+ public void send_updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.thrift.TException
+ {
+ updateDomain_args args = new updateDomain_args();
+ args.setDomain(domain);
+ sendBase("updateDomain", args);
+ }
+
+ public boolean recv_updateDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateDomain_result result = new updateDomain_result();
+ receiveBase(result, "updateDomain");
+ 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, "updateDomain failed: unknown result");
+ }
+
+ public boolean deleteDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteDomain(domainId);
+ return recv_deleteDomain();
+ }
+
+ public void send_deleteDomain(String domainId) throws org.apache.thrift.TException
+ {
+ deleteDomain_args args = new deleteDomain_args();
+ args.setDomainId(domainId);
+ sendBase("deleteDomain", args);
+ }
+
+ public boolean recv_deleteDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteDomain_result result = new deleteDomain_result();
+ receiveBase(result, "deleteDomain");
+ 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, "deleteDomain failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getDomain(domainId);
+ return recv_getDomain();
+ }
+
+ public void send_getDomain(String domainId) throws org.apache.thrift.TException
+ {
+ getDomain_args args = new getDomain_args();
+ args.setDomainId(domainId);
+ sendBase("getDomain", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.Domain recv_getDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getDomain_result result = new getDomain_result();
+ receiveBase(result, "getDomain");
+ 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, "getDomain failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getDomains(offset, limit);
+ return recv_getDomains();
+ }
+
+ public void send_getDomains(int offset, int limit) throws org.apache.thrift.TException
+ {
+ getDomains_args args = new getDomains_args();
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getDomains", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Domain> recv_getDomains() throws org.apache.thrift.TException
+ {
+ getDomains_result result = new getDomains_result();
+ receiveBase(result, "getDomains");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDomains failed: unknown result");
+ }
+
+ public boolean registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_registerUser(user);
+ return recv_registerUser();
+ }
+
+ public void send_registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.thrift.TException
+ {
+ registerUser_args args = new registerUser_args();
+ args.setUser(user);
+ sendBase("registerUser", args);
+ }
+
+ public boolean recv_registerUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ registerUser_result result = new registerUser_result();
+ receiveBase(result, "registerUser");
+ 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, "registerUser failed: unknown result");
+ }
+
+ public boolean updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updatedUser(user);
+ return recv_updatedUser();
+ }
+
+ public void send_updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.thrift.TException
+ {
+ updatedUser_args args = new updatedUser_args();
+ args.setUser(user);
+ sendBase("updatedUser", args);
+ }
+
+ public boolean recv_updatedUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updatedUser_result result = new updatedUser_result();
+ receiveBase(result, "updatedUser");
+ 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, "updatedUser failed: unknown result");
+ }
+
+ public boolean deleteUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteUser(userId);
+ return recv_deleteUser();
+ }
+
+ public void send_deleteUser(String userId) throws org.apache.thrift.TException
+ {
+ deleteUser_args args = new deleteUser_args();
+ args.setUserId(userId);
+ sendBase("deleteUser", args);
+ }
+
+ public boolean recv_deleteUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteUser_result result = new deleteUser_result();
+ receiveBase(result, "deleteUser");
+ 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, "deleteUser failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.User getUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getUser(userId);
+ return recv_getUser();
+ }
+
+ public void send_getUser(String userId) throws org.apache.thrift.TException
+ {
+ getUser_args args = new getUser_args();
+ args.setUserId(userId);
+ sendBase("getUser", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.User recv_getUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getUser_result result = new getUser_result();
+ receiveBase(result, "getUser");
+ 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, "getUser failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getUsers(domain, offset, limit);
+ return recv_getUsers();
+ }
+
+ public void send_getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getUsers_args args = new getUsers_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getUsers", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.User> recv_getUsers() throws org.apache.thrift.TException
+ {
+ getUsers_result result = new getUsers_result();
+ receiveBase(result, "getUsers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
+ }
+
+ public boolean createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createGroup(group);
+ return recv_createGroup();
+ }
+
+ public void send_createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.thrift.TException
+ {
+ createGroup_args args = new createGroup_args();
+ args.setGroup(group);
+ sendBase("createGroup", args);
+ }
+
+ public boolean recv_createGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createGroup_result result = new createGroup_result();
+ receiveBase(result, "createGroup");
+ 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, "createGroup failed: unknown result");
+ }
+
+ public boolean updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateGroup(group);
+ return recv_updateGroup();
+ }
+
+ public void send_updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.thrift.TException
+ {
+ updateGroup_args args = new updateGroup_args();
+ args.setGroup(group);
+ sendBase("updateGroup", args);
+ }
+
+ public boolean recv_updateGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateGroup_result result = new updateGroup_result();
+ receiveBase(result, "updateGroup");
+ 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, "updateGroup failed: unknown result");
+ }
+
+ public boolean deleteGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteGroup(groupId);
+ return recv_deleteGroup();
+ }
+
+ public void send_deleteGroup(String groupId) throws org.apache.thrift.TException
+ {
+ deleteGroup_args args = new deleteGroup_args();
+ args.setGroupId(groupId);
+ sendBase("deleteGroup", args);
+ }
+
+ public boolean recv_deleteGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteGroup_result result = new deleteGroup_result();
+ receiveBase(result, "deleteGroup");
+ 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, "deleteGroup failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getGroup(groupId);
+ return recv_getGroup();
+ }
+
+ public void send_getGroup(String groupId) throws org.apache.thrift.TException
+ {
+ getGroup_args args = new getGroup_args();
+ args.setGroupId(groupId);
+ sendBase("getGroup", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.UserGroup recv_getGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getGroup_result result = new getGroup_result();
+ receiveBase(result, "getGroup");
+ 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, "getGroup failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getGroups(domain, offset, limit);
+ return recv_getGroups();
+ }
+
+ public void send_getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getGroups_args args = new getGroups_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getGroups", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.UserGroup> recv_getGroups() throws org.apache.thrift.TException
+ {
+ getGroups_result result = new getGroups_result();
+ receiveBase(result, "getGroups");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroups failed: unknown result");
+ }
+
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_addUsersToGroup(userIds, groupId);
+ return recv_addUsersToGroup();
+ }
+
+ public void send_addUsersToGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
+ {
+ addUsersToGroup_args args = new addUsersToGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ sendBase("addUsersToGroup", args);
+ }
+
+ public boolean recv_addUsersToGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ addUsersToGroup_result result = new addUsersToGroup_result();
+ receiveBase(result, "addUsersToGroup");
+ 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, "addUsersToGroup failed: unknown result");
+ }
+
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_removeUsersFromGroup(userIds, groupId);
+ return recv_removeUsersFromGroup();
+ }
+
+ public void send_removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
+ {
+ removeUsersFromGroup_args args = new removeUsersFromGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ sendBase("removeUsersFromGroup", args);
+ }
+
+ public boolean recv_removeUsersFromGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ removeUsersFromGroup_result result = new removeUsersFromGroup_result();
+ receiveBase(result, "removeUsersFromGroup");
+ 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, "removeUsersFromGroup failed: unknown result");
+ }
+
+ public Map<String,org.apache.airavata.gov.registry.models.GroupType> getGroupMembers(String groupId) throws org.apache.thrift.TException
+ {
+ send_getGroupMembers(groupId);
+ return recv_getGroupMembers();
+ }
+
+ public void send_getGroupMembers(String groupId) throws org.apache.thrift.TException
+ {
+ getGroupMembers_args args = new getGroupMembers_args();
+ args.setGroupId(groupId);
+ sendBase("getGroupMembers", args);
+ }
+
+ public Map<String,org.apache.airavata.gov.registry.models.GroupType> recv_getGroupMembers() throws org.apache.thrift.TException
+ {
+ getGroupMembers_result result = new getGroupMembers_result();
+ receiveBase(result, "getGroupMembers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembers failed: unknown result");
+ }
+
+ public boolean createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createEntityType(entityType);
+ return recv_createEntityType();
+ }
+
+ public void send_createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.thrift.TException
+ {
+ createEntityType_args args = new createEntityType_args();
+ args.setEntityType(entityType);
+ sendBase("createEntityType", args);
+ }
+
+ public boolean recv_createEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createEntityType_result result = new createEntityType_result();
+ receiveBase(result, "createEntityType");
+ 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, "createEntityType failed: unknown result");
+ }
+
+ public boolean updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateEntityType(entityType);
+ return recv_updateEntityType();
+ }
+
+ public void send_updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.thrift.TException
+ {
+ updateEntityType_args args = new updateEntityType_args();
+ args.setEntityType(entityType);
+ sendBase("updateEntityType", args);
+ }
+
+ public boolean recv_updateEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateEntityType_result result = new updateEntityType_result();
+ receiveBase(result, "updateEntityType");
+ 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, "updateEntityType failed: unknown result");
+ }
+
+ public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteEntityType(entityTypeId);
+ return recv_deleteEntityType();
+ }
+
+ public void send_deleteEntityType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ deleteEntityType_args args = new deleteEntityType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("deleteEntityType", args);
+ }
+
+ public boolean recv_deleteEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteEntityType_result result = new deleteEntityType_result();
+ receiveBase(result, "deleteEntityType");
+ 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, "deleteEntityType failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getEntityType(entityTypeId);
+ return recv_getEntityType();
+ }
+
+ public void send_getEntityType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ getEntityType_args args = new getEntityType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("getEntityType", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.EntityType recv_getEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getEntityType_result result = new getEntityType_result();
+ receiveBase(result, "getEntityType");
+ 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, "getEntityType failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getEntityTypes(domain, offset, limit);
+ return recv_getEntityTypes();
+ }
+
+ public void send_getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getEntityTypes_args args = new getEntityTypes_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getEntityTypes", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.EntityType> recv_getEntityTypes() throws org.apache.thrift.TException
+ {
+ getEntityTypes_result result = new getEntityTypes_result();
+ receiveBase(result, "getEntityTypes");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEntityTypes failed: unknown result");
+ }
+
+ public boolean registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_registerEntity(entity);
+ return recv_registerEntity();
+ }
+
+ public void send_registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.thrift.TException
+ {
+ registerEntity_args args = new registerEntity_args();
+ args.setEntity(entity);
+ sendBase("registerEntity", args);
+ }
+
+ public boolean recv_registerEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ registerEntity_result result = new registerEntity_result();
+ receiveBase(result, "registerEntity");
+ 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, "registerEntity failed: unknown result");
+ }
+
+ public boolean updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateEntity(entity);
+ return recv_updateEntity();
+ }
+
+ public void send_updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.thrift.TException
+ {
+ updateEntity_args args = new updateEntity_args();
+ args.setEntity(entity);
+ sendBase("updateEntity", args);
+ }
+
+ public boolean recv_updateEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateEntity_result result = new updateEntity_result();
+ receiveBase(result, "updateEntity");
+ 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, "updateEntity failed: unknown result");
+ }
+
+ public boolean deleteEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteEntity(entityId);
+ return recv_deleteEntity();
+ }
+
+ public void send_deleteEntity(String entityId) throws org.apache.thrift.TException
+ {
+ deleteEntity_args args = new deleteEntity_args();
+ args.setEntityId(entityId);
+ sendBase("deleteEntity", args);
+ }
+
+ public boolean recv_deleteEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteEntity_result result = new deleteEntity_result();
+ receiveBase(result, "deleteEntity");
+ 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, "deleteEntity failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getEntity(entityId);
+ return recv_getEntity();
+ }
+
+ public void send_getEntity(String entityId) throws org.apache.thrift.TException
+ {
+ getEntity_args args = new getEntity_args();
+ args.setEntityId(entityId);
+ sendBase("getEntity", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.Entity recv_getEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getEntity_result result = new getEntity_result();
+ receiveBase(result, "getEntity");
+ 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, "getEntity failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Entity> searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_searchEntities(domain, entityType, filters, offset, limit);
+ return recv_searchEntities();
+ }
+
+ public void send_searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.thrift.TException
+ {
+ searchEntities_args args = new searchEntities_args();
+ args.setDomain(domain);
+ args.setEntityType(entityType);
+ args.setFilters(filters);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("searchEntities", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Entity> recv_searchEntities() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ searchEntities_result result = new searchEntities_result();
+ receiveBase(result, "searchEntities");
+ 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, "searchEntities failed: unknown result");
+ }
+
+ public boolean createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createPermissionType(permisionType);
+ return recv_createPermissionType();
+ }
+
+ public void send_createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.thrift.TException
+ {
+ createPermissionType_args args = new createPermissionType_args();
+ args.setPermisionType(permisionType);
+ sendBase("createPermissionType", args);
+ }
+
+ public boolean recv_createPermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createPermissionType_result result = new createPermissionType_result();
+ receiveBase(result, "createPermissionType");
+ 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, "createPermissionType failed: unknown result");
+ }
+
+ public boolean updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updatePermissionType(permisionType);
+ return recv_updatePermissionType();
+ }
+
+ public void send_updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.thrift.TException
+ {
+ updatePermissionType_args args = new updatePermissionType_args();
+ args.setPermisionType(permisionType);
+ sendBase("updatePermissionType", args);
+ }
+
+ public boolean recv_updatePermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updatePermissionType_result result = new updatePermissionType_result();
+ receiveBase(result, "updatePermissionType");
+ 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, "updatePermissionType failed: unknown result");
+ }
+
+ public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deletePermissionType(entityTypeId);
+ return recv_deletePermissionType();
+ }
+
+ public void send_deletePermissionType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ deletePermissionType_args args = new deletePermissionType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("deletePermissionType", args);
+ }
+
+ public boolean recv_deletePermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deletePermissionType_result result = new deletePermissionType_result();
+ receiveBase(result, "deletePermissionType");
+ 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, "deletePermissionType failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.PermissionType getPermissionType(String permisionTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getPermissionType(permisionTypeId);
+ return recv_getPermissionType();
+ }
+
+ public void send_getPermissionType(String permisionTypeId) throws org.apache.thrift.TException
+ {
+ getPermissionType_args args = new getPermissionType_args();
+ args.setPermisionTypeId(permisionTypeId);
+ sendBase("getPermissionType", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.PermissionType recv_getPermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getPermissionType_result result = new getPermissionType_result();
+ receiveBase(result, "getPermissionType");
+ 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, "getPermissionType failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getPermissionTypes(domain, offset, limit);
+ return recv_getPermissionTypes();
+ }
+
+ public void send_getPermissionTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getPermissionTypes_args args = new getPermissionTypes_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getPermissionTypes", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.PermissionType> recv_getPermissionTypes() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getPermissionTypes_result result = new getPermissionTypes_result();
+ receiveBase(result, "getPermissionTypes");
+ 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, "getPermissionTypes 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> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void createDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createDomain_call method_call = new createDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.Domain domain;
+ public createDomain_call(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createDomain_args args = new createDomain_args();
+ args.setDomain(domain);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_createDomain();
+ }
+ }
+
+ public void updateDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateDomain_call method_call = new updateDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.Domain domain;
+ public updateDomain_call(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateDomain_args args = new updateDomain_args();
+ args.setDomain(domain);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_updateDomain();
+ }
+ }
+
+ public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteDomain_call method_call = new deleteDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domainId;
+ public deleteDomain_call(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domainId = domainId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteDomain_args args = new deleteDomain_args();
+ args.setDomainId(domainId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_deleteDomain();
+ }
+ }
+
+ public void getDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getDomain_call method_call = new getDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domainId;
+ public getDomain_call(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domainId = domainId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getDomain_args args = new getDomain_args();
+ args.setDomainId(domainId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.gov.registry.models.Domain getResult() throws org.apache.airavata.gov.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_getDomain();
+ }
+ }
+
+ public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getDomains_call method_call = new getDomains_call(offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getDomains_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private int offset;
+ private int limit;
+ public getDomains_call(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDomains", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getDomains_args args = new getDomains_args();
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Domain> getResult() throws 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_getDomains();
+ }
+ }
+
+ public void registerUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ registerUser_call method_call = new registerUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class registerUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.User user;
+ public registerUser_call(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.user = user;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ registerUser_args args = new registerUser_args();
+ args.setUser(user);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_registerUser();
+ }
+ }
+
+ public void updatedUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updatedUser_call method_call = new updatedUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updatedUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.User user;
+ public updatedUser_call(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.user = user;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatedUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updatedUser_args args = new updatedUser_args();
+ args.setUser(user);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_updatedUser();
+ }
+ }
+
+ public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteUser_call method_call = new deleteUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userId;
+ public deleteUser_call(String userId, 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.userId = userId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteUser_args args = new deleteUser_args();
+ args.setUserId(userId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_deleteUser();
+ }
+ }
+
+ public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getUser_call method_call = new getUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userId;
+ public getUser_call(String userId, 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.userId = userId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getUser_args args = new getUser_args();
+ args.setUserId(userId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.gov.registry.models.User getResult() throws org.apache.airavata.gov.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_getUser();
+ }
+ }
+
+ public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getUsers_call method_call = new getUsers_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domain;
+ private int offset;
+ private int limit;
+ public getUsers_call(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getUsers_args args = new getUsers_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.gov.registry.models.User> getResult() throws 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_getUsers();
+ }
+ }
+
+ public void createGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createGroup_call method_call = new createGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.UserGroup group;
+ public createGroup_call(org.apache.airavata.gov.registry.models.UserGroup group, 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.group = group;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createGroup_args args = new createGroup_args();
+ args.setGroup(group);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_createGroup();
+ }
+ }
+
+ public void updateGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateGroup_call method_call = new updateGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.UserGroup group;
+ public updateGroup_call(org.apache.airavata.gov.registry.models.UserGroup group, 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.group = group;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateGroup_args args = new updateGroup_args();
+ args.setGroup(group);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_updateGroup();
+ }
+ }
+
+ public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteGroup_call method_call = new deleteGroup_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String groupId;
+ public deleteGroup_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteGroup_args args = new deleteGroup_args();
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_deleteGroup();
+ }
+ }
+
+ public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroup_call method_call = new getGroup_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String groupId;
+ public getGroup_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getGroup_args args = new getGroup_args();
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.gov.registry.models.UserGroup getResult() throws org.apache.airavata.gov.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_getGroup();
+ }
+ }
+
+ public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroups_call method_call = new getGroups_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domain;
+ private int offset;
+ private int limit;
+ public getGroups_call(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getGroups_args args = new getGroups_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.gov.registry.models.UserGroup> getResult() throws 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_getGroups();
+ }
+ }
+
+ public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ addUsersToGroup_call method_call = new addUsersToGroup_call(userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class addUsersToGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private List<String> userIds;
+ private String groupId;
+ public addUsersToGroup_call(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userIds = userIds;
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUsersToGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ addUsersToGroup_args args = new addUsersToGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_addUsersToGroup();
+ }
+ }
+
+ public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ removeUsersFromGroup_call method_call = new removeUsersFromGroup_call(userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class removeUsersFromGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private List<String> userIds;
+ private String groupId;
+ public removeUsersFromGroup_call(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userIds = userIds;
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeUsersFromGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ removeUsersFromGroup_args args = new removeUsersFromGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_removeUsersFromGroup();
+ }
+ }
+
+ public void getGroupMembers(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroupMembers_call method_call = new getGroupMembers_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroupMembers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String groupId;
+ public getGroupMembers_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroupMembers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getGroupMembers_args args = new getGroupMembers_args();
+ args.setGroupId(groupId);
+ args.write(prot);
<TRUNCATED>
[07/50] [abbrv] airavata git commit: Update properties
Posted by sc...@apache.org.
Update properties
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/72f35c19
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/72f35c19
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/72f35c19
Branch: refs/heads/airavata-gov-registry
Commit: 72f35c19c66b038dab4bc20f6365a80b857692cd
Parents: 2ab5a72
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Sep 19 14:35:24 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Sep 19 14:35:24 2016 -0400
----------------------------------------------------------------------
group_vars/all.yml | 5 +++--
.../templates/airavata-server.properties.j2 | 2 ++
.../gfac/templates/airavata-server.properties.j2 | 2 ++
roles/pga/tasks/main.yml | 7 +++++++
roles/pga/templates/pga_config.php.j2 | 18 ++++++++++++++----
roles/pga/vars/main.yml | 16 ++++++++--------
.../templates/airavata-server.properties.j2 | 2 ++
7 files changed, 38 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index 7dfd8d4..d49f583 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -2,7 +2,7 @@
ansible_connection: ssh
# ansible_ssh_user: centos
ansible_ssh_user: root
-ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-jetstream.pem
+ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/dev-deployment-key.pem
# ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
user: centos
@@ -44,9 +44,10 @@ zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
api_server_name: "apiserver-node0"
api_server_host: "{{ansible_fqdn}}"
api_server_port: "8930"
-api_secured: "true"
+api_secured: "false"
tls_enable: "false"
api_server_tls_port: "9930"
+enable_sharing: false
# Orchestrator related variables
orchestrator_name: "orchestrator-node0"
http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index 5a01525..e36b029 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -43,6 +43,7 @@ validationQuery=SELECT 1 from CONFIGURATION
cache.enable=false
jpa.cache.size=-1
#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+enable.sharing={{enable_sharing}}
# Properties for default user mode
default.registry.user=admin
@@ -185,6 +186,7 @@ credential.store.jdbc.driver=com.mysql.jdbc.Driver
credential.store.server.host={{ cred_store_server_host }}
credential.store.server.port={{ cred_store_port }}
credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
+credential.stroe.jdbc.validationQuery=SELECT 1 from CONFIGURATION
# these properties used by credential store email notifications
email.server=smtp.googlemail.com
http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index 5a01525..e36b029 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -43,6 +43,7 @@ validationQuery=SELECT 1 from CONFIGURATION
cache.enable=false
jpa.cache.size=-1
#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+enable.sharing={{enable_sharing}}
# Properties for default user mode
default.registry.user=admin
@@ -185,6 +186,7 @@ credential.store.jdbc.driver=com.mysql.jdbc.Driver
credential.store.server.host={{ cred_store_server_host }}
credential.store.server.port={{ cred_store_port }}
credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
+credential.stroe.jdbc.validationQuery=SELECT 1 from CONFIGURATION
# these properties used by credential store email notifications
email.server=smtp.googlemail.com
http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/pga/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/tasks/main.yml b/roles/pga/tasks/main.yml
index 80beac2..6fe1df5 100644
--- a/roles/pga/tasks/main.yml
+++ b/roles/pga/tasks/main.yml
@@ -32,6 +32,13 @@
yum: name=php-mcrypt state=latest update_cache=yes
become: yes
+# - name: Check previous deployments
+# stat: path="{{ doc_root_dir }}" get_md5=no get_checksum=no
+# register: check
+
+- name: delete previous deployments
+ file: path="{{ doc_root_dir }}" state=absent
+
- name: Git clone php gateway
git: repo=https://github.com/apache/airavata-php-gateway.git
dest="{{ doc_root_dir }}" version=master
http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/pga/templates/pga_config.php.j2
----------------------------------------------------------------------
diff --git a/roles/pga/templates/pga_config.php.j2 b/roles/pga/templates/pga_config.php.j2
index 703f67f..7b38575 100644
--- a/roles/pga/templates/pga_config.php.j2
+++ b/roles/pga/templates/pga_config.php.j2
@@ -11,17 +11,17 @@ return array(
/**
* Admin Role Name
*/
- 'admin-role-name' => 'Internal/everyone',
+ 'admin-role-name' => 'admin',
/**
* Read only Admin Role Name
*/
- 'read-only-admin-role-name' => 'Internal/everyone',
+ 'read-only-admin-role-name' => 'admin-read-only',
/**
* Gateway user role
*/
- 'user-role-name' => 'Internal/everyone',
+ 'user-role-name' => 'gateway-user',
/**
* Tenant Domain
@@ -49,6 +49,11 @@ return array(
'oauth-client-secret' => '{{ oauth_client_secret }}',
/**
+ * OAuth Grant Type (password or authorization_code)
+ */
+ 'oauth-grant-type' => 'password',
+
+ /**
* Identity server domain
*/
'server' => 'idp.scigap.org',
@@ -151,7 +156,12 @@ return array(
/**
* Gateway data store resource id
*/
- 'gateway-data-store-resource-id' => '{{ gateway_data_store_resource_id }}'
+ 'gateway-data-store-resource-id' => '{{ gateway_data_store_resource_id }}',
+
+ /**
+ * Data Sharing enabled
+ */
+ 'data-sharing-enabled' => false
],
/**
http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/pga/vars/main.yml
----------------------------------------------------------------------
diff --git a/roles/pga/vars/main.yml b/roles/pga/vars/main.yml
index b7ba81f..35c5122 100644
--- a/roles/pga/vars/main.yml
+++ b/roles/pga/vars/main.yml
@@ -7,15 +7,15 @@ user_data_dir: "/var/www/user_data"
httpd_conf_file_location: "/etc/httpd/conf"
## WSO2 IS related variables
-tenant_domain: "master2.airavata"
-admin_username: "master2"
-admin_password: "master"
-oauth_client_key: "5_GFR88Nzd4XvGthSMF1fnOJPuMa"
-oauth_client_secret: "KNTf_LPLuGBDbRVZwkrP_fF5z2Ea"
+tenant_domain: "prod.testdrive"
+admin_username: "tdaadmin"
+admin_password: "SciDeploy"
+oauth_client_key: "RuLl_Uw7i_KXaLoAGJkiasTfyBYa"
+oauth_client_secret: "vD9yi2ANkChzgWiih3RahrIcfsoa"
## Airavata Client related variables
#airavata_server: "tls://gw77.iu.xsede.org"
-airavata_server: "http://{{ groups['api-orch'][0] }}"
+airavata_server: "{{ groups['api-orch'][0] }}"
airavata_port: "8930"
gateway_id: "default"
# relative to document root dir
@@ -23,8 +23,8 @@ experiment_data_dir: "{{ user_data_dir }}"
gateway_data_store_resource_id: "gw75.iu.xsede.org_3e40e62b-be11-4590-bf24-b1b6796c3572"
## Portal related variables
-super_admin_portal: "false"
-admin_emails: "'sgg@iu.edu','blas@gmail.com'"
+super_admin_portal: "true"
+admin_emails: "'sgg@iu.edu'"
portal_email_username: "pga.airavata@gmail.com"
portal_email_password: "airavata12"
...
http://git-wip-us.apache.org/repos/asf/airavata/blob/72f35c19/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/registry/templates/airavata-server.properties.j2 b/roles/registry/templates/airavata-server.properties.j2
index 5a01525..e36b029 100644
--- a/roles/registry/templates/airavata-server.properties.j2
+++ b/roles/registry/templates/airavata-server.properties.j2
@@ -43,6 +43,7 @@ validationQuery=SELECT 1 from CONFIGURATION
cache.enable=false
jpa.cache.size=-1
#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+enable.sharing={{enable_sharing}}
# Properties for default user mode
default.registry.user=admin
@@ -185,6 +186,7 @@ credential.store.jdbc.driver=com.mysql.jdbc.Driver
credential.store.server.host={{ cred_store_server_host }}
credential.store.server.port={{ cred_store_port }}
credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
+credential.stroe.jdbc.validationQuery=SELECT 1 from CONFIGURATION
# these properties used by credential store email notifications
email.server=smtp.googlemail.com
[35/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/pom.xml b/airavata-gov-registry/pom.xml
deleted file mode 100644
index 46f801f..0000000
--- a/airavata-gov-registry/pom.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.airavata</groupId>
- <artifactId>gov-registry</artifactId>
- <packaging>pom</packaging>
- <version>${global.version}</version>
-
- <properties>
- <global.version>0.17-SNAPSHOT</global.version>
- </properties>
-
- <modules>
- <module>airavata-gov-registry-stubs</module>
- <module>airavata-gov-registry-core</module>
- </modules>
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift b/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
deleted file mode 100644
index bbf2e89..0000000
--- a/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-namespace java org.apache.airavata.gov.registry.service.cpi
-
-include "./gov_reg_models.thrift"
-
-service GovRegistryService {
-
- /**
- * Domain Operations
- **/
- bool createDomain(1: required gov_reg_models.Domain domain) throws (1: gov_reg_models.GovRegistryException gre)
- bool updateDomain(1: required gov_reg_models.Domain domain) throws (1: gov_reg_models.GovRegistryException gre)
- bool deleteDomain(1: required string domainId) throws (1: gov_reg_models.GovRegistryException gre)
- gov_reg_models.Domain getDomain(1: required string domainId) throws (1: gov_reg_models.GovRegistryException gre)
- list<gov_reg_models.Domain> getDomains(1: required i32 offset, 2: required i32 limit)
-
- /**
- * User Operations
- **/
- bool registerUser(1: required gov_reg_models.User user) throws (1: gov_reg_models.GovRegistryException gre)
- bool updatedUser(1: required gov_reg_models.User user) throws (1: gov_reg_models.GovRegistryException gre)
- bool deleteUser(1: required string userId) throws (1: gov_reg_models.GovRegistryException gre)
- gov_reg_models.User getUser(1: required string userId) throws (1: gov_reg_models.GovRegistryException gre)
- list<gov_reg_models.User> getUsers(1: required string domain, 2: required i32 offset, 3: required i32 limit)
-
- /**
- * Group Operations
- **/
- bool createGroup(1: required gov_reg_models.UserGroup group) throws (1: gov_reg_models.GovRegistryException gre)
- bool updateGroup(1: required gov_reg_models.UserGroup group) throws (1: gov_reg_models.GovRegistryException gre)
- bool deleteGroup(1: required string groupId) throws (1: gov_reg_models.GovRegistryException gre)
- gov_reg_models.UserGroup getGroup(1: required string groupId) throws (1: gov_reg_models.GovRegistryException gre)
- list<gov_reg_models.UserGroup> getGroups(1: required string domain, 2: required i32 offset, 3: required i32 limit)
-
- bool addUsersToGroup(1: required list<string> userIds, 2: required string groupId) throws (1: gov_reg_models.GovRegistryException gre);
- bool removeUsersFromGroup(1: required list<string> userIds, 2: required string groupId) throws (1: gov_reg_models.GovRegistryException gre);
- map<string, gov_reg_models.GroupType> getGroupMembers(1: required string groupId)
-
- /**
- * EntityType Operations
- **/
- bool createEntityType(1: required gov_reg_models.EntityType entityType) throws (1: gov_reg_models.GovRegistryException gre)
- bool updateEntityType(1: required gov_reg_models.EntityType entityType) throws (1: gov_reg_models.GovRegistryException gre)
- bool deleteEntityType(1: required string entityTypeId) throws (1: gov_reg_models.GovRegistryException gre)
- gov_reg_models.EntityType getEntityType(1: required string entityTypeId) throws (1: gov_reg_models.GovRegistryException gre)
- list<gov_reg_models.EntityType> getEntityTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit)
-
- /**
- * Entity Operations
- **/
- bool registerEntity(1: required gov_reg_models.Entity entity) throws (1: gov_reg_models.GovRegistryException gre)
- bool updateEntity(1: required gov_reg_models.Entity entity) throws (1: gov_reg_models.GovRegistryException gre)
- bool deleteEntity(1: required string entityId) throws (1: gov_reg_models.GovRegistryException gre)
- gov_reg_models.Entity getEntity(1: required string entityId) throws (1: gov_reg_models.GovRegistryException gre)
- list<gov_reg_models.Entity> searchEntities(1: required string domain, 2: required string entityType,
- 3: required map<string, string> filters, 4: required i32 offset, 5: required i32 limit) throws (1: gov_reg_models.GovRegistryException gre)
-
- /**
- * EntityType Operations
- **/
- bool createPermissionType(1: required gov_reg_models.PermissionType permisionType) throws (1: gov_reg_models.GovRegistryException gre)
- bool updatePermissionType(1: required gov_reg_models.PermissionType permisionType) throws (1: gov_reg_models.GovRegistryException gre)
- bool deletePermissionType(1: required string entityTypeId) throws (1: gov_reg_models.GovRegistryException gre)
- gov_reg_models.PermissionType getPermissionType(1: required string permisionTypeId) throws (1: gov_reg_models.GovRegistryException gre)
- list<gov_reg_models.PermissionType> getPermissionTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit) throws (1: gov_reg_models.GovRegistryException gre)
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/thrift_models/gov_reg_models.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_reg_models.thrift b/airavata-gov-registry/thrift_models/gov_reg_models.thrift
deleted file mode 100644
index c2d64eb..0000000
--- a/airavata-gov-registry/thrift_models/gov_reg_models.thrift
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
- namespace java org.apache.airavata.gov.registry.models
-
-const string DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID"
-
-struct Domain {
- 1: optional string domainId = DO_NOT_SET_AT_CLIENTS_ID,
- 2: optional string name,
- 3: optional string description,
- 4: optional i64 createdTime,
- 5: optional i64 updatedTime
-}
-
- struct User {
- 1: optional string userId = DO_NOT_SET_AT_CLIENTS_ID,
- 2: optional string domainId,
- 3: optional string userName,
- 4: optional i64 createdTime,
- 5: optional i64 updatedTime
- }
-
-enum GroupType {
- SINGLE_USER,
- MULTI_USER
-}
-
- struct UserGroup {
- 1: optional string groupId = DO_NOT_SET_AT_CLIENTS_ID,
- 2: optional string domainId,
- 3: optional string name,
- 6: optional string description,
- 7: optional string ownerId,
- 8: optional i64 createdTime,
- 9: optional i64 updatedTime,
- 10: optional GroupType groupType
- }
-
-
-struct EntityType {
- 1: optional string entityTypeId = DO_NOT_SET_AT_CLIENTS_ID,
- 2: optional string domainId,
- 3: optional string name,
- 4: optional string description,
- 5: optional i64 createdTime,
- 6: optional i64 updatedTime
-}
-
-
-struct Entity {
- 1: optional string entityId = DO_NOT_SET_AT_CLIENTS_ID,
- 2: optional string domainId,
- 3: optional string entityTypeId,
- 4: optional string ownerId,
- 5: optional string parentEntityId,
- 6: optional string name,
- 7: optional string description,
- 8: optional map<string,string> metadata,
- 9: optional string fullText,
- 10: optional i64 createdTime,
- 11: optional i64 updatedTime
-}
-
-struct PermissionType {
- 1: optional string permissionId = DO_NOT_SET_AT_CLIENTS_ID,
- 2: optional string domainId,
- 3: optional string name,
- 4: optional i64 createdTime,
- 5: optional i64 updatedTime
-}
-
-exception GovRegistryException {
- 1: required string message
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/thrift_models/gov_sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_sharing_cpi.thrift b/airavata-gov-registry/thrift_models/gov_sharing_cpi.thrift
new file mode 100644
index 0000000..e6953df
--- /dev/null
+++ b/airavata-gov-registry/thrift_models/gov_sharing_cpi.thrift
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace java org.apache.airavata.gov.registry.service.cpi
+
+include "./gov_sharing_models.thrift"
+
+service GovRegistryService {
+
+ /**
+ * Domain Operations
+ **/
+ bool createDomain(1: required gov_sharing_models.thrift.Domain domain) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool updateDomain(1: required gov_sharing_models.thrift.Domain domain) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool deleteDomain(1: required string domainId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ gov_sharing_models.thrift.Domain getDomain(1: required string domainId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ list<gov_sharing_models.thrift.Domain> getDomains(1: required i32 offset, 2: required i32 limit)
+
+ /**
+ * User Operations
+ **/
+ bool registerUser(1: required gov_sharing_models.thrift.User user) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool updatedUser(1: required gov_sharing_models.thrift.User user) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool deleteUser(1: required string userId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ gov_sharing_models.thrift.User getUser(1: required string userId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ list<gov_sharing_models.thrift.User> getUsers(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ /**
+ * Group Operations
+ **/
+ bool createGroup(1: required gov_sharing_models.thrift.UserGroup group) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool updateGroup(1: required gov_sharing_models.thrift.UserGroup group) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool deleteGroup(1: required string groupId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ gov_sharing_models.thrift.UserGroup getGroup(1: required string groupId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ list<gov_sharing_models.thrift.UserGroup> getGroups(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ bool addUsersToGroup(1: required list<string> userIds, 2: required string groupId) throws (1: gov_sharing_models.thrift.GovRegistryException gre);
+ bool removeUsersFromGroup(1: required list<string> userIds, 2: required string groupId) throws (1: gov_sharing_models.thrift.GovRegistryException gre);
+ map<string, gov_sharing_models.thrift.GroupType> getGroupMembers(1: required string groupId)
+
+ /**
+ * EntityType Operations
+ **/
+ bool createEntityType(1: required gov_sharing_models.thrift.EntityType entityType) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool updateEntityType(1: required gov_sharing_models.thrift.EntityType entityType) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool deleteEntityType(1: required string entityTypeId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ gov_sharing_models.thrift.EntityType getEntityType(1: required string entityTypeId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ list<gov_sharing_models.thrift.EntityType> getEntityTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ /**
+ * Entity Operations
+ **/
+ bool registerEntity(1: required gov_sharing_models.thrift.Entity entity) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool updateEntity(1: required gov_sharing_models.thrift.Entity entity) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool deleteEntity(1: required string entityId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ gov_sharing_models.thrift.Entity getEntity(1: required string entityId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ list<gov_sharing_models.thrift.Entity> searchEntities(1: required string domain, 2: required string entityType,
+ 3: required map<string, string> filters, 4: required i32 offset, 5: required i32 limit) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+
+ /**
+ * EntityType Operations
+ **/
+ bool createPermissionType(1: required gov_sharing_models.thrift.PermissionType permisionType) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool updatePermissionType(1: required gov_sharing_models.thrift.PermissionType permisionType) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ bool deletePermissionType(1: required string entityTypeId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ gov_sharing_models.thrift.PermissionType getPermissionType(1: required string permisionTypeId) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+ list<gov_sharing_models.thrift.PermissionType> getPermissionTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit) throws (1: gov_sharing_models.thrift.GovRegistryException gre)
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/thrift_models/gov_sharing_models.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_sharing_models.thrift b/airavata-gov-registry/thrift_models/gov_sharing_models.thrift
new file mode 100644
index 0000000..c2d64eb
--- /dev/null
+++ b/airavata-gov-registry/thrift_models/gov_sharing_models.thrift
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+ namespace java org.apache.airavata.gov.registry.models
+
+const string DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID"
+
+struct Domain {
+ 1: optional string domainId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string name,
+ 3: optional string description,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+}
+
+ struct User {
+ 1: optional string userId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string userName,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+ }
+
+enum GroupType {
+ SINGLE_USER,
+ MULTI_USER
+}
+
+ struct UserGroup {
+ 1: optional string groupId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 6: optional string description,
+ 7: optional string ownerId,
+ 8: optional i64 createdTime,
+ 9: optional i64 updatedTime,
+ 10: optional GroupType groupType
+ }
+
+
+struct EntityType {
+ 1: optional string entityTypeId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 4: optional string description,
+ 5: optional i64 createdTime,
+ 6: optional i64 updatedTime
+}
+
+
+struct Entity {
+ 1: optional string entityId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string entityTypeId,
+ 4: optional string ownerId,
+ 5: optional string parentEntityId,
+ 6: optional string name,
+ 7: optional string description,
+ 8: optional map<string,string> metadata,
+ 9: optional string fullText,
+ 10: optional i64 createdTime,
+ 11: optional i64 updatedTime
+}
+
+struct PermissionType {
+ 1: optional string permissionId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+}
+
+exception GovRegistryException {
+ 1: required string message
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/thrift_models/thrift-gen.sh
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/thrift-gen.sh b/airavata-gov-registry/thrift_models/thrift-gen.sh
deleted file mode 100755
index 839359c..0000000
--- a/airavata-gov-registry/thrift_models/thrift-gen.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-thrift --gen java gov_reg_models.thrift
-cd gen-java
-rm -r ../../airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/*
-cp -r org/apache/airavata/gov/registry/models/ ../../airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/
-
-cd ..
-thrift --gen java gov_reg_cpi.thrift
-cd gen-java
-rm -r ../../airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/*
-cp -r org/apache/airavata/gov/registry/service/cpi/ ../../airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/
-
-cd ..
-
-rm -r gen-java
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/README.md
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/README.md b/modules/airavata-sharing-registry/README.md
new file mode 100644
index 0000000..299e7b4
--- /dev/null
+++ b/modules/airavata-sharing-registry/README.md
@@ -0,0 +1,3 @@
+## Airavata Governance Registry
+
+* This module implements a generic service for access controlling to resources and to provide group based resource sharing
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/pom.xml b/modules/airavata-sharing-registry/airavata-sharing-registry-core/pom.xml
new file mode 100644
index 0000000..f43f77c
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>airavata-sharing-registry</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <relativePath>../pom.xml</relativePath>
+ <version>${global.version}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>airavata-sharing-registry-core</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>0.9.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-sharing-registry-stubs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-commons</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.dozer</groupId>
+ <artifactId>dozer</artifactId>
+ <version>5.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-all</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.34</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>2.2.0</version>
+ <configuration>
+ <includes>**/entities/*.class</includes>
+ <excludes>**/entities/XML*.class</excludes>
+ <addDefaultConstructor>true</addDefaultConstructor>
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>enhancer</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java
new file mode 100644
index 0000000..48b5314
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java
@@ -0,0 +1,113 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "DOMAIN", schema = "" )
+public class DomainEntity {
+ private final static Logger logger = LoggerFactory.getLogger(DomainEntity.class);
+ private String domainId;
+ private String name;
+ private String description;
+ private Long createdTime;
+ private Long updatedTime;
+
+ @Id
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ DomainEntity that = (DomainEntity) o;
+
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = domainId != null ? domainId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
new file mode 100644
index 0000000..2658caa
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
@@ -0,0 +1,214 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.util.Map;
+
+@Entity
+@Table(name = "ENTITY", schema = "")
+public class EntityEntity {
+ private final static Logger logger = LoggerFactory.getLogger(EntityEntity.class);
+ private String entityId;
+ private String domainId;
+ private String entityTypeId;
+ private String ownerId;
+ private String parentEntityId;
+ private String name;
+ private String description;
+ private Map<String, String> metadata;
+ private String fullText;
+ private Long createdTime;
+ private Long updatedTime;
+ private DomainEntity domainByDomainId;
+ private EntityEntity entityByParentEntityId;
+
+ @Id
+ @Column(name = "ENTITY_ID")
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "ENTITY_TYPE_ID")
+ public String getEntityTypeId() {
+ return entityTypeId;
+ }
+
+ public void setEntityTypeId(String entityTypeId) {
+ this.entityTypeId = entityTypeId;
+ }
+
+ @Basic
+ @Column(name = "OWNER_ID")
+ public String getOwnerId() {
+ return ownerId;
+ }
+
+ public void setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ }
+
+ @Basic
+ @Column(name = "PARENT_ENTITY_ID")
+ public String getParentEntityId() {
+ return parentEntityId;
+ }
+
+ public void setParentEntityId(String parentEntityId) {
+ this.parentEntityId = parentEntityId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @ElementCollection
+ @CollectionTable(
+ name="ENTITY_METADATA",
+ joinColumns=@JoinColumn(name="ENTITY_ID")
+ )
+ @MapKeyColumn(name="META_KEY")
+ @Column(name="META_VALUE")
+ public Map<String, String> getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Map<String, String> metadata) {
+ this.metadata = metadata;
+ }
+
+ @Lob
+ @Column(name = "FULL_TEXT")
+ public String getFullText() {
+ return fullText;
+ }
+
+ public void setFullText(String fullText) {
+ this.fullText = fullText;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EntityEntity that = (EntityEntity) o;
+
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (parentEntityId != null ? !parentEntityId.equals(that.parentEntityId) : that.parentEntityId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (metadata.equals(that.metadata)) return false;
+ if (fullText != null ? !fullText.equals(that.fullText) : that.fullText != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+ if (ownerId != null ? !ownerId.equals(that.ownerId) : that.ownerId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = entityId != null ? entityId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (metadata != null ? metadata.hashCode() : 0);
+ result = 31 * result + (fullText != null ? fullText.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "PARENT_ENTITY_ID", referencedColumnName = "ENTITY_ID")
+ public EntityEntity getEntityByParentEntityId() {
+ return entityByParentEntityId;
+ }
+
+ public void setEntityByParentEntityId(EntityEntity entityByParentEntityId) {
+ this.entityByParentEntityId = entityByParentEntityId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
new file mode 100644
index 0000000..371ad77
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
@@ -0,0 +1,136 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "ENTITY_TYPE", schema = "")
+public class EntityTypeEntity {
+ private final static Logger logger = LoggerFactory.getLogger(EntityTypeEntity.class);
+ private String entityTypeId;
+ private String domainId;
+ private String name;
+ private String description;
+ private Long createdTime;
+ private Long updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "ENTITY_TYPE_ID")
+ public String getEntityTypeId() {
+ return entityTypeId;
+ }
+
+ public void setEntityTypeId(String entityTypeId) {
+ this.entityTypeId = entityTypeId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EntityTypeEntity that = (EntityTypeEntity) o;
+
+ if (entityTypeId != null ? !entityTypeId.equals(that.entityTypeId) : that.entityTypeId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = entityTypeId != null ? entityTypeId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
new file mode 100644
index 0000000..c62a52d
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
@@ -0,0 +1,112 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "GROUP_MEMBERSHIP", schema = "")
+@IdClass(GroupMembershipEntityPK.class)
+public class GroupMembershipEntity {
+ private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntity.class);
+ private String parentId;
+ private String childId;
+ private String childType;
+ private Long createdTime;
+ private Long updatedTime;
+
+ @Id
+ @Column(name = "PARENT_ID")
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ @Id
+ @Column(name = "CHILD_ID")
+ public String getChildId() {
+ return childId;
+ }
+
+ public void setChildId(String childId) {
+ this.childId = childId;
+ }
+
+ @Basic
+ @Column(name = "CHILD_TYPE")
+ public String getChildType() {
+ return childType;
+ }
+
+ public void setChildType(String childType) {
+ this.childType = childType;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ GroupMembershipEntity that = (GroupMembershipEntity) o;
+
+ if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
+ if (childId != null ? !childId.equals(that.childId) : that.childId != null) return false;
+ if (childType != null ? !childType.equals(that.childType) : that.childType != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = parentId != null ? parentId.hashCode() : 0;
+ result = 31 * result + (childId != null ? childId.hashCode() : 0);
+ result = 31 * result + (childType != null ? childType.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
new file mode 100644
index 0000000..be3b1f9
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class GroupMembershipEntityPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntityPK.class);
+ private String parentId;
+ private String childId;
+
+ @Column(name = "PARENT_ID")
+ @Id
+ public String getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ @Column(name = "CHILD_ID")
+ @Id
+ public String getChildId() {
+ return childId;
+ }
+
+ public void setChildId(String childId) {
+ this.childId = childId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ GroupMembershipEntityPK that = (GroupMembershipEntityPK) o;
+
+ if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
+ if (childId != null ? !childId.equals(that.childId) : that.childId != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = parentId != null ? parentId.hashCode() : 0;
+ result = 31 * result + (childId != null ? childId.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
new file mode 100644
index 0000000..898093a
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
@@ -0,0 +1,136 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "PERMISSION_TYPE", schema = "")
+public class PermissionTypeEntity {
+ private final static Logger logger = LoggerFactory.getLogger(PermissionTypeEntity.class);
+ private String permissionTypeId;
+ private String domainId;
+ private String name;
+ private String description;
+ private Long createdTime;
+ private Long updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "PERMISSION_TYPE_ID")
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ PermissionTypeEntity that = (PermissionTypeEntity) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/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
new file mode 100644
index 0000000..a06e90d
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
@@ -0,0 +1,135 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "SHARING", schema = "")
+@IdClass(SharingEntityPK.class)
+public class SharingEntity {
+ private final static Logger logger = LoggerFactory.getLogger(SharingEntity.class);
+ private String permissionTypeId;
+ private String entityId;
+ private String groupId;
+ private Long createdTime;
+ private Long updatedTime;
+ private PermissionTypeEntity permissionTypeByPermissionTypeId;
+ private EntityTypeEntity entityTypeByEntityTypeId;
+
+ @Id
+ @Column(name = "PERMISSION_TYPE_ID")
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Id
+ @Column(name = "ENTITY_ID")
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Id
+ @Column(name = "GROUP_ID")
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ SharingEntity that = (SharingEntity) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
+ result = 31 * result + (groupId != null ? groupId.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "PERMISSION_TYPE_ID", referencedColumnName = "PERMISSION_TYPE_ID", nullable = false)
+ public PermissionTypeEntity getPermissionTypeByPermissionTypeId() {
+ return permissionTypeByPermissionTypeId;
+ }
+
+ public void setPermissionTypeByPermissionTypeId(PermissionTypeEntity permissionTypeByPermissionTypeId) {
+ this.permissionTypeByPermissionTypeId = permissionTypeByPermissionTypeId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "ENTITY_TYPE_ID", referencedColumnName = "ENTITY_TYPE_ID")
+ public EntityTypeEntity getEntityTypeByEntityTypeId() {
+ return entityTypeByEntityTypeId;
+ }
+
+ public void setEntityTypeByEntityTypeId(EntityTypeEntity entityTypeByEntityTypeId) {
+ this.entityTypeByEntityTypeId = entityTypeByEntityTypeId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
new file mode 100644
index 0000000..fe6ebaf
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
@@ -0,0 +1,113 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class SharingEntityPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(SharingEntityPK.class);
+ private String permissionTypeId;
+ private String entityId;
+ private String groupId;
+ private Long createdTime;
+ private Long updatedTime;
+
+ @Column(name = "PERMISSION_TYPE_ID")
+ @Id
+ public String getPermissionTypeId() {
+ return permissionTypeId;
+ }
+
+ public void setPermissionTypeId(String permissionTypeId) {
+ this.permissionTypeId = permissionTypeId;
+ }
+
+ @Column(name = "ENTITY_ID")
+ @Id
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+
+ @Column(name = "GROUP_ID")
+ @Id
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ SharingEntityPK that = (SharingEntityPK) o;
+
+ if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
+ return false;
+ if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+ result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
+ result = 31 * result + (groupId != null ? groupId.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserEntity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserEntity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserEntity.java
new file mode 100644
index 0000000..ed88230
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserEntity.java
@@ -0,0 +1,123 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "USER", schema = "")
+public class UserEntity {
+ private final static Logger logger = LoggerFactory.getLogger(UserEntity.class);
+ private String userId;
+ private String domainId;
+ private String userName;
+ private Long createdTime;
+ private Long updatedTime;
+ private DomainEntity domainByDomainId;
+
+ @Id
+ @Column(name = "USER_ID")
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "USER_NAME")
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ UserEntity that = (UserEntity) o;
+
+ if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = userId != null ? userId.hashCode() : 0;
+ result = 31 * result + (userName != null ? userName.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
new file mode 100644
index 0000000..3ccd0c9
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
@@ -0,0 +1,172 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.entities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "USER_GROUP", schema = "")
+public class UserGroupEntity {
+ private final static Logger logger = LoggerFactory.getLogger(UserGroupEntity.class);
+ private String groupId;
+ private String domainId;
+ private String name;
+ private String description;
+ private String ownerId;
+ private String groupType;
+ private Long createdTime;
+ private Long updatedTime;
+ private DomainEntity domainByDomainId;
+ private UserEntity userByOwnerId;
+
+ @Id
+ @Column(name = "GROUP_ID")
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Basic
+ @Column(name = "DOMAIN_ID")
+ public String getDomainId() {
+ return domainId;
+ }
+
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
+ }
+
+ @Basic
+ @Column(name = "OWNER_ID")
+ public String getOwnerId() {
+ return ownerId;
+ }
+
+ public void setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ }
+
+ @Basic
+ @Column(name = "NAME")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Basic
+ @Column(name = "DESCRIPTION")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Basic
+ @Column(name = "GROUP_TYPE")
+ public String getGroupType() {
+ return groupType;
+ }
+
+ public void setGroupType(String type) {
+ this.groupType = type;
+ }
+
+ @Basic
+ @Column(name = "CREATED_TIME")
+ public Long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(Long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ @Basic
+ @Column(name = "UPDATED_TIME")
+ public Long getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(Long updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ UserGroupEntity that = (UserGroupEntity) o;
+
+ if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
+ if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
+ if (ownerId != null ? !ownerId.equals(that.ownerId) : that.ownerId != null) return false;
+ if (name != null ? !name.equals(that.name) : that.name != null) return false;
+ if (description != null ? !description.equals(that.description) : that.description != null) return false;
+ if (groupType != null ? !groupType.equals(that.groupType) : that.groupType != null) return false;
+ if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
+ if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = groupId != null ? groupId.hashCode() : 0;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (groupType != null ? groupType.hashCode() : 0);
+ result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
+ result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
+ return result;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
+ public DomainEntity getDomainByDomainId() {
+ return domainByDomainId;
+ }
+
+ public void setDomainByDomainId(DomainEntity domainByDomainId) {
+ this.domainByDomainId = domainByDomainId;
+ }
+
+ @ManyToOne
+ @JoinColumn(name = "OWNER_ID", referencedColumnName = "USER_ID")
+ public UserEntity getUserByOwnerId() {
+ return userByOwnerId;
+ }
+
+ public void setUserByOwnerId(UserEntity userByOwnerId) {
+ this.userByOwnerId = userByOwnerId;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
new file mode 100644
index 0000000..bba8c2d
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
@@ -0,0 +1,133 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+import org.apache.airavata.sharing.registry.db.utils.DBConstants;
+import org.apache.airavata.sharing.registry.db.utils.JPAUtils;
+import org.apache.airavata.sharing.registry.db.utils.ObjectMapperSingleton;
+import org.apache.airavata.sharing.registry.models.GovRegistryException;
+import org.dozer.Mapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public abstract class AbstractRepository<T, E, Id> {
+ private final static Logger logger = LoggerFactory.getLogger(AbstractRepository.class);
+
+ private Class<T> thriftGenericClass;
+ private Class<E> dbEntityGenericClass;
+
+ public AbstractRepository(Class<T> thriftGenericClass, Class<E> dbEntityGenericClass){
+ this.thriftGenericClass = thriftGenericClass;
+ this.dbEntityGenericClass = dbEntityGenericClass;
+ }
+
+ public T create(T t) throws GovRegistryException {
+ return update(t);
+ }
+
+ public List<T> create(List<T> tList) throws GovRegistryException {
+ return update(tList);
+ }
+
+ public T update(T t) throws GovRegistryException {
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ E entity = mapper.map(t, dbEntityGenericClass);
+ E persistedCopy = JPAUtils.execute(entityManager -> entityManager.merge(entity));
+ return mapper.map(persistedCopy, thriftGenericClass);
+ }
+
+ public List<T> update(List<T> tList) throws GovRegistryException {
+ List<T> returnList = new ArrayList<>();
+ for(T temp : tList)
+ returnList.add(update(temp));
+ return returnList;
+ }
+
+ public boolean delete(Id id) throws GovRegistryException {
+ JPAUtils.execute(entityManager -> {
+ E entity = entityManager.find(dbEntityGenericClass, id);
+ entityManager.remove(entity);
+ return entity;
+ });
+ return true;
+ }
+
+ public boolean delete(List<Id> idList) throws GovRegistryException {
+ for(Id id : idList)
+ delete(id);
+ return true;
+ }
+
+ public T get(Id id) throws GovRegistryException {
+ E entity = JPAUtils.execute(entityManager -> entityManager
+ .find(dbEntityGenericClass, id));
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ return mapper.map(entity, thriftGenericClass);
+ }
+
+ public List<T> get(List<Id> idList) throws GovRegistryException {
+ List<T> returnList = new ArrayList<>();
+ for(Id id : idList)
+ returnList.add(get(id));
+ return returnList;
+ }
+
+ public List<T> select(Map<String, String> filters, int offset, int limit) throws GovRegistryException {
+ String queryString = getSelectQuery(filters);
+ int newLimit = limit < 0 ? DBConstants.SELECT_MAX_ROWS: limit;
+ List resultSet = JPAUtils.execute(entityManager -> entityManager.createQuery(queryString).setFirstResult(offset)
+ .setMaxResults(newLimit).getResultList());
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ List<T> gatewayList = new ArrayList<>();
+ resultSet.stream().forEach(rs -> gatewayList.add(mapper.map(rs, thriftGenericClass)));
+ return gatewayList;
+ }
+
+ public List<T> select(String queryString, int offset, int limit) throws GovRegistryException {
+ int newLimit = limit < 0 ? DBConstants.SELECT_MAX_ROWS: limit;
+ List resultSet = JPAUtils.execute(entityManager -> entityManager.createQuery(queryString).setFirstResult(offset)
+ .setMaxResults(newLimit).getResultList());
+ Mapper mapper = ObjectMapperSingleton.getInstance();
+ List<T> gatewayList = new ArrayList<>();
+ resultSet.stream().forEach(rs -> gatewayList.add(mapper.map(rs, thriftGenericClass)));
+ return gatewayList;
+ }
+
+ private String getSelectQuery(Map<String, String> filters){
+ String query = "SELECT p from " + dbEntityGenericClass.getSimpleName() + " as p WHERE ";
+ if(filters == null || filters.size() == 0){
+ query += "1";
+ }else{
+ for(String k : filters.keySet()){
+ query += "p." + k + " LIKE '%" + filters.get(k) + "%' AND ";
+ }
+ query = query.substring(0, query.length()-5);
+ }
+
+ query += " ORDER BY p.createdTime DESC";
+
+ return query;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java
new file mode 100644
index 0000000..8cd44ef
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+import org.apache.airavata.sharing.registry.db.entities.DomainEntity;
+import org.apache.airavata.sharing.registry.models.Domain;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DomainRepository extends AbstractRepository<Domain, DomainEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(DomainRepository.class);
+
+ public DomainRepository(){
+ super(Domain.class, DomainEntity.class);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
new file mode 100644
index 0000000..353b006
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+import org.apache.airavata.sharing.registry.db.entities.EntityEntity;
+import org.apache.airavata.sharing.registry.models.Entity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class EntityRepository extends AbstractRepository<Entity, EntityEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(EntityRepository.class);
+
+ public EntityRepository() {
+ super(Entity.class, EntityEntity.class);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
new file mode 100644
index 0000000..ed2a7e9
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.sharing.registry.db.repositories;
+
+import org.apache.airavata.sharing.registry.db.entities.EntityTypeEntity;
+import org.apache.airavata.sharing.registry.models.EntityType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class EntityTypeRepository extends AbstractRepository<EntityType, EntityTypeEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(EntityTypeRepository.class);
+
+ public EntityTypeRepository() {
+ super(EntityType.class, EntityTypeEntity.class);
+ }
+}
\ No newline at end of file
[22/50] [abbrv] airavata git commit: initial commit
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
new file mode 100644
index 0000000..74a8b75
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
@@ -0,0 +1,391 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+public class GovRegistryException extends TException implements org.apache.thrift.TBase<GovRegistryException, GovRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<GovRegistryException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GovRegistryException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 GovRegistryExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GovRegistryExceptionTupleSchemeFactory());
+ }
+
+ public String message; // 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 {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(GovRegistryException.class, metaDataMap);
+ }
+
+ public GovRegistryException() {
+ }
+
+ public GovRegistryException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GovRegistryException(GovRegistryException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public GovRegistryException deepCopy() {
+ return new GovRegistryException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public GovRegistryException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GovRegistryException)
+ return this.equals((GovRegistryException)that);
+ return false;
+ }
+
+ public boolean equals(GovRegistryException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_message = true && (isSetMessage());
+ list.add(present_message);
+ if (present_message)
+ list.add(message);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GovRegistryException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("GovRegistryException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' 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 GovRegistryExceptionStandardSchemeFactory implements SchemeFactory {
+ public GovRegistryExceptionStandardScheme getScheme() {
+ return new GovRegistryExceptionStandardScheme();
+ }
+ }
+
+ private static class GovRegistryExceptionStandardScheme extends StandardScheme<GovRegistryException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GovRegistryException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, GovRegistryException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GovRegistryExceptionTupleSchemeFactory implements SchemeFactory {
+ public GovRegistryExceptionTupleScheme getScheme() {
+ return new GovRegistryExceptionTupleScheme();
+ }
+ }
+
+ private static class GovRegistryExceptionTupleScheme extends TupleScheme<GovRegistryException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GovRegistryException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GovRegistryException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Group.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Group.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Group.java
new file mode 100644
index 0000000..fc3e5d5
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Group.java
@@ -0,0 +1,1154 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+public class Group implements org.apache.thrift.TBase<Group, Group._Fields>, java.io.Serializable, Cloneable, Comparable<Group> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Group");
+
+ private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)8);
+ private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)9);
+ private static final org.apache.thrift.protocol.TField GROUP_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("groupType", org.apache.thrift.protocol.TType.I32, (short)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GroupStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GroupTupleSchemeFactory());
+ }
+
+ public String groupId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public String ownerId; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType groupType; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ GROUP_ID((short)1, "groupId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)6, "description"),
+ OWNER_ID((short)7, "ownerId"),
+ CREATED_TIME((short)8, "createdTime"),
+ UPDATED_TIME((short)9, "updatedTime"),
+ /**
+ *
+ * @see GroupType
+ */
+ GROUP_TYPE((short)10, "groupType");
+
+ 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: // GROUP_ID
+ return GROUP_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 6: // DESCRIPTION
+ return DESCRIPTION;
+ case 7: // OWNER_ID
+ return OWNER_ID;
+ case 8: // CREATED_TIME
+ return CREATED_TIME;
+ case 9: // UPDATED_TIME
+ return UPDATED_TIME;
+ case 10: // GROUP_TYPE
+ return GROUP_TYPE;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.GROUP_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.OWNER_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME,_Fields.GROUP_TYPE};
+ 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.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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.GROUP_TYPE, new org.apache.thrift.meta_data.FieldMetaData("groupType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Group.class, metaDataMap);
+ }
+
+ public Group() {
+ this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Group(Group other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetGroupId()) {
+ this.groupId = other.groupId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ if (other.isSetGroupType()) {
+ this.groupType = other.groupType;
+ }
+ }
+
+ public Group deepCopy() {
+ return new Group(this);
+ }
+
+ @Override
+ public void clear() {
+ this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ this.description = null;
+ this.ownerId = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ this.groupType = null;
+ }
+
+ public String getGroupId() {
+ return this.groupId;
+ }
+
+ public Group setGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ public void unsetGroupId() {
+ this.groupId = null;
+ }
+
+ /** Returns true if field groupId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupId() {
+ return this.groupId != null;
+ }
+
+ public void setGroupIdIsSet(boolean value) {
+ if (!value) {
+ this.groupId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public Group setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Group setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Group setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public Group setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Group setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Group setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType getGroupType() {
+ return this.groupType;
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public Group setGroupType(GroupType groupType) {
+ this.groupType = groupType;
+ return this;
+ }
+
+ public void unsetGroupType() {
+ this.groupType = null;
+ }
+
+ /** Returns true if field groupType is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupType() {
+ return this.groupType != null;
+ }
+
+ public void setGroupTypeIsSet(boolean value) {
+ if (!value) {
+ this.groupType = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case GROUP_ID:
+ if (value == null) {
+ unsetGroupId();
+ } else {
+ setGroupId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ case GROUP_TYPE:
+ if (value == null) {
+ unsetGroupType();
+ } else {
+ setGroupType((GroupType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case GROUP_ID:
+ return getGroupId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ case GROUP_TYPE:
+ return getGroupType();
+
+ }
+ 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 GROUP_ID:
+ return isSetGroupId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ case GROUP_TYPE:
+ return isSetGroupType();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Group)
+ return this.equals((Group)that);
+ return false;
+ }
+
+ public boolean equals(Group that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_groupId = true && this.isSetGroupId();
+ boolean that_present_groupId = true && that.isSetGroupId();
+ if (this_present_groupId || that_present_groupId) {
+ if (!(this_present_groupId && that_present_groupId))
+ return false;
+ if (!this.groupId.equals(that.groupId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ boolean this_present_groupType = true && this.isSetGroupType();
+ boolean that_present_groupType = true && that.isSetGroupType();
+ if (this_present_groupType || that_present_groupType) {
+ if (!(this_present_groupType && that_present_groupType))
+ return false;
+ if (!this.groupType.equals(that.groupType))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_groupId = true && (isSetGroupId());
+ list.add(present_groupId);
+ if (present_groupId)
+ list.add(groupId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_ownerId = true && (isSetOwnerId());
+ list.add(present_ownerId);
+ if (present_ownerId)
+ list.add(ownerId);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ boolean present_groupType = true && (isSetGroupType());
+ list.add(present_groupType);
+ if (present_groupType)
+ list.add(groupType.getValue());
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Group other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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;
+ }
+ }
+ 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("Group(");
+ boolean first = true;
+
+ if (isSetGroupId()) {
+ sb.append("groupId:");
+ if (this.groupId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ first = false;
+ }
+ if (isSetGroupType()) {
+ if (!first) sb.append(", ");
+ sb.append("groupType:");
+ if (this.groupType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupType);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ 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 GroupStandardSchemeFactory implements SchemeFactory {
+ public GroupStandardScheme getScheme() {
+ return new GroupStandardScheme();
+ }
+ }
+
+ private static class GroupStandardScheme extends StandardScheme<Group> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Group 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: // GROUP_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // GROUP_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ 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, Group struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.groupId != null) {
+ if (struct.isSetGroupId()) {
+ oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
+ oprot.writeString(struct.groupId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.groupType != null) {
+ if (struct.isSetGroupType()) {
+ oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.groupType.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GroupTupleSchemeFactory implements SchemeFactory {
+ public GroupTupleScheme getScheme() {
+ return new GroupTupleScheme();
+ }
+ }
+
+ private static class GroupTupleScheme extends TupleScheme<Group> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Group struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetGroupId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(3);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetGroupType()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetGroupId()) {
+ oprot.writeString(struct.groupId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ if (struct.isSetGroupType()) {
+ oprot.writeI32(struct.groupType.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Group struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java
new file mode 100644
index 0000000..012b95d
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.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.gov.registry.models;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum GroupType implements org.apache.thrift.TEnum {
+ SINGLE_USER(0),
+ MULTI_USER(1);
+
+ private final int value;
+
+ private GroupType(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 GroupType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SINGLE_USER;
+ case 1:
+ return MULTI_USER;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
new file mode 100644
index 0000000..e8702ac
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
@@ -0,0 +1,817 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+public class PermissionType implements org.apache.thrift.TBase<PermissionType, PermissionType._Fields>, java.io.Serializable, Cloneable, Comparable<PermissionType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PermissionType");
+
+ private static final org.apache.thrift.protocol.TField PERMISSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("permissionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new PermissionTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new PermissionTypeTupleSchemeFactory());
+ }
+
+ public String permissionId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PERMISSION_ID((short)1, "permissionId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // PERMISSION_ID
+ return PERMISSION_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.PERMISSION_ID,_Fields.DOMAIN_ID,_Fields.NAME,_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);
+ tmpMap.put(_Fields.PERMISSION_ID, new org.apache.thrift.meta_data.FieldMetaData("permissionId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PermissionType.class, metaDataMap);
+ }
+
+ public PermissionType() {
+ this.permissionId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public PermissionType(PermissionType other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetPermissionId()) {
+ this.permissionId = other.permissionId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public PermissionType deepCopy() {
+ return new PermissionType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.permissionId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getPermissionId() {
+ return this.permissionId;
+ }
+
+ public PermissionType setPermissionId(String permissionId) {
+ this.permissionId = permissionId;
+ return this;
+ }
+
+ public void unsetPermissionId() {
+ this.permissionId = null;
+ }
+
+ /** Returns true if field permissionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetPermissionId() {
+ return this.permissionId != null;
+ }
+
+ public void setPermissionIdIsSet(boolean value) {
+ if (!value) {
+ this.permissionId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public PermissionType setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public PermissionType setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public PermissionType setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public PermissionType setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PERMISSION_ID:
+ if (value == null) {
+ unsetPermissionId();
+ } else {
+ setPermissionId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PERMISSION_ID:
+ return getPermissionId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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_ID:
+ return isSetPermissionId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof PermissionType)
+ return this.equals((PermissionType)that);
+ return false;
+ }
+
+ public boolean equals(PermissionType that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_permissionId = true && this.isSetPermissionId();
+ boolean that_present_permissionId = true && that.isSetPermissionId();
+ if (this_present_permissionId || that_present_permissionId) {
+ if (!(this_present_permissionId && that_present_permissionId))
+ return false;
+ if (!this.permissionId.equals(that.permissionId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_permissionId = true && (isSetPermissionId());
+ list.add(present_permissionId);
+ if (present_permissionId)
+ list.add(permissionId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(PermissionType other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPermissionId()).compareTo(other.isSetPermissionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPermissionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissionId, other.permissionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("PermissionType(");
+ boolean first = true;
+
+ if (isSetPermissionId()) {
+ sb.append("permissionId:");
+ if (this.permissionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.permissionId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 PermissionTypeStandardSchemeFactory implements SchemeFactory {
+ public PermissionTypeStandardScheme getScheme() {
+ return new PermissionTypeStandardScheme();
+ }
+ }
+
+ private static class PermissionTypeStandardScheme extends StandardScheme<PermissionType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, PermissionType 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_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.permissionId = iprot.readString();
+ struct.setPermissionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, PermissionType struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.permissionId != null) {
+ if (struct.isSetPermissionId()) {
+ oprot.writeFieldBegin(PERMISSION_ID_FIELD_DESC);
+ oprot.writeString(struct.permissionId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class PermissionTypeTupleSchemeFactory implements SchemeFactory {
+ public PermissionTypeTupleScheme getScheme() {
+ return new PermissionTypeTupleScheme();
+ }
+ }
+
+ private static class PermissionTypeTupleScheme extends TupleScheme<PermissionType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, PermissionType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetPermissionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetPermissionId()) {
+ oprot.writeString(struct.permissionId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, PermissionType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.permissionId = iprot.readString();
+ struct.setPermissionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
[08/50] [abbrv] airavata git commit: setting default gateway approval
status
Posted by sc...@apache.org.
setting default gateway approval status
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f3b8e021
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f3b8e021
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f3b8e021
Branch: refs/heads/airavata-gov-registry
Commit: f3b8e021cbaba7e218a70dbf7b9d1a59e9b11047
Parents: a5156a9
Author: scnakandala <su...@gmail.com>
Authored: Wed Sep 21 17:12:00 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Sep 21 17:12:00 2016 -0400
----------------------------------------------------------------------
.../core/experiment/catalog/impl/ExperimentCatalogImpl.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3b8e021/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
index 3bc0b92..8494493 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
@@ -38,6 +38,7 @@ import org.apache.airavata.model.status.ProcessStatus;
import org.apache.airavata.model.status.TaskStatus;
import org.apache.airavata.model.task.TaskModel;
import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.GatewayApprovalStatus;
import org.apache.airavata.model.workspace.Notification;
import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
@@ -65,6 +66,7 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
if (!ExpCatResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
gatewayResource = (GatewayResource) ExpCatResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
gatewayResource.setGatewayName(ServerSettings.getDefaultUserGateway());
+ gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
gatewayResource.save();
}else {
gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
[19/50] [abbrv] airavata git commit: initial commit
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/pom.xml b/airavata-gov-registry/pom.xml
new file mode 100644
index 0000000..fb65085
--- /dev/null
+++ b/airavata-gov-registry/pom.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>gov-registry</artifactId>
+ <packaging>pom</packaging>
+ <version>${global.version}</version>
+
+ <properties>
+ <global.version>0.17-SNAPSHOT</global.version>
+ </properties>
+
+ <modules>
+ <module>airavata-gov-registry-stubs</module>
+ <module>airavata-gov-registry-core</module>
+ </modules>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift b/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
new file mode 100644
index 0000000..f7289e2
--- /dev/null
+++ b/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace java org.apache.airavata.gov.registry.service.cpi
+
+include "./gov_reg_models.thrift"
+
+service GovRegistryService {
+
+ /**
+ * Domain Operations
+ **/
+ bool createDomain(1: required gov_reg_models.Domain domain) throws (1: gov_reg_models.GovRegistryException gre)
+ bool updateDomain(1: required gov_reg_models.Domain domain) throws (1: gov_reg_models.GovRegistryException gre)
+ bool deleteDomain(1: required string domainId) throws (1: gov_reg_models.GovRegistryException gre)
+ gov_reg_models.Domain getDomain(1: required string domainId) throws (1: gov_reg_models.GovRegistryException gre)
+ list<gov_reg_models.Domain> getDomains(1: required i32 offset, 2: required i32 limit)
+
+ /**
+ * User Operations
+ **/
+ bool registerUser(1: required gov_reg_models.User user) throws (1: gov_reg_models.GovRegistryException gre)
+ bool updatedUser(1: required gov_reg_models.User user) throws (1: gov_reg_models.GovRegistryException gre)
+ bool deleteUser(1: required string userId) throws (1: gov_reg_models.GovRegistryException gre)
+ gov_reg_models.User getUser(1: required string userId) throws (1: gov_reg_models.GovRegistryException gre)
+ list<gov_reg_models.User> getUsers(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ /**
+ * Group Operations
+ **/
+ bool createGroup(1: required gov_reg_models.Group group) throws (1: gov_reg_models.GovRegistryException gre)
+ bool updateGroup(1: required gov_reg_models.Group group) throws (1: gov_reg_models.GovRegistryException gre)
+ bool deleteGroup(1: required string groupId) throws (1: gov_reg_models.GovRegistryException gre)
+ gov_reg_models.Group getGroup(1: required string groupId) throws (1: gov_reg_models.GovRegistryException gre)
+ list<gov_reg_models.Group> getGroups(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ bool addUsersToGroup(1: required list<string> userIds, 2: required string groupId) throws (1: gov_reg_models.GovRegistryException gre);
+ bool removeUsersFromGroup(1: required list<string> userIds, 2: required string groupId) throws (1: gov_reg_models.GovRegistryException gre);
+ map<string, gov_reg_models.GroupType> getGroupMembers(1: required string groupId)
+
+ /**
+ * EntityType Operations
+ **/
+ bool createEntityType(1: required gov_reg_models.EntityType entityType) throws (1: gov_reg_models.GovRegistryException gre)
+ bool updateEntityType(1: required gov_reg_models.EntityType entityType) throws (1: gov_reg_models.GovRegistryException gre)
+ bool deleteEntityType(1: required string entityTypeId) throws (1: gov_reg_models.GovRegistryException gre)
+ gov_reg_models.EntityType getEntityType(1: required string entityTypeId) throws (1: gov_reg_models.GovRegistryException gre)
+ list<gov_reg_models.EntityType> getEntityTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ /**
+ * Entity Operations
+ **/
+ bool registerEntity(1: required gov_reg_models.Entity entity) throws (1: gov_reg_models.GovRegistryException gre)
+ bool updateEntity(1: required gov_reg_models.Entity entity) throws (1: gov_reg_models.GovRegistryException gre)
+ bool deleteEntity(1: required string entityId) throws (1: gov_reg_models.GovRegistryException gre)
+ gov_reg_models.Entity getEntity(1: required string entityId) throws (1: gov_reg_models.GovRegistryException gre)
+ list<gov_reg_models.Entity> searchEntities(1: required string domain, 2: required string entityType,
+ 3: required map<string, string> filters, 4: required i32 offset, 5: required i32 limit) throws (1: gov_reg_models.GovRegistryException gre)
+
+ /**
+ * EntityType Operations
+ **/
+ bool createPermissionType(1: required gov_reg_models.PermissionType permisionType) throws (1: gov_reg_models.GovRegistryException gre)
+ bool updatePermissionType(1: required gov_reg_models.PermissionType permisionType) throws (1: gov_reg_models.GovRegistryException gre)
+ bool deletePermissionType(1: required string entityTypeId) throws (1: gov_reg_models.GovRegistryException gre)
+ gov_reg_models.PermissionType getPermissionType(1: required string permisionTypeId) throws (1: gov_reg_models.GovRegistryException gre)
+ list<gov_reg_models.PermissionType> getPermissionTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit) throws (1: gov_reg_models.GovRegistryException gre)
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/thrift_models/gov_reg_models.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_reg_models.thrift b/airavata-gov-registry/thrift_models/gov_reg_models.thrift
new file mode 100644
index 0000000..ef4acb9
--- /dev/null
+++ b/airavata-gov-registry/thrift_models/gov_reg_models.thrift
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+ namespace java org.apache.airavata.gov.registry.models
+
+const string DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID"
+
+struct Domain {
+ 1: optional string domainId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string name,
+ 3: optional string description,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+}
+
+ struct User {
+ 1: optional string userId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string userName,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+ }
+
+enum GroupType {
+ SINGLE_USER,
+ MULTI_USER
+}
+
+ struct Group {
+ 1: optional string groupId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 6: optional string description,
+ 7: optional string ownerId,
+ 8: optional i64 createdTime,
+ 9: optional i64 updatedTime,
+ 10: optional GroupType groupType
+ }
+
+
+struct EntityType {
+ 1: optional string entityTypeId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 4: optional string description,
+ 5: optional i64 createdTime,
+ 6: optional i64 updatedTime
+}
+
+
+struct Entity {
+ 1: optional string entityId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string entityTypeId,
+ 4: optional string ownerId,
+ 5: optional string name,
+ 6: optional string description,
+ 7: optional map<string,string> metadata,
+ 8: optional string fullText,
+ 9: optional i64 createdTime,
+ 10: optional i64 updatedTime
+}
+
+struct PermissionType {
+ 1: optional string permissionId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+}
+
+exception GovRegistryException {
+ 1: required string message
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/thrift_models/thrift-gen.sh
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/thrift-gen.sh b/airavata-gov-registry/thrift_models/thrift-gen.sh
new file mode 100755
index 0000000..839359c
--- /dev/null
+++ b/airavata-gov-registry/thrift_models/thrift-gen.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+thrift --gen java gov_reg_models.thrift
+cd gen-java
+rm -r ../../airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/*
+cp -r org/apache/airavata/gov/registry/models/ ../../airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/
+
+cd ..
+thrift --gen java gov_reg_cpi.thrift
+cd gen-java
+rm -r ../../airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/*
+cp -r org/apache/airavata/gov/registry/service/cpi/ ../../airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/
+
+cd ..
+
+rm -r gen-java
\ No newline at end of file
[43/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
deleted file mode 100644
index d265c23..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
-public class GovRegistryException extends TException implements org.apache.thrift.TBase<GovRegistryException, GovRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<GovRegistryException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GovRegistryException");
-
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 GovRegistryExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GovRegistryExceptionTupleSchemeFactory());
- }
-
- public String message; // 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 {
- MESSAGE((short)1, "message");
-
- 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: // MESSAGE
- return MESSAGE;
- 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(GovRegistryException.class, metaDataMap);
- }
-
- public GovRegistryException() {
- }
-
- public GovRegistryException(
- String message)
- {
- this();
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public GovRegistryException(GovRegistryException other) {
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public GovRegistryException deepCopy() {
- return new GovRegistryException(this);
- }
-
- @Override
- public void clear() {
- this.message = null;
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public GovRegistryException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case MESSAGE:
- return getMessage();
-
- }
- 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 MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof GovRegistryException)
- return this.equals((GovRegistryException)that);
- return false;
- }
-
- public boolean equals(GovRegistryException that) {
- if (that == null)
- return false;
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_message = true && (isSetMessage());
- list.add(present_message);
- if (present_message)
- list.add(message);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(GovRegistryException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("GovRegistryException(");
- boolean first = true;
-
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (message == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' 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 GovRegistryExceptionStandardSchemeFactory implements SchemeFactory {
- public GovRegistryExceptionStandardScheme getScheme() {
- return new GovRegistryExceptionStandardScheme();
- }
- }
-
- private static class GovRegistryExceptionStandardScheme extends StandardScheme<GovRegistryException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, GovRegistryException 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: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, GovRegistryException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class GovRegistryExceptionTupleSchemeFactory implements SchemeFactory {
- public GovRegistryExceptionTupleScheme getScheme() {
- return new GovRegistryExceptionTupleScheme();
- }
- }
-
- private static class GovRegistryExceptionTupleScheme extends TupleScheme<GovRegistryException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, GovRegistryException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.message);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, GovRegistryException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java
deleted file mode 100644
index 012b95d..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-public enum GroupType implements org.apache.thrift.TEnum {
- SINGLE_USER(0),
- MULTI_USER(1);
-
- private final int value;
-
- private GroupType(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 GroupType findByValue(int value) {
- switch (value) {
- case 0:
- return SINGLE_USER;
- case 1:
- return MULTI_USER;
- default:
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
deleted file mode 100644
index 717969e..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
+++ /dev/null
@@ -1,817 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
-public class PermissionType implements org.apache.thrift.TBase<PermissionType, PermissionType._Fields>, java.io.Serializable, Cloneable, Comparable<PermissionType> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PermissionType");
-
- private static final org.apache.thrift.protocol.TField PERMISSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("permissionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new PermissionTypeStandardSchemeFactory());
- schemes.put(TupleScheme.class, new PermissionTypeTupleSchemeFactory());
- }
-
- public String permissionId; // optional
- public String domainId; // optional
- public String name; // optional
- public long createdTime; // optional
- public long updatedTime; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- PERMISSION_ID((short)1, "permissionId"),
- DOMAIN_ID((short)2, "domainId"),
- NAME((short)3, "name"),
- CREATED_TIME((short)4, "createdTime"),
- UPDATED_TIME((short)5, "updatedTime");
-
- 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: // PERMISSION_ID
- return PERMISSION_ID;
- case 2: // DOMAIN_ID
- return DOMAIN_ID;
- case 3: // NAME
- return NAME;
- case 4: // CREATED_TIME
- return CREATED_TIME;
- case 5: // UPDATED_TIME
- return UPDATED_TIME;
- 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 __CREATEDTIME_ISSET_ID = 0;
- private static final int __UPDATEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.PERMISSION_ID,_Fields.DOMAIN_ID,_Fields.NAME,_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);
- tmpMap.put(_Fields.PERMISSION_ID, new org.apache.thrift.meta_data.FieldMetaData("permissionId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PermissionType.class, metaDataMap);
- }
-
- public PermissionType() {
- this.permissionId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public PermissionType(PermissionType other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetPermissionId()) {
- this.permissionId = other.permissionId;
- }
- if (other.isSetDomainId()) {
- this.domainId = other.domainId;
- }
- if (other.isSetName()) {
- this.name = other.name;
- }
- this.createdTime = other.createdTime;
- this.updatedTime = other.updatedTime;
- }
-
- public PermissionType deepCopy() {
- return new PermissionType(this);
- }
-
- @Override
- public void clear() {
- this.permissionId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- this.domainId = null;
- this.name = null;
- setCreatedTimeIsSet(false);
- this.createdTime = 0;
- setUpdatedTimeIsSet(false);
- this.updatedTime = 0;
- }
-
- public String getPermissionId() {
- return this.permissionId;
- }
-
- public PermissionType setPermissionId(String permissionId) {
- this.permissionId = permissionId;
- return this;
- }
-
- public void unsetPermissionId() {
- this.permissionId = null;
- }
-
- /** Returns true if field permissionId is set (has been assigned a value) and false otherwise */
- public boolean isSetPermissionId() {
- return this.permissionId != null;
- }
-
- public void setPermissionIdIsSet(boolean value) {
- if (!value) {
- this.permissionId = null;
- }
- }
-
- public String getDomainId() {
- return this.domainId;
- }
-
- public PermissionType setDomainId(String domainId) {
- this.domainId = domainId;
- return this;
- }
-
- public void unsetDomainId() {
- this.domainId = null;
- }
-
- /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
- public boolean isSetDomainId() {
- return this.domainId != null;
- }
-
- public void setDomainIdIsSet(boolean value) {
- if (!value) {
- this.domainId = null;
- }
- }
-
- public String getName() {
- return this.name;
- }
-
- public PermissionType setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public long getCreatedTime() {
- return this.createdTime;
- }
-
- public PermissionType setCreatedTime(long createdTime) {
- this.createdTime = createdTime;
- setCreatedTimeIsSet(true);
- return this;
- }
-
- public void unsetCreatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- public void setCreatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
- }
-
- public long getUpdatedTime() {
- return this.updatedTime;
- }
-
- public PermissionType setUpdatedTime(long updatedTime) {
- this.updatedTime = updatedTime;
- setUpdatedTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- public void setUpdatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case PERMISSION_ID:
- if (value == null) {
- unsetPermissionId();
- } else {
- setPermissionId((String)value);
- }
- break;
-
- case DOMAIN_ID:
- if (value == null) {
- unsetDomainId();
- } else {
- setDomainId((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case CREATED_TIME:
- if (value == null) {
- unsetCreatedTime();
- } else {
- setCreatedTime((Long)value);
- }
- break;
-
- case UPDATED_TIME:
- if (value == null) {
- unsetUpdatedTime();
- } else {
- setUpdatedTime((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case PERMISSION_ID:
- return getPermissionId();
-
- case DOMAIN_ID:
- return getDomainId();
-
- case NAME:
- return getName();
-
- case CREATED_TIME:
- return getCreatedTime();
-
- case UPDATED_TIME:
- return getUpdatedTime();
-
- }
- 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_ID:
- return isSetPermissionId();
- case DOMAIN_ID:
- return isSetDomainId();
- case NAME:
- return isSetName();
- case CREATED_TIME:
- return isSetCreatedTime();
- case UPDATED_TIME:
- return isSetUpdatedTime();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof PermissionType)
- return this.equals((PermissionType)that);
- return false;
- }
-
- public boolean equals(PermissionType that) {
- if (that == null)
- return false;
-
- boolean this_present_permissionId = true && this.isSetPermissionId();
- boolean that_present_permissionId = true && that.isSetPermissionId();
- if (this_present_permissionId || that_present_permissionId) {
- if (!(this_present_permissionId && that_present_permissionId))
- return false;
- if (!this.permissionId.equals(that.permissionId))
- return false;
- }
-
- boolean this_present_domainId = true && this.isSetDomainId();
- boolean that_present_domainId = true && that.isSetDomainId();
- if (this_present_domainId || that_present_domainId) {
- if (!(this_present_domainId && that_present_domainId))
- return false;
- if (!this.domainId.equals(that.domainId))
- return false;
- }
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_createdTime = true && this.isSetCreatedTime();
- boolean that_present_createdTime = true && that.isSetCreatedTime();
- if (this_present_createdTime || that_present_createdTime) {
- if (!(this_present_createdTime && that_present_createdTime))
- return false;
- if (this.createdTime != that.createdTime)
- return false;
- }
-
- boolean this_present_updatedTime = true && this.isSetUpdatedTime();
- boolean that_present_updatedTime = true && that.isSetUpdatedTime();
- if (this_present_updatedTime || that_present_updatedTime) {
- if (!(this_present_updatedTime && that_present_updatedTime))
- return false;
- if (this.updatedTime != that.updatedTime)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_permissionId = true && (isSetPermissionId());
- list.add(present_permissionId);
- if (present_permissionId)
- list.add(permissionId);
-
- boolean present_domainId = true && (isSetDomainId());
- list.add(present_domainId);
- if (present_domainId)
- list.add(domainId);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_createdTime = true && (isSetCreatedTime());
- list.add(present_createdTime);
- if (present_createdTime)
- list.add(createdTime);
-
- boolean present_updatedTime = true && (isSetUpdatedTime());
- list.add(present_updatedTime);
- if (present_updatedTime)
- list.add(updatedTime);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(PermissionType other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetPermissionId()).compareTo(other.isSetPermissionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPermissionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissionId, other.permissionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDomainId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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("PermissionType(");
- boolean first = true;
-
- if (isSetPermissionId()) {
- sb.append("permissionId:");
- if (this.permissionId == null) {
- sb.append("null");
- } else {
- sb.append(this.permissionId);
- }
- first = false;
- }
- if (isSetDomainId()) {
- if (!first) sb.append(", ");
- sb.append("domainId:");
- if (this.domainId == null) {
- sb.append("null");
- } else {
- sb.append(this.domainId);
- }
- first = false;
- }
- if (isSetName()) {
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- }
- if (isSetCreatedTime()) {
- if (!first) sb.append(", ");
- sb.append("createdTime:");
- sb.append(this.createdTime);
- first = false;
- }
- if (isSetUpdatedTime()) {
- if (!first) sb.append(", ");
- sb.append("updatedTime:");
- sb.append(this.updatedTime);
- 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 PermissionTypeStandardSchemeFactory implements SchemeFactory {
- public PermissionTypeStandardScheme getScheme() {
- return new PermissionTypeStandardScheme();
- }
- }
-
- private static class PermissionTypeStandardScheme extends StandardScheme<PermissionType> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, PermissionType 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_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.permissionId = iprot.readString();
- struct.setPermissionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DOMAIN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CREATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // UPDATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(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, PermissionType struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.permissionId != null) {
- if (struct.isSetPermissionId()) {
- oprot.writeFieldBegin(PERMISSION_ID_FIELD_DESC);
- oprot.writeString(struct.permissionId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.domainId != null) {
- if (struct.isSetDomainId()) {
- oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
- oprot.writeString(struct.domainId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.name != null) {
- if (struct.isSetName()) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.createdTime);
- oprot.writeFieldEnd();
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.updatedTime);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class PermissionTypeTupleSchemeFactory implements SchemeFactory {
- public PermissionTypeTupleScheme getScheme() {
- return new PermissionTypeTupleScheme();
- }
- }
-
- private static class PermissionTypeTupleScheme extends TupleScheme<PermissionType> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, PermissionType struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetPermissionId()) {
- optionals.set(0);
- }
- if (struct.isSetDomainId()) {
- optionals.set(1);
- }
- if (struct.isSetName()) {
- optionals.set(2);
- }
- if (struct.isSetCreatedTime()) {
- optionals.set(3);
- }
- if (struct.isSetUpdatedTime()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetPermissionId()) {
- oprot.writeString(struct.permissionId);
- }
- if (struct.isSetDomainId()) {
- oprot.writeString(struct.domainId);
- }
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeI64(struct.createdTime);
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeI64(struct.updatedTime);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, PermissionType struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.permissionId = iprot.readString();
- struct.setPermissionIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- }
- if (incoming.get(2)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- }
- if (incoming.get(4)) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
deleted file mode 100644
index 14573fe..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
+++ /dev/null
@@ -1,817 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
-public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UserStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UserTupleSchemeFactory());
- }
-
- public String userId; // optional
- public String domainId; // optional
- public String userName; // optional
- public long createdTime; // optional
- public long updatedTime; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userId"),
- DOMAIN_ID((short)2, "domainId"),
- USER_NAME((short)3, "userName"),
- CREATED_TIME((short)4, "createdTime"),
- UPDATED_TIME((short)5, "updatedTime");
-
- 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: // USER_ID
- return USER_ID;
- case 2: // DOMAIN_ID
- return DOMAIN_ID;
- case 3: // USER_NAME
- return USER_NAME;
- case 4: // CREATED_TIME
- return CREATED_TIME;
- case 5: // UPDATED_TIME
- return UPDATED_TIME;
- 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 __CREATEDTIME_ISSET_ID = 0;
- private static final int __UPDATEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.USER_ID,_Fields.DOMAIN_ID,_Fields.USER_NAME,_Fields.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);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
- }
-
- public User() {
- this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public User(User other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetUserId()) {
- this.userId = other.userId;
- }
- if (other.isSetDomainId()) {
- this.domainId = other.domainId;
- }
- if (other.isSetUserName()) {
- this.userName = other.userName;
- }
- this.createdTime = other.createdTime;
- this.updatedTime = other.updatedTime;
- }
-
- public User deepCopy() {
- return new User(this);
- }
-
- @Override
- public void clear() {
- this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- this.domainId = null;
- this.userName = null;
- setCreatedTimeIsSet(false);
- this.createdTime = 0;
- setUpdatedTimeIsSet(false);
- this.updatedTime = 0;
- }
-
- public String getUserId() {
- return this.userId;
- }
-
- public User setUserId(String userId) {
- this.userId = userId;
- return this;
- }
-
- public void unsetUserId() {
- this.userId = null;
- }
-
- /** Returns true if field userId is set (has been assigned a value) and false otherwise */
- public boolean isSetUserId() {
- return this.userId != null;
- }
-
- public void setUserIdIsSet(boolean value) {
- if (!value) {
- this.userId = null;
- }
- }
-
- public String getDomainId() {
- return this.domainId;
- }
-
- public User setDomainId(String domainId) {
- this.domainId = domainId;
- return this;
- }
-
- public void unsetDomainId() {
- this.domainId = null;
- }
-
- /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
- public boolean isSetDomainId() {
- return this.domainId != null;
- }
-
- public void setDomainIdIsSet(boolean value) {
- if (!value) {
- this.domainId = null;
- }
- }
-
- public String getUserName() {
- return this.userName;
- }
-
- public User setUserName(String userName) {
- this.userName = userName;
- return this;
- }
-
- public void unsetUserName() {
- this.userName = null;
- }
-
- /** Returns true if field userName is set (has been assigned a value) and false otherwise */
- public boolean isSetUserName() {
- return this.userName != null;
- }
-
- public void setUserNameIsSet(boolean value) {
- if (!value) {
- this.userName = null;
- }
- }
-
- public long getCreatedTime() {
- return this.createdTime;
- }
-
- public User setCreatedTime(long createdTime) {
- this.createdTime = createdTime;
- setCreatedTimeIsSet(true);
- return this;
- }
-
- public void unsetCreatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- public void setCreatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
- }
-
- public long getUpdatedTime() {
- return this.updatedTime;
- }
-
- public User setUpdatedTime(long updatedTime) {
- this.updatedTime = updatedTime;
- setUpdatedTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- public void setUpdatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserId();
- } else {
- setUserId((String)value);
- }
- break;
-
- case DOMAIN_ID:
- if (value == null) {
- unsetDomainId();
- } else {
- setDomainId((String)value);
- }
- break;
-
- case USER_NAME:
- if (value == null) {
- unsetUserName();
- } else {
- setUserName((String)value);
- }
- break;
-
- case CREATED_TIME:
- if (value == null) {
- unsetCreatedTime();
- } else {
- setCreatedTime((Long)value);
- }
- break;
-
- case UPDATED_TIME:
- if (value == null) {
- unsetUpdatedTime();
- } else {
- setUpdatedTime((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserId();
-
- case DOMAIN_ID:
- return getDomainId();
-
- case USER_NAME:
- return getUserName();
-
- case CREATED_TIME:
- return getCreatedTime();
-
- case UPDATED_TIME:
- return getUpdatedTime();
-
- }
- 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 USER_ID:
- return isSetUserId();
- case DOMAIN_ID:
- return isSetDomainId();
- case USER_NAME:
- return isSetUserName();
- case CREATED_TIME:
- return isSetCreatedTime();
- case UPDATED_TIME:
- return isSetUpdatedTime();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof User)
- return this.equals((User)that);
- return false;
- }
-
- public boolean equals(User that) {
- if (that == null)
- return false;
-
- boolean this_present_userId = true && this.isSetUserId();
- boolean that_present_userId = true && that.isSetUserId();
- if (this_present_userId || that_present_userId) {
- if (!(this_present_userId && that_present_userId))
- return false;
- if (!this.userId.equals(that.userId))
- return false;
- }
-
- boolean this_present_domainId = true && this.isSetDomainId();
- boolean that_present_domainId = true && that.isSetDomainId();
- if (this_present_domainId || that_present_domainId) {
- if (!(this_present_domainId && that_present_domainId))
- return false;
- if (!this.domainId.equals(that.domainId))
- return false;
- }
-
- boolean this_present_userName = true && this.isSetUserName();
- boolean that_present_userName = true && that.isSetUserName();
- if (this_present_userName || that_present_userName) {
- if (!(this_present_userName && that_present_userName))
- return false;
- if (!this.userName.equals(that.userName))
- return false;
- }
-
- boolean this_present_createdTime = true && this.isSetCreatedTime();
- boolean that_present_createdTime = true && that.isSetCreatedTime();
- if (this_present_createdTime || that_present_createdTime) {
- if (!(this_present_createdTime && that_present_createdTime))
- return false;
- if (this.createdTime != that.createdTime)
- return false;
- }
-
- boolean this_present_updatedTime = true && this.isSetUpdatedTime();
- boolean that_present_updatedTime = true && that.isSetUpdatedTime();
- if (this_present_updatedTime || that_present_updatedTime) {
- if (!(this_present_updatedTime && that_present_updatedTime))
- return false;
- if (this.updatedTime != that.updatedTime)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_userId = true && (isSetUserId());
- list.add(present_userId);
- if (present_userId)
- list.add(userId);
-
- boolean present_domainId = true && (isSetDomainId());
- list.add(present_domainId);
- if (present_domainId)
- list.add(domainId);
-
- boolean present_userName = true && (isSetUserName());
- list.add(present_userName);
- if (present_userName)
- list.add(userName);
-
- boolean present_createdTime = true && (isSetCreatedTime());
- list.add(present_createdTime);
- if (present_createdTime)
- list.add(createdTime);
-
- boolean present_updatedTime = true && (isSetUpdatedTime());
- list.add(present_updatedTime);
- if (present_updatedTime)
- list.add(updatedTime);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(User other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDomainId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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("User(");
- boolean first = true;
-
- if (isSetUserId()) {
- sb.append("userId:");
- if (this.userId == null) {
- sb.append("null");
- } else {
- sb.append(this.userId);
- }
- first = false;
- }
- if (isSetDomainId()) {
- if (!first) sb.append(", ");
- sb.append("domainId:");
- if (this.domainId == null) {
- sb.append("null");
- } else {
- sb.append(this.domainId);
- }
- first = false;
- }
- if (isSetUserName()) {
- if (!first) sb.append(", ");
- sb.append("userName:");
- if (this.userName == null) {
- sb.append("null");
- } else {
- sb.append(this.userName);
- }
- first = false;
- }
- if (isSetCreatedTime()) {
- if (!first) sb.append(", ");
- sb.append("createdTime:");
- sb.append(this.createdTime);
- first = false;
- }
- if (isSetUpdatedTime()) {
- if (!first) sb.append(", ");
- sb.append("updatedTime:");
- sb.append(this.updatedTime);
- 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 UserStandardSchemeFactory implements SchemeFactory {
- public UserStandardScheme getScheme() {
- return new UserStandardScheme();
- }
- }
-
- private static class UserStandardScheme extends StandardScheme<User> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userId = iprot.readString();
- struct.setUserIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DOMAIN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // USER_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CREATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // UPDATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(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, User struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userId != null) {
- if (struct.isSetUserId()) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.domainId != null) {
- if (struct.isSetDomainId()) {
- oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
- oprot.writeString(struct.domainId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.userName != null) {
- if (struct.isSetUserName()) {
- oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
- oprot.writeString(struct.userName);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.createdTime);
- oprot.writeFieldEnd();
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.updatedTime);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class UserTupleSchemeFactory implements SchemeFactory {
- public UserTupleScheme getScheme() {
- return new UserTupleScheme();
- }
- }
-
- private static class UserTupleScheme extends TupleScheme<User> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserId()) {
- optionals.set(0);
- }
- if (struct.isSetDomainId()) {
- optionals.set(1);
- }
- if (struct.isSetUserName()) {
- optionals.set(2);
- }
- if (struct.isSetCreatedTime()) {
- optionals.set(3);
- }
- if (struct.isSetUpdatedTime()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetUserId()) {
- oprot.writeString(struct.userId);
- }
- if (struct.isSetDomainId()) {
- oprot.writeString(struct.domainId);
- }
- if (struct.isSetUserName()) {
- oprot.writeString(struct.userName);
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeI64(struct.createdTime);
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeI64(struct.updatedTime);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.userId = iprot.readString();
- struct.setUserIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- }
- if (incoming.get(2)) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- }
- if (incoming.get(4)) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- }
- }
- }
-
-}
-
[27/50] [abbrv] 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/0e21ebcd
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0e21ebcd
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0e21ebcd
Branch: refs/heads/airavata-gov-registry
Commit: 0e21ebcd032b0716a941156e6aaa9786803a2142
Parents: 8c2720a
Author: scnakandala <su...@gmail.com>
Authored: Wed Sep 21 16:54:11 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Oct 3 11:33:14 2016 -0400
----------------------------------------------------------------------
.../airavata-gov-registry-core/pom.xml | 51 +
.../src/main/java/META-INF/persistence.xml | 15 -
.../gov/registry/db/entities/UserEntity.java | 2 +-
.../registry/db/entities/UserGroupEntity.java | 4 +-
.../db/repositories/AbstractRepository.java | 12 +-
.../db/repositories/DomainRepository.java | 34 +
.../db/repositories/UserGroupRepository.java | 34 +
.../gov/registry/db/utils/DBConstants.java | 40 +
.../gov/registry/db/utils/JPAUtils.java | 20 +-
.../gov/registry/db/utils/QueryGenerator.java | 53 +
.../src/main/resources/META-INF/persistence.xml | 15 +
.../src/main/resources/gov-registry.sql | 11 +-
.../gov/registry/db/RepositoriesTest.java | 113 ++
.../airavata/gov/registry/models/Domain.java | 27 +-
.../airavata/gov/registry/models/Entity.java | 2 +-
.../gov/registry/models/EntityType.java | 2 +-
.../registry/models/GovRegistryException.java | 2 +-
.../airavata/gov/registry/models/Group.java | 1154 ------------------
.../gov/registry/models/PermissionType.java | 2 +-
.../airavata/gov/registry/models/User.java | 2 +-
.../airavata/gov/registry/models/UserGroup.java | 1154 ++++++++++++++++++
.../service/cpi/GovRegistryService.java | 160 +--
airavata-gov-registry/pom.xml | 1 -
.../thrift_models/gov_reg_cpi.thrift | 8 +-
.../thrift_models/gov_reg_models.thrift | 2 +-
25 files changed, 1624 insertions(+), 1296 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/pom.xml b/airavata-gov-registry/airavata-gov-registry-core/pom.xml
index d986ebe..84ca5ff 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/pom.xml
+++ b/airavata-gov-registry/airavata-gov-registry-core/pom.xml
@@ -37,6 +37,57 @@
<artifactId>dozer</artifactId>
<version>5.4.0</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-all</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.34</version>
+ </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>2.2.0</version>
+ <configuration>
+ <includes>**/entities/*.class</includes>
+ <excludes>**/entities/XML*.class</excludes>
+ <addDefaultConstructor>true</addDefaultConstructor>
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>enhancer</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/META-INF/persistence.xml b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/META-INF/persistence.xml
deleted file mode 100644
index 4a89174..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/META-INF/persistence.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
-
- <persistence-unit name="airavata-gov-registry">
- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.airavata.gov.registry.db.entities.DomainEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.EntityEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.EntityTypeEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.GroupMembershipEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.PermissionTypeEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.SharingEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.UserEntity</class>
- <class>org.apache.airavata.gov.registry.db.entities.UserGroupEntity</class>
- </persistence-unit>
-</persistence>
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
index d4598d5..7201651 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
@@ -46,7 +46,7 @@ public class UserEntity {
this.userId = userId;
}
- @Id
+ @Basic
@Column(name = "DOMAIN_ID")
public String getDomainId() {
return domainId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
index 560f171..aacf263 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
@@ -50,7 +50,7 @@ public class UserGroupEntity {
this.groupId = groupId;
}
- @Id
+ @Basic
@Column(name = "DOMAIN_ID")
public String getDomainId() {
return domainId;
@@ -60,7 +60,7 @@ public class UserGroupEntity {
this.domainId = domainId;
}
- @Id
+ @Basic
@Column(name = "OWNER_ID")
public String getOwnerId() {
return ownerId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
index 03c3b41..b78060c 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
@@ -22,6 +22,7 @@ package org.apache.airavata.gov.registry.db.repositories;
import org.apache.airavata.gov.registry.db.utils.JPAUtils;
import org.apache.airavata.gov.registry.db.utils.ObjectMapperSingleton;
+import org.apache.airavata.gov.registry.db.utils.QueryGenerator;
import org.apache.airavata.gov.registry.models.GovRegistryException;
import org.dozer.Mapper;
import org.slf4j.Logger;
@@ -29,16 +30,19 @@ import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
public abstract class AbstractRepository<T, E, Id> {
private final static Logger logger = LoggerFactory.getLogger(AbstractRepository.class);
private Class<T> thriftGenericClass;
private Class<E> dbEntityGenericClass;
+ private QueryGenerator queryGenerator;
public AbstractRepository(Class<T> thriftGenericClass, Class<E> dbEntityGenericClass){
this.thriftGenericClass = thriftGenericClass;
this.dbEntityGenericClass = dbEntityGenericClass;
+ this.queryGenerator = new QueryGenerator(dbEntityGenericClass.getSimpleName());
}
public T create(T t) throws GovRegistryException {
@@ -68,9 +72,11 @@ public abstract class AbstractRepository<T, E, Id> {
return mapper.map(entity, thriftGenericClass);
}
- public List<T> select(String query, int limit, int offset) throws GovRegistryException {
- List resultSet = JPAUtils.execute(entityManager -> entityManager.createQuery(query).setFirstResult(offset)
- .setMaxResults(offset).getResultList());
+ public List<T> select(Map<String, String> filters, int offset, int limit) throws GovRegistryException {
+ String queryString = queryGenerator.getSelectQuery(filters);
+
+ List resultSet = JPAUtils.execute(entityManager -> entityManager.createQuery(queryString).setFirstResult(offset)
+ .setMaxResults(limit).getResultList());
Mapper mapper = ObjectMapperSingleton.getInstance();
List<T> gatewayList = new ArrayList<>();
resultSet.stream().forEach(rs -> gatewayList.add(mapper.map(rs, thriftGenericClass)));
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
new file mode 100644
index 0000000..5442c58
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.repositories;
+
+import org.apache.airavata.gov.registry.db.entities.DomainEntity;
+import org.apache.airavata.gov.registry.models.Domain;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DomainRepository extends AbstractRepository<Domain, DomainEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(DomainRepository.class);
+
+ public DomainRepository(Class<Domain> thriftGenericClass, Class<DomainEntity> dbEntityGenericClass) {
+ super(thriftGenericClass, dbEntityGenericClass);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
new file mode 100644
index 0000000..c1a8bae
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.repositories;
+
+import org.apache.airavata.gov.registry.db.entities.UserGroupEntity;
+import org.apache.airavata.gov.registry.models.UserGroup;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroupEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(UserGroupRepository.class);
+
+ public UserGroupRepository(Class<UserGroup> thriftGenericClass, Class<UserGroupEntity> dbEntityGenericClass) {
+ super(thriftGenericClass, dbEntityGenericClass);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
new file mode 100644
index 0000000..6045806
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DBConstants {
+ private final static Logger logger = LoggerFactory.getLogger(DBConstants.class);
+
+ public static class DomainTable {
+ public static String DOMAIN_ID = "domainId";
+ public static String NAME = "name";
+ public static String DESCRIPTION = "description";
+ }
+
+ public static class UserTable {
+ public static String USER_ID = "userId";
+ public static String DOMAIN_ID = "domainId";
+ public static String USER_NAME = "userName";
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
index 0d8b78f..6e8d11c 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
@@ -33,7 +33,7 @@ import java.util.Map;
public class JPAUtils {
private final static Logger logger = LoggerFactory.getLogger(JPAUtils.class);
- private static final String PERSISTENCE_UNIT_NAME = "appcatalog_data";
+ private static final String PERSISTENCE_UNIT_NAME = "airavata-gov-registry";
private static final String GOV_REG_JDBC_DRIVER = "appcatalog.jdbc.driver";
private static final String GOV_REG_JDBC_URL = "appcatalog.jdbc.url";
private static final String GOV_REG_JDBC_USER = "appcatalog.jdbc.user";
@@ -42,10 +42,10 @@ public class JPAUtils {
private static final String JPA_CACHE_SIZE = "jpa.cache.size";
private static final String JPA_CACHE_ENABLED = "cache.enable";
- @PersistenceUnit(unitName = "airavata-gov-registry")
+ @PersistenceUnit(unitName = PERSISTENCE_UNIT_NAME)
protected static EntityManagerFactory factory;
- @PersistenceContext(unitName = "airavata-gov-registry")
- private static EntityManager appCatEntityManager;
+ @PersistenceContext(unitName = PERSISTENCE_UNIT_NAME)
+ private static EntityManager entityManager;
public static EntityManager getEntityManager() {
if (factory == null) {
@@ -55,7 +55,12 @@ public class JPAUtils {
// "Password=" + readServerProperties(GOV_REG_JDBC_PWD) +
// ",validationQuery=" + readServerProperties(GOV_REG_VALIDATION_QUERY);
//
- String connectionProperties = "jdbc:mysql://localhost:3306/airavata_gov_registry;create=true;user=root;password=";
+
+ String connectionProperties = "DriverClassName=com.mysql.jdbc.Driver," +
+ "Url=jdbc:mysql://localhost:3306/airavata_gov_registry?autoReconnect=true," +
+ "Username=root," +
+ "Password=," +
+ ",validationQuery=SELECT 1 FROM CONFIGURATION";
Map<String, String> properties = new HashMap<String, String>();
properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
@@ -71,10 +76,11 @@ public class JPAUtils {
properties.put("openjpa.jdbc.QuerySQLCache", "false");
properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
" PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000, autoReconnect=true");
+ properties.put("openjpa.RuntimeUnenhancedClasses", "warn");
factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
}
- appCatEntityManager = factory.createEntityManager();
- return appCatEntityManager;
+ entityManager = factory.createEntityManager();
+ return entityManager;
}
private static String readServerProperties(String propertyName) throws GovRegistryException {
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
new file mode 100644
index 0000000..2844a4a
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
@@ -0,0 +1,53 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+
+public class QueryGenerator {
+ private final static Logger logger = LoggerFactory.getLogger(QueryGenerator.class);
+
+ private String tableName;
+
+
+ public QueryGenerator(String tableName){
+ this.tableName = tableName;
+ }
+
+ public String getSelectQuery(Map<String, String> filters){
+ String query = "SELECT p from " + tableName + " as p WHERE ";
+ if(filters == null || filters.size() == 0){
+ query += "1";
+ }else{
+ for(String k : filters.keySet()){
+ query += "p." + k + " LIKE '%" + filters.get(k) + "%' AND ";
+ }
+ query = query.substring(0, query.length()-5);
+ }
+
+ query += " ORDER BY p.createdTime DESC";
+
+ return query;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/META-INF/persistence.xml b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..4a89174
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
+
+ <persistence-unit name="airavata-gov-registry">
+ <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+ <class>org.apache.airavata.gov.registry.db.entities.DomainEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.EntityEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.EntityTypeEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.GroupMembershipEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.PermissionTypeEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.SharingEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.UserEntity</class>
+ <class>org.apache.airavata.gov.registry.db.entities.UserGroupEntity</class>
+ </persistence-unit>
+</persistence>
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
index 68e1a95..a9ca3dc 100644
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/main/resources/gov-registry.sql
@@ -111,4 +111,13 @@ CREATE TABLE SHARING (
FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID),
FOREIGN KEY (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID)
-)
\ No newline at end of file
+)
+
+CREATE TABLE CONFIGURATION
+(
+ CONFIG_KEY VARCHAR(255),
+ CONFIG_VALUE VARCHAR(255),
+ PRIMARY KEY(CONFIG_KEY, CONFIG_VALUE)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VALUE) VALUES('gov_reg_version', '0.17');
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java b/airavata-gov-registry/airavata-gov-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
new file mode 100644
index 0000000..0b0da15
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
@@ -0,0 +1,113 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db;
+
+import junit.framework.Assert;
+import org.apache.airavata.gov.registry.db.entities.DomainEntity;
+import org.apache.airavata.gov.registry.db.entities.UserEntity;
+import org.apache.airavata.gov.registry.db.repositories.DomainRepository;
+import org.apache.airavata.gov.registry.db.repositories.UserRepository;
+import org.apache.airavata.gov.registry.db.utils.DBConstants;
+import org.apache.airavata.gov.registry.models.Domain;
+import org.apache.airavata.gov.registry.models.GovRegistryException;
+import org.apache.airavata.gov.registry.models.User;
+import org.apache.airavata.gov.registry.models.UserGroup;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class RepositoriesTest {
+ private final static Logger logger = LoggerFactory.getLogger(RepositoriesTest.class);
+
+ @Test
+ public void test() throws GovRegistryException {
+
+ //Creating domain
+ Domain domain = new Domain();
+ String domainId = "test-domain."+System.currentTimeMillis();
+ domain.setDomainId(domainId);
+ domain.setName(domainId);
+ domain.setDescription("test domain description");
+ domain.setCreatedTime(System.currentTimeMillis());
+ domain.setUpdatedTime(System.currentTimeMillis());
+
+ DomainRepository domainRepository = new DomainRepository(Domain.class, DomainEntity.class);
+ domain = domainRepository.create(domain);
+ Assert.assertNotNull(domain);
+
+ Map<String, String> filters = new HashMap<>();
+ filters.put(DBConstants.DomainTable.DESCRIPTION, "test");
+ Assert.assertTrue(domainRepository.select(filters, 0, 10).size() > 0);
+
+
+ //Creating users
+ User user1 = new User();
+ String userName1 = "test-user." + System.currentTimeMillis();
+ String userId1 = domainId + ":" + userName1;
+ user1.setUserId(userId1);
+ user1.setUserName(userName1);
+ user1.setDomainId(domainId);
+ user1.setCreatedTime(System.currentTimeMillis());
+ user1.setUpdatedTime(System.currentTimeMillis());
+
+ UserRepository userRepository = new UserRepository(User.class, UserEntity.class);
+ user1 = userRepository.create(user1);
+ Assert.assertNotNull(user1);
+
+ User user2 = new User();
+ String userName2 = "test-user." + System.currentTimeMillis();
+ String userId2 = domainId + ":" + userName2;
+ user2.setUserId(userId2);
+ user2.setUserName(userName2);
+ user2.setDomainId(domainId);
+ user2.setCreatedTime(System.currentTimeMillis());
+ user2.setUpdatedTime(System.currentTimeMillis());
+
+ User user3 = new User();
+ String userName3 = "test-user." + System.currentTimeMillis();
+ String userId3 = domainId + ":" + userName3;
+ user3.setUserId(userId3);
+ user3.setUserName(userName3);
+ user3.setDomainId(domainId);
+ user3.setCreatedTime(System.currentTimeMillis());
+ user3.setUpdatedTime(System.currentTimeMillis());
+
+ filters = new HashMap<>();
+ filters.put(DBConstants.UserTable.USER_NAME, "test");
+ Assert.assertTrue(userRepository.select(filters, 0, 10).size() > 0);
+
+ //Creating Groups
+ UserGroup userGroup1 = new UserGroup();
+ String groupName1 = "test-group";
+ String groupId1 = domainId + ":" + groupName1 + "." + System.currentTimeMillis();
+ userGroup1.setGroupId(groupId1);
+ userGroup1.setDomainId(domainId);
+ userGroup1.setName(groupName1);
+ userGroup1.setDescription("test group description");
+ userGroup1.setOwnerId(userId1);
+ userGroup1.setCreatedTime(System.currentTimeMillis());
+ userGroup1.setUpdatedTime(System.currentTimeMillis());
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
index 0bebf24..a373892 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
@@ -6,35 +6,18 @@
*/
package org.apache.airavata.gov.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-09-20")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
public class Domain implements org.apache.thrift.TBase<Domain, Domain._Fields>, java.io.Serializable, Cloneable, Comparable<Domain> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Domain");
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
index 93059c4..0c1d447 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, java.io.Serializable, Cloneable, Comparable<Entity> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entity");
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
index 689453f..3585243 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
public class EntityType implements org.apache.thrift.TBase<EntityType, EntityType._Fields>, java.io.Serializable, Cloneable, Comparable<EntityType> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EntityType");
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
index 74a8b75..d265c23 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
public class GovRegistryException extends TException implements org.apache.thrift.TBase<GovRegistryException, GovRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<GovRegistryException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GovRegistryException");
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Group.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Group.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Group.java
deleted file mode 100644
index fc3e5d5..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Group.java
+++ /dev/null
@@ -1,1154 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
-public class Group implements org.apache.thrift.TBase<Group, Group._Fields>, java.io.Serializable, Cloneable, Comparable<Group> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Group");
-
- private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)8);
- private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)9);
- private static final org.apache.thrift.protocol.TField GROUP_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("groupType", org.apache.thrift.protocol.TType.I32, (short)10);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GroupStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GroupTupleSchemeFactory());
- }
-
- public String groupId; // optional
- public String domainId; // optional
- public String name; // optional
- public String description; // optional
- public String ownerId; // optional
- public long createdTime; // optional
- public long updatedTime; // optional
- /**
- *
- * @see GroupType
- */
- public GroupType groupType; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GROUP_ID((short)1, "groupId"),
- DOMAIN_ID((short)2, "domainId"),
- NAME((short)3, "name"),
- DESCRIPTION((short)6, "description"),
- OWNER_ID((short)7, "ownerId"),
- CREATED_TIME((short)8, "createdTime"),
- UPDATED_TIME((short)9, "updatedTime"),
- /**
- *
- * @see GroupType
- */
- GROUP_TYPE((short)10, "groupType");
-
- 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: // GROUP_ID
- return GROUP_ID;
- case 2: // DOMAIN_ID
- return DOMAIN_ID;
- case 3: // NAME
- return NAME;
- case 6: // DESCRIPTION
- return DESCRIPTION;
- case 7: // OWNER_ID
- return OWNER_ID;
- case 8: // CREATED_TIME
- return CREATED_TIME;
- case 9: // UPDATED_TIME
- return UPDATED_TIME;
- case 10: // GROUP_TYPE
- return GROUP_TYPE;
- 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 __CREATEDTIME_ISSET_ID = 0;
- private static final int __UPDATEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.GROUP_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.OWNER_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME,_Fields.GROUP_TYPE};
- 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.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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.GROUP_TYPE, new org.apache.thrift.meta_data.FieldMetaData("groupType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupType.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Group.class, metaDataMap);
- }
-
- public Group() {
- this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public Group(Group other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetGroupId()) {
- this.groupId = other.groupId;
- }
- if (other.isSetDomainId()) {
- this.domainId = other.domainId;
- }
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- if (other.isSetOwnerId()) {
- this.ownerId = other.ownerId;
- }
- this.createdTime = other.createdTime;
- this.updatedTime = other.updatedTime;
- if (other.isSetGroupType()) {
- this.groupType = other.groupType;
- }
- }
-
- public Group deepCopy() {
- return new Group(this);
- }
-
- @Override
- public void clear() {
- this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- this.domainId = null;
- this.name = null;
- this.description = null;
- this.ownerId = null;
- setCreatedTimeIsSet(false);
- this.createdTime = 0;
- setUpdatedTimeIsSet(false);
- this.updatedTime = 0;
- this.groupType = null;
- }
-
- public String getGroupId() {
- return this.groupId;
- }
-
- public Group setGroupId(String groupId) {
- this.groupId = groupId;
- return this;
- }
-
- public void unsetGroupId() {
- this.groupId = null;
- }
-
- /** Returns true if field groupId is set (has been assigned a value) and false otherwise */
- public boolean isSetGroupId() {
- return this.groupId != null;
- }
-
- public void setGroupIdIsSet(boolean value) {
- if (!value) {
- this.groupId = null;
- }
- }
-
- public String getDomainId() {
- return this.domainId;
- }
-
- public Group setDomainId(String domainId) {
- this.domainId = domainId;
- return this;
- }
-
- public void unsetDomainId() {
- this.domainId = null;
- }
-
- /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
- public boolean isSetDomainId() {
- return this.domainId != null;
- }
-
- public void setDomainIdIsSet(boolean value) {
- if (!value) {
- this.domainId = null;
- }
- }
-
- public String getName() {
- return this.name;
- }
-
- public Group setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public Group setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public String getOwnerId() {
- return this.ownerId;
- }
-
- public Group setOwnerId(String ownerId) {
- this.ownerId = ownerId;
- return this;
- }
-
- public void unsetOwnerId() {
- this.ownerId = null;
- }
-
- /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
- public boolean isSetOwnerId() {
- return this.ownerId != null;
- }
-
- public void setOwnerIdIsSet(boolean value) {
- if (!value) {
- this.ownerId = null;
- }
- }
-
- public long getCreatedTime() {
- return this.createdTime;
- }
-
- public Group setCreatedTime(long createdTime) {
- this.createdTime = createdTime;
- setCreatedTimeIsSet(true);
- return this;
- }
-
- public void unsetCreatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- public void setCreatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
- }
-
- public long getUpdatedTime() {
- return this.updatedTime;
- }
-
- public Group setUpdatedTime(long updatedTime) {
- this.updatedTime = updatedTime;
- setUpdatedTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- public void setUpdatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
- }
-
- /**
- *
- * @see GroupType
- */
- public GroupType getGroupType() {
- return this.groupType;
- }
-
- /**
- *
- * @see GroupType
- */
- public Group setGroupType(GroupType groupType) {
- this.groupType = groupType;
- return this;
- }
-
- public void unsetGroupType() {
- this.groupType = null;
- }
-
- /** Returns true if field groupType is set (has been assigned a value) and false otherwise */
- public boolean isSetGroupType() {
- return this.groupType != null;
- }
-
- public void setGroupTypeIsSet(boolean value) {
- if (!value) {
- this.groupType = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case GROUP_ID:
- if (value == null) {
- unsetGroupId();
- } else {
- setGroupId((String)value);
- }
- break;
-
- case DOMAIN_ID:
- if (value == null) {
- unsetDomainId();
- } else {
- setDomainId((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case OWNER_ID:
- if (value == null) {
- unsetOwnerId();
- } else {
- setOwnerId((String)value);
- }
- break;
-
- case CREATED_TIME:
- if (value == null) {
- unsetCreatedTime();
- } else {
- setCreatedTime((Long)value);
- }
- break;
-
- case UPDATED_TIME:
- if (value == null) {
- unsetUpdatedTime();
- } else {
- setUpdatedTime((Long)value);
- }
- break;
-
- case GROUP_TYPE:
- if (value == null) {
- unsetGroupType();
- } else {
- setGroupType((GroupType)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case GROUP_ID:
- return getGroupId();
-
- case DOMAIN_ID:
- return getDomainId();
-
- case NAME:
- return getName();
-
- case DESCRIPTION:
- return getDescription();
-
- case OWNER_ID:
- return getOwnerId();
-
- case CREATED_TIME:
- return getCreatedTime();
-
- case UPDATED_TIME:
- return getUpdatedTime();
-
- case GROUP_TYPE:
- return getGroupType();
-
- }
- 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 GROUP_ID:
- return isSetGroupId();
- case DOMAIN_ID:
- return isSetDomainId();
- case NAME:
- return isSetName();
- case DESCRIPTION:
- return isSetDescription();
- case OWNER_ID:
- return isSetOwnerId();
- case CREATED_TIME:
- return isSetCreatedTime();
- case UPDATED_TIME:
- return isSetUpdatedTime();
- case GROUP_TYPE:
- return isSetGroupType();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof Group)
- return this.equals((Group)that);
- return false;
- }
-
- public boolean equals(Group that) {
- if (that == null)
- return false;
-
- boolean this_present_groupId = true && this.isSetGroupId();
- boolean that_present_groupId = true && that.isSetGroupId();
- if (this_present_groupId || that_present_groupId) {
- if (!(this_present_groupId && that_present_groupId))
- return false;
- if (!this.groupId.equals(that.groupId))
- return false;
- }
-
- boolean this_present_domainId = true && this.isSetDomainId();
- boolean that_present_domainId = true && that.isSetDomainId();
- if (this_present_domainId || that_present_domainId) {
- if (!(this_present_domainId && that_present_domainId))
- return false;
- if (!this.domainId.equals(that.domainId))
- return false;
- }
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- boolean this_present_ownerId = true && this.isSetOwnerId();
- boolean that_present_ownerId = true && that.isSetOwnerId();
- if (this_present_ownerId || that_present_ownerId) {
- if (!(this_present_ownerId && that_present_ownerId))
- return false;
- if (!this.ownerId.equals(that.ownerId))
- return false;
- }
-
- boolean this_present_createdTime = true && this.isSetCreatedTime();
- boolean that_present_createdTime = true && that.isSetCreatedTime();
- if (this_present_createdTime || that_present_createdTime) {
- if (!(this_present_createdTime && that_present_createdTime))
- return false;
- if (this.createdTime != that.createdTime)
- return false;
- }
-
- boolean this_present_updatedTime = true && this.isSetUpdatedTime();
- boolean that_present_updatedTime = true && that.isSetUpdatedTime();
- if (this_present_updatedTime || that_present_updatedTime) {
- if (!(this_present_updatedTime && that_present_updatedTime))
- return false;
- if (this.updatedTime != that.updatedTime)
- return false;
- }
-
- boolean this_present_groupType = true && this.isSetGroupType();
- boolean that_present_groupType = true && that.isSetGroupType();
- if (this_present_groupType || that_present_groupType) {
- if (!(this_present_groupType && that_present_groupType))
- return false;
- if (!this.groupType.equals(that.groupType))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_groupId = true && (isSetGroupId());
- list.add(present_groupId);
- if (present_groupId)
- list.add(groupId);
-
- boolean present_domainId = true && (isSetDomainId());
- list.add(present_domainId);
- if (present_domainId)
- list.add(domainId);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- boolean present_ownerId = true && (isSetOwnerId());
- list.add(present_ownerId);
- if (present_ownerId)
- list.add(ownerId);
-
- boolean present_createdTime = true && (isSetCreatedTime());
- list.add(present_createdTime);
- if (present_createdTime)
- list.add(createdTime);
-
- boolean present_updatedTime = true && (isSetUpdatedTime());
- list.add(present_updatedTime);
- if (present_updatedTime)
- list.add(updatedTime);
-
- boolean present_groupType = true && (isSetGroupType());
- list.add(present_groupType);
- if (present_groupType)
- list.add(groupType.getValue());
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(Group other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGroupId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDomainId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOwnerId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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;
- }
- }
- 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("Group(");
- boolean first = true;
-
- if (isSetGroupId()) {
- sb.append("groupId:");
- if (this.groupId == null) {
- sb.append("null");
- } else {
- sb.append(this.groupId);
- }
- first = false;
- }
- if (isSetDomainId()) {
- if (!first) sb.append(", ");
- sb.append("domainId:");
- if (this.domainId == null) {
- sb.append("null");
- } else {
- sb.append(this.domainId);
- }
- first = false;
- }
- if (isSetName()) {
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- }
- if (isSetDescription()) {
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- }
- if (isSetOwnerId()) {
- if (!first) sb.append(", ");
- sb.append("ownerId:");
- if (this.ownerId == null) {
- sb.append("null");
- } else {
- sb.append(this.ownerId);
- }
- first = false;
- }
- if (isSetCreatedTime()) {
- if (!first) sb.append(", ");
- sb.append("createdTime:");
- sb.append(this.createdTime);
- first = false;
- }
- if (isSetUpdatedTime()) {
- if (!first) sb.append(", ");
- sb.append("updatedTime:");
- sb.append(this.updatedTime);
- first = false;
- }
- if (isSetGroupType()) {
- if (!first) sb.append(", ");
- sb.append("groupType:");
- if (this.groupType == null) {
- sb.append("null");
- } else {
- sb.append(this.groupType);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- 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 GroupStandardSchemeFactory implements SchemeFactory {
- public GroupStandardScheme getScheme() {
- return new GroupStandardScheme();
- }
- }
-
- private static class GroupStandardScheme extends StandardScheme<Group> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, Group 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: // GROUP_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.groupId = iprot.readString();
- struct.setGroupIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DOMAIN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // OWNER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.ownerId = iprot.readString();
- struct.setOwnerIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // CREATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // UPDATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // GROUP_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
- struct.setGroupTypeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- 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, Group struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.groupId != null) {
- if (struct.isSetGroupId()) {
- oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
- oprot.writeString(struct.groupId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.domainId != null) {
- if (struct.isSetDomainId()) {
- oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
- oprot.writeString(struct.domainId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.name != null) {
- if (struct.isSetName()) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- }
- if (struct.description != null) {
- if (struct.isSetDescription()) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- }
- if (struct.ownerId != null) {
- if (struct.isSetOwnerId()) {
- oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
- oprot.writeString(struct.ownerId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.createdTime);
- oprot.writeFieldEnd();
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.updatedTime);
- oprot.writeFieldEnd();
- }
- if (struct.groupType != null) {
- if (struct.isSetGroupType()) {
- oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
- oprot.writeI32(struct.groupType.getValue());
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class GroupTupleSchemeFactory implements SchemeFactory {
- public GroupTupleScheme getScheme() {
- return new GroupTupleScheme();
- }
- }
-
- private static class GroupTupleScheme extends TupleScheme<Group> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Group struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetGroupId()) {
- optionals.set(0);
- }
- if (struct.isSetDomainId()) {
- optionals.set(1);
- }
- if (struct.isSetName()) {
- optionals.set(2);
- }
- if (struct.isSetDescription()) {
- optionals.set(3);
- }
- if (struct.isSetOwnerId()) {
- optionals.set(4);
- }
- if (struct.isSetCreatedTime()) {
- optionals.set(5);
- }
- if (struct.isSetUpdatedTime()) {
- optionals.set(6);
- }
- if (struct.isSetGroupType()) {
- optionals.set(7);
- }
- oprot.writeBitSet(optionals, 8);
- if (struct.isSetGroupId()) {
- oprot.writeString(struct.groupId);
- }
- if (struct.isSetDomainId()) {
- oprot.writeString(struct.domainId);
- }
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetOwnerId()) {
- oprot.writeString(struct.ownerId);
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeI64(struct.createdTime);
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeI64(struct.updatedTime);
- }
- if (struct.isSetGroupType()) {
- oprot.writeI32(struct.groupType.getValue());
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Group struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(8);
- if (incoming.get(0)) {
- struct.groupId = iprot.readString();
- struct.setGroupIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- }
- if (incoming.get(2)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(4)) {
- struct.ownerId = iprot.readString();
- struct.setOwnerIdIsSet(true);
- }
- if (incoming.get(5)) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- }
- if (incoming.get(6)) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- }
- if (incoming.get(7)) {
- struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
- struct.setGroupTypeIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
index e8702ac..717969e 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
public class PermissionType implements org.apache.thrift.TBase<PermissionType, PermissionType._Fields>, java.io.Serializable, Cloneable, Comparable<PermissionType> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PermissionType");
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
index 76ef8b6..14573fe 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
[06/50] [abbrv] airavata git commit: Change hostnames in runtime to
avoid address bind issue
Posted by sc...@apache.org.
Change hostnames in runtime to avoid address bind issue
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/2ab5a723
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/2ab5a723
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/2ab5a723
Branch: refs/heads/airavata-gov-registry
Commit: 2ab5a7236b771ef045b29ffd9131fca37260cfb5
Parents: 475f687
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Wed Sep 14 13:10:43 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Wed Sep 14 13:10:43 2016 -0400
----------------------------------------------------------------------
group_vars/all.yml | 10 ++++----
roles/api-orch/tasks/main.yml | 11 +++++++--
roles/common/tasks/main.yml | 4 ++--
roles/database/tasks/main.yml | 15 ++++++------
roles/database/tasks/secure_install.yml | 1 +
roles/gfac/tasks/main.yml | 10 +++++---
roles/registry/tasks/main.yml | 8 +++++--
site.yml | 35 +++++++++++++++++++++-------
8 files changed, 63 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index b1efac4..7dfd8d4 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -1,9 +1,9 @@
---
ansible_connection: ssh
-ansible_ssh_user: centos
-# ansible_ssh_user: root
-# ansible_ssh_private_key_file: /Users/syodage/Projects/scigap/JetCloud/jetcloud.key
-ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
+# ansible_ssh_user: centos
+ansible_ssh_user: root
+ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-jetstream.pem
+# ansible_ssh_private_key_file: /Users/syodage/Projects/airavata-ansible/shameera-aws.pem.txt
user: centos
group: centos
@@ -71,7 +71,7 @@ client_truststore_passwd: "airavata"
cred_keystore: "airavata_sym.jks"
cred_keystore_passwd: "airavata"
cred_keystore_alias: "airavata"
-cred_store_server_host: "{{ groups['database'][0] }}"
+cred_store_server_host: "{{ ansible_fqdn }}"
cred_store_port: "8960"
keystores_location: "{{ deployment_dir }}/keystores"
http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/api-orch/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/api-orch/tasks/main.yml b/roles/api-orch/tasks/main.yml
index 369bb2b..c9c5227 100644
--- a/roles/api-orch/tasks/main.yml
+++ b/roles/api-orch/tasks/main.yml
@@ -19,10 +19,17 @@
file: path="{{ api_orch_dir }}/{{ airavata_dist }}" state=absent
- name: Copy distribution to api-orcheatrator deployment directory
- unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+ unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name }}"
dest="{{ api_orch_dir }}/"
copy=no
+- name: set api-orch private ip
+ set_fact:
+ api_server_host: "{{ ansible_eth0.ipv4.address }}"
+ orchestrator_host: "{{ ansible_eth0.ipv4.address }}"
+ cred_store_server_host: "{{ ansible_eth0.ipv4.address }}"
+
+
- name: Copy Airavata server properties file
template: src=airavata-server.properties.j2
dest="{{ api_orch_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
@@ -49,7 +56,7 @@
- "{{ api_server_port }}/tcp"
- "{{ orchestrator_port }}/tcp"
- "{{ cred_store_port }}/tcp"
- become: yes
+ become_user: root
- name: stop api-orch
command: ./bin/airavata-server-stop.sh -f
http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index 4289515..eac1a60 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -4,7 +4,7 @@
with_items:
- git
- maven
- become: yes
+ become_user: root
# Setup airavata source
- name: Create deployment directory {{ deployment_dir }}
@@ -27,7 +27,7 @@
- name: Run maven build
command: mvn clean install -Dmaven.test.skip=true chdir="{{ airavata_source_dir }}/"
environment:
- MAVEN_OPTS: "-Xmx1024m"
+ MAVEN_OPTS: "-Xmx2048m"
register: build
tags: update
# when: (checkout|success) and (checkout.changed == true)
http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/database/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/main.yml b/roles/database/tasks/main.yml
index 8a02227..17e5b0d 100644
--- a/roles/database/tasks/main.yml
+++ b/roles/database/tasks/main.yml
@@ -5,15 +5,15 @@
# Install Mysql
- name: install epel release
yum: name=epel-release state=present
- become: yes
+ become_user: root
- name: install pip
yum: name=python-pip state=latest update_cache=yes
- become: yes
+ become_user: root
- name: install pexpect
pip: name=pexpect
- become: yes
+ become_user: root
# - name: Adds Python MySQL support on Debian/Ubuntu
# apt: pkg="python-mysqldb" state=present
@@ -21,17 +21,17 @@
- name: Adds Python MySQL support on RedHat/CentOS
yum: name=MySQL-python state=present
- become: yes
+ become_user: root
# when: ansible_os_family == 'RedHat'
- name: install mariadb
yum: name="{{ item }}" state=latest update_cache=yes
with_items: "{{ mysql_packages }}"
- become: yes
+ become_user: root
- name: start mariadb
service: name=mariadb state=started enabled=yes
- become: yes
+ become_user: root
- include: secure_install.yml
@@ -57,5 +57,4 @@
- name: open firewall port {{ db_server_port }}
firewalld: port="{{ db_server_port }}/tcp"
zone=public permanent=true state=enabled immediate=yes
- become: yes
-...
+ become_user: root
http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/database/tasks/secure_install.yml
----------------------------------------------------------------------
diff --git a/roles/database/tasks/secure_install.yml b/roles/database/tasks/secure_install.yml
index 39ced65..a747419 100644
--- a/roles/database/tasks/secure_install.yml
+++ b/roles/database/tasks/secure_install.yml
@@ -5,6 +5,7 @@
password="{{ mysql_root_password }}"
host=localhost
login_user=root
+ # login_password="{{ mysql_root_password }}"
- name: Copy .my.cnf file
template: src=my.cnf.j2 dest="{{ user_home }}/.my.cnf"
http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/gfac/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/gfac/tasks/main.yml b/roles/gfac/tasks/main.yml
index 06d6dda..30874e6 100644
--- a/roles/gfac/tasks/main.yml
+++ b/roles/gfac/tasks/main.yml
@@ -20,10 +20,14 @@
file: path="{{ gfac_dir }}/{{ airavata_dist }}" state=absent
- name: Copy distribution to gfac deployment directory
- unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+ unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name }}"
dest="{{ gfac_dir }}/"
copy=no
+- name: set gfac private ip
+ set_fact:
+ gfac_host: "{{ ansible_eth0.ipv4.address }}"
+
- name: Copy Airavata server properties file
template: src=airavata-server.properties.j2
dest="{{ gfac_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
@@ -47,14 +51,14 @@
- name: Open firwall ports
firewalld: port="{{ gfac_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
- become: yes
+ become_user: root
- name: stop gfac
command: ./bin/airavata-server-stop.sh -f
chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
removes="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
-- name: start gfac
+- name: start gfac
command: ./bin/airavata-server-start.sh gfac -d
chdir="{{ gfac_dir }}/{{ airavata_dist }}/"
creates="{{ gfac_dir }}/{{ airavata_dist }}/bin/server_start_*"
http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/roles/registry/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/registry/tasks/main.yml b/roles/registry/tasks/main.yml
index 1c4ba85..9bd2784 100644
--- a/roles/registry/tasks/main.yml
+++ b/roles/registry/tasks/main.yml
@@ -19,10 +19,14 @@
file: path="{{ registry_dir }}/{{ airavata_dist }}" state=absent
- name: Copy distribution to registry deployment directory
- unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+ unarchive: src="{{ airavata_source_dir }}/modules/distribution/target/{{ airavata_dist_name }}"
dest="{{ registry_dir }}/"
copy=no
+- name: set gfac private ip
+ set_fact:
+ registry_host: "{{ ansible_eth0.ipv4.address }}"
+
- name: Copy Airavata server properties file
template: src=airavata-server.properties.j2
dest="{{ registry_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
@@ -39,7 +43,7 @@
- name: Open firwall ports
firewalld: port="{{ registry_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
- become: yes
+ become_user: root
- name: stop registry
command: ./bin/airavata-server-stop.sh -f
http://git-wip-us.apache.org/repos/asf/airavata/blob/2ab5a723/site.yml
----------------------------------------------------------------------
diff --git a/site.yml b/site.yml
index 036229c..69ff15b 100644
--- a/site.yml
+++ b/site.yml
@@ -14,41 +14,58 @@
- rabbitmq
- hosts: database
- tags: mysql
+ tags: mysql , airavata
roles:
- env_setup
- - database
+ - role: database
+ become: yes
+ become_user: "{{user}}"
- hosts: wso2is
tags: wso2is
roles:
- env_setup
- java
- - wso2_is
+ - role: wso2_is
+ become: yes
+ become_user: "{{user}}"
+
- hosts: gfac
tags: gfac, airavata
roles:
- env_setup
- java
- - common
- - gfac
+ - role: common
+ become: yes
+ become_user: "{{user}}"
+ - role: gfac
+ become: yes
+ become_user: "{{user}}"
- hosts: api-orch
tags: api-orch, airavata
roles:
- env_setup
- java
- - common
- - api-orch
+ - role: common
+ become: yes
+ become_user: "{{user}}"
+ - role: api-orch
+ become: yes
+ become_user: "{{user}}"
- hosts: registry
tags: registry, airavata
roles:
- env_setup
- java
- - common
- - registry
+ - role: common
+ become: yes
+ become_user: "{{user}}"
+ - role: registry
+ become: yes
+ become_user: "{{user}}"
- hosts: pga
tags: pga
[44/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
deleted file mode 100644
index 0c1d447..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
+++ /dev/null
@@ -1,1511 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
-public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, java.io.Serializable, Cloneable, Comparable<Entity> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entity");
-
- private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField ENTITY_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField PARENT_ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentEntityId", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)8);
- private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)9);
- 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)10);
- 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)11);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new EntityStandardSchemeFactory());
- schemes.put(TupleScheme.class, new EntityTupleSchemeFactory());
- }
-
- public String entityId; // optional
- public String domainId; // optional
- public String entityTypeId; // optional
- public String ownerId; // optional
- public String parentEntityId; // optional
- public String name; // optional
- public String description; // optional
- public Map<String,String> metadata; // optional
- public String fullText; // optional
- public long createdTime; // optional
- public long updatedTime; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ENTITY_ID((short)1, "entityId"),
- DOMAIN_ID((short)2, "domainId"),
- ENTITY_TYPE_ID((short)3, "entityTypeId"),
- OWNER_ID((short)4, "ownerId"),
- PARENT_ENTITY_ID((short)5, "parentEntityId"),
- NAME((short)6, "name"),
- DESCRIPTION((short)7, "description"),
- METADATA((short)8, "metadata"),
- FULL_TEXT((short)9, "fullText"),
- CREATED_TIME((short)10, "createdTime"),
- UPDATED_TIME((short)11, "updatedTime");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ENTITY_ID
- return ENTITY_ID;
- case 2: // DOMAIN_ID
- return DOMAIN_ID;
- case 3: // ENTITY_TYPE_ID
- return ENTITY_TYPE_ID;
- case 4: // OWNER_ID
- return OWNER_ID;
- case 5: // PARENT_ENTITY_ID
- return PARENT_ENTITY_ID;
- case 6: // NAME
- return NAME;
- case 7: // DESCRIPTION
- return DESCRIPTION;
- case 8: // METADATA
- return METADATA;
- case 9: // FULL_TEXT
- return FULL_TEXT;
- case 10: // CREATED_TIME
- return CREATED_TIME;
- case 11: // UPDATED_TIME
- return UPDATED_TIME;
- 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 __CREATEDTIME_ISSET_ID = 0;
- private static final int __UPDATEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.ENTITY_ID,_Fields.DOMAIN_ID,_Fields.ENTITY_TYPE_ID,_Fields.OWNER_ID,_Fields.PARENT_ENTITY_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.METADATA,_Fields.FULL_TEXT,_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);
- tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PARENT_ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("parentEntityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.FULL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("fullText", 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Entity.class, metaDataMap);
- }
-
- public Entity() {
- this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public Entity(Entity other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetEntityId()) {
- this.entityId = other.entityId;
- }
- if (other.isSetDomainId()) {
- this.domainId = other.domainId;
- }
- if (other.isSetEntityTypeId()) {
- this.entityTypeId = other.entityTypeId;
- }
- if (other.isSetOwnerId()) {
- this.ownerId = other.ownerId;
- }
- if (other.isSetParentEntityId()) {
- this.parentEntityId = other.parentEntityId;
- }
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- if (other.isSetMetadata()) {
- Map<String,String> __this__metadata = new HashMap<String,String>(other.metadata);
- this.metadata = __this__metadata;
- }
- if (other.isSetFullText()) {
- this.fullText = other.fullText;
- }
- this.createdTime = other.createdTime;
- this.updatedTime = other.updatedTime;
- }
-
- public Entity deepCopy() {
- return new Entity(this);
- }
-
- @Override
- public void clear() {
- this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- this.domainId = null;
- this.entityTypeId = null;
- this.ownerId = null;
- this.parentEntityId = null;
- this.name = null;
- this.description = null;
- this.metadata = null;
- this.fullText = null;
- setCreatedTimeIsSet(false);
- this.createdTime = 0;
- setUpdatedTimeIsSet(false);
- this.updatedTime = 0;
- }
-
- public String getEntityId() {
- return this.entityId;
- }
-
- public Entity setEntityId(String entityId) {
- this.entityId = entityId;
- return this;
- }
-
- public void unsetEntityId() {
- this.entityId = null;
- }
-
- /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
- public boolean isSetEntityId() {
- return this.entityId != null;
- }
-
- public void setEntityIdIsSet(boolean value) {
- if (!value) {
- this.entityId = null;
- }
- }
-
- public String getDomainId() {
- return this.domainId;
- }
-
- public Entity setDomainId(String domainId) {
- this.domainId = domainId;
- return this;
- }
-
- public void unsetDomainId() {
- this.domainId = null;
- }
-
- /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
- public boolean isSetDomainId() {
- return this.domainId != null;
- }
-
- public void setDomainIdIsSet(boolean value) {
- if (!value) {
- this.domainId = null;
- }
- }
-
- public String getEntityTypeId() {
- return this.entityTypeId;
- }
-
- public Entity 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 String getOwnerId() {
- return this.ownerId;
- }
-
- public Entity setOwnerId(String ownerId) {
- this.ownerId = ownerId;
- return this;
- }
-
- public void unsetOwnerId() {
- this.ownerId = null;
- }
-
- /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
- public boolean isSetOwnerId() {
- return this.ownerId != null;
- }
-
- public void setOwnerIdIsSet(boolean value) {
- if (!value) {
- this.ownerId = null;
- }
- }
-
- public String getParentEntityId() {
- return this.parentEntityId;
- }
-
- public Entity setParentEntityId(String parentEntityId) {
- this.parentEntityId = parentEntityId;
- return this;
- }
-
- public void unsetParentEntityId() {
- this.parentEntityId = null;
- }
-
- /** Returns true if field parentEntityId is set (has been assigned a value) and false otherwise */
- public boolean isSetParentEntityId() {
- return this.parentEntityId != null;
- }
-
- public void setParentEntityIdIsSet(boolean value) {
- if (!value) {
- this.parentEntityId = null;
- }
- }
-
- public String getName() {
- return this.name;
- }
-
- public Entity setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public Entity setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public int getMetadataSize() {
- return (this.metadata == null) ? 0 : this.metadata.size();
- }
-
- public void putToMetadata(String key, String val) {
- if (this.metadata == null) {
- this.metadata = new HashMap<String,String>();
- }
- this.metadata.put(key, val);
- }
-
- public Map<String,String> getMetadata() {
- return this.metadata;
- }
-
- public Entity setMetadata(Map<String,String> metadata) {
- this.metadata = metadata;
- return this;
- }
-
- public void unsetMetadata() {
- this.metadata = null;
- }
-
- /** Returns true if field metadata is set (has been assigned a value) and false otherwise */
- public boolean isSetMetadata() {
- return this.metadata != null;
- }
-
- public void setMetadataIsSet(boolean value) {
- if (!value) {
- this.metadata = null;
- }
- }
-
- public String getFullText() {
- return this.fullText;
- }
-
- public Entity setFullText(String fullText) {
- this.fullText = fullText;
- return this;
- }
-
- public void unsetFullText() {
- this.fullText = null;
- }
-
- /** Returns true if field fullText is set (has been assigned a value) and false otherwise */
- public boolean isSetFullText() {
- return this.fullText != null;
- }
-
- public void setFullTextIsSet(boolean value) {
- if (!value) {
- this.fullText = null;
- }
- }
-
- public long getCreatedTime() {
- return this.createdTime;
- }
-
- public Entity setCreatedTime(long createdTime) {
- this.createdTime = createdTime;
- setCreatedTimeIsSet(true);
- return this;
- }
-
- public void unsetCreatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- public void setCreatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
- }
-
- public long getUpdatedTime() {
- return this.updatedTime;
- }
-
- public Entity setUpdatedTime(long updatedTime) {
- this.updatedTime = updatedTime;
- setUpdatedTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- public void setUpdatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ENTITY_ID:
- if (value == null) {
- unsetEntityId();
- } else {
- setEntityId((String)value);
- }
- break;
-
- case DOMAIN_ID:
- if (value == null) {
- unsetDomainId();
- } else {
- setDomainId((String)value);
- }
- break;
-
- case ENTITY_TYPE_ID:
- if (value == null) {
- unsetEntityTypeId();
- } else {
- setEntityTypeId((String)value);
- }
- break;
-
- case OWNER_ID:
- if (value == null) {
- unsetOwnerId();
- } else {
- setOwnerId((String)value);
- }
- break;
-
- case PARENT_ENTITY_ID:
- if (value == null) {
- unsetParentEntityId();
- } else {
- setParentEntityId((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case METADATA:
- if (value == null) {
- unsetMetadata();
- } else {
- setMetadata((Map<String,String>)value);
- }
- break;
-
- case FULL_TEXT:
- if (value == null) {
- unsetFullText();
- } else {
- setFullText((String)value);
- }
- break;
-
- case CREATED_TIME:
- if (value == null) {
- unsetCreatedTime();
- } else {
- setCreatedTime((Long)value);
- }
- break;
-
- case UPDATED_TIME:
- if (value == null) {
- unsetUpdatedTime();
- } else {
- setUpdatedTime((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ENTITY_ID:
- return getEntityId();
-
- case DOMAIN_ID:
- return getDomainId();
-
- case ENTITY_TYPE_ID:
- return getEntityTypeId();
-
- case OWNER_ID:
- return getOwnerId();
-
- case PARENT_ENTITY_ID:
- return getParentEntityId();
-
- case NAME:
- return getName();
-
- case DESCRIPTION:
- return getDescription();
-
- case METADATA:
- return getMetadata();
-
- case FULL_TEXT:
- return getFullText();
-
- case CREATED_TIME:
- return getCreatedTime();
-
- case UPDATED_TIME:
- return getUpdatedTime();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ENTITY_ID:
- return isSetEntityId();
- case DOMAIN_ID:
- return isSetDomainId();
- case ENTITY_TYPE_ID:
- return isSetEntityTypeId();
- case OWNER_ID:
- return isSetOwnerId();
- case PARENT_ENTITY_ID:
- return isSetParentEntityId();
- case NAME:
- return isSetName();
- case DESCRIPTION:
- return isSetDescription();
- case METADATA:
- return isSetMetadata();
- case FULL_TEXT:
- return isSetFullText();
- case CREATED_TIME:
- return isSetCreatedTime();
- case UPDATED_TIME:
- return isSetUpdatedTime();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof Entity)
- return this.equals((Entity)that);
- return false;
- }
-
- public boolean equals(Entity that) {
- if (that == null)
- return false;
-
- boolean this_present_entityId = true && this.isSetEntityId();
- boolean that_present_entityId = true && that.isSetEntityId();
- if (this_present_entityId || that_present_entityId) {
- if (!(this_present_entityId && that_present_entityId))
- return false;
- if (!this.entityId.equals(that.entityId))
- return false;
- }
-
- boolean this_present_domainId = true && this.isSetDomainId();
- boolean that_present_domainId = true && that.isSetDomainId();
- if (this_present_domainId || that_present_domainId) {
- if (!(this_present_domainId && that_present_domainId))
- return false;
- if (!this.domainId.equals(that.domainId))
- 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;
- }
-
- boolean this_present_ownerId = true && this.isSetOwnerId();
- boolean that_present_ownerId = true && that.isSetOwnerId();
- if (this_present_ownerId || that_present_ownerId) {
- if (!(this_present_ownerId && that_present_ownerId))
- return false;
- if (!this.ownerId.equals(that.ownerId))
- return false;
- }
-
- boolean this_present_parentEntityId = true && this.isSetParentEntityId();
- boolean that_present_parentEntityId = true && that.isSetParentEntityId();
- if (this_present_parentEntityId || that_present_parentEntityId) {
- if (!(this_present_parentEntityId && that_present_parentEntityId))
- return false;
- if (!this.parentEntityId.equals(that.parentEntityId))
- return false;
- }
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- boolean this_present_metadata = true && this.isSetMetadata();
- boolean that_present_metadata = true && that.isSetMetadata();
- if (this_present_metadata || that_present_metadata) {
- if (!(this_present_metadata && that_present_metadata))
- return false;
- if (!this.metadata.equals(that.metadata))
- return false;
- }
-
- boolean this_present_fullText = true && this.isSetFullText();
- boolean that_present_fullText = true && that.isSetFullText();
- if (this_present_fullText || that_present_fullText) {
- if (!(this_present_fullText && that_present_fullText))
- return false;
- if (!this.fullText.equals(that.fullText))
- return false;
- }
-
- boolean this_present_createdTime = true && this.isSetCreatedTime();
- boolean that_present_createdTime = true && that.isSetCreatedTime();
- if (this_present_createdTime || that_present_createdTime) {
- if (!(this_present_createdTime && that_present_createdTime))
- return false;
- if (this.createdTime != that.createdTime)
- return false;
- }
-
- boolean this_present_updatedTime = true && this.isSetUpdatedTime();
- boolean that_present_updatedTime = true && that.isSetUpdatedTime();
- if (this_present_updatedTime || that_present_updatedTime) {
- if (!(this_present_updatedTime && that_present_updatedTime))
- return false;
- if (this.updatedTime != that.updatedTime)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_entityId = true && (isSetEntityId());
- list.add(present_entityId);
- if (present_entityId)
- list.add(entityId);
-
- boolean present_domainId = true && (isSetDomainId());
- list.add(present_domainId);
- if (present_domainId)
- list.add(domainId);
-
- boolean present_entityTypeId = true && (isSetEntityTypeId());
- list.add(present_entityTypeId);
- if (present_entityTypeId)
- list.add(entityTypeId);
-
- boolean present_ownerId = true && (isSetOwnerId());
- list.add(present_ownerId);
- if (present_ownerId)
- list.add(ownerId);
-
- boolean present_parentEntityId = true && (isSetParentEntityId());
- list.add(present_parentEntityId);
- if (present_parentEntityId)
- list.add(parentEntityId);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- boolean present_metadata = true && (isSetMetadata());
- list.add(present_metadata);
- if (present_metadata)
- list.add(metadata);
-
- boolean present_fullText = true && (isSetFullText());
- list.add(present_fullText);
- if (present_fullText)
- list.add(fullText);
-
- boolean present_createdTime = true && (isSetCreatedTime());
- list.add(present_createdTime);
- if (present_createdTime)
- list.add(createdTime);
-
- boolean present_updatedTime = true && (isSetUpdatedTime());
- list.add(present_updatedTime);
- if (present_updatedTime)
- list.add(updatedTime);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(Entity other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(other.isSetEntityId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetEntityId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, other.entityId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDomainId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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;
- }
- }
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOwnerId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetParentEntityId()).compareTo(other.isSetParentEntityId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetParentEntityId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentEntityId, other.parentEntityId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMetadata()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFullText()).compareTo(other.isSetFullText());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFullText()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullText, other.fullText);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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("Entity(");
- boolean first = true;
-
- if (isSetEntityId()) {
- sb.append("entityId:");
- if (this.entityId == null) {
- sb.append("null");
- } else {
- sb.append(this.entityId);
- }
- first = false;
- }
- if (isSetDomainId()) {
- if (!first) sb.append(", ");
- sb.append("domainId:");
- if (this.domainId == null) {
- sb.append("null");
- } else {
- sb.append(this.domainId);
- }
- first = false;
- }
- if (isSetEntityTypeId()) {
- if (!first) sb.append(", ");
- sb.append("entityTypeId:");
- if (this.entityTypeId == null) {
- sb.append("null");
- } else {
- sb.append(this.entityTypeId);
- }
- first = false;
- }
- if (isSetOwnerId()) {
- if (!first) sb.append(", ");
- sb.append("ownerId:");
- if (this.ownerId == null) {
- sb.append("null");
- } else {
- sb.append(this.ownerId);
- }
- first = false;
- }
- if (isSetParentEntityId()) {
- if (!first) sb.append(", ");
- sb.append("parentEntityId:");
- if (this.parentEntityId == null) {
- sb.append("null");
- } else {
- sb.append(this.parentEntityId);
- }
- first = false;
- }
- if (isSetName()) {
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- }
- if (isSetDescription()) {
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- }
- if (isSetMetadata()) {
- if (!first) sb.append(", ");
- sb.append("metadata:");
- if (this.metadata == null) {
- sb.append("null");
- } else {
- sb.append(this.metadata);
- }
- first = false;
- }
- if (isSetFullText()) {
- if (!first) sb.append(", ");
- sb.append("fullText:");
- if (this.fullText == null) {
- sb.append("null");
- } else {
- sb.append(this.fullText);
- }
- first = false;
- }
- if (isSetCreatedTime()) {
- if (!first) sb.append(", ");
- sb.append("createdTime:");
- sb.append(this.createdTime);
- first = false;
- }
- if (isSetUpdatedTime()) {
- if (!first) sb.append(", ");
- sb.append("updatedTime:");
- sb.append(this.updatedTime);
- 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 EntityStandardSchemeFactory implements SchemeFactory {
- public EntityStandardScheme getScheme() {
- return new EntityStandardScheme();
- }
- }
-
- private static class EntityStandardScheme extends StandardScheme<Entity> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, Entity struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ENTITY_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.entityId = iprot.readString();
- struct.setEntityIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DOMAIN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // ENTITY_TYPE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.entityTypeId = iprot.readString();
- struct.setEntityTypeIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // OWNER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.ownerId = iprot.readString();
- struct.setOwnerIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // PARENT_ENTITY_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.parentEntityId = iprot.readString();
- struct.setParentEntityIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // METADATA
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
- struct.metadata = new HashMap<String,String>(2*_map0.size);
- String _key1;
- String _val2;
- for (int _i3 = 0; _i3 < _map0.size; ++_i3)
- {
- _key1 = iprot.readString();
- _val2 = iprot.readString();
- struct.metadata.put(_key1, _val2);
- }
- iprot.readMapEnd();
- }
- struct.setMetadataIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // FULL_TEXT
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.fullText = iprot.readString();
- struct.setFullTextIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // CREATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // UPDATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(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, Entity struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.entityId != null) {
- if (struct.isSetEntityId()) {
- oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
- oprot.writeString(struct.entityId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.domainId != null) {
- if (struct.isSetDomainId()) {
- oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
- oprot.writeString(struct.domainId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.entityTypeId != null) {
- if (struct.isSetEntityTypeId()) {
- oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
- oprot.writeString(struct.entityTypeId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.ownerId != null) {
- if (struct.isSetOwnerId()) {
- oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
- oprot.writeString(struct.ownerId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.parentEntityId != null) {
- if (struct.isSetParentEntityId()) {
- oprot.writeFieldBegin(PARENT_ENTITY_ID_FIELD_DESC);
- oprot.writeString(struct.parentEntityId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.name != null) {
- if (struct.isSetName()) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- }
- if (struct.description != null) {
- if (struct.isSetDescription()) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- }
- if (struct.metadata != null) {
- if (struct.isSetMetadata()) {
- oprot.writeFieldBegin(METADATA_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
- for (Map.Entry<String, String> _iter4 : struct.metadata.entrySet())
- {
- oprot.writeString(_iter4.getKey());
- oprot.writeString(_iter4.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (struct.fullText != null) {
- if (struct.isSetFullText()) {
- oprot.writeFieldBegin(FULL_TEXT_FIELD_DESC);
- oprot.writeString(struct.fullText);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.createdTime);
- oprot.writeFieldEnd();
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.updatedTime);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class EntityTupleSchemeFactory implements SchemeFactory {
- public EntityTupleScheme getScheme() {
- return new EntityTupleScheme();
- }
- }
-
- private static class EntityTupleScheme extends TupleScheme<Entity> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetEntityId()) {
- optionals.set(0);
- }
- if (struct.isSetDomainId()) {
- optionals.set(1);
- }
- if (struct.isSetEntityTypeId()) {
- optionals.set(2);
- }
- if (struct.isSetOwnerId()) {
- optionals.set(3);
- }
- if (struct.isSetParentEntityId()) {
- optionals.set(4);
- }
- if (struct.isSetName()) {
- optionals.set(5);
- }
- if (struct.isSetDescription()) {
- optionals.set(6);
- }
- if (struct.isSetMetadata()) {
- optionals.set(7);
- }
- if (struct.isSetFullText()) {
- optionals.set(8);
- }
- if (struct.isSetCreatedTime()) {
- optionals.set(9);
- }
- if (struct.isSetUpdatedTime()) {
- optionals.set(10);
- }
- oprot.writeBitSet(optionals, 11);
- if (struct.isSetEntityId()) {
- oprot.writeString(struct.entityId);
- }
- if (struct.isSetDomainId()) {
- oprot.writeString(struct.domainId);
- }
- if (struct.isSetEntityTypeId()) {
- oprot.writeString(struct.entityTypeId);
- }
- if (struct.isSetOwnerId()) {
- oprot.writeString(struct.ownerId);
- }
- if (struct.isSetParentEntityId()) {
- oprot.writeString(struct.parentEntityId);
- }
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetMetadata()) {
- {
- oprot.writeI32(struct.metadata.size());
- for (Map.Entry<String, String> _iter5 : struct.metadata.entrySet())
- {
- oprot.writeString(_iter5.getKey());
- oprot.writeString(_iter5.getValue());
- }
- }
- }
- if (struct.isSetFullText()) {
- oprot.writeString(struct.fullText);
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeI64(struct.createdTime);
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeI64(struct.updatedTime);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(11);
- if (incoming.get(0)) {
- struct.entityId = iprot.readString();
- struct.setEntityIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- }
- if (incoming.get(2)) {
- struct.entityTypeId = iprot.readString();
- struct.setEntityTypeIdIsSet(true);
- }
- if (incoming.get(3)) {
- struct.ownerId = iprot.readString();
- struct.setOwnerIdIsSet(true);
- }
- if (incoming.get(4)) {
- struct.parentEntityId = iprot.readString();
- struct.setParentEntityIdIsSet(true);
- }
- if (incoming.get(5)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(6)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(7)) {
- {
- org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.metadata = new HashMap<String,String>(2*_map6.size);
- String _key7;
- String _val8;
- for (int _i9 = 0; _i9 < _map6.size; ++_i9)
- {
- _key7 = iprot.readString();
- _val8 = iprot.readString();
- struct.metadata.put(_key7, _val8);
- }
- }
- struct.setMetadataIsSet(true);
- }
- if (incoming.get(8)) {
- struct.fullText = iprot.readString();
- struct.setFullTextIsSet(true);
- }
- if (incoming.get(9)) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- }
- if (incoming.get(10)) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
deleted file mode 100644
index 3585243..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
+++ /dev/null
@@ -1,924 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
-public class EntityType implements org.apache.thrift.TBase<EntityType, EntityType._Fields>, java.io.Serializable, Cloneable, Comparable<EntityType> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EntityType");
-
- 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 org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
- 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)5);
- 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)6);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new EntityTypeStandardSchemeFactory());
- schemes.put(TupleScheme.class, new EntityTypeTupleSchemeFactory());
- }
-
- public String entityTypeId; // optional
- public String domainId; // optional
- public String name; // optional
- public String description; // optional
- public long createdTime; // optional
- public long updatedTime; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ENTITY_TYPE_ID((short)1, "entityTypeId"),
- DOMAIN_ID((short)2, "domainId"),
- NAME((short)3, "name"),
- DESCRIPTION((short)4, "description"),
- CREATED_TIME((short)5, "createdTime"),
- UPDATED_TIME((short)6, "updatedTime");
-
- 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;
- case 2: // DOMAIN_ID
- return DOMAIN_ID;
- case 3: // NAME
- return NAME;
- case 4: // DESCRIPTION
- return DESCRIPTION;
- case 5: // CREATED_TIME
- return CREATED_TIME;
- case 6: // UPDATED_TIME
- return UPDATED_TIME;
- 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 __CREATEDTIME_ISSET_ID = 0;
- private static final int __UPDATEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.ENTITY_TYPE_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
- tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EntityType.class, metaDataMap);
- }
-
- public EntityType() {
- this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public EntityType(EntityType other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetEntityTypeId()) {
- this.entityTypeId = other.entityTypeId;
- }
- if (other.isSetDomainId()) {
- this.domainId = other.domainId;
- }
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- this.createdTime = other.createdTime;
- this.updatedTime = other.updatedTime;
- }
-
- public EntityType deepCopy() {
- return new EntityType(this);
- }
-
- @Override
- public void clear() {
- this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- this.domainId = null;
- this.name = null;
- this.description = null;
- setCreatedTimeIsSet(false);
- this.createdTime = 0;
- setUpdatedTimeIsSet(false);
- this.updatedTime = 0;
- }
-
- public String getEntityTypeId() {
- return this.entityTypeId;
- }
-
- public EntityType 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 String getDomainId() {
- return this.domainId;
- }
-
- public EntityType setDomainId(String domainId) {
- this.domainId = domainId;
- return this;
- }
-
- public void unsetDomainId() {
- this.domainId = null;
- }
-
- /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
- public boolean isSetDomainId() {
- return this.domainId != null;
- }
-
- public void setDomainIdIsSet(boolean value) {
- if (!value) {
- this.domainId = null;
- }
- }
-
- public String getName() {
- return this.name;
- }
-
- public EntityType setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public EntityType setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public long getCreatedTime() {
- return this.createdTime;
- }
-
- public EntityType setCreatedTime(long createdTime) {
- this.createdTime = createdTime;
- setCreatedTimeIsSet(true);
- return this;
- }
-
- public void unsetCreatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- public void setCreatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
- }
-
- public long getUpdatedTime() {
- return this.updatedTime;
- }
-
- public EntityType setUpdatedTime(long updatedTime) {
- this.updatedTime = updatedTime;
- setUpdatedTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- public void setUpdatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ENTITY_TYPE_ID:
- if (value == null) {
- unsetEntityTypeId();
- } else {
- setEntityTypeId((String)value);
- }
- break;
-
- case DOMAIN_ID:
- if (value == null) {
- unsetDomainId();
- } else {
- setDomainId((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case CREATED_TIME:
- if (value == null) {
- unsetCreatedTime();
- } else {
- setCreatedTime((Long)value);
- }
- break;
-
- case UPDATED_TIME:
- if (value == null) {
- unsetUpdatedTime();
- } else {
- setUpdatedTime((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ENTITY_TYPE_ID:
- return getEntityTypeId();
-
- case DOMAIN_ID:
- return getDomainId();
-
- case NAME:
- return getName();
-
- case DESCRIPTION:
- return getDescription();
-
- case CREATED_TIME:
- return getCreatedTime();
-
- case UPDATED_TIME:
- return getUpdatedTime();
-
- }
- 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();
- case DOMAIN_ID:
- return isSetDomainId();
- case NAME:
- return isSetName();
- case DESCRIPTION:
- return isSetDescription();
- case CREATED_TIME:
- return isSetCreatedTime();
- case UPDATED_TIME:
- return isSetUpdatedTime();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof EntityType)
- return this.equals((EntityType)that);
- return false;
- }
-
- public boolean equals(EntityType 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;
- }
-
- boolean this_present_domainId = true && this.isSetDomainId();
- boolean that_present_domainId = true && that.isSetDomainId();
- if (this_present_domainId || that_present_domainId) {
- if (!(this_present_domainId && that_present_domainId))
- return false;
- if (!this.domainId.equals(that.domainId))
- return false;
- }
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- boolean this_present_createdTime = true && this.isSetCreatedTime();
- boolean that_present_createdTime = true && that.isSetCreatedTime();
- if (this_present_createdTime || that_present_createdTime) {
- if (!(this_present_createdTime && that_present_createdTime))
- return false;
- if (this.createdTime != that.createdTime)
- return false;
- }
-
- boolean this_present_updatedTime = true && this.isSetUpdatedTime();
- boolean that_present_updatedTime = true && that.isSetUpdatedTime();
- if (this_present_updatedTime || that_present_updatedTime) {
- if (!(this_present_updatedTime && that_present_updatedTime))
- return false;
- if (this.updatedTime != that.updatedTime)
- 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);
-
- boolean present_domainId = true && (isSetDomainId());
- list.add(present_domainId);
- if (present_domainId)
- list.add(domainId);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- boolean present_createdTime = true && (isSetCreatedTime());
- list.add(present_createdTime);
- if (present_createdTime)
- list.add(createdTime);
-
- boolean present_updatedTime = true && (isSetUpdatedTime());
- list.add(present_updatedTime);
- if (present_updatedTime)
- list.add(updatedTime);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(EntityType 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;
- }
- }
- lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDomainId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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("EntityType(");
- boolean first = true;
-
- if (isSetEntityTypeId()) {
- sb.append("entityTypeId:");
- if (this.entityTypeId == null) {
- sb.append("null");
- } else {
- sb.append(this.entityTypeId);
- }
- first = false;
- }
- if (isSetDomainId()) {
- if (!first) sb.append(", ");
- sb.append("domainId:");
- if (this.domainId == null) {
- sb.append("null");
- } else {
- sb.append(this.domainId);
- }
- first = false;
- }
- if (isSetName()) {
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- }
- if (isSetDescription()) {
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- }
- if (isSetCreatedTime()) {
- if (!first) sb.append(", ");
- sb.append("createdTime:");
- sb.append(this.createdTime);
- first = false;
- }
- if (isSetUpdatedTime()) {
- if (!first) sb.append(", ");
- sb.append("updatedTime:");
- sb.append(this.updatedTime);
- 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 EntityTypeStandardSchemeFactory implements SchemeFactory {
- public EntityTypeStandardScheme getScheme() {
- return new EntityTypeStandardScheme();
- }
- }
-
- private static class EntityTypeStandardScheme extends StandardScheme<EntityType> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, EntityType 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;
- case 2: // DOMAIN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // CREATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // UPDATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(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, EntityType struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.entityTypeId != null) {
- if (struct.isSetEntityTypeId()) {
- oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
- oprot.writeString(struct.entityTypeId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.domainId != null) {
- if (struct.isSetDomainId()) {
- oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
- oprot.writeString(struct.domainId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.name != null) {
- if (struct.isSetName()) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- }
- if (struct.description != null) {
- if (struct.isSetDescription()) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.createdTime);
- oprot.writeFieldEnd();
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.updatedTime);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class EntityTypeTupleSchemeFactory implements SchemeFactory {
- public EntityTypeTupleScheme getScheme() {
- return new EntityTypeTupleScheme();
- }
- }
-
- private static class EntityTypeTupleScheme extends TupleScheme<EntityType> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, EntityType struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetEntityTypeId()) {
- optionals.set(0);
- }
- if (struct.isSetDomainId()) {
- optionals.set(1);
- }
- if (struct.isSetName()) {
- optionals.set(2);
- }
- if (struct.isSetDescription()) {
- optionals.set(3);
- }
- if (struct.isSetCreatedTime()) {
- optionals.set(4);
- }
- if (struct.isSetUpdatedTime()) {
- optionals.set(5);
- }
- oprot.writeBitSet(optionals, 6);
- if (struct.isSetEntityTypeId()) {
- oprot.writeString(struct.entityTypeId);
- }
- if (struct.isSetDomainId()) {
- oprot.writeString(struct.domainId);
- }
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeI64(struct.createdTime);
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeI64(struct.updatedTime);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, EntityType struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
- if (incoming.get(0)) {
- struct.entityTypeId = iprot.readString();
- struct.setEntityTypeIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- }
- if (incoming.get(2)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(4)) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- }
- if (incoming.get(5)) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- }
- }
- }
-
-}
-
[38/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
new file mode 100644
index 0000000..3585243
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/EntityType.java
@@ -0,0 +1,924 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class EntityType implements org.apache.thrift.TBase<EntityType, EntityType._Fields>, java.io.Serializable, Cloneable, Comparable<EntityType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EntityType");
+
+ 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 org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
+ 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)5);
+ 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)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EntityTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EntityTypeTupleSchemeFactory());
+ }
+
+ public String entityTypeId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ENTITY_TYPE_ID((short)1, "entityTypeId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)4, "description"),
+ CREATED_TIME((short)5, "createdTime"),
+ UPDATED_TIME((short)6, "updatedTime");
+
+ 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;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 4: // DESCRIPTION
+ return DESCRIPTION;
+ case 5: // CREATED_TIME
+ return CREATED_TIME;
+ case 6: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.ENTITY_TYPE_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
+ tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EntityType.class, metaDataMap);
+ }
+
+ public EntityType() {
+ this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public EntityType(EntityType other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public EntityType deepCopy() {
+ return new EntityType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ this.description = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public EntityType 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 String getDomainId() {
+ return this.domainId;
+ }
+
+ public EntityType setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public EntityType setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public EntityType setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public EntityType setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public EntityType setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof EntityType)
+ return this.equals((EntityType)that);
+ return false;
+ }
+
+ public boolean equals(EntityType 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;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ 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);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(EntityType 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("EntityType(");
+ boolean first = true;
+
+ if (isSetEntityTypeId()) {
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 EntityTypeStandardSchemeFactory implements SchemeFactory {
+ public EntityTypeStandardScheme getScheme() {
+ return new EntityTypeStandardScheme();
+ }
+ }
+
+ private static class EntityTypeStandardScheme extends StandardScheme<EntityType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, EntityType 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;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, EntityType struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.entityTypeId != null) {
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EntityTypeTupleSchemeFactory implements SchemeFactory {
+ public EntityTypeTupleScheme getScheme() {
+ return new EntityTypeTupleScheme();
+ }
+ }
+
+ private static class EntityTypeTupleScheme extends TupleScheme<EntityType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, EntityType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetEntityTypeId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(3);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(4);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeString(struct.entityTypeId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, EntityType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
new file mode 100644
index 0000000..d265c23
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GovRegistryException.java
@@ -0,0 +1,391 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class GovRegistryException extends TException implements org.apache.thrift.TBase<GovRegistryException, GovRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<GovRegistryException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GovRegistryException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 GovRegistryExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GovRegistryExceptionTupleSchemeFactory());
+ }
+
+ public String message; // 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 {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(GovRegistryException.class, metaDataMap);
+ }
+
+ public GovRegistryException() {
+ }
+
+ public GovRegistryException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GovRegistryException(GovRegistryException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public GovRegistryException deepCopy() {
+ return new GovRegistryException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public GovRegistryException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GovRegistryException)
+ return this.equals((GovRegistryException)that);
+ return false;
+ }
+
+ public boolean equals(GovRegistryException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_message = true && (isSetMessage());
+ list.add(present_message);
+ if (present_message)
+ list.add(message);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GovRegistryException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("GovRegistryException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' 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 GovRegistryExceptionStandardSchemeFactory implements SchemeFactory {
+ public GovRegistryExceptionStandardScheme getScheme() {
+ return new GovRegistryExceptionStandardScheme();
+ }
+ }
+
+ private static class GovRegistryExceptionStandardScheme extends StandardScheme<GovRegistryException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GovRegistryException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, GovRegistryException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GovRegistryExceptionTupleSchemeFactory implements SchemeFactory {
+ public GovRegistryExceptionTupleScheme getScheme() {
+ return new GovRegistryExceptionTupleScheme();
+ }
+ }
+
+ private static class GovRegistryExceptionTupleScheme extends TupleScheme<GovRegistryException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GovRegistryException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GovRegistryException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.java
new file mode 100644
index 0000000..012b95d
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/GroupType.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.gov.registry.models;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum GroupType implements org.apache.thrift.TEnum {
+ SINGLE_USER(0),
+ MULTI_USER(1);
+
+ private final int value;
+
+ private GroupType(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 GroupType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SINGLE_USER;
+ case 1:
+ return MULTI_USER;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
new file mode 100644
index 0000000..717969e
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/PermissionType.java
@@ -0,0 +1,817 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class PermissionType implements org.apache.thrift.TBase<PermissionType, PermissionType._Fields>, java.io.Serializable, Cloneable, Comparable<PermissionType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PermissionType");
+
+ private static final org.apache.thrift.protocol.TField PERMISSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("permissionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new PermissionTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new PermissionTypeTupleSchemeFactory());
+ }
+
+ public String permissionId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PERMISSION_ID((short)1, "permissionId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // PERMISSION_ID
+ return PERMISSION_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.PERMISSION_ID,_Fields.DOMAIN_ID,_Fields.NAME,_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);
+ tmpMap.put(_Fields.PERMISSION_ID, new org.apache.thrift.meta_data.FieldMetaData("permissionId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PermissionType.class, metaDataMap);
+ }
+
+ public PermissionType() {
+ this.permissionId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public PermissionType(PermissionType other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetPermissionId()) {
+ this.permissionId = other.permissionId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public PermissionType deepCopy() {
+ return new PermissionType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.permissionId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getPermissionId() {
+ return this.permissionId;
+ }
+
+ public PermissionType setPermissionId(String permissionId) {
+ this.permissionId = permissionId;
+ return this;
+ }
+
+ public void unsetPermissionId() {
+ this.permissionId = null;
+ }
+
+ /** Returns true if field permissionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetPermissionId() {
+ return this.permissionId != null;
+ }
+
+ public void setPermissionIdIsSet(boolean value) {
+ if (!value) {
+ this.permissionId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public PermissionType setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public PermissionType setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public PermissionType setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public PermissionType setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PERMISSION_ID:
+ if (value == null) {
+ unsetPermissionId();
+ } else {
+ setPermissionId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PERMISSION_ID:
+ return getPermissionId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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_ID:
+ return isSetPermissionId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof PermissionType)
+ return this.equals((PermissionType)that);
+ return false;
+ }
+
+ public boolean equals(PermissionType that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_permissionId = true && this.isSetPermissionId();
+ boolean that_present_permissionId = true && that.isSetPermissionId();
+ if (this_present_permissionId || that_present_permissionId) {
+ if (!(this_present_permissionId && that_present_permissionId))
+ return false;
+ if (!this.permissionId.equals(that.permissionId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_permissionId = true && (isSetPermissionId());
+ list.add(present_permissionId);
+ if (present_permissionId)
+ list.add(permissionId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(PermissionType other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetPermissionId()).compareTo(other.isSetPermissionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPermissionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissionId, other.permissionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("PermissionType(");
+ boolean first = true;
+
+ if (isSetPermissionId()) {
+ sb.append("permissionId:");
+ if (this.permissionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.permissionId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 PermissionTypeStandardSchemeFactory implements SchemeFactory {
+ public PermissionTypeStandardScheme getScheme() {
+ return new PermissionTypeStandardScheme();
+ }
+ }
+
+ private static class PermissionTypeStandardScheme extends StandardScheme<PermissionType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, PermissionType 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_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.permissionId = iprot.readString();
+ struct.setPermissionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, PermissionType struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.permissionId != null) {
+ if (struct.isSetPermissionId()) {
+ oprot.writeFieldBegin(PERMISSION_ID_FIELD_DESC);
+ oprot.writeString(struct.permissionId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class PermissionTypeTupleSchemeFactory implements SchemeFactory {
+ public PermissionTypeTupleScheme getScheme() {
+ return new PermissionTypeTupleScheme();
+ }
+ }
+
+ private static class PermissionTypeTupleScheme extends TupleScheme<PermissionType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, PermissionType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetPermissionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetPermissionId()) {
+ oprot.writeString(struct.permissionId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, PermissionType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.permissionId = iprot.readString();
+ struct.setPermissionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
[39/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql b/airavata-gov-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql
new file mode 100644
index 0000000..a9ca3dc
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/main/resources/gov-registry.sql
@@ -0,0 +1,123 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+CREATE TABLE DOMAIN (
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (DOMAIN_ID)
+);
+
+CREATE TABLE USER (
+ USER_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ USER_NAME VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (USER_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
+);
+
+CREATE TABLE USER_GROUP (
+ GROUP_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ OWNER_ID VARCHAR(255),
+ TYPE VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (GROUP_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID),
+ FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID)
+);
+
+
+CREATE TABLE GROUP_MEMBERSHIP (
+ PARENT_ID VARCHAR(255),
+ CHILD_ID VARCHAR(255),
+ CHILD_TYPE VARCHAR(255),
+ PRIMARY KEY (PARENT_ID, CHILD_ID),
+ FOREIGN KEY (PARENT_ID) REFERENCES USER_GROUP(GROUP_ID),
+ FOREIGN KEY (CHILD_ID) REFERENCES USER_GROUP(GROUP_ID)
+);
+
+CREATE TABLE ENTITY_TYPE (
+ ENTITY_TYPE_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (ENTITY_TYPE_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
+);
+
+CREATE TABLE PERMISSION_TYPE (
+ PERMISSION_TYPE_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (PERMISSION_TYPE_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID)
+);
+
+CREATE TABLE ENTITY (
+ ENTITY_ID VARCHAR(255),
+ DOMAIN_ID VARCHAR(255),
+ ENITY_TYPE VARCHAR(255),
+ OWNER_ID VARCHAR(255),
+ PARENT_ENTITY_ID VARCHAR(255),
+ NAME VARCHAR(255),
+ DESCRIPTION VARCHAR(255),
+ METADATA BLOB,
+ FULL_TEXT TEXT,
+ CREATED_TIME LONG,
+ UPDATED_TIME LONG,
+ PRIMARY KEY (ENTITY_ID),
+ FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID),
+ FOREIGN KEY (ENITY_TYPE) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
+ FOREIGN KEY (OWNER_ID) REFERENCES USER(USER_ID),
+ FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID)
+);
+
+CREATE TABLE SHARING (
+ PERMISSION_TYPE_ID VARCHAR(255),
+ ENTITY_TYPE_ID VARCHAR(255),
+ ENTITY_ID VARCHAR(255),
+ GROUP_ID VARCHAR(255),
+ PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID),
+ FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID),
+ FOREIGN KEY (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID),
+ FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID)
+)
+
+CREATE TABLE CONFIGURATION
+(
+ CONFIG_KEY VARCHAR(255),
+ CONFIG_VALUE VARCHAR(255),
+ PRIMARY KEY(CONFIG_KEY, CONFIG_VALUE)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VALUE) VALUES('gov_reg_version', '0.17');
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java b/airavata-gov-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
new file mode 100644
index 0000000..0b0da15
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-core/src/test/java/org/apache/airavata/gov/registry/db/RepositoriesTest.java
@@ -0,0 +1,113 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.gov.registry.db;
+
+import junit.framework.Assert;
+import org.apache.airavata.gov.registry.db.entities.DomainEntity;
+import org.apache.airavata.gov.registry.db.entities.UserEntity;
+import org.apache.airavata.gov.registry.db.repositories.DomainRepository;
+import org.apache.airavata.gov.registry.db.repositories.UserRepository;
+import org.apache.airavata.gov.registry.db.utils.DBConstants;
+import org.apache.airavata.gov.registry.models.Domain;
+import org.apache.airavata.gov.registry.models.GovRegistryException;
+import org.apache.airavata.gov.registry.models.User;
+import org.apache.airavata.gov.registry.models.UserGroup;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class RepositoriesTest {
+ private final static Logger logger = LoggerFactory.getLogger(RepositoriesTest.class);
+
+ @Test
+ public void test() throws GovRegistryException {
+
+ //Creating domain
+ Domain domain = new Domain();
+ String domainId = "test-domain."+System.currentTimeMillis();
+ domain.setDomainId(domainId);
+ domain.setName(domainId);
+ domain.setDescription("test domain description");
+ domain.setCreatedTime(System.currentTimeMillis());
+ domain.setUpdatedTime(System.currentTimeMillis());
+
+ DomainRepository domainRepository = new DomainRepository(Domain.class, DomainEntity.class);
+ domain = domainRepository.create(domain);
+ Assert.assertNotNull(domain);
+
+ Map<String, String> filters = new HashMap<>();
+ filters.put(DBConstants.DomainTable.DESCRIPTION, "test");
+ Assert.assertTrue(domainRepository.select(filters, 0, 10).size() > 0);
+
+
+ //Creating users
+ User user1 = new User();
+ String userName1 = "test-user." + System.currentTimeMillis();
+ String userId1 = domainId + ":" + userName1;
+ user1.setUserId(userId1);
+ user1.setUserName(userName1);
+ user1.setDomainId(domainId);
+ user1.setCreatedTime(System.currentTimeMillis());
+ user1.setUpdatedTime(System.currentTimeMillis());
+
+ UserRepository userRepository = new UserRepository(User.class, UserEntity.class);
+ user1 = userRepository.create(user1);
+ Assert.assertNotNull(user1);
+
+ User user2 = new User();
+ String userName2 = "test-user." + System.currentTimeMillis();
+ String userId2 = domainId + ":" + userName2;
+ user2.setUserId(userId2);
+ user2.setUserName(userName2);
+ user2.setDomainId(domainId);
+ user2.setCreatedTime(System.currentTimeMillis());
+ user2.setUpdatedTime(System.currentTimeMillis());
+
+ User user3 = new User();
+ String userName3 = "test-user." + System.currentTimeMillis();
+ String userId3 = domainId + ":" + userName3;
+ user3.setUserId(userId3);
+ user3.setUserName(userName3);
+ user3.setDomainId(domainId);
+ user3.setCreatedTime(System.currentTimeMillis());
+ user3.setUpdatedTime(System.currentTimeMillis());
+
+ filters = new HashMap<>();
+ filters.put(DBConstants.UserTable.USER_NAME, "test");
+ Assert.assertTrue(userRepository.select(filters, 0, 10).size() > 0);
+
+ //Creating Groups
+ UserGroup userGroup1 = new UserGroup();
+ String groupName1 = "test-group";
+ String groupId1 = domainId + ":" + groupName1 + "." + System.currentTimeMillis();
+ userGroup1.setGroupId(groupId1);
+ userGroup1.setDomainId(domainId);
+ userGroup1.setName(groupName1);
+ userGroup1.setDescription("test group description");
+ userGroup1.setOwnerId(userId1);
+ userGroup1.setCreatedTime(System.currentTimeMillis());
+ userGroup1.setUpdatedTime(System.currentTimeMillis());
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/pom.xml b/airavata-gov-registry/airavata-sharing-registry-stubs/pom.xml
new file mode 100644
index 0000000..51aab58
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>gov-registry</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <relativePath>../pom.xml</relativePath>
+ <version>${global.version}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>airavata-gov-registry-stubs</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>0.9.3</version>
+ </dependency>
+ </dependencies>
+
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
new file mode 100644
index 0000000..a373892
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Domain.java
@@ -0,0 +1,800 @@
+/**
+ * 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.gov.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 javax.annotation.Generated;
+import java.util.*;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class Domain implements org.apache.thrift.TBase<Domain, Domain._Fields>, java.io.Serializable, Cloneable, Comparable<Domain> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Domain");
+
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new DomainStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DomainTupleSchemeFactory());
+ }
+
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ DOMAIN_ID((short)1, "domainId"),
+ NAME((short)2, "name"),
+ DESCRIPTION((short)3, "description"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 2: // NAME
+ return NAME;
+ case 3: // DESCRIPTION
+ return DESCRIPTION;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Domain.class, metaDataMap);
+ }
+
+ public Domain() {
+ this.domainId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Domain(Domain other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public Domain deepCopy() {
+ return new Domain(this);
+ }
+
+ @Override
+ public void clear() {
+ this.domainId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.name = null;
+ this.description = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public Domain setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Domain setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Domain setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Domain setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Domain setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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 DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Domain)
+ return this.equals((Domain)that);
+ return false;
+ }
+
+ public boolean equals(Domain that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Domain other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Domain(");
+ boolean first = true;
+
+ if (isSetDomainId()) {
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 DomainStandardSchemeFactory implements SchemeFactory {
+ public DomainStandardScheme getScheme() {
+ return new DomainStandardScheme();
+ }
+ }
+
+ private static class DomainStandardScheme extends StandardScheme<Domain> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Domain 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: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, Domain struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DomainTupleSchemeFactory implements SchemeFactory {
+ public DomainTupleScheme getScheme() {
+ return new DomainTupleScheme();
+ }
+ }
+
+ private static class DomainTupleScheme extends TupleScheme<Domain> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Domain struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetDomainId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Domain struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
new file mode 100644
index 0000000..0c1d447
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/Entity.java
@@ -0,0 +1,1511 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, java.io.Serializable, Cloneable, Comparable<Entity> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entity");
+
+ private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField ENTITY_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField PARENT_ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentEntityId", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)8);
+ private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)9);
+ 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)10);
+ 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)11);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EntityStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EntityTupleSchemeFactory());
+ }
+
+ public String entityId; // optional
+ public String domainId; // optional
+ public String entityTypeId; // optional
+ public String ownerId; // optional
+ public String parentEntityId; // optional
+ public String name; // optional
+ public String description; // optional
+ public Map<String,String> metadata; // optional
+ public String fullText; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ENTITY_ID((short)1, "entityId"),
+ DOMAIN_ID((short)2, "domainId"),
+ ENTITY_TYPE_ID((short)3, "entityTypeId"),
+ OWNER_ID((short)4, "ownerId"),
+ PARENT_ENTITY_ID((short)5, "parentEntityId"),
+ NAME((short)6, "name"),
+ DESCRIPTION((short)7, "description"),
+ METADATA((short)8, "metadata"),
+ FULL_TEXT((short)9, "fullText"),
+ CREATED_TIME((short)10, "createdTime"),
+ UPDATED_TIME((short)11, "updatedTime");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ENTITY_ID
+ return ENTITY_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // ENTITY_TYPE_ID
+ return ENTITY_TYPE_ID;
+ case 4: // OWNER_ID
+ return OWNER_ID;
+ case 5: // PARENT_ENTITY_ID
+ return PARENT_ENTITY_ID;
+ case 6: // NAME
+ return NAME;
+ case 7: // DESCRIPTION
+ return DESCRIPTION;
+ case 8: // METADATA
+ return METADATA;
+ case 9: // FULL_TEXT
+ return FULL_TEXT;
+ case 10: // CREATED_TIME
+ return CREATED_TIME;
+ case 11: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.ENTITY_ID,_Fields.DOMAIN_ID,_Fields.ENTITY_TYPE_ID,_Fields.OWNER_ID,_Fields.PARENT_ENTITY_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.METADATA,_Fields.FULL_TEXT,_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);
+ tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PARENT_ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("parentEntityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.FULL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("fullText", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Entity.class, metaDataMap);
+ }
+
+ public Entity() {
+ this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Entity(Entity other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetEntityId()) {
+ this.entityId = other.entityId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetParentEntityId()) {
+ this.parentEntityId = other.parentEntityId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetMetadata()) {
+ Map<String,String> __this__metadata = new HashMap<String,String>(other.metadata);
+ this.metadata = __this__metadata;
+ }
+ if (other.isSetFullText()) {
+ this.fullText = other.fullText;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public Entity deepCopy() {
+ return new Entity(this);
+ }
+
+ @Override
+ public void clear() {
+ this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.entityTypeId = null;
+ this.ownerId = null;
+ this.parentEntityId = null;
+ this.name = null;
+ this.description = null;
+ this.metadata = null;
+ this.fullText = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getEntityId() {
+ return this.entityId;
+ }
+
+ public Entity setEntityId(String entityId) {
+ this.entityId = entityId;
+ return this;
+ }
+
+ public void unsetEntityId() {
+ this.entityId = null;
+ }
+
+ /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
+ public boolean isSetEntityId() {
+ return this.entityId != null;
+ }
+
+ public void setEntityIdIsSet(boolean value) {
+ if (!value) {
+ this.entityId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public Entity setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public Entity 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 String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public Entity setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getParentEntityId() {
+ return this.parentEntityId;
+ }
+
+ public Entity setParentEntityId(String parentEntityId) {
+ this.parentEntityId = parentEntityId;
+ return this;
+ }
+
+ public void unsetParentEntityId() {
+ this.parentEntityId = null;
+ }
+
+ /** Returns true if field parentEntityId is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentEntityId() {
+ return this.parentEntityId != null;
+ }
+
+ public void setParentEntityIdIsSet(boolean value) {
+ if (!value) {
+ this.parentEntityId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Entity setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public Entity setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public int getMetadataSize() {
+ return (this.metadata == null) ? 0 : this.metadata.size();
+ }
+
+ public void putToMetadata(String key, String val) {
+ if (this.metadata == null) {
+ this.metadata = new HashMap<String,String>();
+ }
+ this.metadata.put(key, val);
+ }
+
+ public Map<String,String> getMetadata() {
+ return this.metadata;
+ }
+
+ public Entity setMetadata(Map<String,String> metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ public void unsetMetadata() {
+ this.metadata = null;
+ }
+
+ /** Returns true if field metadata is set (has been assigned a value) and false otherwise */
+ public boolean isSetMetadata() {
+ return this.metadata != null;
+ }
+
+ public void setMetadataIsSet(boolean value) {
+ if (!value) {
+ this.metadata = null;
+ }
+ }
+
+ public String getFullText() {
+ return this.fullText;
+ }
+
+ public Entity setFullText(String fullText) {
+ this.fullText = fullText;
+ return this;
+ }
+
+ public void unsetFullText() {
+ this.fullText = null;
+ }
+
+ /** Returns true if field fullText is set (has been assigned a value) and false otherwise */
+ public boolean isSetFullText() {
+ return this.fullText != null;
+ }
+
+ public void setFullTextIsSet(boolean value) {
+ if (!value) {
+ this.fullText = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public Entity setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public Entity setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ENTITY_ID:
+ if (value == null) {
+ unsetEntityId();
+ } else {
+ setEntityId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case PARENT_ENTITY_ID:
+ if (value == null) {
+ unsetParentEntityId();
+ } else {
+ setParentEntityId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case METADATA:
+ if (value == null) {
+ unsetMetadata();
+ } else {
+ setMetadata((Map<String,String>)value);
+ }
+ break;
+
+ case FULL_TEXT:
+ if (value == null) {
+ unsetFullText();
+ } else {
+ setFullText((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ENTITY_ID:
+ return getEntityId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case PARENT_ENTITY_ID:
+ return getParentEntityId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case METADATA:
+ return getMetadata();
+
+ case FULL_TEXT:
+ return getFullText();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case ENTITY_ID:
+ return isSetEntityId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case ENTITY_TYPE_ID:
+ return isSetEntityTypeId();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case PARENT_ENTITY_ID:
+ return isSetParentEntityId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case METADATA:
+ return isSetMetadata();
+ case FULL_TEXT:
+ return isSetFullText();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Entity)
+ return this.equals((Entity)that);
+ return false;
+ }
+
+ public boolean equals(Entity that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_entityId = true && this.isSetEntityId();
+ boolean that_present_entityId = true && that.isSetEntityId();
+ if (this_present_entityId || that_present_entityId) {
+ if (!(this_present_entityId && that_present_entityId))
+ return false;
+ if (!this.entityId.equals(that.entityId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ 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;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_parentEntityId = true && this.isSetParentEntityId();
+ boolean that_present_parentEntityId = true && that.isSetParentEntityId();
+ if (this_present_parentEntityId || that_present_parentEntityId) {
+ if (!(this_present_parentEntityId && that_present_parentEntityId))
+ return false;
+ if (!this.parentEntityId.equals(that.parentEntityId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_metadata = true && this.isSetMetadata();
+ boolean that_present_metadata = true && that.isSetMetadata();
+ if (this_present_metadata || that_present_metadata) {
+ if (!(this_present_metadata && that_present_metadata))
+ return false;
+ if (!this.metadata.equals(that.metadata))
+ return false;
+ }
+
+ boolean this_present_fullText = true && this.isSetFullText();
+ boolean that_present_fullText = true && that.isSetFullText();
+ if (this_present_fullText || that_present_fullText) {
+ if (!(this_present_fullText && that_present_fullText))
+ return false;
+ if (!this.fullText.equals(that.fullText))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_entityId = true && (isSetEntityId());
+ list.add(present_entityId);
+ if (present_entityId)
+ list.add(entityId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_entityTypeId = true && (isSetEntityTypeId());
+ list.add(present_entityTypeId);
+ if (present_entityTypeId)
+ list.add(entityTypeId);
+
+ boolean present_ownerId = true && (isSetOwnerId());
+ list.add(present_ownerId);
+ if (present_ownerId)
+ list.add(ownerId);
+
+ boolean present_parentEntityId = true && (isSetParentEntityId());
+ list.add(present_parentEntityId);
+ if (present_parentEntityId)
+ list.add(parentEntityId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_metadata = true && (isSetMetadata());
+ list.add(present_metadata);
+ if (present_metadata)
+ list.add(metadata);
+
+ boolean present_fullText = true && (isSetFullText());
+ list.add(present_fullText);
+ if (present_fullText)
+ list.add(fullText);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(Entity other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(other.isSetEntityId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEntityId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, other.entityId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetParentEntityId()).compareTo(other.isSetParentEntityId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParentEntityId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentEntityId, other.parentEntityId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMetadata()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFullText()).compareTo(other.isSetFullText());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFullText()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullText, other.fullText);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("Entity(");
+ boolean first = true;
+
+ if (isSetEntityId()) {
+ sb.append("entityId:");
+ if (this.entityId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetEntityTypeId()) {
+ if (!first) sb.append(", ");
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ }
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ if (isSetParentEntityId()) {
+ if (!first) sb.append(", ");
+ sb.append("parentEntityId:");
+ if (this.parentEntityId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parentEntityId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetMetadata()) {
+ if (!first) sb.append(", ");
+ sb.append("metadata:");
+ if (this.metadata == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.metadata);
+ }
+ first = false;
+ }
+ if (isSetFullText()) {
+ if (!first) sb.append(", ");
+ sb.append("fullText:");
+ if (this.fullText == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.fullText);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 EntityStandardSchemeFactory implements SchemeFactory {
+ public EntityStandardScheme getScheme() {
+ return new EntityStandardScheme();
+ }
+ }
+
+ private static class EntityStandardScheme extends StandardScheme<Entity> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Entity struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // ENTITY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityId = iprot.readString();
+ struct.setEntityIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ENTITY_TYPE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // PARENT_ENTITY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parentEntityId = iprot.readString();
+ struct.setParentEntityIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // METADATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+ struct.metadata = new HashMap<String,String>(2*_map0.size);
+ String _key1;
+ String _val2;
+ for (int _i3 = 0; _i3 < _map0.size; ++_i3)
+ {
+ _key1 = iprot.readString();
+ _val2 = iprot.readString();
+ struct.metadata.put(_key1, _val2);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setMetadataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // FULL_TEXT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.fullText = iprot.readString();
+ struct.setFullTextIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, Entity struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.entityId != null) {
+ if (struct.isSetEntityId()) {
+ oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
+ oprot.writeString(struct.entityId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.entityTypeId != null) {
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.parentEntityId != null) {
+ if (struct.isSetParentEntityId()) {
+ oprot.writeFieldBegin(PARENT_ENTITY_ID_FIELD_DESC);
+ oprot.writeString(struct.parentEntityId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.metadata != null) {
+ if (struct.isSetMetadata()) {
+ oprot.writeFieldBegin(METADATA_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
+ for (Map.Entry<String, String> _iter4 : struct.metadata.entrySet())
+ {
+ oprot.writeString(_iter4.getKey());
+ oprot.writeString(_iter4.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.fullText != null) {
+ if (struct.isSetFullText()) {
+ oprot.writeFieldBegin(FULL_TEXT_FIELD_DESC);
+ oprot.writeString(struct.fullText);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EntityTupleSchemeFactory implements SchemeFactory {
+ public EntityTupleScheme getScheme() {
+ return new EntityTupleScheme();
+ }
+ }
+
+ private static class EntityTupleScheme extends TupleScheme<Entity> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetEntityId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetEntityTypeId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetParentEntityId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetName()) {
+ optionals.set(5);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(6);
+ }
+ if (struct.isSetMetadata()) {
+ optionals.set(7);
+ }
+ if (struct.isSetFullText()) {
+ optionals.set(8);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(9);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(10);
+ }
+ oprot.writeBitSet(optionals, 11);
+ if (struct.isSetEntityId()) {
+ oprot.writeString(struct.entityId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeString(struct.entityTypeId);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetParentEntityId()) {
+ oprot.writeString(struct.parentEntityId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetMetadata()) {
+ {
+ oprot.writeI32(struct.metadata.size());
+ for (Map.Entry<String, String> _iter5 : struct.metadata.entrySet())
+ {
+ oprot.writeString(_iter5.getKey());
+ oprot.writeString(_iter5.getValue());
+ }
+ }
+ }
+ if (struct.isSetFullText()) {
+ oprot.writeString(struct.fullText);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Entity struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(11);
+ if (incoming.get(0)) {
+ struct.entityId = iprot.readString();
+ struct.setEntityIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.parentEntityId = iprot.readString();
+ struct.setParentEntityIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(7)) {
+ {
+ org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.metadata = new HashMap<String,String>(2*_map6.size);
+ String _key7;
+ String _val8;
+ for (int _i9 = 0; _i9 < _map6.size; ++_i9)
+ {
+ _key7 = iprot.readString();
+ _val8 = iprot.readString();
+ struct.metadata.put(_key7, _val8);
+ }
+ }
+ struct.setMetadataIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.fullText = iprot.readString();
+ struct.setFullTextIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
[49/50] [abbrv] airavata git commit: adding readme file
Posted by sc...@apache.org.
adding readme file
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/8c2720ae
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/8c2720ae
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/8c2720ae
Branch: refs/heads/airavata-gov-registry
Commit: 8c2720ae6c676c91deb2cd22975ad3d6d8498187
Parents: 1737f86
Author: scnakandala <su...@gmail.com>
Authored: Tue Sep 20 16:38:32 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Oct 3 11:33:14 2016 -0400
----------------------------------------------------------------------
airavata-gov-registry/README.md | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c2720ae/airavata-gov-registry/README.md
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/README.md b/airavata-gov-registry/README.md
new file mode 100644
index 0000000..299e7b4
--- /dev/null
+++ b/airavata-gov-registry/README.md
@@ -0,0 +1,3 @@
+## Airavata Governance Registry
+
+* This module implements a generic service for access controlling to resources and to provide group based resource sharing
\ No newline at end of file
[42/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
deleted file mode 100644
index 96758d5..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
+++ /dev/null
@@ -1,1154 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
-public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._Fields>, java.io.Serializable, Cloneable, Comparable<UserGroup> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserGroup");
-
- private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)8);
- private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)9);
- private static final org.apache.thrift.protocol.TField GROUP_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("groupType", org.apache.thrift.protocol.TType.I32, (short)10);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UserGroupStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UserGroupTupleSchemeFactory());
- }
-
- public String groupId; // optional
- public String domainId; // optional
- public String name; // optional
- public String description; // optional
- public String ownerId; // optional
- public long createdTime; // optional
- public long updatedTime; // optional
- /**
- *
- * @see GroupType
- */
- public GroupType groupType; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GROUP_ID((short)1, "groupId"),
- DOMAIN_ID((short)2, "domainId"),
- NAME((short)3, "name"),
- DESCRIPTION((short)6, "description"),
- OWNER_ID((short)7, "ownerId"),
- CREATED_TIME((short)8, "createdTime"),
- UPDATED_TIME((short)9, "updatedTime"),
- /**
- *
- * @see GroupType
- */
- GROUP_TYPE((short)10, "groupType");
-
- 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: // GROUP_ID
- return GROUP_ID;
- case 2: // DOMAIN_ID
- return DOMAIN_ID;
- case 3: // NAME
- return NAME;
- case 6: // DESCRIPTION
- return DESCRIPTION;
- case 7: // OWNER_ID
- return OWNER_ID;
- case 8: // CREATED_TIME
- return CREATED_TIME;
- case 9: // UPDATED_TIME
- return UPDATED_TIME;
- case 10: // GROUP_TYPE
- return GROUP_TYPE;
- 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 __CREATEDTIME_ISSET_ID = 0;
- private static final int __UPDATEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.GROUP_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.OWNER_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME,_Fields.GROUP_TYPE};
- 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.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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.GROUP_TYPE, new org.apache.thrift.meta_data.FieldMetaData("groupType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupType.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserGroup.class, metaDataMap);
- }
-
- public UserGroup() {
- this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public UserGroup(UserGroup other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetGroupId()) {
- this.groupId = other.groupId;
- }
- if (other.isSetDomainId()) {
- this.domainId = other.domainId;
- }
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- if (other.isSetOwnerId()) {
- this.ownerId = other.ownerId;
- }
- this.createdTime = other.createdTime;
- this.updatedTime = other.updatedTime;
- if (other.isSetGroupType()) {
- this.groupType = other.groupType;
- }
- }
-
- public UserGroup deepCopy() {
- return new UserGroup(this);
- }
-
- @Override
- public void clear() {
- this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
-
- this.domainId = null;
- this.name = null;
- this.description = null;
- this.ownerId = null;
- setCreatedTimeIsSet(false);
- this.createdTime = 0;
- setUpdatedTimeIsSet(false);
- this.updatedTime = 0;
- this.groupType = null;
- }
-
- public String getGroupId() {
- return this.groupId;
- }
-
- public UserGroup setGroupId(String groupId) {
- this.groupId = groupId;
- return this;
- }
-
- public void unsetGroupId() {
- this.groupId = null;
- }
-
- /** Returns true if field groupId is set (has been assigned a value) and false otherwise */
- public boolean isSetGroupId() {
- return this.groupId != null;
- }
-
- public void setGroupIdIsSet(boolean value) {
- if (!value) {
- this.groupId = null;
- }
- }
-
- public String getDomainId() {
- return this.domainId;
- }
-
- public UserGroup setDomainId(String domainId) {
- this.domainId = domainId;
- return this;
- }
-
- public void unsetDomainId() {
- this.domainId = null;
- }
-
- /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
- public boolean isSetDomainId() {
- return this.domainId != null;
- }
-
- public void setDomainIdIsSet(boolean value) {
- if (!value) {
- this.domainId = null;
- }
- }
-
- public String getName() {
- return this.name;
- }
-
- public UserGroup setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public UserGroup setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public String getOwnerId() {
- return this.ownerId;
- }
-
- public UserGroup setOwnerId(String ownerId) {
- this.ownerId = ownerId;
- return this;
- }
-
- public void unsetOwnerId() {
- this.ownerId = null;
- }
-
- /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
- public boolean isSetOwnerId() {
- return this.ownerId != null;
- }
-
- public void setOwnerIdIsSet(boolean value) {
- if (!value) {
- this.ownerId = null;
- }
- }
-
- public long getCreatedTime() {
- return this.createdTime;
- }
-
- public UserGroup setCreatedTime(long createdTime) {
- this.createdTime = createdTime;
- setCreatedTimeIsSet(true);
- return this;
- }
-
- public void unsetCreatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
- }
-
- public void setCreatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
- }
-
- public long getUpdatedTime() {
- return this.updatedTime;
- }
-
- public UserGroup setUpdatedTime(long updatedTime) {
- this.updatedTime = updatedTime;
- setUpdatedTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdatedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdatedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
- }
-
- public void setUpdatedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
- }
-
- /**
- *
- * @see GroupType
- */
- public GroupType getGroupType() {
- return this.groupType;
- }
-
- /**
- *
- * @see GroupType
- */
- public UserGroup setGroupType(GroupType groupType) {
- this.groupType = groupType;
- return this;
- }
-
- public void unsetGroupType() {
- this.groupType = null;
- }
-
- /** Returns true if field groupType is set (has been assigned a value) and false otherwise */
- public boolean isSetGroupType() {
- return this.groupType != null;
- }
-
- public void setGroupTypeIsSet(boolean value) {
- if (!value) {
- this.groupType = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case GROUP_ID:
- if (value == null) {
- unsetGroupId();
- } else {
- setGroupId((String)value);
- }
- break;
-
- case DOMAIN_ID:
- if (value == null) {
- unsetDomainId();
- } else {
- setDomainId((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case OWNER_ID:
- if (value == null) {
- unsetOwnerId();
- } else {
- setOwnerId((String)value);
- }
- break;
-
- case CREATED_TIME:
- if (value == null) {
- unsetCreatedTime();
- } else {
- setCreatedTime((Long)value);
- }
- break;
-
- case UPDATED_TIME:
- if (value == null) {
- unsetUpdatedTime();
- } else {
- setUpdatedTime((Long)value);
- }
- break;
-
- case GROUP_TYPE:
- if (value == null) {
- unsetGroupType();
- } else {
- setGroupType((GroupType)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case GROUP_ID:
- return getGroupId();
-
- case DOMAIN_ID:
- return getDomainId();
-
- case NAME:
- return getName();
-
- case DESCRIPTION:
- return getDescription();
-
- case OWNER_ID:
- return getOwnerId();
-
- case CREATED_TIME:
- return getCreatedTime();
-
- case UPDATED_TIME:
- return getUpdatedTime();
-
- case GROUP_TYPE:
- return getGroupType();
-
- }
- 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 GROUP_ID:
- return isSetGroupId();
- case DOMAIN_ID:
- return isSetDomainId();
- case NAME:
- return isSetName();
- case DESCRIPTION:
- return isSetDescription();
- case OWNER_ID:
- return isSetOwnerId();
- case CREATED_TIME:
- return isSetCreatedTime();
- case UPDATED_TIME:
- return isSetUpdatedTime();
- case GROUP_TYPE:
- return isSetGroupType();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof UserGroup)
- return this.equals((UserGroup)that);
- return false;
- }
-
- public boolean equals(UserGroup that) {
- if (that == null)
- return false;
-
- boolean this_present_groupId = true && this.isSetGroupId();
- boolean that_present_groupId = true && that.isSetGroupId();
- if (this_present_groupId || that_present_groupId) {
- if (!(this_present_groupId && that_present_groupId))
- return false;
- if (!this.groupId.equals(that.groupId))
- return false;
- }
-
- boolean this_present_domainId = true && this.isSetDomainId();
- boolean that_present_domainId = true && that.isSetDomainId();
- if (this_present_domainId || that_present_domainId) {
- if (!(this_present_domainId && that_present_domainId))
- return false;
- if (!this.domainId.equals(that.domainId))
- return false;
- }
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- boolean this_present_ownerId = true && this.isSetOwnerId();
- boolean that_present_ownerId = true && that.isSetOwnerId();
- if (this_present_ownerId || that_present_ownerId) {
- if (!(this_present_ownerId && that_present_ownerId))
- return false;
- if (!this.ownerId.equals(that.ownerId))
- return false;
- }
-
- boolean this_present_createdTime = true && this.isSetCreatedTime();
- boolean that_present_createdTime = true && that.isSetCreatedTime();
- if (this_present_createdTime || that_present_createdTime) {
- if (!(this_present_createdTime && that_present_createdTime))
- return false;
- if (this.createdTime != that.createdTime)
- return false;
- }
-
- boolean this_present_updatedTime = true && this.isSetUpdatedTime();
- boolean that_present_updatedTime = true && that.isSetUpdatedTime();
- if (this_present_updatedTime || that_present_updatedTime) {
- if (!(this_present_updatedTime && that_present_updatedTime))
- return false;
- if (this.updatedTime != that.updatedTime)
- return false;
- }
-
- boolean this_present_groupType = true && this.isSetGroupType();
- boolean that_present_groupType = true && that.isSetGroupType();
- if (this_present_groupType || that_present_groupType) {
- if (!(this_present_groupType && that_present_groupType))
- return false;
- if (!this.groupType.equals(that.groupType))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_groupId = true && (isSetGroupId());
- list.add(present_groupId);
- if (present_groupId)
- list.add(groupId);
-
- boolean present_domainId = true && (isSetDomainId());
- list.add(present_domainId);
- if (present_domainId)
- list.add(domainId);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- boolean present_ownerId = true && (isSetOwnerId());
- list.add(present_ownerId);
- if (present_ownerId)
- list.add(ownerId);
-
- boolean present_createdTime = true && (isSetCreatedTime());
- list.add(present_createdTime);
- if (present_createdTime)
- list.add(createdTime);
-
- boolean present_updatedTime = true && (isSetUpdatedTime());
- list.add(present_updatedTime);
- if (present_updatedTime)
- list.add(updatedTime);
-
- boolean present_groupType = true && (isSetGroupType());
- list.add(present_groupType);
- if (present_groupType)
- list.add(groupType.getValue());
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(UserGroup other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGroupId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDomainId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOwnerId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdatedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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;
- }
- }
- 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("UserGroup(");
- boolean first = true;
-
- if (isSetGroupId()) {
- sb.append("groupId:");
- if (this.groupId == null) {
- sb.append("null");
- } else {
- sb.append(this.groupId);
- }
- first = false;
- }
- if (isSetDomainId()) {
- if (!first) sb.append(", ");
- sb.append("domainId:");
- if (this.domainId == null) {
- sb.append("null");
- } else {
- sb.append(this.domainId);
- }
- first = false;
- }
- if (isSetName()) {
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- }
- if (isSetDescription()) {
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- }
- if (isSetOwnerId()) {
- if (!first) sb.append(", ");
- sb.append("ownerId:");
- if (this.ownerId == null) {
- sb.append("null");
- } else {
- sb.append(this.ownerId);
- }
- first = false;
- }
- if (isSetCreatedTime()) {
- if (!first) sb.append(", ");
- sb.append("createdTime:");
- sb.append(this.createdTime);
- first = false;
- }
- if (isSetUpdatedTime()) {
- if (!first) sb.append(", ");
- sb.append("updatedTime:");
- sb.append(this.updatedTime);
- first = false;
- }
- if (isSetGroupType()) {
- if (!first) sb.append(", ");
- sb.append("groupType:");
- if (this.groupType == null) {
- sb.append("null");
- } else {
- sb.append(this.groupType);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- 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 UserGroupStandardSchemeFactory implements SchemeFactory {
- public UserGroupStandardScheme getScheme() {
- return new UserGroupStandardScheme();
- }
- }
-
- private static class UserGroupStandardScheme extends StandardScheme<UserGroup> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, UserGroup 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: // GROUP_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.groupId = iprot.readString();
- struct.setGroupIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DOMAIN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // OWNER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.ownerId = iprot.readString();
- struct.setOwnerIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // CREATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // UPDATED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // GROUP_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
- struct.setGroupTypeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- 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, UserGroup struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.groupId != null) {
- if (struct.isSetGroupId()) {
- oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
- oprot.writeString(struct.groupId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.domainId != null) {
- if (struct.isSetDomainId()) {
- oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
- oprot.writeString(struct.domainId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.name != null) {
- if (struct.isSetName()) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- }
- if (struct.description != null) {
- if (struct.isSetDescription()) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- }
- if (struct.ownerId != null) {
- if (struct.isSetOwnerId()) {
- oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
- oprot.writeString(struct.ownerId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.createdTime);
- oprot.writeFieldEnd();
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
- oprot.writeI64(struct.updatedTime);
- oprot.writeFieldEnd();
- }
- if (struct.groupType != null) {
- if (struct.isSetGroupType()) {
- oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
- oprot.writeI32(struct.groupType.getValue());
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class UserGroupTupleSchemeFactory implements SchemeFactory {
- public UserGroupTupleScheme getScheme() {
- return new UserGroupTupleScheme();
- }
- }
-
- private static class UserGroupTupleScheme extends TupleScheme<UserGroup> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetGroupId()) {
- optionals.set(0);
- }
- if (struct.isSetDomainId()) {
- optionals.set(1);
- }
- if (struct.isSetName()) {
- optionals.set(2);
- }
- if (struct.isSetDescription()) {
- optionals.set(3);
- }
- if (struct.isSetOwnerId()) {
- optionals.set(4);
- }
- if (struct.isSetCreatedTime()) {
- optionals.set(5);
- }
- if (struct.isSetUpdatedTime()) {
- optionals.set(6);
- }
- if (struct.isSetGroupType()) {
- optionals.set(7);
- }
- oprot.writeBitSet(optionals, 8);
- if (struct.isSetGroupId()) {
- oprot.writeString(struct.groupId);
- }
- if (struct.isSetDomainId()) {
- oprot.writeString(struct.domainId);
- }
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetOwnerId()) {
- oprot.writeString(struct.ownerId);
- }
- if (struct.isSetCreatedTime()) {
- oprot.writeI64(struct.createdTime);
- }
- if (struct.isSetUpdatedTime()) {
- oprot.writeI64(struct.updatedTime);
- }
- if (struct.isSetGroupType()) {
- oprot.writeI32(struct.groupType.getValue());
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(8);
- if (incoming.get(0)) {
- struct.groupId = iprot.readString();
- struct.setGroupIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.domainId = iprot.readString();
- struct.setDomainIdIsSet(true);
- }
- if (incoming.get(2)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(4)) {
- struct.ownerId = iprot.readString();
- struct.setOwnerIdIsSet(true);
- }
- if (incoming.get(5)) {
- struct.createdTime = iprot.readI64();
- struct.setCreatedTimeIsSet(true);
- }
- if (incoming.get(6)) {
- struct.updatedTime = iprot.readI64();
- struct.setUpdatedTimeIsSet(true);
- }
- if (incoming.get(7)) {
- struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
- struct.setGroupTypeIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
deleted file mode 100644
index d24734b..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.gov.registry.models;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-public class gov_reg_modelsConstants {
-
- public static final String DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID";
-
-}
[37/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
new file mode 100644
index 0000000..14573fe
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/User.java
@@ -0,0 +1,817 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
+
+ private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserTupleSchemeFactory());
+ }
+
+ public String userId; // optional
+ public String domainId; // optional
+ public String userName; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_ID((short)1, "userId"),
+ DOMAIN_ID((short)2, "domainId"),
+ USER_NAME((short)3, "userName"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // USER_ID
+ return USER_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // USER_NAME
+ return USER_NAME;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.USER_ID,_Fields.DOMAIN_ID,_Fields.USER_NAME,_Fields.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);
+ tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
+ }
+
+ public User() {
+ this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public User(User other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetUserId()) {
+ this.userId = other.userId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public User deepCopy() {
+ return new User(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.userName = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getUserId() {
+ return this.userId;
+ }
+
+ public User setUserId(String userId) {
+ this.userId = userId;
+ return this;
+ }
+
+ public void unsetUserId() {
+ this.userId = null;
+ }
+
+ /** Returns true if field userId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserId() {
+ return this.userId != null;
+ }
+
+ public void setUserIdIsSet(boolean value) {
+ if (!value) {
+ this.userId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public User setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public User setUserName(String userName) {
+ this.userName = userName;
+ return this;
+ }
+
+ public void unsetUserName() {
+ this.userName = null;
+ }
+
+ /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserName() {
+ return this.userName != null;
+ }
+
+ public void setUserNameIsSet(boolean value) {
+ if (!value) {
+ this.userName = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public User setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public User setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_ID:
+ if (value == null) {
+ unsetUserId();
+ } else {
+ setUserId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_ID:
+ return getUserId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case USER_NAME:
+ return getUserName();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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 USER_ID:
+ return isSetUserId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case USER_NAME:
+ return isSetUserName();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof User)
+ return this.equals((User)that);
+ return false;
+ }
+
+ public boolean equals(User that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_userId = true && this.isSetUserId();
+ boolean that_present_userId = true && that.isSetUserId();
+ if (this_present_userId || that_present_userId) {
+ if (!(this_present_userId && that_present_userId))
+ return false;
+ if (!this.userId.equals(that.userId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_userName = true && this.isSetUserName();
+ boolean that_present_userName = true && that.isSetUserName();
+ if (this_present_userName || that_present_userName) {
+ if (!(this_present_userName && that_present_userName))
+ return false;
+ if (!this.userName.equals(that.userName))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_userId = true && (isSetUserId());
+ list.add(present_userId);
+ if (present_userId)
+ list.add(userId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_userName = true && (isSetUserName());
+ list.add(present_userName);
+ if (present_userName)
+ list.add(userName);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(User other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("User(");
+ boolean first = true;
+
+ if (isSetUserId()) {
+ sb.append("userId:");
+ if (this.userId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetUserName()) {
+ if (!first) sb.append(", ");
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 UserStandardSchemeFactory implements SchemeFactory {
+ public UserStandardScheme getScheme() {
+ return new UserStandardScheme();
+ }
+ }
+
+ private static class UserStandardScheme extends StandardScheme<User> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // USER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // USER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, User struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userId != null) {
+ if (struct.isSetUserId()) {
+ oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+ oprot.writeString(struct.userId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.userName != null) {
+ if (struct.isSetUserName()) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserTupleSchemeFactory implements SchemeFactory {
+ public UserTupleScheme getScheme() {
+ return new UserTupleScheme();
+ }
+ }
+
+ private static class UserTupleScheme extends TupleScheme<User> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUserName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetUserId()) {
+ oprot.writeString(struct.userId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetUserName()) {
+ oprot.writeString(struct.userName);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
new file mode 100644
index 0000000..96758d5
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
@@ -0,0 +1,1154 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._Fields>, java.io.Serializable, Cloneable, Comparable<UserGroup> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserGroup");
+
+ private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)8);
+ private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)9);
+ private static final org.apache.thrift.protocol.TField GROUP_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("groupType", org.apache.thrift.protocol.TType.I32, (short)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserGroupStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserGroupTupleSchemeFactory());
+ }
+
+ public String groupId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public String ownerId; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType groupType; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ GROUP_ID((short)1, "groupId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)6, "description"),
+ OWNER_ID((short)7, "ownerId"),
+ CREATED_TIME((short)8, "createdTime"),
+ UPDATED_TIME((short)9, "updatedTime"),
+ /**
+ *
+ * @see GroupType
+ */
+ GROUP_TYPE((short)10, "groupType");
+
+ 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: // GROUP_ID
+ return GROUP_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 6: // DESCRIPTION
+ return DESCRIPTION;
+ case 7: // OWNER_ID
+ return OWNER_ID;
+ case 8: // CREATED_TIME
+ return CREATED_TIME;
+ case 9: // UPDATED_TIME
+ return UPDATED_TIME;
+ case 10: // GROUP_TYPE
+ return GROUP_TYPE;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.GROUP_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.OWNER_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME,_Fields.GROUP_TYPE};
+ 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.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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.GROUP_TYPE, new org.apache.thrift.meta_data.FieldMetaData("groupType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserGroup.class, metaDataMap);
+ }
+
+ public UserGroup() {
+ this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public UserGroup(UserGroup other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetGroupId()) {
+ this.groupId = other.groupId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ if (other.isSetGroupType()) {
+ this.groupType = other.groupType;
+ }
+ }
+
+ public UserGroup deepCopy() {
+ return new UserGroup(this);
+ }
+
+ @Override
+ public void clear() {
+ this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ this.description = null;
+ this.ownerId = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ this.groupType = null;
+ }
+
+ public String getGroupId() {
+ return this.groupId;
+ }
+
+ public UserGroup setGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ public void unsetGroupId() {
+ this.groupId = null;
+ }
+
+ /** Returns true if field groupId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupId() {
+ return this.groupId != null;
+ }
+
+ public void setGroupIdIsSet(boolean value) {
+ if (!value) {
+ this.groupId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public UserGroup setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public UserGroup setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public UserGroup setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public UserGroup setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public UserGroup setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public UserGroup setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType getGroupType() {
+ return this.groupType;
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public UserGroup setGroupType(GroupType groupType) {
+ this.groupType = groupType;
+ return this;
+ }
+
+ public void unsetGroupType() {
+ this.groupType = null;
+ }
+
+ /** Returns true if field groupType is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupType() {
+ return this.groupType != null;
+ }
+
+ public void setGroupTypeIsSet(boolean value) {
+ if (!value) {
+ this.groupType = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case GROUP_ID:
+ if (value == null) {
+ unsetGroupId();
+ } else {
+ setGroupId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ case GROUP_TYPE:
+ if (value == null) {
+ unsetGroupType();
+ } else {
+ setGroupType((GroupType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case GROUP_ID:
+ return getGroupId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ case GROUP_TYPE:
+ return getGroupType();
+
+ }
+ 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 GROUP_ID:
+ return isSetGroupId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ case GROUP_TYPE:
+ return isSetGroupType();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof UserGroup)
+ return this.equals((UserGroup)that);
+ return false;
+ }
+
+ public boolean equals(UserGroup that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_groupId = true && this.isSetGroupId();
+ boolean that_present_groupId = true && that.isSetGroupId();
+ if (this_present_groupId || that_present_groupId) {
+ if (!(this_present_groupId && that_present_groupId))
+ return false;
+ if (!this.groupId.equals(that.groupId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ boolean this_present_groupType = true && this.isSetGroupType();
+ boolean that_present_groupType = true && that.isSetGroupType();
+ if (this_present_groupType || that_present_groupType) {
+ if (!(this_present_groupType && that_present_groupType))
+ return false;
+ if (!this.groupType.equals(that.groupType))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_groupId = true && (isSetGroupId());
+ list.add(present_groupId);
+ if (present_groupId)
+ list.add(groupId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_ownerId = true && (isSetOwnerId());
+ list.add(present_ownerId);
+ if (present_ownerId)
+ list.add(ownerId);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ boolean present_groupType = true && (isSetGroupType());
+ list.add(present_groupType);
+ if (present_groupType)
+ list.add(groupType.getValue());
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(UserGroup other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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;
+ }
+ }
+ 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("UserGroup(");
+ boolean first = true;
+
+ if (isSetGroupId()) {
+ sb.append("groupId:");
+ if (this.groupId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ first = false;
+ }
+ if (isSetGroupType()) {
+ if (!first) sb.append(", ");
+ sb.append("groupType:");
+ if (this.groupType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupType);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ 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 UserGroupStandardSchemeFactory implements SchemeFactory {
+ public UserGroupStandardScheme getScheme() {
+ return new UserGroupStandardScheme();
+ }
+ }
+
+ private static class UserGroupStandardScheme extends StandardScheme<UserGroup> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, UserGroup 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: // GROUP_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // GROUP_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ 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, UserGroup struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.groupId != null) {
+ if (struct.isSetGroupId()) {
+ oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
+ oprot.writeString(struct.groupId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.groupType != null) {
+ if (struct.isSetGroupType()) {
+ oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.groupType.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserGroupTupleSchemeFactory implements SchemeFactory {
+ public UserGroupTupleScheme getScheme() {
+ return new UserGroupTupleScheme();
+ }
+ }
+
+ private static class UserGroupTupleScheme extends TupleScheme<UserGroup> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetGroupId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(3);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetGroupType()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetGroupId()) {
+ oprot.writeString(struct.groupId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ if (struct.isSetGroupType()) {
+ oprot.writeI32(struct.groupType.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
new file mode 100644
index 0000000..d24734b
--- /dev/null
+++ b/airavata-gov-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/gov_reg_modelsConstants.java
@@ -0,0 +1,41 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+public class gov_reg_modelsConstants {
+
+ public static final String DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID";
+
+}
[28/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/pom.xml
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/pom.xml b/modules/airavata-sharing-registry/pom.xml
new file mode 100644
index 0000000..f69b0d1
--- /dev/null
+++ b/modules/airavata-sharing-registry/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>airavata</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <relativePath>../pom.xml</relativePath>
+ <version>0.17-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-sharing-registry</artifactId>
+ <packaging>pom</packaging>
+ <version>${global.version}</version>
+
+ <properties>
+ <global.version>0.17-SNAPSHOT</global.version>
+ </properties>
+
+ <modules>
+ <module>airavata-sharing-registry-stubs</module>
+ <module>airavata-sharing-registry-core</module>
+ </modules>
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/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
new file mode 100644
index 0000000..2f8e255
--- /dev/null
+++ b/modules/airavata-sharing-registry/thrift_models/sharing_cpi.thrift
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace java org.apache.airavata.sharing.registry.service.cpi
+
+include "./sharing_models.thrift"
+
+service GovRegistryService {
+
+ /**
+ * Domain Operations
+ **/
+ bool createDomain(1: required sharing_models.Domain domain) throws (1: sharing_models.GovRegistryException gre)
+ bool updateDomain(1: required sharing_models.Domain domain) throws (1: sharing_models.GovRegistryException gre)
+ bool deleteDomain(1: required string domainId) throws (1: sharing_models.GovRegistryException gre)
+ sharing_models.Domain getDomain(1: required string domainId) throws (1: sharing_models.GovRegistryException gre)
+ list<sharing_models.Domain> getDomains(1: required i32 offset, 2: required i32 limit)
+
+ /**
+ * User Operations
+ **/
+ bool registerUser(1: required sharing_models.User user) throws (1: sharing_models.GovRegistryException gre)
+ bool updatedUser(1: required sharing_models.User user) throws (1: sharing_models.GovRegistryException gre)
+ bool deleteUser(1: required string userId) throws (1: sharing_models.GovRegistryException gre)
+ sharing_models.User getUser(1: required string userId) throws (1: sharing_models.GovRegistryException gre)
+ list<sharing_models.User> getUsers(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ /**
+ * Group Operations
+ **/
+ bool createGroup(1: required sharing_models.UserGroup group) throws (1: sharing_models.GovRegistryException gre)
+ bool updateGroup(1: required sharing_models.UserGroup group) throws (1: sharing_models.GovRegistryException gre)
+ bool deleteGroup(1: required string groupId) throws (1: sharing_models.GovRegistryException gre)
+ sharing_models.UserGroup getGroup(1: required string groupId) throws (1: sharing_models.GovRegistryException gre)
+ list<sharing_models.UserGroup> getGroups(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ bool addUsersToGroup(1: required list<string> userIds, 2: required string groupId) throws (1: sharing_models.GovRegistryException gre);
+ bool removeUsersFromGroup(1: required list<string> userIds, 2: required string groupId) throws (1: sharing_models.GovRegistryException gre);
+ map<string, sharing_models.GroupType> getGroupMembers(1: required string groupId)
+
+ /**
+ * EntityType Operations
+ **/
+ bool createEntityType(1: required sharing_models.EntityType entityType) throws (1: sharing_models.GovRegistryException gre)
+ bool updateEntityType(1: required sharing_models.EntityType entityType) throws (1: sharing_models.GovRegistryException gre)
+ bool deleteEntityType(1: required string entityTypeId) throws (1: sharing_models.GovRegistryException gre)
+ sharing_models.EntityType getEntityType(1: required string entityTypeId) throws (1: sharing_models.GovRegistryException gre)
+ list<sharing_models.EntityType> getEntityTypes(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+
+ /**
+ * Entity Operations
+ **/
+ bool registerEntity(1: required sharing_models.Entity entity) throws (1: sharing_models.GovRegistryException gre)
+ bool updateEntity(1: required sharing_models.Entity entity) throws (1: sharing_models.GovRegistryException gre)
+ bool deleteEntity(1: required string entityId) throws (1: sharing_models.GovRegistryException gre)
+ sharing_models.Entity getEntity(1: required string entityId) throws (1: sharing_models.GovRegistryException gre)
+ list<sharing_models.Entity> searchEntities(1: required string domain, 2: required string entityType,
+ 3: required map<string, string> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.GovRegistryException gre)
+
+ /**
+ * EntityType Operations
+ **/
+ bool createPermissionType(1: required sharing_models.PermissionType permisionType) throws (1: sharing_models.GovRegistryException gre)
+ bool updatePermissionType(1: required sharing_models.PermissionType permisionType) throws (1: sharing_models.GovRegistryException gre)
+ bool deletePermissionType(1: required string entityTypeId) throws (1: sharing_models.GovRegistryException gre)
+ sharing_models.PermissionType getPermissionType(1: required string permisionTypeId) 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)
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/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
new file mode 100644
index 0000000..554d74d
--- /dev/null
+++ b/modules/airavata-sharing-registry/thrift_models/sharing_models.thrift
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+ namespace java org.apache.airavata.sharing.registry.models
+
+const string DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID"
+
+struct Domain {
+ 1: optional string domainId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string name,
+ 3: optional string description,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+}
+
+ struct User {
+ 1: optional string userId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string userName,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+ }
+
+enum GroupType {
+ SINGLE_USER,
+ MULTI_USER
+}
+
+ struct UserGroup {
+ 1: optional string groupId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 6: optional string description,
+ 7: optional string ownerId,
+ 8: optional i64 createdTime,
+ 9: optional i64 updatedTime,
+ 10: optional GroupType groupType
+ }
+
+ enum GroupChildType {
+ USER,
+ GROUP
+ }
+
+ struct GroupMembership {
+ 1: optional string parentId,
+ 2: optional string childId,
+ 3: optional GroupChildType childType
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+ }
+
+
+
+struct EntityType {
+ 1: optional string entityTypeId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 4: optional string description,
+ 5: optional i64 createdTime,
+ 6: optional i64 updatedTime
+}
+
+
+struct Entity {
+ 1: optional string entityId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string entityTypeId,
+ 4: optional string ownerId,
+ 5: optional string parentEntityId,
+ 6: optional string name,
+ 7: optional string description,
+ 8: optional map<string,string> metadata,
+ 9: optional string fullText,
+ 10: optional i64 createdTime,
+ 11: optional i64 updatedTime
+}
+
+struct PermissionType {
+ 1: optional string permissionTypeId = DO_NOT_SET_AT_CLIENTS_ID,
+ 2: optional string domainId,
+ 3: optional string name,
+ 4: optional string description,
+ 5: optional i64 createdTime,
+ 6: optional i64 updatedTime
+}
+
+struct Sharing {
+ 1: optional string permissionTypeId,
+ 2: optional string entityId,
+ 3: optional string groupId,
+ 4: optional i64 createdTime,
+ 5: optional i64 updatedTime
+}
+
+exception GovRegistryException {
+ 1: required string message
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/thrift_models/thrift-gen.sh
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/thrift_models/thrift-gen.sh b/modules/airavata-sharing-registry/thrift_models/thrift-gen.sh
new file mode 100755
index 0000000..295be80
--- /dev/null
+++ b/modules/airavata-sharing-registry/thrift_models/thrift-gen.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+thrift --gen java sharing_models.thrift
+cd gen-java
+rm -r ../../airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/*
+cp -r org/apache/airavata/sharing/registry/models/ ../../airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/
+
+cd ..
+thrift --gen java sharing_cpi.thrift
+cd gen-java
+rm -r ../../airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/*
+cp -r org/apache/airavata/sharing/registry/service/cpi/ ../../airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/
+
+cd ..
+
+rm -r gen-java
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
deleted file mode 100644
index 4833874..0000000
--- a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0"?>
-<!--*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-* -->
-<persistence xmlns="http://java.sun.com/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
- <persistence-unit name="appcatalog_data">
- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.airavata.registry.core.app.catalog.model.ComputeResource</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.GlobusJobSubmission</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.GlobusGKEndpoint</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.GSISSHSubmission</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.GSISSHExport</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.PreJobCommand</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.PostJobCommand</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.UnicoreJobSubmission</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.UnicoreDataMovement</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.HostAlias</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.HostIPAddress</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ScpDataMovement</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.GridftpDataMovement</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.GridftpEndpoint</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.SshJobSubmission</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationModule</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationDeployment</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ModuleLoadCmd</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.LibraryPrepandPath</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.LibraryApendPath</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.AppEnvironment</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationInterface</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.AppModuleMapping</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationIntInput</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationIntOutput</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.GatewayProfile</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ComputeResourcePreference</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.BatchQueue</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ComputeResourceFileSystem</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.JobSubmissionInterface</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.DataMovementInterface</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.StoragePreference</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.StorageResource</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.StorageInterface</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ResourceJobManager</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.JobManagerCommand</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.ParallelismPrefixCommand</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.LocalSubmission</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.LocalDataMovement</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.Configuration</class>
- <exclude-unlisted-classes>true</exclude-unlisted-classes>
- </persistence-unit>
- <persistence-unit name="experiment_data">
- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.Experiment</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ExperimentError</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ExperimentInput</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ExperimentOutput</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ExperimentStatus</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ExperimentSummary</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.Gateway</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.GatewayWorker</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.Process</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ProcessError</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ProcessInput</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ProcessOutput</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ProcessResourceSchedule</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ProcessStatus</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.Project</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.ProjectUser</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.Task</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.TaskError</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.TaskStatus</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.Users</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.UserConfigurationData</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.Job</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.JobStatus</class>
- <class>org.apache.airavata.registry.core.experiment.catalog.model.Notification</class>
- <exclude-unlisted-classes>true</exclude-unlisted-classes>
- </persistence-unit>
- <persistence-unit name="replicacatalog_data">
- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.airavata.registry.core.replica.catalog.model.Configuration</class>
- <class>org.apache.airavata.registry.core.replica.catalog.model.DataProduct</class>
- <class>org.apache.airavata.registry.core.replica.catalog.model.DataReplicaLocation</class>
- <class>org.apache.airavata.registry.core.replica.catalog.model.DataProductMetaData</class>
- <class>org.apache.airavata.registry.core.replica.catalog.model.DataReplicaMetaData</class>
- <class>org.apache.airavata.registry.core.replica.catalog.model.Configuration</class>
- <exclude-unlisted-classes>true</exclude-unlisted-classes>
- </persistence-unit>
- <persistence-unit name="workflowcatalog_data">
- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.airavata.registry.core.workflow.catalog.model.Workflow</class>
- <class>org.apache.airavata.registry.core.workflow.catalog.model.WorkflowInput</class>
- <class>org.apache.airavata.registry.core.workflow.catalog.model.WorkflowOutput</class>
- <class>org.apache.airavata.registry.core.workflow.catalog.model.Edge</class>
- <class>org.apache.airavata.registry.core.workflow.catalog.model.Node</class>
- <class>org.apache.airavata.registry.core.workflow.catalog.model.Port</class>
- <class>org.apache.airavata.registry.core.workflow.catalog.model.ComponentStatus</class>
- <class>org.apache.airavata.registry.core.workflow.catalog.model.WorkflowStatus</class>
- <exclude-unlisted-classes>true</exclude-unlisted-classes>
- </persistence-unit>
-</persistence>
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3988fd0..f925004 100644
--- a/pom.xml
+++ b/pom.xml
@@ -564,6 +564,7 @@
<module>modules/workflow</module>
<module>modules/test-suite</module>
<module>modules/group-manager</module>
+ <module>modules/airavata-sharing-registry</module>
<!-- Deprecated Modules-->
<!--<module>modules/integration-tests</module>-->
<!--<module>modules/workflow-model</module>-->
[10/50] [abbrv] airavata git commit: fixing gateway intialization
issue
Posted by sc...@apache.org.
fixing gateway intialization issue
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/264f616f
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/264f616f
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/264f616f
Branch: refs/heads/airavata-gov-registry
Commit: 264f616ffecd585d92e650685b504101208e79dc
Parents: c084683
Author: scnakandala <su...@gmail.com>
Authored: Thu Sep 22 12:32:49 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Sep 22 12:32:49 2016 -0400
----------------------------------------------------------------------
.../core/experiment/catalog/impl/ExperimentCatalogImpl.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/264f616f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
index 8494493..53bd52b 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
@@ -91,6 +91,8 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
public ExperimentCatalogImpl(String gateway, String username, String password) throws RegistryException{
if (!ExpCatResourceUtils.isGatewayExist(gateway)){
gatewayResource = (GatewayResource) ExpCatResourceUtils.createGateway(gateway);
+ gatewayResource.setGatewayName(gateway);
+ gatewayResource.setGatewayApprovalStatus(GatewayApprovalStatus.APPROVED.toString());
gatewayResource.save();
}else {
gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(gateway);
[41/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
deleted file mode 100644
index 0fb6325..0000000
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
+++ /dev/null
@@ -1,33673 +0,0 @@
-/**
- * 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.gov.registry.service.cpi;
-
-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;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
-public class GovRegistryService {
-
- public interface Iface {
-
- /**
- * * Domain Operations
- * *
- *
- * @param domain
- */
- public boolean createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean deleteDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public org.apache.airavata.gov.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public List<org.apache.airavata.gov.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.thrift.TException;
-
- /**
- * * User Operations
- * *
- *
- * @param user
- */
- public boolean registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean deleteUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public org.apache.airavata.gov.registry.models.User getUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public List<org.apache.airavata.gov.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException;
-
- /**
- * * Group Operations
- * *
- *
- * @param group
- */
- public boolean createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean deleteGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public org.apache.airavata.gov.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public List<org.apache.airavata.gov.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
-
- public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public Map<String,org.apache.airavata.gov.registry.models.GroupType> getGroupMembers(String groupId) throws org.apache.thrift.TException;
-
- /**
- * * EntityType Operations
- * *
- *
- * @param entityType
- */
- public boolean createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public org.apache.airavata.gov.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public List<org.apache.airavata.gov.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException;
-
- /**
- * * Entity Operations
- * *
- *
- * @param entity
- */
- public boolean registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean deleteEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public org.apache.airavata.gov.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public List<org.apache.airavata.gov.registry.models.Entity> searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- /**
- * * EntityType Operations
- * *
- *
- * @param permisionType
- */
- public boolean createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public org.apache.airavata.gov.registry.models.PermissionType getPermissionType(String permisionTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- public List<org.apache.airavata.gov.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
-
- }
-
- public interface AsyncIface {
-
- public void createDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updateDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void registerUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updatedUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void createGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updateGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getGroupMembers(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getEntityTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void registerEntity(org.apache.airavata.gov.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updateEntity(org.apache.airavata.gov.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deletePermissionType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getPermissionType(String permisionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
- public Factory() {}
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
- super(prot, prot);
- }
-
- public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public boolean createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_createDomain(domain);
- return recv_createDomain();
- }
-
- public void send_createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.thrift.TException
- {
- createDomain_args args = new createDomain_args();
- args.setDomain(domain);
- sendBase("createDomain", args);
- }
-
- public boolean recv_createDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- createDomain_result result = new createDomain_result();
- receiveBase(result, "createDomain");
- 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, "createDomain failed: unknown result");
- }
-
- public boolean updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_updateDomain(domain);
- return recv_updateDomain();
- }
-
- public void send_updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.thrift.TException
- {
- updateDomain_args args = new updateDomain_args();
- args.setDomain(domain);
- sendBase("updateDomain", args);
- }
-
- public boolean recv_updateDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- updateDomain_result result = new updateDomain_result();
- receiveBase(result, "updateDomain");
- 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, "updateDomain failed: unknown result");
- }
-
- public boolean deleteDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_deleteDomain(domainId);
- return recv_deleteDomain();
- }
-
- public void send_deleteDomain(String domainId) throws org.apache.thrift.TException
- {
- deleteDomain_args args = new deleteDomain_args();
- args.setDomainId(domainId);
- sendBase("deleteDomain", args);
- }
-
- public boolean recv_deleteDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- deleteDomain_result result = new deleteDomain_result();
- receiveBase(result, "deleteDomain");
- 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, "deleteDomain failed: unknown result");
- }
-
- public org.apache.airavata.gov.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_getDomain(domainId);
- return recv_getDomain();
- }
-
- public void send_getDomain(String domainId) throws org.apache.thrift.TException
- {
- getDomain_args args = new getDomain_args();
- args.setDomainId(domainId);
- sendBase("getDomain", args);
- }
-
- public org.apache.airavata.gov.registry.models.Domain recv_getDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- getDomain_result result = new getDomain_result();
- receiveBase(result, "getDomain");
- 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, "getDomain failed: unknown result");
- }
-
- public List<org.apache.airavata.gov.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.thrift.TException
- {
- send_getDomains(offset, limit);
- return recv_getDomains();
- }
-
- public void send_getDomains(int offset, int limit) throws org.apache.thrift.TException
- {
- getDomains_args args = new getDomains_args();
- args.setOffset(offset);
- args.setLimit(limit);
- sendBase("getDomains", args);
- }
-
- public List<org.apache.airavata.gov.registry.models.Domain> recv_getDomains() throws org.apache.thrift.TException
- {
- getDomains_result result = new getDomains_result();
- receiveBase(result, "getDomains");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDomains failed: unknown result");
- }
-
- public boolean registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_registerUser(user);
- return recv_registerUser();
- }
-
- public void send_registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.thrift.TException
- {
- registerUser_args args = new registerUser_args();
- args.setUser(user);
- sendBase("registerUser", args);
- }
-
- public boolean recv_registerUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- registerUser_result result = new registerUser_result();
- receiveBase(result, "registerUser");
- 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, "registerUser failed: unknown result");
- }
-
- public boolean updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_updatedUser(user);
- return recv_updatedUser();
- }
-
- public void send_updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.thrift.TException
- {
- updatedUser_args args = new updatedUser_args();
- args.setUser(user);
- sendBase("updatedUser", args);
- }
-
- public boolean recv_updatedUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- updatedUser_result result = new updatedUser_result();
- receiveBase(result, "updatedUser");
- 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, "updatedUser failed: unknown result");
- }
-
- public boolean deleteUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_deleteUser(userId);
- return recv_deleteUser();
- }
-
- public void send_deleteUser(String userId) throws org.apache.thrift.TException
- {
- deleteUser_args args = new deleteUser_args();
- args.setUserId(userId);
- sendBase("deleteUser", args);
- }
-
- public boolean recv_deleteUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- deleteUser_result result = new deleteUser_result();
- receiveBase(result, "deleteUser");
- 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, "deleteUser failed: unknown result");
- }
-
- public org.apache.airavata.gov.registry.models.User getUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_getUser(userId);
- return recv_getUser();
- }
-
- public void send_getUser(String userId) throws org.apache.thrift.TException
- {
- getUser_args args = new getUser_args();
- args.setUserId(userId);
- sendBase("getUser", args);
- }
-
- public org.apache.airavata.gov.registry.models.User recv_getUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- getUser_result result = new getUser_result();
- receiveBase(result, "getUser");
- 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, "getUser failed: unknown result");
- }
-
- public List<org.apache.airavata.gov.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
- {
- send_getUsers(domain, offset, limit);
- return recv_getUsers();
- }
-
- public void send_getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
- {
- getUsers_args args = new getUsers_args();
- args.setDomain(domain);
- args.setOffset(offset);
- args.setLimit(limit);
- sendBase("getUsers", args);
- }
-
- public List<org.apache.airavata.gov.registry.models.User> recv_getUsers() throws org.apache.thrift.TException
- {
- getUsers_result result = new getUsers_result();
- receiveBase(result, "getUsers");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
- }
-
- public boolean createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_createGroup(group);
- return recv_createGroup();
- }
-
- public void send_createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.thrift.TException
- {
- createGroup_args args = new createGroup_args();
- args.setGroup(group);
- sendBase("createGroup", args);
- }
-
- public boolean recv_createGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- createGroup_result result = new createGroup_result();
- receiveBase(result, "createGroup");
- 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, "createGroup failed: unknown result");
- }
-
- public boolean updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_updateGroup(group);
- return recv_updateGroup();
- }
-
- public void send_updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.thrift.TException
- {
- updateGroup_args args = new updateGroup_args();
- args.setGroup(group);
- sendBase("updateGroup", args);
- }
-
- public boolean recv_updateGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- updateGroup_result result = new updateGroup_result();
- receiveBase(result, "updateGroup");
- 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, "updateGroup failed: unknown result");
- }
-
- public boolean deleteGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_deleteGroup(groupId);
- return recv_deleteGroup();
- }
-
- public void send_deleteGroup(String groupId) throws org.apache.thrift.TException
- {
- deleteGroup_args args = new deleteGroup_args();
- args.setGroupId(groupId);
- sendBase("deleteGroup", args);
- }
-
- public boolean recv_deleteGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- deleteGroup_result result = new deleteGroup_result();
- receiveBase(result, "deleteGroup");
- 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, "deleteGroup failed: unknown result");
- }
-
- public org.apache.airavata.gov.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_getGroup(groupId);
- return recv_getGroup();
- }
-
- public void send_getGroup(String groupId) throws org.apache.thrift.TException
- {
- getGroup_args args = new getGroup_args();
- args.setGroupId(groupId);
- sendBase("getGroup", args);
- }
-
- public org.apache.airavata.gov.registry.models.UserGroup recv_getGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- getGroup_result result = new getGroup_result();
- receiveBase(result, "getGroup");
- 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, "getGroup failed: unknown result");
- }
-
- public List<org.apache.airavata.gov.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
- {
- send_getGroups(domain, offset, limit);
- return recv_getGroups();
- }
-
- public void send_getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
- {
- getGroups_args args = new getGroups_args();
- args.setDomain(domain);
- args.setOffset(offset);
- args.setLimit(limit);
- sendBase("getGroups", args);
- }
-
- public List<org.apache.airavata.gov.registry.models.UserGroup> recv_getGroups() throws org.apache.thrift.TException
- {
- getGroups_result result = new getGroups_result();
- receiveBase(result, "getGroups");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroups failed: unknown result");
- }
-
- public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_addUsersToGroup(userIds, groupId);
- return recv_addUsersToGroup();
- }
-
- public void send_addUsersToGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
- {
- addUsersToGroup_args args = new addUsersToGroup_args();
- args.setUserIds(userIds);
- args.setGroupId(groupId);
- sendBase("addUsersToGroup", args);
- }
-
- public boolean recv_addUsersToGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- addUsersToGroup_result result = new addUsersToGroup_result();
- receiveBase(result, "addUsersToGroup");
- 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, "addUsersToGroup failed: unknown result");
- }
-
- public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_removeUsersFromGroup(userIds, groupId);
- return recv_removeUsersFromGroup();
- }
-
- public void send_removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
- {
- removeUsersFromGroup_args args = new removeUsersFromGroup_args();
- args.setUserIds(userIds);
- args.setGroupId(groupId);
- sendBase("removeUsersFromGroup", args);
- }
-
- public boolean recv_removeUsersFromGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- removeUsersFromGroup_result result = new removeUsersFromGroup_result();
- receiveBase(result, "removeUsersFromGroup");
- 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, "removeUsersFromGroup failed: unknown result");
- }
-
- public Map<String,org.apache.airavata.gov.registry.models.GroupType> getGroupMembers(String groupId) throws org.apache.thrift.TException
- {
- send_getGroupMembers(groupId);
- return recv_getGroupMembers();
- }
-
- public void send_getGroupMembers(String groupId) throws org.apache.thrift.TException
- {
- getGroupMembers_args args = new getGroupMembers_args();
- args.setGroupId(groupId);
- sendBase("getGroupMembers", args);
- }
-
- public Map<String,org.apache.airavata.gov.registry.models.GroupType> recv_getGroupMembers() throws org.apache.thrift.TException
- {
- getGroupMembers_result result = new getGroupMembers_result();
- receiveBase(result, "getGroupMembers");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembers failed: unknown result");
- }
-
- public boolean createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_createEntityType(entityType);
- return recv_createEntityType();
- }
-
- public void send_createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.thrift.TException
- {
- createEntityType_args args = new createEntityType_args();
- args.setEntityType(entityType);
- sendBase("createEntityType", args);
- }
-
- public boolean recv_createEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- createEntityType_result result = new createEntityType_result();
- receiveBase(result, "createEntityType");
- 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, "createEntityType failed: unknown result");
- }
-
- public boolean updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_updateEntityType(entityType);
- return recv_updateEntityType();
- }
-
- public void send_updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.thrift.TException
- {
- updateEntityType_args args = new updateEntityType_args();
- args.setEntityType(entityType);
- sendBase("updateEntityType", args);
- }
-
- public boolean recv_updateEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- updateEntityType_result result = new updateEntityType_result();
- receiveBase(result, "updateEntityType");
- 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, "updateEntityType failed: unknown result");
- }
-
- public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_deleteEntityType(entityTypeId);
- return recv_deleteEntityType();
- }
-
- public void send_deleteEntityType(String entityTypeId) throws org.apache.thrift.TException
- {
- deleteEntityType_args args = new deleteEntityType_args();
- args.setEntityTypeId(entityTypeId);
- sendBase("deleteEntityType", args);
- }
-
- public boolean recv_deleteEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- deleteEntityType_result result = new deleteEntityType_result();
- receiveBase(result, "deleteEntityType");
- 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, "deleteEntityType failed: unknown result");
- }
-
- public org.apache.airavata.gov.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_getEntityType(entityTypeId);
- return recv_getEntityType();
- }
-
- public void send_getEntityType(String entityTypeId) throws org.apache.thrift.TException
- {
- getEntityType_args args = new getEntityType_args();
- args.setEntityTypeId(entityTypeId);
- sendBase("getEntityType", args);
- }
-
- public org.apache.airavata.gov.registry.models.EntityType recv_getEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- getEntityType_result result = new getEntityType_result();
- receiveBase(result, "getEntityType");
- 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, "getEntityType failed: unknown result");
- }
-
- public List<org.apache.airavata.gov.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
- {
- send_getEntityTypes(domain, offset, limit);
- return recv_getEntityTypes();
- }
-
- public void send_getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
- {
- getEntityTypes_args args = new getEntityTypes_args();
- args.setDomain(domain);
- args.setOffset(offset);
- args.setLimit(limit);
- sendBase("getEntityTypes", args);
- }
-
- public List<org.apache.airavata.gov.registry.models.EntityType> recv_getEntityTypes() throws org.apache.thrift.TException
- {
- getEntityTypes_result result = new getEntityTypes_result();
- receiveBase(result, "getEntityTypes");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEntityTypes failed: unknown result");
- }
-
- public boolean registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_registerEntity(entity);
- return recv_registerEntity();
- }
-
- public void send_registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.thrift.TException
- {
- registerEntity_args args = new registerEntity_args();
- args.setEntity(entity);
- sendBase("registerEntity", args);
- }
-
- public boolean recv_registerEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- registerEntity_result result = new registerEntity_result();
- receiveBase(result, "registerEntity");
- 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, "registerEntity failed: unknown result");
- }
-
- public boolean updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_updateEntity(entity);
- return recv_updateEntity();
- }
-
- public void send_updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.thrift.TException
- {
- updateEntity_args args = new updateEntity_args();
- args.setEntity(entity);
- sendBase("updateEntity", args);
- }
-
- public boolean recv_updateEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- updateEntity_result result = new updateEntity_result();
- receiveBase(result, "updateEntity");
- 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, "updateEntity failed: unknown result");
- }
-
- public boolean deleteEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_deleteEntity(entityId);
- return recv_deleteEntity();
- }
-
- public void send_deleteEntity(String entityId) throws org.apache.thrift.TException
- {
- deleteEntity_args args = new deleteEntity_args();
- args.setEntityId(entityId);
- sendBase("deleteEntity", args);
- }
-
- public boolean recv_deleteEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- deleteEntity_result result = new deleteEntity_result();
- receiveBase(result, "deleteEntity");
- 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, "deleteEntity failed: unknown result");
- }
-
- public org.apache.airavata.gov.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_getEntity(entityId);
- return recv_getEntity();
- }
-
- public void send_getEntity(String entityId) throws org.apache.thrift.TException
- {
- getEntity_args args = new getEntity_args();
- args.setEntityId(entityId);
- sendBase("getEntity", args);
- }
-
- public org.apache.airavata.gov.registry.models.Entity recv_getEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- getEntity_result result = new getEntity_result();
- receiveBase(result, "getEntity");
- 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, "getEntity failed: unknown result");
- }
-
- public List<org.apache.airavata.gov.registry.models.Entity> searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_searchEntities(domain, entityType, filters, offset, limit);
- return recv_searchEntities();
- }
-
- public void send_searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.thrift.TException
- {
- searchEntities_args args = new searchEntities_args();
- args.setDomain(domain);
- args.setEntityType(entityType);
- args.setFilters(filters);
- args.setOffset(offset);
- args.setLimit(limit);
- sendBase("searchEntities", args);
- }
-
- public List<org.apache.airavata.gov.registry.models.Entity> recv_searchEntities() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- searchEntities_result result = new searchEntities_result();
- receiveBase(result, "searchEntities");
- 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, "searchEntities failed: unknown result");
- }
-
- public boolean createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_createPermissionType(permisionType);
- return recv_createPermissionType();
- }
-
- public void send_createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.thrift.TException
- {
- createPermissionType_args args = new createPermissionType_args();
- args.setPermisionType(permisionType);
- sendBase("createPermissionType", args);
- }
-
- public boolean recv_createPermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- createPermissionType_result result = new createPermissionType_result();
- receiveBase(result, "createPermissionType");
- 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, "createPermissionType failed: unknown result");
- }
-
- public boolean updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_updatePermissionType(permisionType);
- return recv_updatePermissionType();
- }
-
- public void send_updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.thrift.TException
- {
- updatePermissionType_args args = new updatePermissionType_args();
- args.setPermisionType(permisionType);
- sendBase("updatePermissionType", args);
- }
-
- public boolean recv_updatePermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- updatePermissionType_result result = new updatePermissionType_result();
- receiveBase(result, "updatePermissionType");
- 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, "updatePermissionType failed: unknown result");
- }
-
- public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_deletePermissionType(entityTypeId);
- return recv_deletePermissionType();
- }
-
- public void send_deletePermissionType(String entityTypeId) throws org.apache.thrift.TException
- {
- deletePermissionType_args args = new deletePermissionType_args();
- args.setEntityTypeId(entityTypeId);
- sendBase("deletePermissionType", args);
- }
-
- public boolean recv_deletePermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- deletePermissionType_result result = new deletePermissionType_result();
- receiveBase(result, "deletePermissionType");
- 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, "deletePermissionType failed: unknown result");
- }
-
- public org.apache.airavata.gov.registry.models.PermissionType getPermissionType(String permisionTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_getPermissionType(permisionTypeId);
- return recv_getPermissionType();
- }
-
- public void send_getPermissionType(String permisionTypeId) throws org.apache.thrift.TException
- {
- getPermissionType_args args = new getPermissionType_args();
- args.setPermisionTypeId(permisionTypeId);
- sendBase("getPermissionType", args);
- }
-
- public org.apache.airavata.gov.registry.models.PermissionType recv_getPermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- getPermissionType_result result = new getPermissionType_result();
- receiveBase(result, "getPermissionType");
- 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, "getPermissionType failed: unknown result");
- }
-
- public List<org.apache.airavata.gov.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- send_getPermissionTypes(domain, offset, limit);
- return recv_getPermissionTypes();
- }
-
- public void send_getPermissionTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
- {
- getPermissionTypes_args args = new getPermissionTypes_args();
- args.setDomain(domain);
- args.setOffset(offset);
- args.setLimit(limit);
- sendBase("getPermissionTypes", args);
- }
-
- public List<org.apache.airavata.gov.registry.models.PermissionType> recv_getPermissionTypes() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
- {
- getPermissionTypes_result result = new getPermissionTypes_result();
- receiveBase(result, "getPermissionTypes");
- 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, "getPermissionTypes 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> {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
- public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void createDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- createDomain_call method_call = new createDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class createDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.gov.registry.models.Domain domain;
- public createDomain_call(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.domain = domain;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
- createDomain_args args = new createDomain_args();
- args.setDomain(domain);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_createDomain();
- }
- }
-
- public void updateDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- updateDomain_call method_call = new updateDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class updateDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.gov.registry.models.Domain domain;
- public updateDomain_call(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.domain = domain;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
- updateDomain_args args = new updateDomain_args();
- args.setDomain(domain);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_updateDomain();
- }
- }
-
- public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteDomain_call method_call = new deleteDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String domainId;
- public deleteDomain_call(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.domainId = domainId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteDomain_args args = new deleteDomain_args();
- args.setDomainId(domainId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_deleteDomain();
- }
- }
-
- public void getDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getDomain_call method_call = new getDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String domainId;
- public getDomain_call(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.domainId = domainId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getDomain_args args = new getDomain_args();
- args.setDomainId(domainId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.gov.registry.models.Domain getResult() throws org.apache.airavata.gov.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_getDomain();
- }
- }
-
- public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getDomains_call method_call = new getDomains_call(offset, limit, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getDomains_call extends org.apache.thrift.async.TAsyncMethodCall {
- private int offset;
- private int limit;
- public getDomains_call(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.offset = offset;
- this.limit = limit;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDomains", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getDomains_args args = new getDomains_args();
- args.setOffset(offset);
- args.setLimit(limit);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<org.apache.airavata.gov.registry.models.Domain> getResult() throws 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_getDomains();
- }
- }
-
- public void registerUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- registerUser_call method_call = new registerUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class registerUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.gov.registry.models.User user;
- public registerUser_call(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.user = user;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- registerUser_args args = new registerUser_args();
- args.setUser(user);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_registerUser();
- }
- }
-
- public void updatedUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- updatedUser_call method_call = new updatedUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class updatedUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.gov.registry.models.User user;
- public updatedUser_call(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.user = user;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatedUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- updatedUser_args args = new updatedUser_args();
- args.setUser(user);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_updatedUser();
- }
- }
-
- public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteUser_call method_call = new deleteUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userId;
- public deleteUser_call(String userId, 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.userId = userId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteUser_args args = new deleteUser_args();
- args.setUserId(userId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_deleteUser();
- }
- }
-
- public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getUser_call method_call = new getUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userId;
- public getUser_call(String userId, 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.userId = userId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getUser_args args = new getUser_args();
- args.setUserId(userId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.gov.registry.models.User getResult() throws org.apache.airavata.gov.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_getUser();
- }
- }
-
- public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getUsers_call method_call = new getUsers_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String domain;
- private int offset;
- private int limit;
- public getUsers_call(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.domain = domain;
- this.offset = offset;
- this.limit = limit;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getUsers_args args = new getUsers_args();
- args.setDomain(domain);
- args.setOffset(offset);
- args.setLimit(limit);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<org.apache.airavata.gov.registry.models.User> getResult() throws 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_getUsers();
- }
- }
-
- public void createGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- createGroup_call method_call = new createGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class createGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.gov.registry.models.UserGroup group;
- public createGroup_call(org.apache.airavata.gov.registry.models.UserGroup group, 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.group = group;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
- createGroup_args args = new createGroup_args();
- args.setGroup(group);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_createGroup();
- }
- }
-
- public void updateGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- updateGroup_call method_call = new updateGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class updateGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.gov.registry.models.UserGroup group;
- public updateGroup_call(org.apache.airavata.gov.registry.models.UserGroup group, 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.group = group;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
- updateGroup_args args = new updateGroup_args();
- args.setGroup(group);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_updateGroup();
- }
- }
-
- public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteGroup_call method_call = new deleteGroup_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String groupId;
- public deleteGroup_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.groupId = groupId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteGroup_args args = new deleteGroup_args();
- args.setGroupId(groupId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_deleteGroup();
- }
- }
-
- public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getGroup_call method_call = new getGroup_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String groupId;
- public getGroup_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.groupId = groupId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getGroup_args args = new getGroup_args();
- args.setGroupId(groupId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.gov.registry.models.UserGroup getResult() throws org.apache.airavata.gov.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_getGroup();
- }
- }
-
- public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getGroups_call method_call = new getGroups_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String domain;
- private int offset;
- private int limit;
- public getGroups_call(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.domain = domain;
- this.offset = offset;
- this.limit = limit;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getGroups_args args = new getGroups_args();
- args.setDomain(domain);
- args.setOffset(offset);
- args.setLimit(limit);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<org.apache.airavata.gov.registry.models.UserGroup> getResult() throws 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_getGroups();
- }
- }
-
- public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- addUsersToGroup_call method_call = new addUsersToGroup_call(userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class addUsersToGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
- private List<String> userIds;
- private String groupId;
- public addUsersToGroup_call(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userIds = userIds;
- this.groupId = groupId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUsersToGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
- addUsersToGroup_args args = new addUsersToGroup_args();
- args.setUserIds(userIds);
- args.setGroupId(groupId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_addUsersToGroup();
- }
- }
-
- public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- removeUsersFromGroup_call method_call = new removeUsersFromGroup_call(userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class removeUsersFromGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
- private List<String> userIds;
- private String groupId;
- public removeUsersFromGroup_call(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userIds = userIds;
- this.groupId = groupId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeUsersFromGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
- removeUsersFromGroup_args args = new removeUsersFromGroup_args();
- args.setUserIds(userIds);
- args.setGroupId(groupId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.airavata.gov.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_removeUsersFromGroup();
- }
- }
-
- public void getGroupMembers(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getGroupMembers_call method_call = new getGroupMembers_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getGroupMembers_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String groupId;
- public getGroupMembers_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.groupId = groupId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroupMembers", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getGroupMembers_args args = new getGroupMembers_args();
- args.setGroupId(groupId);
- args.write(prot);
- pro
<TRUNCATED>
[46/50] [abbrv] 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/f3c365ab
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f3c365ab
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f3c365ab
Branch: refs/heads/airavata-gov-registry
Commit: f3c365abcff5877d9d1c9f71aef013eb2a5a2e39
Parents: 0e21ebc
Author: scnakandala <su...@gmail.com>
Authored: Fri Sep 23 18:51:24 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Oct 3 11:33:14 2016 -0400
----------------------------------------------------------------------
airavata-gov-registry/README.md | 3 -
.../airavata-gov-registry-core/pom.xml | 93 -
.../gov/registry/db/entities/DomainEntity.java | 113 -
.../gov/registry/db/entities/EntityEntity.java | 186 -
.../registry/db/entities/EntityTypeEntity.java | 136 -
.../db/entities/GroupMembershipEntity.java | 88 -
.../db/entities/GroupMembershipEntityPK.java | 74 -
.../db/entities/PermissionTypeEntity.java | 124 -
.../gov/registry/db/entities/SharingEntity.java | 111 -
.../registry/db/entities/SharingEntityPK.java | 88 -
.../gov/registry/db/entities/UserEntity.java | 123 -
.../registry/db/entities/UserGroupEntity.java | 172 -
.../db/repositories/AbstractRepository.java | 85 -
.../db/repositories/DomainRepository.java | 34 -
.../db/repositories/UserGroupRepository.java | 34 -
.../db/repositories/UserRepository.java | 34 -
.../gov/registry/db/utils/Committer.java | 27 -
.../gov/registry/db/utils/DBConstants.java | 40 -
.../gov/registry/db/utils/JPAUtils.java | 111 -
.../db/utils/ObjectMapperSingleton.java | 39 -
.../gov/registry/db/utils/QueryGenerator.java | 53 -
.../gov/registry/server/GovRegistryServer.java | 28 -
.../server/GovRegistryServerHandler.java | 223 -
.../src/main/resources/META-INF/persistence.xml | 15 -
.../src/main/resources/gov-registry.sql | 123 -
.../gov/registry/db/RepositoriesTest.java | 113 -
.../airavata-gov-registry-stubs/pom.xml | 23 -
.../airavata/gov/registry/models/Domain.java | 800 -
.../airavata/gov/registry/models/Entity.java | 1511 -
.../gov/registry/models/EntityType.java | 924 -
.../registry/models/GovRegistryException.java | 391 -
.../airavata/gov/registry/models/GroupType.java | 45 -
.../gov/registry/models/PermissionType.java | 817 -
.../airavata/gov/registry/models/User.java | 817 -
.../airavata/gov/registry/models/UserGroup.java | 1154 -
.../models/gov_reg_modelsConstants.java | 41 -
.../service/cpi/GovRegistryService.java | 33673 -----------------
.../airavata-sharing-registry-core/pom.xml | 93 +
.../gov/registry/db/entities/DomainEntity.java | 113 +
.../gov/registry/db/entities/EntityEntity.java | 186 +
.../registry/db/entities/EntityTypeEntity.java | 136 +
.../db/entities/GroupMembershipEntity.java | 88 +
.../db/entities/GroupMembershipEntityPK.java | 74 +
.../db/entities/PermissionTypeEntity.java | 124 +
.../gov/registry/db/entities/SharingEntity.java | 111 +
.../registry/db/entities/SharingEntityPK.java | 88 +
.../gov/registry/db/entities/UserEntity.java | 123 +
.../registry/db/entities/UserGroupEntity.java | 172 +
.../db/repositories/AbstractRepository.java | 85 +
.../db/repositories/DomainRepository.java | 34 +
.../db/repositories/UserGroupRepository.java | 34 +
.../db/repositories/UserRepository.java | 34 +
.../gov/registry/db/utils/Committer.java | 27 +
.../gov/registry/db/utils/DBConstants.java | 40 +
.../gov/registry/db/utils/JPAUtils.java | 111 +
.../db/utils/ObjectMapperSingleton.java | 39 +
.../gov/registry/db/utils/QueryGenerator.java | 53 +
.../gov/registry/server/GovRegistryServer.java | 28 +
.../server/GovRegistryServerHandler.java | 223 +
.../src/main/resources/META-INF/persistence.xml | 15 +
.../src/main/resources/gov-registry.sql | 123 +
.../gov/registry/db/RepositoriesTest.java | 113 +
.../airavata-sharing-registry-stubs/pom.xml | 23 +
.../airavata/gov/registry/models/Domain.java | 800 +
.../airavata/gov/registry/models/Entity.java | 1511 +
.../gov/registry/models/EntityType.java | 924 +
.../registry/models/GovRegistryException.java | 391 +
.../airavata/gov/registry/models/GroupType.java | 45 +
.../gov/registry/models/PermissionType.java | 817 +
.../airavata/gov/registry/models/User.java | 817 +
.../airavata/gov/registry/models/UserGroup.java | 1154 +
.../models/gov_reg_modelsConstants.java | 41 +
.../service/cpi/GovRegistryService.java | 33673 +++++++++++++++++
airavata-gov-registry/pom.xml | 20 -
.../thrift_models/gov_reg_cpi.thrift | 85 -
.../thrift_models/gov_reg_models.thrift | 92 -
.../thrift_models/gov_sharing_cpi.thrift | 85 +
.../thrift_models/gov_sharing_models.thrift | 92 +
.../thrift_models/thrift-gen.sh | 16 -
modules/airavata-sharing-registry/README.md | 3 +
.../airavata-sharing-registry-core/pom.xml | 93 +
.../registry/db/entities/DomainEntity.java | 113 +
.../registry/db/entities/EntityEntity.java | 214 +
.../registry/db/entities/EntityTypeEntity.java | 136 +
.../db/entities/GroupMembershipEntity.java | 112 +
.../db/entities/GroupMembershipEntityPK.java | 74 +
.../db/entities/PermissionTypeEntity.java | 136 +
.../registry/db/entities/SharingEntity.java | 135 +
.../registry/db/entities/SharingEntityPK.java | 113 +
.../registry/db/entities/UserEntity.java | 123 +
.../registry/db/entities/UserGroupEntity.java | 172 +
.../db/repositories/AbstractRepository.java | 133 +
.../db/repositories/DomainRepository.java | 34 +
.../db/repositories/EntityRepository.java | 34 +
.../db/repositories/EntityTypeRepository.java | 34 +
.../repositories/GroupMembershipRepository.java | 98 +
.../repositories/PermissionTypeRepository.java | 34 +
.../db/repositories/SharingRepository.java | 34 +
.../db/repositories/UserGroupRepository.java | 34 +
.../db/repositories/UserRepository.java | 35 +
.../sharing/registry/db/utils/Committer.java | 27 +
.../sharing/registry/db/utils/DBConstants.java | 57 +
.../sharing/registry/db/utils/JPAUtils.java | 111 +
.../db/utils/ObjectMapperSingleton.java | 39 +
.../registry/server/GovRegistryServer.java | 28 +
.../server/GovRegistryServerHandler.java | 223 +
.../src/main/resources/META-INF/persistence.xml | 15 +
.../src/main/resources/gov-registry.sql | 135 +
.../sharing/registry/db/RepositoriesTest.java | 353 +
.../airavata-sharing-registry-stubs/pom.xml | 23 +
.../sharing/registry/models/Domain.java | 817 +
.../sharing/registry/models/Entity.java | 1511 +
.../sharing/registry/models/EntityType.java | 924 +
.../registry/models/GovRegistryException.java | 391 +
.../sharing/registry/models/GroupChildType.java | 41 +
.../registry/models/GroupMembership.java | 830 +
.../sharing/registry/models/GroupType.java | 45 +
.../sharing/registry/models/PermissionType.java | 924 +
.../sharing/registry/models/Sharing.java | 814 +
.../airavata/sharing/registry/models/User.java | 817 +
.../sharing/registry/models/UserGroup.java | 1154 +
.../models/sharing_modelsConstants.java | 41 +
.../service/cpi/GovRegistryService.java | 33673 +++++++++++++++++
modules/airavata-sharing-registry/pom.xml | 27 +
.../thrift_models/sharing_cpi.thrift | 85 +
.../thrift_models/sharing_models.thrift | 115 +
.../thrift_models/thrift-gen.sh | 16 +
.../src/main/resources/META-INF/persistence.xml | 118 -
pom.xml | 1 +
129 files changed, 87771 insertions(+), 42797 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/README.md
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/README.md b/airavata-gov-registry/README.md
deleted file mode 100644
index 299e7b4..0000000
--- a/airavata-gov-registry/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Airavata Governance Registry
-
-* This module implements a generic service for access controlling to resources and to provide group based resource sharing
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/pom.xml b/airavata-gov-registry/airavata-gov-registry-core/pom.xml
deleted file mode 100644
index 84ca5ff..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/pom.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>gov-registry</artifactId>
- <groupId>org.apache.airavata</groupId>
- <relativePath>../pom.xml</relativePath>
- <version>${global.version}</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>airavata-gov-registry-core</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.10</version>
- </dependency>
- <dependency>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- <version>0.9.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-gov-registry-stubs</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-commons</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.dozer</groupId>
- <artifactId>dozer</artifactId>
- <version>5.4.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-all</artifactId>
- <version>2.2.0</version>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.34</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.5.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-maven-plugin</artifactId>
- <version>2.2.0</version>
- <configuration>
- <includes>**/entities/*.class</includes>
- <excludes>**/entities/XML*.class</excludes>
- <addDefaultConstructor>true</addDefaultConstructor>
- <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
- </configuration>
- <executions>
- <execution>
- <id>enhancer</id>
- <phase>process-classes</phase>
- <goals>
- <goal>enhance</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa</artifactId>
- <version>2.2.0</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
deleted file mode 100644
index 0de9d62..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/DomainEntity.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "DOMAIN", schema = "" )
-public class DomainEntity {
- private final static Logger logger = LoggerFactory.getLogger(DomainEntity.class);
- private String domainId;
- private String name;
- private String description;
- private String createdTime;
- private String updatedTime;
-
- @Id
- @Column(name = "DOMAIN_ID")
- public String getDomainId() {
- return domainId;
- }
-
- public void setDomainId(String domainId) {
- this.domainId = domainId;
- }
-
- @Basic
- @Column(name = "NAME")
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Basic
- @Column(name = "DESCRIPTION")
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- @Basic
- @Column(name = "CREATED_TIME")
- public String getCreatedTime() {
- return createdTime;
- }
-
- public void setCreatedTime(String createdTime) {
- this.createdTime = createdTime;
- }
-
- @Basic
- @Column(name = "UPDATED_TIME")
- public String getUpdatedTime() {
- return updatedTime;
- }
-
- public void setUpdatedTime(String updatedTime) {
- this.updatedTime = updatedTime;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- DomainEntity that = (DomainEntity) o;
-
- if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
- if (name != null ? !name.equals(that.name) : that.name != null) return false;
- if (description != null ? !description.equals(that.description) : that.description != null) return false;
- if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
- if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = domainId != null ? domainId.hashCode() : 0;
- result = 31 * result + (name != null ? name.hashCode() : 0);
- result = 31 * result + (description != null ? description.hashCode() : 0);
- result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
- result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
- return result;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
deleted file mode 100644
index e472790..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityEntity.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.util.Arrays;
-
-@Entity
-@Table(name = "ENTITY", schema = "")
-public class EntityEntity {
- private final static Logger logger = LoggerFactory.getLogger(EntityEntity.class);
- private String entityId;
- private String domainId;
- private String parentEntityId;
- private String name;
- private String description;
- private byte[] metadata;
- private String fullText;
- private String createdTime;
- private String updatedTime;
- private DomainEntity domainByDomainId;
- private EntityEntity entityByParentEntityId;
-
- @Id
- @Column(name = "ENTITY_ID")
- public String getEntityId() {
- return entityId;
- }
-
- public void setEntityId(String entityId) {
- this.entityId = entityId;
- }
-
- @Basic
- @Column(name = "DOMAIN_ID")
- public String getDomainId() {
- return domainId;
- }
-
- public void setDomainId(String domainId) {
- this.domainId = domainId;
- }
-
- @Basic
- @Column(name = "PARENT_ENTITY_ID")
- public String getParentEntityId() {
- return parentEntityId;
- }
-
- public void setParentEntityId(String parentEntityId) {
- this.parentEntityId = parentEntityId;
- }
-
- @Basic
- @Column(name = "NAME")
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Basic
- @Column(name = "DESCRIPTION")
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- @Basic
- @Column(name = "METADATA")
- public byte[] getMetadata() {
- return metadata;
- }
-
- public void setMetadata(byte[] metadata) {
- this.metadata = metadata;
- }
-
- @Basic
- @Column(name = "FULL_TEXT")
- public String getFullText() {
- return fullText;
- }
-
- public void setFullText(String fullText) {
- this.fullText = fullText;
- }
-
- @Basic
- @Column(name = "CREATED_TIME")
- public String getCreatedTime() {
- return createdTime;
- }
-
- public void setCreatedTime(String createdTime) {
- this.createdTime = createdTime;
- }
-
- @Basic
- @Column(name = "UPDATED_TIME")
- public String getUpdatedTime() {
- return updatedTime;
- }
-
- public void setUpdatedTime(String updatedTime) {
- this.updatedTime = updatedTime;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- EntityEntity that = (EntityEntity) o;
-
- if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
- if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
- if (parentEntityId != null ? !parentEntityId.equals(that.parentEntityId) : that.parentEntityId != null) return false;
- if (name != null ? !name.equals(that.name) : that.name != null) return false;
- if (description != null ? !description.equals(that.description) : that.description != null) return false;
- if (!Arrays.equals(metadata, that.metadata)) return false;
- if (fullText != null ? !fullText.equals(that.fullText) : that.fullText != null) return false;
- if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
- if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = entityId != null ? entityId.hashCode() : 0;
- result = 31 * result + (name != null ? name.hashCode() : 0);
- result = 31 * result + (description != null ? description.hashCode() : 0);
- result = 31 * result + (metadata != null ? Arrays.hashCode(metadata) : 0);
- result = 31 * result + (fullText != null ? fullText.hashCode() : 0);
- result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
- result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
- return result;
- }
-
- @ManyToOne
- @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
- public DomainEntity getDomainByDomainId() {
- return domainByDomainId;
- }
-
- public void setDomainByDomainId(DomainEntity domainByDomainId) {
- this.domainByDomainId = domainByDomainId;
- }
-
- @ManyToOne
- @JoinColumn(name = "PARENT_ENTITY_ID", referencedColumnName = "ENTITY_ID")
- public EntityEntity getEntityByParentEntityId() {
- return entityByParentEntityId;
- }
-
- public void setEntityByParentEntityId(EntityEntity entityByParentEntityId) {
- this.entityByParentEntityId = entityByParentEntityId;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
deleted file mode 100644
index 63c5e2f..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/EntityTypeEntity.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "ENTITY_TYPE", schema = "")
-public class EntityTypeEntity {
- private final static Logger logger = LoggerFactory.getLogger(EntityTypeEntity.class);
- private String entityTypeId;
- private String domainId;
- private String name;
- private String description;
- private String createdTime;
- private String updatedTime;
- private DomainEntity domainByDomainId;
-
- @Id
- @Column(name = "ENTITY_TYPE_ID")
- public String getEntityTypeId() {
- return entityTypeId;
- }
-
- public void setEntityTypeId(String entityTypeId) {
- this.entityTypeId = entityTypeId;
- }
-
- @Basic
- @Column(name = "DOMAIN_ID")
- public String getDomainId() {
- return domainId;
- }
-
- public void setDomainId(String domainId) {
- this.domainId = domainId;
- }
-
- @Basic
- @Column(name = "NAME")
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Basic
- @Column(name = "DESCRIPTION")
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- @Basic
- @Column(name = "CREATED_TIME")
- public String getCreatedTime() {
- return createdTime;
- }
-
- public void setCreatedTime(String createdTime) {
- this.createdTime = createdTime;
- }
-
- @Basic
- @Column(name = "UPDATED_TIME")
- public String getUpdatedTime() {
- return updatedTime;
- }
-
- public void setUpdatedTime(String updatedTime) {
- this.updatedTime = updatedTime;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- EntityTypeEntity that = (EntityTypeEntity) o;
-
- if (entityTypeId != null ? !entityTypeId.equals(that.entityTypeId) : that.entityTypeId != null) return false;
- if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
- if (name != null ? !name.equals(that.name) : that.name != null) return false;
- if (description != null ? !description.equals(that.description) : that.description != null) return false;
- if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
- if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = entityTypeId != null ? entityTypeId.hashCode() : 0;
- result = 31 * result + (name != null ? name.hashCode() : 0);
- result = 31 * result + (description != null ? description.hashCode() : 0);
- result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
- result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
- return result;
- }
-
- @ManyToOne
- @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
- public DomainEntity getDomainByDomainId() {
- return domainByDomainId;
- }
-
- public void setDomainByDomainId(DomainEntity domainByDomainId) {
- this.domainByDomainId = domainByDomainId;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
deleted file mode 100644
index 8fd9329..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntity.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "GROUP_MEMBERSHIP", schema = "")
-@IdClass(GroupMembershipEntityPK.class)
-public class GroupMembershipEntity {
- private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntity.class);
- private String parentId;
- private String childId;
- private String childType;
-
- @Id
- @Column(name = "PARENT_ID")
- public String getParentId() {
- return parentId;
- }
-
- public void setParentId(String parentId) {
- this.parentId = parentId;
- }
-
- @Id
- @Column(name = "CHILD_ID")
- public String getChildId() {
- return childId;
- }
-
- public void setChildId(String childId) {
- this.childId = childId;
- }
-
- @Basic
- @Column(name = "CHILD_TYPE")
- public String getChildType() {
- return childType;
- }
-
- public void setChildType(String childType) {
- this.childType = childType;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- GroupMembershipEntity that = (GroupMembershipEntity) o;
-
- if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
- if (childId != null ? !childId.equals(that.childId) : that.childId != null) return false;
- if (childType != null ? !childType.equals(that.childType) : that.childType != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = parentId != null ? parentId.hashCode() : 0;
- result = 31 * result + (childId != null ? childId.hashCode() : 0);
- result = 31 * result + (childType != null ? childType.hashCode() : 0);
- return result;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
deleted file mode 100644
index 2dfbefb..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/GroupMembershipEntityPK.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.Column;
-import javax.persistence.Id;
-import java.io.Serializable;
-
-public class GroupMembershipEntityPK implements Serializable {
- private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntityPK.class);
- private String parentId;
- private String childId;
-
- @Column(name = "PARENT_ID")
- @Id
- public String getParentId() {
- return parentId;
- }
-
- public void setParentId(String parentId) {
- this.parentId = parentId;
- }
-
- @Column(name = "CHILD_ID")
- @Id
- public String getChildId() {
- return childId;
- }
-
- public void setChildId(String childId) {
- this.childId = childId;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- GroupMembershipEntityPK that = (GroupMembershipEntityPK) o;
-
- if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
- if (childId != null ? !childId.equals(that.childId) : that.childId != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = parentId != null ? parentId.hashCode() : 0;
- result = 31 * result + (childId != null ? childId.hashCode() : 0);
- return result;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
deleted file mode 100644
index ecc37b6..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/PermissionTypeEntity.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "PERMISSION_TYPE", schema = "")
-public class PermissionTypeEntity {
- private final static Logger logger = LoggerFactory.getLogger(PermissionTypeEntity.class);
- private String permissionTypeId;
- private String domainId;
- private String name;
- private String createdTime;
- private String updatedTime;
- private DomainEntity domainByDomainId;
-
- @Id
- @Column(name = "PERMISSION_TYPE_ID")
- public String getPermissionTypeId() {
- return permissionTypeId;
- }
-
- public void setPermissionTypeId(String permissionTypeId) {
- this.permissionTypeId = permissionTypeId;
- }
-
- @Basic
- @Column(name = "DOMAIN_ID")
- public String getDomainId() {
- return domainId;
- }
-
- public void setDomainId(String domainId) {
- this.domainId = domainId;
- }
-
- @Basic
- @Column(name = "NAME")
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Basic
- @Column(name = "CREATED_TIME")
- public String getCreatedTime() {
- return createdTime;
- }
-
- public void setCreatedTime(String createdTime) {
- this.createdTime = createdTime;
- }
-
- @Basic
- @Column(name = "UPDATED_TIME")
- public String getUpdatedTime() {
- return updatedTime;
- }
-
- public void setUpdatedTime(String updatedTime) {
- this.updatedTime = updatedTime;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- PermissionTypeEntity that = (PermissionTypeEntity) o;
-
- if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
- return false;
- if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
- if (name != null ? !name.equals(that.name) : that.name != null) return false;
- if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
- if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
- result = 31 * result + (name != null ? name.hashCode() : 0);
- result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
- result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
- return result;
- }
-
- @ManyToOne
- @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
- public DomainEntity getDomainByDomainId() {
- return domainByDomainId;
- }
-
- public void setDomainByDomainId(DomainEntity domainByDomainId) {
- this.domainByDomainId = domainByDomainId;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
deleted file mode 100644
index e9b949d..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntity.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "SHARING", schema = "")
-@IdClass(SharingEntityPK.class)
-public class SharingEntity {
- private final static Logger logger = LoggerFactory.getLogger(SharingEntity.class);
- private String permissionTypeId;
- private String entityId;
- private String groupId;
- private PermissionTypeEntity permissionTypeByPermissionTypeId;
- private EntityTypeEntity entityTypeByEntityTypeId;
-
- @Id
- @Column(name = "PERMISSION_TYPE_ID")
- public String getPermissionTypeId() {
- return permissionTypeId;
- }
-
- public void setPermissionTypeId(String permissionTypeId) {
- this.permissionTypeId = permissionTypeId;
- }
-
- @Id
- @Column(name = "ENTITY_ID")
- public String getEntityId() {
- return entityId;
- }
-
- public void setEntityId(String entityId) {
- this.entityId = entityId;
- }
-
- @Id
- @Column(name = "GROUP_ID")
- public String getGroupId() {
- return groupId;
- }
-
- public void setGroupId(String groupId) {
- this.groupId = groupId;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- SharingEntity that = (SharingEntity) o;
-
- if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
- return false;
- if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
- if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
- result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
- result = 31 * result + (groupId != null ? groupId.hashCode() : 0);
- return result;
- }
-
- @ManyToOne
- @JoinColumn(name = "PERMISSION_TYPE_ID", referencedColumnName = "PERMISSION_TYPE_ID", nullable = false)
- public PermissionTypeEntity getPermissionTypeByPermissionTypeId() {
- return permissionTypeByPermissionTypeId;
- }
-
- public void setPermissionTypeByPermissionTypeId(PermissionTypeEntity permissionTypeByPermissionTypeId) {
- this.permissionTypeByPermissionTypeId = permissionTypeByPermissionTypeId;
- }
-
- @ManyToOne
- @JoinColumn(name = "ENTITY_TYPE_ID", referencedColumnName = "ENTITY_TYPE_ID")
- public EntityTypeEntity getEntityTypeByEntityTypeId() {
- return entityTypeByEntityTypeId;
- }
-
- public void setEntityTypeByEntityTypeId(EntityTypeEntity entityTypeByEntityTypeId) {
- this.entityTypeByEntityTypeId = entityTypeByEntityTypeId;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
deleted file mode 100644
index 8274904..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/SharingEntityPK.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.Column;
-import javax.persistence.Id;
-import java.io.Serializable;
-
-public class SharingEntityPK implements Serializable {
- private final static Logger logger = LoggerFactory.getLogger(SharingEntityPK.class);
- private String permissionTypeId;
- private String entityId;
- private String groupId;
-
- @Column(name = "PERMISSION_TYPE_ID")
- @Id
- public String getPermissionTypeId() {
- return permissionTypeId;
- }
-
- public void setPermissionTypeId(String permissionTypeId) {
- this.permissionTypeId = permissionTypeId;
- }
-
- @Column(name = "ENTITY_ID")
- @Id
- public String getEntityId() {
- return entityId;
- }
-
- public void setEntityId(String entityId) {
- this.entityId = entityId;
- }
-
- @Column(name = "GROUP_ID")
- @Id
- public String getGroupId() {
- return groupId;
- }
-
- public void setGroupId(String groupId) {
- this.groupId = groupId;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- SharingEntityPK that = (SharingEntityPK) o;
-
- if (permissionTypeId != null ? !permissionTypeId.equals(that.permissionTypeId) : that.permissionTypeId != null)
- return false;
- if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
- if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
- result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
- result = 31 * result + (groupId != null ? groupId.hashCode() : 0);
- return result;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
deleted file mode 100644
index 7201651..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserEntity.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "USER", schema = "")
-public class UserEntity {
- private final static Logger logger = LoggerFactory.getLogger(UserEntity.class);
- private String userId;
- private String domainId;
- private String userName;
- private String createdTime;
- private String updatedTime;
- private DomainEntity domainByDomainId;
-
- @Id
- @Column(name = "USER_ID")
- public String getUserId() {
- return userId;
- }
-
- public void setUserId(String userId) {
- this.userId = userId;
- }
-
- @Basic
- @Column(name = "DOMAIN_ID")
- public String getDomainId() {
- return domainId;
- }
-
- public void setDomainId(String domainId) {
- this.domainId = domainId;
- }
-
- @Basic
- @Column(name = "USER_NAME")
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- @Basic
- @Column(name = "CREATED_TIME")
- public String getCreatedTime() {
- return createdTime;
- }
-
- public void setCreatedTime(String createdTime) {
- this.createdTime = createdTime;
- }
-
- @Basic
- @Column(name = "UPDATED_TIME")
- public String getUpdatedTime() {
- return updatedTime;
- }
-
- public void setUpdatedTime(String updatedTime) {
- this.updatedTime = updatedTime;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- UserEntity that = (UserEntity) o;
-
- if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
- if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
- if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
- if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
- if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = userId != null ? userId.hashCode() : 0;
- result = 31 * result + (userName != null ? userName.hashCode() : 0);
- result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
- result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
- return result;
- }
-
- @ManyToOne
- @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
- public DomainEntity getDomainByDomainId() {
- return domainByDomainId;
- }
-
- public void setDomainByDomainId(DomainEntity domainByDomainId) {
- this.domainByDomainId = domainByDomainId;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
deleted file mode 100644
index aacf263..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/entities/UserGroupEntity.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "USER_GROUP", schema = "")
-public class UserGroupEntity {
- private final static Logger logger = LoggerFactory.getLogger(UserGroupEntity.class);
- private String groupId;
- private String domainId;
- private String name;
- private String description;
- private String ownerId;
- private String type;
- private String createdTime;
- private String updatedTime;
- private DomainEntity domainByDomainId;
- private UserEntity userByOwnerId;
-
- @Id
- @Column(name = "GROUP_ID")
- public String getGroupId() {
- return groupId;
- }
-
- public void setGroupId(String groupId) {
- this.groupId = groupId;
- }
-
- @Basic
- @Column(name = "DOMAIN_ID")
- public String getDomainId() {
- return domainId;
- }
-
- public void setDomainId(String domainId) {
- this.domainId = domainId;
- }
-
- @Basic
- @Column(name = "OWNER_ID")
- public String getOwnerId() {
- return ownerId;
- }
-
- public void setOwnerId(String ownerId) {
- this.ownerId = ownerId;
- }
-
- @Basic
- @Column(name = "NAME")
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Basic
- @Column(name = "DESCRIPTION")
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- @Basic
- @Column(name = "TYPE")
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- @Basic
- @Column(name = "CREATED_TIME")
- public String getCreatedTime() {
- return createdTime;
- }
-
- public void setCreatedTime(String createdTime) {
- this.createdTime = createdTime;
- }
-
- @Basic
- @Column(name = "UPDATED_TIME")
- public String getUpdatedTime() {
- return updatedTime;
- }
-
- public void setUpdatedTime(String updatedTime) {
- this.updatedTime = updatedTime;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- UserGroupEntity that = (UserGroupEntity) o;
-
- if (groupId != null ? !groupId.equals(that.groupId) : that.groupId != null) return false;
- if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null) return false;
- if (ownerId != null ? !ownerId.equals(that.ownerId) : that.ownerId != null) return false;
- if (name != null ? !name.equals(that.name) : that.name != null) return false;
- if (description != null ? !description.equals(that.description) : that.description != null) return false;
- if (type != null ? !type.equals(that.type) : that.type != null) return false;
- if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
- if (updatedTime != null ? !updatedTime.equals(that.updatedTime) : that.updatedTime != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = groupId != null ? groupId.hashCode() : 0;
- result = 31 * result + (name != null ? name.hashCode() : 0);
- result = 31 * result + (description != null ? description.hashCode() : 0);
- result = 31 * result + (type != null ? type.hashCode() : 0);
- result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
- result = 31 * result + (updatedTime != null ? updatedTime.hashCode() : 0);
- return result;
- }
-
- @ManyToOne
- @JoinColumn(name = "DOMAIN_ID", referencedColumnName = "DOMAIN_ID")
- public DomainEntity getDomainByDomainId() {
- return domainByDomainId;
- }
-
- public void setDomainByDomainId(DomainEntity domainByDomainId) {
- this.domainByDomainId = domainByDomainId;
- }
-
- @ManyToOne
- @JoinColumn(name = "OWNER_ID", referencedColumnName = "USER_ID")
- public UserEntity getUserByOwnerId() {
- return userByOwnerId;
- }
-
- public void setUserByOwnerId(UserEntity userByOwnerId) {
- this.userByOwnerId = userByOwnerId;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
deleted file mode 100644
index b78060c..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/AbstractRepository.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.repositories;
-
-import org.apache.airavata.gov.registry.db.utils.JPAUtils;
-import org.apache.airavata.gov.registry.db.utils.ObjectMapperSingleton;
-import org.apache.airavata.gov.registry.db.utils.QueryGenerator;
-import org.apache.airavata.gov.registry.models.GovRegistryException;
-import org.dozer.Mapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public abstract class AbstractRepository<T, E, Id> {
- private final static Logger logger = LoggerFactory.getLogger(AbstractRepository.class);
-
- private Class<T> thriftGenericClass;
- private Class<E> dbEntityGenericClass;
- private QueryGenerator queryGenerator;
-
- public AbstractRepository(Class<T> thriftGenericClass, Class<E> dbEntityGenericClass){
- this.thriftGenericClass = thriftGenericClass;
- this.dbEntityGenericClass = dbEntityGenericClass;
- this.queryGenerator = new QueryGenerator(dbEntityGenericClass.getSimpleName());
- }
-
- public T create(T t) throws GovRegistryException {
- return update(t);
- }
-
- public T update(T t) throws GovRegistryException {
- Mapper mapper = ObjectMapperSingleton.getInstance();
- E entity = mapper.map(t, dbEntityGenericClass);
- E persistedCopy = JPAUtils.execute(entityManager -> entityManager.merge(entity));
- return mapper.map(persistedCopy, thriftGenericClass);
- }
-
- public boolean delete(Id id) throws GovRegistryException {
- JPAUtils.execute(entityManager -> {
- E entity = entityManager.find(dbEntityGenericClass, id);
- entityManager.remove(entity);
- return entity;
- });
- return true;
- }
-
- public T get(Id id) throws GovRegistryException {
- E entity = JPAUtils.execute(entityManager -> entityManager
- .find(dbEntityGenericClass, id));
- Mapper mapper = ObjectMapperSingleton.getInstance();
- return mapper.map(entity, thriftGenericClass);
- }
-
- public List<T> select(Map<String, String> filters, int offset, int limit) throws GovRegistryException {
- String queryString = queryGenerator.getSelectQuery(filters);
-
- List resultSet = JPAUtils.execute(entityManager -> entityManager.createQuery(queryString).setFirstResult(offset)
- .setMaxResults(limit).getResultList());
- Mapper mapper = ObjectMapperSingleton.getInstance();
- List<T> gatewayList = new ArrayList<>();
- resultSet.stream().forEach(rs -> gatewayList.add(mapper.map(rs, thriftGenericClass)));
- return gatewayList;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
deleted file mode 100644
index 5442c58..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/DomainRepository.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.repositories;
-
-import org.apache.airavata.gov.registry.db.entities.DomainEntity;
-import org.apache.airavata.gov.registry.models.Domain;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DomainRepository extends AbstractRepository<Domain, DomainEntity, String> {
- private final static Logger logger = LoggerFactory.getLogger(DomainRepository.class);
-
- public DomainRepository(Class<Domain> thriftGenericClass, Class<DomainEntity> dbEntityGenericClass) {
- super(thriftGenericClass, dbEntityGenericClass);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
deleted file mode 100644
index c1a8bae..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserGroupRepository.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.repositories;
-
-import org.apache.airavata.gov.registry.db.entities.UserGroupEntity;
-import org.apache.airavata.gov.registry.models.UserGroup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroupEntity, String> {
- private final static Logger logger = LoggerFactory.getLogger(UserGroupRepository.class);
-
- public UserGroupRepository(Class<UserGroup> thriftGenericClass, Class<UserGroupEntity> dbEntityGenericClass) {
- super(thriftGenericClass, dbEntityGenericClass);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
deleted file mode 100644
index 44af810..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/repositories/UserRepository.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.repositories;
-
-import org.apache.airavata.gov.registry.db.entities.UserEntity;
-import org.apache.airavata.gov.registry.models.User;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class UserRepository extends AbstractRepository<User, UserEntity, String> {
- private final static Logger logger = LoggerFactory.getLogger(UserRepository.class);
-
- public UserRepository(Class<User> thriftGenericClass, Class<UserEntity> dbEntityGenericClass) {
- super(thriftGenericClass, dbEntityGenericClass);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
deleted file mode 100644
index ae9feda..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/Committer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.utils;
-
-@FunctionalInterface
-public interface Committer<T, R> {
-
- R commit(T t);
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
deleted file mode 100644
index 6045806..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/DBConstants.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DBConstants {
- private final static Logger logger = LoggerFactory.getLogger(DBConstants.class);
-
- public static class DomainTable {
- public static String DOMAIN_ID = "domainId";
- public static String NAME = "name";
- public static String DESCRIPTION = "description";
- }
-
- public static class UserTable {
- public static String USER_ID = "userId";
- public static String DOMAIN_ID = "domainId";
- public static String USER_NAME = "userName";
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
deleted file mode 100644
index 6e8d11c..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/JPAUtils.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.utils;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gov.registry.models.GovRegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.util.HashMap;
-import java.util.Map;
-
-public class JPAUtils {
- private final static Logger logger = LoggerFactory.getLogger(JPAUtils.class);
-
- private static final String PERSISTENCE_UNIT_NAME = "airavata-gov-registry";
- private static final String GOV_REG_JDBC_DRIVER = "appcatalog.jdbc.driver";
- private static final String GOV_REG_JDBC_URL = "appcatalog.jdbc.url";
- private static final String GOV_REG_JDBC_USER = "appcatalog.jdbc.user";
- private static final String GOV_REG_JDBC_PWD = "appcatalog.jdbc.password";
- private static final String GOV_REG_VALIDATION_QUERY = "appcatalog.validationQuery";
- private static final String JPA_CACHE_SIZE = "jpa.cache.size";
- private static final String JPA_CACHE_ENABLED = "cache.enable";
-
- @PersistenceUnit(unitName = PERSISTENCE_UNIT_NAME)
- protected static EntityManagerFactory factory;
- @PersistenceContext(unitName = PERSISTENCE_UNIT_NAME)
- private static EntityManager entityManager;
-
- public static EntityManager getEntityManager() {
- if (factory == null) {
-// String connectionProperties = "DriverClassName=" + readServerProperties(GOV_REG_JDBC_DRIVER) + "," +
-// "Url=" + readServerProperties(GOV_REG_JDBC_URL) + "?autoReconnect=true," +
-// "Username=" + readServerProperties(GOV_REG_JDBC_USER) + "," +
-// "Password=" + readServerProperties(GOV_REG_JDBC_PWD) +
-// ",validationQuery=" + readServerProperties(GOV_REG_VALIDATION_QUERY);
-//
-
- String connectionProperties = "DriverClassName=com.mysql.jdbc.Driver," +
- "Url=jdbc:mysql://localhost:3306/airavata_gov_registry?autoReconnect=true," +
- "Username=root," +
- "Password=," +
- ",validationQuery=SELECT 1 FROM CONFIGURATION";
-
- Map<String, String> properties = new HashMap<String, String>();
- properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
- properties.put("openjpa.ConnectionProperties", connectionProperties);
- properties.put("openjpa.DynamicEnhancementAgent", "true");
- properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
- // For app catalog, we don't need caching
-// properties.put("openjpa.DataCache","" + readServerProperties(JPA_CACHE_ENABLED) + "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
-// properties.put("openjpa.QueryCache","" + readServerProperties(JPA_CACHE_ENABLED) + "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
- properties.put("openjpa.RemoteCommitProvider", "sjvm");
- properties.put("openjpa.Log", "DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
- properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
- properties.put("openjpa.jdbc.QuerySQLCache", "false");
- properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72," +
- " PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000, autoReconnect=true");
- properties.put("openjpa.RuntimeUnenhancedClasses", "warn");
- factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
- }
- entityManager = factory.createEntityManager();
- return entityManager;
- }
-
- private static String readServerProperties(String propertyName) throws GovRegistryException {
- try {
- return ServerSettings.getSetting(propertyName);
- } catch (ApplicationSettingsException e) {
- logger.error("Unable to read airavata-server.properties...", e);
- throw new GovRegistryException("Unable to read airavata-server.properties...");
- }
- }
-
- public static <R> R execute(Committer<EntityManager, R> committer) throws GovRegistryException {
- EntityManager entityManager = JPAUtils.getEntityManager();
- try {
- entityManager.getTransaction().begin();
- R r = committer.commit(entityManager);
- entityManager.getTransaction().commit();
- return r;
- }finally {
- if (entityManager != null && entityManager.isOpen()) {
- if (entityManager.getTransaction().isActive()) {
- entityManager.getTransaction().rollback();
- }
- entityManager.close();
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
deleted file mode 100644
index d6c4d4d..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/ObjectMapperSingleton.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.utils;
-
-import org.dozer.DozerBeanMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ObjectMapperSingleton extends DozerBeanMapper{
- private final static Logger logger = LoggerFactory.getLogger(ObjectMapperSingleton.class);
-
- private static ObjectMapperSingleton instance;
-
- private ObjectMapperSingleton(){}
-
- public static ObjectMapperSingleton getInstance(){
- if(instance == null)
- instance = new ObjectMapperSingleton();
- return instance;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
deleted file mode 100644
index 2844a4a..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/db/utils/QueryGenerator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.db.utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-
-public class QueryGenerator {
- private final static Logger logger = LoggerFactory.getLogger(QueryGenerator.class);
-
- private String tableName;
-
-
- public QueryGenerator(String tableName){
- this.tableName = tableName;
- }
-
- public String getSelectQuery(Map<String, String> filters){
- String query = "SELECT p from " + tableName + " as p WHERE ";
- if(filters == null || filters.size() == 0){
- query += "1";
- }else{
- for(String k : filters.keySet()){
- query += "p." + k + " LIKE '%" + filters.get(k) + "%' AND ";
- }
- query = query.substring(0, query.length()-5);
- }
-
- query += " ORDER BY p.createdTime DESC";
-
- return query;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java b/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
deleted file mode 100644
index 276c99e..0000000
--- a/airavata-gov-registry/airavata-gov-registry-core/src/main/java/org/apache/airavata/gov/registry/server/GovRegistryServer.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.gov.registry.server;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class GovRegistryServer {
- private final static Logger logger = LoggerFactory.getLogger(GovRegistryServer.class);
-}
\ No newline at end of file
[29/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/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
new file mode 100644
index 0000000..4ef8a74
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
@@ -0,0 +1,33673 @@
+/**
+ * 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.service.cpi;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class GovRegistryService {
+
+ public interface Iface {
+
+ /**
+ * * Domain Operations
+ * *
+ *
+ * @param domain
+ */
+ public boolean createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteDomain(String domainId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.sharing.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * User Operations
+ * *
+ *
+ * @param user
+ */
+ public boolean registerUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteUser(String userId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * Group Operations
+ * *
+ *
+ * @param group
+ */
+ public boolean createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteGroup(String groupId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public Map<String,org.apache.airavata.sharing.registry.models.GroupType> getGroupMembers(String groupId) throws org.apache.thrift.TException;
+
+ /**
+ * * EntityType Operations
+ * *
+ *
+ * @param entityType
+ */
+ public boolean createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * Entity Operations
+ * *
+ *
+ * @param entity
+ */
+ public boolean registerEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteEntity(String entityId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ /**
+ * * EntityType Operations
+ * *
+ *
+ * @param permisionType
+ */
+ public boolean createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permisionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permisionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permisionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void createDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void registerUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updatedUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createGroup(org.apache.airavata.sharing.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroupMembers(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntityTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void registerEntity(org.apache.airavata.sharing.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateEntity(org.apache.airavata.sharing.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permisionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permisionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deletePermissionType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getPermissionType(String permisionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public boolean createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createDomain(domain);
+ return recv_createDomain();
+ }
+
+ public void send_createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.thrift.TException
+ {
+ createDomain_args args = new createDomain_args();
+ args.setDomain(domain);
+ sendBase("createDomain", args);
+ }
+
+ public boolean recv_createDomain() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createDomain_result result = new createDomain_result();
+ receiveBase(result, "createDomain");
+ 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, "createDomain failed: unknown result");
+ }
+
+ public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateDomain(domain);
+ return recv_updateDomain();
+ }
+
+ public void send_updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.thrift.TException
+ {
+ updateDomain_args args = new updateDomain_args();
+ args.setDomain(domain);
+ sendBase("updateDomain", args);
+ }
+
+ public boolean recv_updateDomain() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateDomain_result result = new updateDomain_result();
+ receiveBase(result, "updateDomain");
+ 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, "updateDomain failed: unknown result");
+ }
+
+ public boolean deleteDomain(String domainId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteDomain(domainId);
+ return recv_deleteDomain();
+ }
+
+ public void send_deleteDomain(String domainId) throws org.apache.thrift.TException
+ {
+ deleteDomain_args args = new deleteDomain_args();
+ args.setDomainId(domainId);
+ sendBase("deleteDomain", args);
+ }
+
+ public boolean recv_deleteDomain() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteDomain_result result = new deleteDomain_result();
+ receiveBase(result, "deleteDomain");
+ 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, "deleteDomain failed: unknown result");
+ }
+
+ public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getDomain(domainId);
+ return recv_getDomain();
+ }
+
+ public void send_getDomain(String domainId) throws org.apache.thrift.TException
+ {
+ getDomain_args args = new getDomain_args();
+ args.setDomainId(domainId);
+ sendBase("getDomain", args);
+ }
+
+ public org.apache.airavata.sharing.registry.models.Domain recv_getDomain() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getDomain_result result = new getDomain_result();
+ receiveBase(result, "getDomain");
+ 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, "getDomain failed: unknown result");
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getDomains(offset, limit);
+ return recv_getDomains();
+ }
+
+ public void send_getDomains(int offset, int limit) throws org.apache.thrift.TException
+ {
+ getDomains_args args = new getDomains_args();
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getDomains", args);
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.Domain> recv_getDomains() throws org.apache.thrift.TException
+ {
+ getDomains_result result = new getDomains_result();
+ receiveBase(result, "getDomains");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDomains failed: unknown result");
+ }
+
+ public boolean registerUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_registerUser(user);
+ return recv_registerUser();
+ }
+
+ public void send_registerUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.thrift.TException
+ {
+ registerUser_args args = new registerUser_args();
+ args.setUser(user);
+ sendBase("registerUser", args);
+ }
+
+ public boolean recv_registerUser() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ registerUser_result result = new registerUser_result();
+ receiveBase(result, "registerUser");
+ 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, "registerUser failed: unknown result");
+ }
+
+ public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updatedUser(user);
+ return recv_updatedUser();
+ }
+
+ public void send_updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.thrift.TException
+ {
+ updatedUser_args args = new updatedUser_args();
+ args.setUser(user);
+ sendBase("updatedUser", args);
+ }
+
+ public boolean recv_updatedUser() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updatedUser_result result = new updatedUser_result();
+ receiveBase(result, "updatedUser");
+ 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, "updatedUser failed: unknown result");
+ }
+
+ public boolean deleteUser(String userId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteUser(userId);
+ return recv_deleteUser();
+ }
+
+ public void send_deleteUser(String userId) throws org.apache.thrift.TException
+ {
+ deleteUser_args args = new deleteUser_args();
+ args.setUserId(userId);
+ sendBase("deleteUser", args);
+ }
+
+ public boolean recv_deleteUser() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteUser_result result = new deleteUser_result();
+ receiveBase(result, "deleteUser");
+ 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, "deleteUser failed: unknown result");
+ }
+
+ public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getUser(userId);
+ return recv_getUser();
+ }
+
+ public void send_getUser(String userId) throws org.apache.thrift.TException
+ {
+ getUser_args args = new getUser_args();
+ args.setUserId(userId);
+ sendBase("getUser", args);
+ }
+
+ public org.apache.airavata.sharing.registry.models.User recv_getUser() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getUser_result result = new getUser_result();
+ receiveBase(result, "getUser");
+ 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, "getUser failed: unknown result");
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getUsers(domain, offset, limit);
+ return recv_getUsers();
+ }
+
+ public void send_getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getUsers_args args = new getUsers_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getUsers", args);
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.User> recv_getUsers() throws org.apache.thrift.TException
+ {
+ getUsers_result result = new getUsers_result();
+ receiveBase(result, "getUsers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
+ }
+
+ public boolean createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createGroup(group);
+ return recv_createGroup();
+ }
+
+ public void send_createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.thrift.TException
+ {
+ createGroup_args args = new createGroup_args();
+ args.setGroup(group);
+ sendBase("createGroup", args);
+ }
+
+ public boolean recv_createGroup() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createGroup_result result = new createGroup_result();
+ receiveBase(result, "createGroup");
+ 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, "createGroup failed: unknown result");
+ }
+
+ public boolean updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateGroup(group);
+ return recv_updateGroup();
+ }
+
+ public void send_updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.thrift.TException
+ {
+ updateGroup_args args = new updateGroup_args();
+ args.setGroup(group);
+ sendBase("updateGroup", args);
+ }
+
+ public boolean recv_updateGroup() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateGroup_result result = new updateGroup_result();
+ receiveBase(result, "updateGroup");
+ 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, "updateGroup failed: unknown result");
+ }
+
+ public boolean deleteGroup(String groupId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteGroup(groupId);
+ return recv_deleteGroup();
+ }
+
+ public void send_deleteGroup(String groupId) throws org.apache.thrift.TException
+ {
+ deleteGroup_args args = new deleteGroup_args();
+ args.setGroupId(groupId);
+ sendBase("deleteGroup", args);
+ }
+
+ public boolean recv_deleteGroup() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteGroup_result result = new deleteGroup_result();
+ receiveBase(result, "deleteGroup");
+ 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, "deleteGroup failed: unknown result");
+ }
+
+ public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getGroup(groupId);
+ return recv_getGroup();
+ }
+
+ public void send_getGroup(String groupId) throws org.apache.thrift.TException
+ {
+ getGroup_args args = new getGroup_args();
+ args.setGroupId(groupId);
+ sendBase("getGroup", args);
+ }
+
+ public org.apache.airavata.sharing.registry.models.UserGroup recv_getGroup() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getGroup_result result = new getGroup_result();
+ receiveBase(result, "getGroup");
+ 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, "getGroup failed: unknown result");
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getGroups(domain, offset, limit);
+ return recv_getGroups();
+ }
+
+ public void send_getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getGroups_args args = new getGroups_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getGroups", args);
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.UserGroup> recv_getGroups() throws org.apache.thrift.TException
+ {
+ getGroups_result result = new getGroups_result();
+ receiveBase(result, "getGroups");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroups failed: unknown result");
+ }
+
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_addUsersToGroup(userIds, groupId);
+ return recv_addUsersToGroup();
+ }
+
+ public void send_addUsersToGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
+ {
+ addUsersToGroup_args args = new addUsersToGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ sendBase("addUsersToGroup", args);
+ }
+
+ public boolean recv_addUsersToGroup() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ addUsersToGroup_result result = new addUsersToGroup_result();
+ receiveBase(result, "addUsersToGroup");
+ 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, "addUsersToGroup failed: unknown result");
+ }
+
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_removeUsersFromGroup(userIds, groupId);
+ return recv_removeUsersFromGroup();
+ }
+
+ public void send_removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
+ {
+ removeUsersFromGroup_args args = new removeUsersFromGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ sendBase("removeUsersFromGroup", args);
+ }
+
+ public boolean recv_removeUsersFromGroup() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ removeUsersFromGroup_result result = new removeUsersFromGroup_result();
+ receiveBase(result, "removeUsersFromGroup");
+ 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, "removeUsersFromGroup failed: unknown result");
+ }
+
+ public Map<String,org.apache.airavata.sharing.registry.models.GroupType> getGroupMembers(String groupId) throws org.apache.thrift.TException
+ {
+ send_getGroupMembers(groupId);
+ return recv_getGroupMembers();
+ }
+
+ public void send_getGroupMembers(String groupId) throws org.apache.thrift.TException
+ {
+ getGroupMembers_args args = new getGroupMembers_args();
+ args.setGroupId(groupId);
+ sendBase("getGroupMembers", args);
+ }
+
+ public Map<String,org.apache.airavata.sharing.registry.models.GroupType> recv_getGroupMembers() throws org.apache.thrift.TException
+ {
+ getGroupMembers_result result = new getGroupMembers_result();
+ receiveBase(result, "getGroupMembers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembers failed: unknown result");
+ }
+
+ public boolean createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createEntityType(entityType);
+ return recv_createEntityType();
+ }
+
+ public void send_createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.thrift.TException
+ {
+ createEntityType_args args = new createEntityType_args();
+ args.setEntityType(entityType);
+ sendBase("createEntityType", args);
+ }
+
+ public boolean recv_createEntityType() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createEntityType_result result = new createEntityType_result();
+ receiveBase(result, "createEntityType");
+ 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, "createEntityType failed: unknown result");
+ }
+
+ public boolean updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateEntityType(entityType);
+ return recv_updateEntityType();
+ }
+
+ public void send_updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.thrift.TException
+ {
+ updateEntityType_args args = new updateEntityType_args();
+ args.setEntityType(entityType);
+ sendBase("updateEntityType", args);
+ }
+
+ public boolean recv_updateEntityType() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateEntityType_result result = new updateEntityType_result();
+ receiveBase(result, "updateEntityType");
+ 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, "updateEntityType failed: unknown result");
+ }
+
+ public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteEntityType(entityTypeId);
+ return recv_deleteEntityType();
+ }
+
+ public void send_deleteEntityType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ deleteEntityType_args args = new deleteEntityType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("deleteEntityType", args);
+ }
+
+ public boolean recv_deleteEntityType() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteEntityType_result result = new deleteEntityType_result();
+ receiveBase(result, "deleteEntityType");
+ 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, "deleteEntityType failed: unknown result");
+ }
+
+ public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getEntityType(entityTypeId);
+ return recv_getEntityType();
+ }
+
+ public void send_getEntityType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ getEntityType_args args = new getEntityType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("getEntityType", args);
+ }
+
+ public org.apache.airavata.sharing.registry.models.EntityType recv_getEntityType() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getEntityType_result result = new getEntityType_result();
+ receiveBase(result, "getEntityType");
+ 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, "getEntityType failed: unknown result");
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getEntityTypes(domain, offset, limit);
+ return recv_getEntityTypes();
+ }
+
+ public void send_getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getEntityTypes_args args = new getEntityTypes_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getEntityTypes", args);
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.EntityType> recv_getEntityTypes() throws org.apache.thrift.TException
+ {
+ getEntityTypes_result result = new getEntityTypes_result();
+ receiveBase(result, "getEntityTypes");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEntityTypes failed: unknown result");
+ }
+
+ public boolean registerEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_registerEntity(entity);
+ return recv_registerEntity();
+ }
+
+ public void send_registerEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.thrift.TException
+ {
+ registerEntity_args args = new registerEntity_args();
+ args.setEntity(entity);
+ sendBase("registerEntity", args);
+ }
+
+ public boolean recv_registerEntity() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ registerEntity_result result = new registerEntity_result();
+ receiveBase(result, "registerEntity");
+ 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, "registerEntity failed: unknown result");
+ }
+
+ public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateEntity(entity);
+ return recv_updateEntity();
+ }
+
+ public void send_updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.thrift.TException
+ {
+ updateEntity_args args = new updateEntity_args();
+ args.setEntity(entity);
+ sendBase("updateEntity", args);
+ }
+
+ public boolean recv_updateEntity() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateEntity_result result = new updateEntity_result();
+ receiveBase(result, "updateEntity");
+ 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, "updateEntity failed: unknown result");
+ }
+
+ public boolean deleteEntity(String entityId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteEntity(entityId);
+ return recv_deleteEntity();
+ }
+
+ public void send_deleteEntity(String entityId) throws org.apache.thrift.TException
+ {
+ deleteEntity_args args = new deleteEntity_args();
+ args.setEntityId(entityId);
+ sendBase("deleteEntity", args);
+ }
+
+ public boolean recv_deleteEntity() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteEntity_result result = new deleteEntity_result();
+ receiveBase(result, "deleteEntity");
+ 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, "deleteEntity failed: unknown result");
+ }
+
+ public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getEntity(entityId);
+ return recv_getEntity();
+ }
+
+ public void send_getEntity(String entityId) throws org.apache.thrift.TException
+ {
+ getEntity_args args = new getEntity_args();
+ args.setEntityId(entityId);
+ sendBase("getEntity", args);
+ }
+
+ public org.apache.airavata.sharing.registry.models.Entity recv_getEntity() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getEntity_result result = new getEntity_result();
+ receiveBase(result, "getEntity");
+ 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, "getEntity failed: unknown result");
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_searchEntities(domain, entityType, filters, offset, limit);
+ return recv_searchEntities();
+ }
+
+ public void send_searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.thrift.TException
+ {
+ searchEntities_args args = new searchEntities_args();
+ args.setDomain(domain);
+ args.setEntityType(entityType);
+ args.setFilters(filters);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("searchEntities", args);
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.Entity> recv_searchEntities() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ searchEntities_result result = new searchEntities_result();
+ receiveBase(result, "searchEntities");
+ 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, "searchEntities failed: unknown result");
+ }
+
+ public boolean createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permisionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createPermissionType(permisionType);
+ return recv_createPermissionType();
+ }
+
+ public void send_createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permisionType) throws org.apache.thrift.TException
+ {
+ createPermissionType_args args = new createPermissionType_args();
+ args.setPermisionType(permisionType);
+ sendBase("createPermissionType", args);
+ }
+
+ public boolean recv_createPermissionType() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createPermissionType_result result = new createPermissionType_result();
+ receiveBase(result, "createPermissionType");
+ 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, "createPermissionType failed: unknown result");
+ }
+
+ public boolean updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permisionType) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updatePermissionType(permisionType);
+ return recv_updatePermissionType();
+ }
+
+ public void send_updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permisionType) throws org.apache.thrift.TException
+ {
+ updatePermissionType_args args = new updatePermissionType_args();
+ args.setPermisionType(permisionType);
+ sendBase("updatePermissionType", args);
+ }
+
+ public boolean recv_updatePermissionType() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updatePermissionType_result result = new updatePermissionType_result();
+ receiveBase(result, "updatePermissionType");
+ 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, "updatePermissionType failed: unknown result");
+ }
+
+ public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deletePermissionType(entityTypeId);
+ return recv_deletePermissionType();
+ }
+
+ public void send_deletePermissionType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ deletePermissionType_args args = new deletePermissionType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("deletePermissionType", args);
+ }
+
+ public boolean recv_deletePermissionType() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deletePermissionType_result result = new deletePermissionType_result();
+ receiveBase(result, "deletePermissionType");
+ 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, "deletePermissionType failed: unknown result");
+ }
+
+ public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permisionTypeId) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getPermissionType(permisionTypeId);
+ return recv_getPermissionType();
+ }
+
+ public void send_getPermissionType(String permisionTypeId) throws org.apache.thrift.TException
+ {
+ getPermissionType_args args = new getPermissionType_args();
+ args.setPermisionTypeId(permisionTypeId);
+ sendBase("getPermissionType", args);
+ }
+
+ public org.apache.airavata.sharing.registry.models.PermissionType recv_getPermissionType() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getPermissionType_result result = new getPermissionType_result();
+ receiveBase(result, "getPermissionType");
+ 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, "getPermissionType failed: unknown result");
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getPermissionTypes(domain, offset, limit);
+ return recv_getPermissionTypes();
+ }
+
+ public void send_getPermissionTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getPermissionTypes_args args = new getPermissionTypes_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getPermissionTypes", args);
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.PermissionType> recv_getPermissionTypes() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getPermissionTypes_result result = new getPermissionTypes_result();
+ receiveBase(result, "getPermissionTypes");
+ 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, "getPermissionTypes 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> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void createDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createDomain_call method_call = new createDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.sharing.registry.models.Domain domain;
+ public createDomain_call(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createDomain_args args = new createDomain_args();
+ args.setDomain(domain);
+ args.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_createDomain();
+ }
+ }
+
+ public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateDomain_call method_call = new updateDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.sharing.registry.models.Domain domain;
+ public updateDomain_call(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateDomain_args args = new updateDomain_args();
+ args.setDomain(domain);
+ args.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_updateDomain();
+ }
+ }
+
+ public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteDomain_call method_call = new deleteDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domainId;
+ public deleteDomain_call(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domainId = domainId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteDomain_args args = new deleteDomain_args();
+ args.setDomainId(domainId);
+ 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_deleteDomain();
+ }
+ }
+
+ public void getDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getDomain_call method_call = new getDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domainId;
+ public getDomain_call(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domainId = domainId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getDomain_args args = new getDomain_args();
+ args.setDomainId(domainId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.sharing.registry.models.Domain 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_getDomain();
+ }
+ }
+
+ public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getDomains_call method_call = new getDomains_call(offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getDomains_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private int offset;
+ private int limit;
+ public getDomains_call(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDomains", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getDomains_args args = new getDomains_args();
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.Domain> getResult() throws 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_getDomains();
+ }
+ }
+
+ public void registerUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ registerUser_call method_call = new registerUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class registerUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.sharing.registry.models.User user;
+ public registerUser_call(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.user = user;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ registerUser_args args = new registerUser_args();
+ args.setUser(user);
+ 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_registerUser();
+ }
+ }
+
+ public void updatedUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updatedUser_call method_call = new updatedUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updatedUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.sharing.registry.models.User user;
+ public updatedUser_call(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.user = user;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatedUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updatedUser_args args = new updatedUser_args();
+ args.setUser(user);
+ 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_updatedUser();
+ }
+ }
+
+ public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteUser_call method_call = new deleteUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userId;
+ public deleteUser_call(String userId, 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.userId = userId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteUser_args args = new deleteUser_args();
+ args.setUserId(userId);
+ 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_deleteUser();
+ }
+ }
+
+ public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getUser_call method_call = new getUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userId;
+ public getUser_call(String userId, 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.userId = userId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getUser_args args = new getUser_args();
+ args.setUserId(userId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.sharing.registry.models.User getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getUser();
+ }
+ }
+
+ public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getUsers_call method_call = new getUsers_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domain;
+ private int offset;
+ private int limit;
+ public getUsers_call(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getUsers_args args = new getUsers_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.User> getResult() throws 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_getUsers();
+ }
+ }
+
+ public void createGroup(org.apache.airavata.sharing.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createGroup_call method_call = new createGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.sharing.registry.models.UserGroup group;
+ public createGroup_call(org.apache.airavata.sharing.registry.models.UserGroup group, 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.group = group;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createGroup_args args = new createGroup_args();
+ args.setGroup(group);
+ 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_createGroup();
+ }
+ }
+
+ public void updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateGroup_call method_call = new updateGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.sharing.registry.models.UserGroup group;
+ public updateGroup_call(org.apache.airavata.sharing.registry.models.UserGroup group, 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.group = group;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateGroup_args args = new updateGroup_args();
+ args.setGroup(group);
+ 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_updateGroup();
+ }
+ }
+
+ public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteGroup_call method_call = new deleteGroup_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String groupId;
+ public deleteGroup_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteGroup_args args = new deleteGroup_args();
+ args.setGroupId(groupId);
+ 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_deleteGroup();
+ }
+ }
+
+ public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroup_call method_call = new getGroup_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String groupId;
+ public getGroup_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getGroup_args args = new getGroup_args();
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.sharing.registry.models.UserGroup getResult() throws org.apache.airavata.sharing.registry.models.GovRegistryException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getGroup();
+ }
+ }
+
+ public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroups_call method_call = new getGroups_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domain;
+ private int offset;
+ private int limit;
+ public getGroups_call(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getGroups_args args = new getGroups_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.sharing.registry.models.UserGroup> getResult() throws 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_getGroups();
+ }
+ }
+
+ public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ addUsersToGroup_call method_call = new addUsersToGroup_call(userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class addUsersToGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private List<String> userIds;
+ private String groupId;
+ public addUsersToGroup_call(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userIds = userIds;
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUsersToGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ addUsersToGroup_args args = new addUsersToGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ 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_addUsersToGroup();
+ }
+ }
+
+ public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ removeUsersFromGroup_call method_call = new removeUsersFromGroup_call(userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class removeUsersFromGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private List<String> userIds;
+ private String groupId;
+ public removeUsersFromGroup_call(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userIds = userIds;
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeUsersFromGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ removeUsersFromGroup_args args = new removeUsersFromGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ 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_removeUsersFromGroup();
+ }
+ }
+
+ public void getGroupMembers(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroupMembers_call method_call = new getGroupMembers_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroupMemb
<TRUNCATED>
[03/50] [abbrv] airavata git commit: Added registry ansible script
Posted by sc...@apache.org.
Added registry ansible script
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9e6f2b19
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9e6f2b19
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9e6f2b19
Branch: refs/heads/airavata-gov-registry
Commit: 9e6f2b1913932baec2d678100446c2557b4e10e3
Parents: 5c9cec8
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Sep 12 13:20:28 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Sep 12 13:20:28 2016 -0400
----------------------------------------------------------------------
group_vars/all.yml | 15 +-
hosts | 15 +-
.../templates/airavata-server.properties.j2 | 8 +
.../templates/airavata-server.properties.j2 | 8 +
.../files/mysql-connector-java-5.1.37-bin.jar | Bin 0 -> 985603 bytes
roles/registry/tasks/main.yml | 55 ++++
.../templates/airavata-server.properties.j2 | 282 +++++++++++++++++++
7 files changed, 373 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/group_vars/all.yml
----------------------------------------------------------------------
diff --git a/group_vars/all.yml b/group_vars/all.yml
index 0269ff2..615085a 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -39,19 +39,26 @@ rabbitmq_broker_url: "amqp://{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ rabb
# Zoookeeper related variables
zookeeper_client_port: 2181
zookeeper_url: "{{ groups['zookeeper'][0] }}:{{ zookeeper_client_port }}"
-# API Server and Orchestrator related variables
+# API Server related variables
api_server_name: "apiserver-node0"
-api_server_host: "{{ ansible_fqdn }}"
+api_server_host: "{{ansible_fqdn}}"
api_server_port: "8930"
api_secured: "true"
tls_enable: "false"
api_server_tls_port: "9930"
+# Orchestrator related variables
orchestrator_name: "orchestrator-node0"
-orchestrator_host: "{{ ansible_fqdn }}"
+orchestrator_host: "{{ansible_fqdn}}"
orchestrator_port: "8940"
api_orch_dir: "{{ deployment_dir }}/api-orchestrator"
+# registry related variables
+registry_name: regserver-node0
+registry_host: "{{groups['registry'][0]}}"
+registry_port: 8970
+registry_dir: "{{ deployment_dir }}/registry"
+
# Credential and keystore related variables
#authorization_server: "https://{{ groups['wso2is'][0]}}:9443/services/"
authorization_server: "https://idp.scigap.org:9443/services/"
@@ -63,7 +70,7 @@ client_truststore_passwd: "airavata"
cred_keystore: "airavata_sym.jks"
cred_keystore_passwd: "airavata"
cred_keystore_alias: "airavata"
-cred_store_server_host: "{{ ansible_fqdn }}"
+cred_store_server_host: "{{ groups['database'][0] }}"
cred_store_port: "8960"
keystores_location: "{{ deployment_dir }}/keystores"
http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/hosts
----------------------------------------------------------------------
diff --git a/hosts b/hosts
index 9fd1d8e..4fc8675 100644
--- a/hosts
+++ b/hosts
@@ -2,22 +2,25 @@
# inventory file : production
[zookeeper]
-52.91.41.223
+54.221.13.4
[rabbitmq]
-52.91.41.223
+54.221.13.4
[database]
-54.221.0.3
+54.196.189.115
[wso2is]
#52.87.209.219
+[registry]
+54.89.119.195
+
[api-orch]
-54.164.53.207
+54.89.119.195
[gfac]
-54.85.248.150
+54.165.169.111
[pga]
-54.88.152.194
+#54.237.220.234
http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index 9418e82..435842f 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -128,6 +128,14 @@ start.submitter=true
embedded.mode=true
enable.validation=true
+###########################################################################
+# Registry Server Configurations
+###########################################################################
+regserver=org.apache.airavata.registry.api.service.RegistryAPIServer
+regserver.server.name={{registry_name}}
+regserver.server.host={{registry_host}}
+regserver.server.port={{registry_port}}
+regserver.server.min.threads=50
###########################################################################
# GFac Server Configurations
http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index 9418e82..435842f 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -128,6 +128,14 @@ start.submitter=true
embedded.mode=true
enable.validation=true
+###########################################################################
+# Registry Server Configurations
+###########################################################################
+regserver=org.apache.airavata.registry.api.service.RegistryAPIServer
+regserver.server.name={{registry_name}}
+regserver.server.host={{registry_host}}
+regserver.server.port={{registry_port}}
+regserver.server.min.threads=50
###########################################################################
# GFac Server Configurations
http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/registry/files/mysql-connector-java-5.1.37-bin.jar
----------------------------------------------------------------------
diff --git a/roles/registry/files/mysql-connector-java-5.1.37-bin.jar b/roles/registry/files/mysql-connector-java-5.1.37-bin.jar
new file mode 100644
index 0000000..465af67
Binary files /dev/null and b/roles/registry/files/mysql-connector-java-5.1.37-bin.jar differ
http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/registry/tasks/main.yml
----------------------------------------------------------------------
diff --git a/roles/registry/tasks/main.yml b/roles/registry/tasks/main.yml
new file mode 100644
index 0000000..1c4ba85
--- /dev/null
+++ b/roles/registry/tasks/main.yml
@@ -0,0 +1,55 @@
+---
+
+################################################################################
+- name: Create registry deployment directory
+ file: path="{{ registry_dir }}" state=directory owner={{ user }} group={{ group }}
+ when: build|success
+
+- name: Check previous deployments
+ stat: path="{{ registry_dir }}/{{ airavata_dist }}" get_md5=no get_checksum=no
+ register: check
+
+- name: stop registry
+ command: ./bin/airavata-server-stop.sh -f
+ chdir="{{ registry_dir }}/{{ airavata_dist }}/"
+ removes="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
+ when: check.stat.exists == True
+
+- name: Delete previous deployments
+ file: path="{{ registry_dir }}/{{ airavata_dist }}" state=absent
+
+- name: Copy distribution to registry deployment directory
+ unarchive: src="{{ airavata_source_dir }}/distribution/target/{{ airavata_dist_name }}"
+ dest="{{ registry_dir }}/"
+ copy=no
+
+- name: Copy Airavata server properties file
+ template: src=airavata-server.properties.j2
+ dest="{{ registry_dir }}/{{ airavata_dist }}/bin/airavata-server.properties"
+ owner={{ user }}
+ group={{ group }}
+ mode="u=rw,g=r,o=r"
+
+- name: Copy Mysql jar to lib
+ copy: src="{{ mysql_connector_jar }}"
+ dest="{{ registry_dir }}/{{ airavata_dist }}/lib/{{ mysql_connector_jar }}"
+ owner={{ user }}
+ group={{ group }}
+
+
+- name: Open firwall ports
+ firewalld: port="{{ registry_port }}/tcp" zone=public permanent=true state=enabled immediate=yes
+ become: yes
+
+- name: stop registry
+ command: ./bin/airavata-server-stop.sh -f
+ chdir="{{ registry_dir }}/{{ airavata_dist }}/"
+ removes="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+- name: start registry
+ command: ./bin/airavata-server-start.sh regserver -d
+ chdir="{{ registry_dir }}/{{ airavata_dist }}/"
+ creates="{{ registry_dir }}/{{ airavata_dist }}/bin/server_start_*"
+
+
+...
http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f2b19/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/registry/templates/airavata-server.properties.j2 b/roles/registry/templates/airavata-server.properties.j2
new file mode 100644
index 0000000..435842f
--- /dev/null
+++ b/roles/registry/templates/airavata-server.properties.j2
@@ -0,0 +1,282 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+###########################################################################
+#
+# This properties file provides configuration for all Airavata Services:
+# API Server, Registry, Workflow Interpreter, GFac, Orchestrator
+#
+###########################################################################
+
+###########################################################################
+# API Server Registry Configuration
+###########################################################################
+
+#for derby [AiravataJPARegistry]
+#registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+registry.jdbc.driver=com.mysql.jdbc.Driver
+registry.jdbc.url=jdbc:mysql://{{ db_server }}:{{ db_server_port }}/{{ exp_catalog }}
+registry.jdbc.user={{ db_user }}
+registry.jdbc.password={{ db_password }}
+#FIXME: Probably the following property should be removed.
+start.derby.server.mode=false
+validationQuery=SELECT 1 from CONFIGURATION
+cache.enable=false
+jpa.cache.size=-1
+#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+
+# Properties for default user mode
+default.registry.user=admin
+default.registry.password=admin
+default.registry.password.hash.method=SHA
+default.registry.gateway=default
+
+###########################################################################
+# Application Catalog DB Configuration
+###########################################################################
+#for derby [AiravataJPARegistry]
+#appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+appcatalog.jdbc.driver=com.mysql.jdbc.Driver
+appcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ app_catalog }}
+appcatalog.jdbc.user={{ db_user }}
+appcatalog.jdbc.password={{ db_password }}
+appcatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+##########################################################################
+# Replica Catalog DB Configuration
+###########################################################################
+#for derby [AiravataJPARegistry]
+#replicacatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#replicacatalog.jdbc.url=jdbc:derby://localhost:1527/replica_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+replicacatalog.jdbc.driver=com.mysql.jdbc.Driver
+replicacatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
+replicacatalog.jdbc.user={{ db_user }}
+replicacatalog.jdbc.password={{ db_password }}
+replicacatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+# Workflow Catalog DB Configuration
+###########################################################################
+#for derby [AiravataJPARegistry]
+#workflowcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#workflowcatalog.jdbc.url=jdbc:derby://localhost:1527/workflow_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+workflowcatalog.jdbc.driver=com.mysql.jdbc.Driver
+workflowcatalog.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ replica_catalog }}
+workflowcatalog.jdbc.user={{ db_user }}
+workflowcatalog.jdbc.password={{ db_password }}
+workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+# User Profile MongoDB Configuration
+###########################################################################
+userprofile.mongodb.host=localhost
+userprofile.mongodb.port=27017
+
+
+###########################################################################
+# Server module Configuration
+###########################################################################
+#credential store server should be started before API server
+#This is obsolete property with new script files.
+#servers=credentialstore,apiserver,orchestrator
+
+
+###########################################################################
+# API Server Configurations
+###########################################################################
+apiserver=org.apache.airavata.api.server.AiravataAPIServer
+apiserver.name={{ api_server_name }}
+apiserver.host={{ api_server_host }}
+apiserver.port={{ api_server_port }}
+apiserver.min.threads=50
+
+###########################################################################
+# Orchestrator Server Configurations
+###########################################################################
+orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
+orchestrator.server.name={{ orchestrator_name }}
+orchestrator.server.host={{ orchestrator_host }}
+orchestrator.server.port={{ orchestrator_port }}
+orchestrator.server.min.threads=50
+job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
+submitter.interval=10000
+threadpool.size=10
+start.submitter=true
+embedded.mode=true
+enable.validation=true
+
+###########################################################################
+# Registry Server Configurations
+###########################################################################
+regserver=org.apache.airavata.registry.api.service.RegistryAPIServer
+regserver.server.name={{registry_name}}
+regserver.server.host={{registry_host}}
+regserver.server.port={{registry_port}}
+regserver.server.min.threads=50
+
+###########################################################################
+# GFac Server Configurations
+###########################################################################
+gfac=org.apache.airavata.gfac.server.GfacServer
+gfac.server.name={{ gfac_name }}
+gfac.server.host={{ gfac_host }}
+gfac.server.port={{ gfac_port }}
+gfac.thread.pool.size=50
+host.scheduler=org.apache.airavata.gfac.impl.DefaultHostScheduler
+
+
+
+###########################################################################
+# Airavata Workflow Interpreter Configurations
+###########################################################################
+workflowserver=org.apache.airavata.api.server.WorkflowServer
+enactment.thread.pool.size=10
+
+#to define custom workflow parser user following property
+#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowBuilder
+
+
+
+###########################################################################
+# Job Scheduler can send informative email messages to you about the status of your job.
+# Specify a string which consists of either the single character "n" (no mail), or one or more
+# of the characters "a" (send mail when job is aborted), "b" (send mail when job begins),
+# and "e" (send mail when job terminates). The default is "a" if not specified.
+###########################################################################
+
+job.notification.enable=true
+#Provide comma separated email ids as a string if more than one
+job.notification.emailids=
+job.notification.flags=abe
+
+###########################################################################
+# Credential Store module Configuration
+###########################################################################
+credential.store.keystore.url={{ keystores_location }}/{{ cred_keystore }}
+credential.store.keystore.alias={{ cred_keystore_alias }}
+credential.store.keystore.password={{ cred_keystore_passwd }}
+credential.store.jdbc.url=jdbc:mysql://{{ db_server }}:3306/{{ credential_store }}
+credential.store.jdbc.user={{ db_user }}
+credential.store.jdbc.password={{ db_password }}
+credential.store.jdbc.driver=com.mysql.jdbc.Driver
+credential.store.server.host={{ cred_store_server_host }}
+credential.store.server.port={{ cred_store_port }}
+credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
+
+# these properties used by credential store email notifications
+email.server=smtp.googlemail.com
+email.server.port=465
+email.user=airavata
+email.password=xxx
+email.ssl=true
+email.from=airavata@apache.org
+
+# SSH PKI key pair or ssh password can be used SSH based sshKeyAuthentication is used.
+# if user specify both password sshKeyAuthentication gets the higher preference
+
+################# ---------- For ssh key pair sshKeyAuthentication ------------------- ################
+#ssh.public.key=/path to public key for ssh
+#ssh.private.key=/path to private key file for ssh
+#ssh.keypass=passphrase for the private key
+#ssh.username=username for ssh connection
+## If you set "yes" for ssh.strict.hostKey.checking, then you must provide known hosts file path
+#ssh.strict.hostKey.checking=yes/no
+#ssh.known.hosts.file=/path to known hosts file
+### Incase of password sshKeyAuthentication.
+#ssh.password=Password for ssh connection
+
+################ ---------- BES Properties ------------------- ###############
+#bes.ca.cert.path=<location>/certificates/cacert.pem
+#bes.ca.key.path=<location>/certificates/cakey.pem
+#bes.ca.key.pass=passphrase
+
+###########################################################################
+# Monitoring module Configuration
+###########################################################################
+
+#This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
+#mechanisms and one would be able to start a monitor
+monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
+
+#These properties will used to enable email base monitoring
+email.based.monitor.host=imap.gmail.com
+email.based.monitor.address={{ monitor_email_address }}
+email.based.monitor.password={{ monitor_email_password }}
+email.based.monitor.folder.name=INBOX
+# either imaps or pop3
+email.based.monitor.store.protocol=imaps
+#These property will be used to query the email server periodically. value in milliseconds(ms).
+email.based.monitoring.period=10000
+
+###########################################################################
+# AMQP Notification Configuration
+###########################################################################
+#for simple scenarios we can use the guest user
+#rabbitmq.broker.url=amqp://localhost:5672
+#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
+# and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
+rabbitmq.broker.url={{ rabbitmq_broker_url }}
+status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
+rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
+rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+durable.queue=false
+prefetch.count=200
+launch.queue.name=launch.queue
+cancel.queue.name=cancel.queue
+activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+rabbitmq.exchange.name=airavata_rabbitmq_exchange
+
+###########################################################################
+# Zookeeper Server Configuration
+###########################################################################
+embedded.zk=false
+zookeeper.server.connection={{ zookeeper_url }}
+zookeeper.timeout=30000
+
+########################################################################
+## API Security Configuration
+########################################################################
+api.secured={{ api_secured }}
+security.manager.class=org.apache.airavata.api.server.security.DefaultAiravataSecurityManager
+### TLS related configuration ####
+TLS.enabled={{ tls_enable }}
+TLS.api.server.port={{ api_server_tls_port }}
+TLS.client.timeout=10000
+#### keystore configuration ####
+keystore.path={{ keystores_location }}/{{ keystore }}
+keystore.password={{ keystore_passwd }}
+#### trust store configuration ####
+trust.store={{ keystores_location }}/{{ client_truststore }}
+trust.store.password=airavata
+#### remote authorization server url ####
+remote.oauth.authorization.server=https://idp.scigap.org:9443/services/
+#### xacml based authorization policy ####
+authorization.policy=airavata-default-xacml-policy
+#### authorization cache related configuration ####
+authz.cache.enabled=true
+authz.cache.manager.class=org.apache.airavata.api.server.security.authzcache.DefaultAuthzCacheManager
+in.memory.cache.size=1000
[04/50] [abbrv] airavata git commit: Update airavata properties file
to use new rabbitmq properties
Posted by sc...@apache.org.
Update airavata properties file to use new rabbitmq properties
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fec0b379
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fec0b379
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fec0b379
Branch: refs/heads/airavata-gov-registry
Commit: fec0b3795604d451b2815bcd2c41fa601fd813c3
Parents: 9e6f2b1
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Sep 12 13:24:37 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Sep 12 13:24:37 2016 -0400
----------------------------------------------------------------------
roles/api-orch/templates/airavata-server.properties.j2 | 13 +++++--------
roles/gfac/templates/airavata-server.properties.j2 | 13 +++++--------
roles/registry/templates/airavata-server.properties.j2 | 13 +++++--------
3 files changed, 15 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/fec0b379/roles/api-orch/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/api-orch/templates/airavata-server.properties.j2 b/roles/api-orch/templates/airavata-server.properties.j2
index 435842f..5a01525 100644
--- a/roles/api-orch/templates/airavata-server.properties.j2
+++ b/roles/api-orch/templates/airavata-server.properties.j2
@@ -239,16 +239,13 @@ email.based.monitoring.period=10000
#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
# and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
rabbitmq.broker.url={{ rabbitmq_broker_url }}
-status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
-rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
-rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+rabbitmq.status.exchange.name=status_exchange
+rabbitmq.process.exchange.name=process_exchange
+rabbitmq.experiment.exchange.name=experiment_exchange
durable.queue=false
prefetch.count=200
-launch.queue.name=launch.queue
-cancel.queue.name=cancel.queue
-activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-rabbitmq.exchange.name=airavata_rabbitmq_exchange
+process.launch.queue.name=process.launch.queue
+experiment.launch..queue.name=experiment.launch.queue
###########################################################################
# Zookeeper Server Configuration
http://git-wip-us.apache.org/repos/asf/airavata/blob/fec0b379/roles/gfac/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/gfac/templates/airavata-server.properties.j2 b/roles/gfac/templates/airavata-server.properties.j2
index 435842f..5a01525 100644
--- a/roles/gfac/templates/airavata-server.properties.j2
+++ b/roles/gfac/templates/airavata-server.properties.j2
@@ -239,16 +239,13 @@ email.based.monitoring.period=10000
#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
# and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
rabbitmq.broker.url={{ rabbitmq_broker_url }}
-status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
-rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
-rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+rabbitmq.status.exchange.name=status_exchange
+rabbitmq.process.exchange.name=process_exchange
+rabbitmq.experiment.exchange.name=experiment_exchange
durable.queue=false
prefetch.count=200
-launch.queue.name=launch.queue
-cancel.queue.name=cancel.queue
-activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-rabbitmq.exchange.name=airavata_rabbitmq_exchange
+process.launch.queue.name=process.launch.queue
+experiment.launch..queue.name=experiment.launch.queue
###########################################################################
# Zookeeper Server Configuration
http://git-wip-us.apache.org/repos/asf/airavata/blob/fec0b379/roles/registry/templates/airavata-server.properties.j2
----------------------------------------------------------------------
diff --git a/roles/registry/templates/airavata-server.properties.j2 b/roles/registry/templates/airavata-server.properties.j2
index 435842f..5a01525 100644
--- a/roles/registry/templates/airavata-server.properties.j2
+++ b/roles/registry/templates/airavata-server.properties.j2
@@ -239,16 +239,13 @@ email.based.monitoring.period=10000
#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
# and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
rabbitmq.broker.url={{ rabbitmq_broker_url }}
-status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
-rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
-rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+rabbitmq.status.exchange.name=status_exchange
+rabbitmq.process.exchange.name=process_exchange
+rabbitmq.experiment.exchange.name=experiment_exchange
durable.queue=false
prefetch.count=200
-launch.queue.name=launch.queue
-cancel.queue.name=cancel.queue
-activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
-rabbitmq.exchange.name=airavata_rabbitmq_exchange
+process.launch.queue.name=process.launch.queue
+experiment.launch..queue.name=experiment.launch.queue
###########################################################################
# Zookeeper Server Configuration
[26/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
new file mode 100644
index 0000000..96758d5
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/models/UserGroup.java
@@ -0,0 +1,1154 @@
+/**
+ * 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.gov.registry.models;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
+public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._Fields>, java.io.Serializable, Cloneable, Comparable<UserGroup> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserGroup");
+
+ private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)8);
+ private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)9);
+ private static final org.apache.thrift.protocol.TField GROUP_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("groupType", org.apache.thrift.protocol.TType.I32, (short)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserGroupStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserGroupTupleSchemeFactory());
+ }
+
+ public String groupId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public String ownerId; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType groupType; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ GROUP_ID((short)1, "groupId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)6, "description"),
+ OWNER_ID((short)7, "ownerId"),
+ CREATED_TIME((short)8, "createdTime"),
+ UPDATED_TIME((short)9, "updatedTime"),
+ /**
+ *
+ * @see GroupType
+ */
+ GROUP_TYPE((short)10, "groupType");
+
+ 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: // GROUP_ID
+ return GROUP_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 6: // DESCRIPTION
+ return DESCRIPTION;
+ case 7: // OWNER_ID
+ return OWNER_ID;
+ case 8: // CREATED_TIME
+ return CREATED_TIME;
+ case 9: // UPDATED_TIME
+ return UPDATED_TIME;
+ case 10: // GROUP_TYPE
+ return GROUP_TYPE;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.GROUP_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.OWNER_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME,_Fields.GROUP_TYPE};
+ 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.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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.GROUP_TYPE, new org.apache.thrift.meta_data.FieldMetaData("groupType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserGroup.class, metaDataMap);
+ }
+
+ public UserGroup() {
+ this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public UserGroup(UserGroup other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetGroupId()) {
+ this.groupId = other.groupId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ if (other.isSetGroupType()) {
+ this.groupType = other.groupType;
+ }
+ }
+
+ public UserGroup deepCopy() {
+ return new UserGroup(this);
+ }
+
+ @Override
+ public void clear() {
+ this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ this.description = null;
+ this.ownerId = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ this.groupType = null;
+ }
+
+ public String getGroupId() {
+ return this.groupId;
+ }
+
+ public UserGroup setGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ public void unsetGroupId() {
+ this.groupId = null;
+ }
+
+ /** Returns true if field groupId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupId() {
+ return this.groupId != null;
+ }
+
+ public void setGroupIdIsSet(boolean value) {
+ if (!value) {
+ this.groupId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public UserGroup setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public UserGroup setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public UserGroup setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public UserGroup setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public UserGroup setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public UserGroup setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType getGroupType() {
+ return this.groupType;
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public UserGroup setGroupType(GroupType groupType) {
+ this.groupType = groupType;
+ return this;
+ }
+
+ public void unsetGroupType() {
+ this.groupType = null;
+ }
+
+ /** Returns true if field groupType is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupType() {
+ return this.groupType != null;
+ }
+
+ public void setGroupTypeIsSet(boolean value) {
+ if (!value) {
+ this.groupType = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case GROUP_ID:
+ if (value == null) {
+ unsetGroupId();
+ } else {
+ setGroupId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ case GROUP_TYPE:
+ if (value == null) {
+ unsetGroupType();
+ } else {
+ setGroupType((GroupType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case GROUP_ID:
+ return getGroupId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ case GROUP_TYPE:
+ return getGroupType();
+
+ }
+ 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 GROUP_ID:
+ return isSetGroupId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ case GROUP_TYPE:
+ return isSetGroupType();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof UserGroup)
+ return this.equals((UserGroup)that);
+ return false;
+ }
+
+ public boolean equals(UserGroup that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_groupId = true && this.isSetGroupId();
+ boolean that_present_groupId = true && that.isSetGroupId();
+ if (this_present_groupId || that_present_groupId) {
+ if (!(this_present_groupId && that_present_groupId))
+ return false;
+ if (!this.groupId.equals(that.groupId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ boolean this_present_groupType = true && this.isSetGroupType();
+ boolean that_present_groupType = true && that.isSetGroupType();
+ if (this_present_groupType || that_present_groupType) {
+ if (!(this_present_groupType && that_present_groupType))
+ return false;
+ if (!this.groupType.equals(that.groupType))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_groupId = true && (isSetGroupId());
+ list.add(present_groupId);
+ if (present_groupId)
+ list.add(groupId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_ownerId = true && (isSetOwnerId());
+ list.add(present_ownerId);
+ if (present_ownerId)
+ list.add(ownerId);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ boolean present_groupType = true && (isSetGroupType());
+ list.add(present_groupType);
+ if (present_groupType)
+ list.add(groupType.getValue());
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(UserGroup other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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;
+ }
+ }
+ 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("UserGroup(");
+ boolean first = true;
+
+ if (isSetGroupId()) {
+ sb.append("groupId:");
+ if (this.groupId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ first = false;
+ }
+ if (isSetGroupType()) {
+ if (!first) sb.append(", ");
+ sb.append("groupType:");
+ if (this.groupType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupType);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ 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 UserGroupStandardSchemeFactory implements SchemeFactory {
+ public UserGroupStandardScheme getScheme() {
+ return new UserGroupStandardScheme();
+ }
+ }
+
+ private static class UserGroupStandardScheme extends StandardScheme<UserGroup> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, UserGroup 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: // GROUP_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // GROUP_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ 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, UserGroup struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.groupId != null) {
+ if (struct.isSetGroupId()) {
+ oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
+ oprot.writeString(struct.groupId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.groupType != null) {
+ if (struct.isSetGroupType()) {
+ oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.groupType.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserGroupTupleSchemeFactory implements SchemeFactory {
+ public UserGroupTupleScheme getScheme() {
+ return new UserGroupTupleScheme();
+ }
+ }
+
+ private static class UserGroupTupleScheme extends TupleScheme<UserGroup> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetGroupId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(3);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetGroupType()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetGroupId()) {
+ oprot.writeString(struct.groupId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ if (struct.isSetGroupType()) {
+ oprot.writeI32(struct.groupType.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.groupType = org.apache.airavata.gov.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
index 3bd763f..0fb6325 100644
--- a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-21")
public class GovRegistryService {
public interface Iface {
@@ -77,15 +77,15 @@ public class GovRegistryService {
*
* @param group
*/
- public boolean createGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+ public boolean createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
- public boolean updateGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+ public boolean updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
public boolean deleteGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
- public org.apache.airavata.gov.registry.models.Group getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+ public org.apache.airavata.gov.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
- public List<org.apache.airavata.gov.registry.models.Group> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
+ public List<org.apache.airavata.gov.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
@@ -165,9 +165,9 @@ public class GovRegistryService {
public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void createGroup(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void updateGroup(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -490,13 +490,13 @@ public class GovRegistryService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
}
- public boolean createGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ public boolean createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
{
send_createGroup(group);
return recv_createGroup();
}
- public void send_createGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.thrift.TException
+ public void send_createGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.thrift.TException
{
createGroup_args args = new createGroup_args();
args.setGroup(group);
@@ -516,13 +516,13 @@ public class GovRegistryService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createGroup failed: unknown result");
}
- public boolean updateGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ public boolean updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
{
send_updateGroup(group);
return recv_updateGroup();
}
- public void send_updateGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.thrift.TException
+ public void send_updateGroup(org.apache.airavata.gov.registry.models.UserGroup group) throws org.apache.thrift.TException
{
updateGroup_args args = new updateGroup_args();
args.setGroup(group);
@@ -568,7 +568,7 @@ public class GovRegistryService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteGroup failed: unknown result");
}
- public org.apache.airavata.gov.registry.models.Group getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ public org.apache.airavata.gov.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
{
send_getGroup(groupId);
return recv_getGroup();
@@ -581,7 +581,7 @@ public class GovRegistryService {
sendBase("getGroup", args);
}
- public org.apache.airavata.gov.registry.models.Group recv_getGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ public org.apache.airavata.gov.registry.models.UserGroup recv_getGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
{
getGroup_result result = new getGroup_result();
receiveBase(result, "getGroup");
@@ -594,7 +594,7 @@ public class GovRegistryService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroup failed: unknown result");
}
- public List<org.apache.airavata.gov.registry.models.Group> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+ public List<org.apache.airavata.gov.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
{
send_getGroups(domain, offset, limit);
return recv_getGroups();
@@ -609,7 +609,7 @@ public class GovRegistryService {
sendBase("getGroups", args);
}
- public List<org.apache.airavata.gov.registry.models.Group> recv_getGroups() throws org.apache.thrift.TException
+ public List<org.apache.airavata.gov.registry.models.UserGroup> recv_getGroups() throws org.apache.thrift.TException
{
getGroups_result result = new getGroups_result();
receiveBase(result, "getGroups");
@@ -1438,7 +1438,7 @@ public class GovRegistryService {
}
}
- public void createGroup(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void createGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
createGroup_call method_call = new createGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
@@ -1446,8 +1446,8 @@ public class GovRegistryService {
}
public static class createGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.gov.registry.models.Group group;
- public createGroup_call(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private org.apache.airavata.gov.registry.models.UserGroup group;
+ public createGroup_call(org.apache.airavata.gov.registry.models.UserGroup group, 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.group = group;
}
@@ -1470,7 +1470,7 @@ public class GovRegistryService {
}
}
- public void updateGroup(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void updateGroup(org.apache.airavata.gov.registry.models.UserGroup group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
updateGroup_call method_call = new updateGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
@@ -1478,8 +1478,8 @@ public class GovRegistryService {
}
public static class updateGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.gov.registry.models.Group group;
- public updateGroup_call(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private org.apache.airavata.gov.registry.models.UserGroup group;
+ public updateGroup_call(org.apache.airavata.gov.registry.models.UserGroup group, 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.group = group;
}
@@ -1556,7 +1556,7 @@ public class GovRegistryService {
prot.writeMessageEnd();
}
- public org.apache.airavata.gov.registry.models.Group getResult() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException {
+ public org.apache.airavata.gov.registry.models.UserGroup getResult() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
@@ -1594,7 +1594,7 @@ public class GovRegistryService {
prot.writeMessageEnd();
}
- public List<org.apache.airavata.gov.registry.models.Group> getResult() throws org.apache.thrift.TException {
+ public List<org.apache.airavata.gov.registry.models.UserGroup> getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
@@ -3838,7 +3838,7 @@ public class GovRegistryService {
}
}
- public static class getGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGroup_args, org.apache.airavata.gov.registry.models.Group> {
+ public static class getGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGroup_args, org.apache.airavata.gov.registry.models.UserGroup> {
public getGroup() {
super("getGroup");
}
@@ -3847,10 +3847,10 @@ public class GovRegistryService {
return new getGroup_args();
}
- public AsyncMethodCallback<org.apache.airavata.gov.registry.models.Group> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.gov.registry.models.UserGroup> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.gov.registry.models.Group>() {
- public void onComplete(org.apache.airavata.gov.registry.models.Group o) {
+ return new AsyncMethodCallback<org.apache.airavata.gov.registry.models.UserGroup>() {
+ public void onComplete(org.apache.airavata.gov.registry.models.UserGroup o) {
getGroup_result result = new getGroup_result();
result.success = o;
try {
@@ -3890,12 +3890,12 @@ public class GovRegistryService {
return false;
}
- public void start(I iface, getGroup_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.gov.registry.models.Group> resultHandler) throws TException {
+ public void start(I iface, getGroup_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.gov.registry.models.UserGroup> resultHandler) throws TException {
iface.getGroup(args.groupId,resultHandler);
}
}
- public static class getGroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGroups_args, List<org.apache.airavata.gov.registry.models.Group>> {
+ public static class getGroups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGroups_args, List<org.apache.airavata.gov.registry.models.UserGroup>> {
public getGroups() {
super("getGroups");
}
@@ -3904,10 +3904,10 @@ public class GovRegistryService {
return new getGroups_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.gov.registry.models.Group>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.gov.registry.models.UserGroup>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.gov.registry.models.Group>>() {
- public void onComplete(List<org.apache.airavata.gov.registry.models.Group> o) {
+ return new AsyncMethodCallback<List<org.apache.airavata.gov.registry.models.UserGroup>>() {
+ public void onComplete(List<org.apache.airavata.gov.registry.models.UserGroup> o) {
getGroups_result result = new getGroups_result();
result.success = o;
try {
@@ -3941,7 +3941,7 @@ public class GovRegistryService {
return false;
}
- public void start(I iface, getGroups_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.gov.registry.models.Group>> resultHandler) throws TException {
+ public void start(I iface, getGroups_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.gov.registry.models.UserGroup>> resultHandler) throws TException {
iface.getGroups(args.domain, args.offset, args.limit,resultHandler);
}
}
@@ -13419,7 +13419,7 @@ public class GovRegistryService {
schemes.put(TupleScheme.class, new createGroup_argsTupleSchemeFactory());
}
- public org.apache.airavata.gov.registry.models.Group group; // required
+ public org.apache.airavata.gov.registry.models.UserGroup group; // 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 {
@@ -13484,7 +13484,7 @@ public class GovRegistryService {
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.GROUP, new org.apache.thrift.meta_data.FieldMetaData("group", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.gov.registry.models.Group.class)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.gov.registry.models.UserGroup.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createGroup_args.class, metaDataMap);
}
@@ -13493,7 +13493,7 @@ public class GovRegistryService {
}
public createGroup_args(
- org.apache.airavata.gov.registry.models.Group group)
+ org.apache.airavata.gov.registry.models.UserGroup group)
{
this();
this.group = group;
@@ -13504,7 +13504,7 @@ public class GovRegistryService {
*/
public createGroup_args(createGroup_args other) {
if (other.isSetGroup()) {
- this.group = new org.apache.airavata.gov.registry.models.Group(other.group);
+ this.group = new org.apache.airavata.gov.registry.models.UserGroup(other.group);
}
}
@@ -13517,11 +13517,11 @@ public class GovRegistryService {
this.group = null;
}
- public org.apache.airavata.gov.registry.models.Group getGroup() {
+ public org.apache.airavata.gov.registry.models.UserGroup getGroup() {
return this.group;
}
- public createGroup_args setGroup(org.apache.airavata.gov.registry.models.Group group) {
+ public createGroup_args setGroup(org.apache.airavata.gov.registry.models.UserGroup group) {
this.group = group;
return this;
}
@@ -13547,7 +13547,7 @@ public class GovRegistryService {
if (value == null) {
unsetGroup();
} else {
- setGroup((org.apache.airavata.gov.registry.models.Group)value);
+ setGroup((org.apache.airavata.gov.registry.models.UserGroup)value);
}
break;
@@ -13709,7 +13709,7 @@ public class GovRegistryService {
switch (schemeField.id) {
case 1: // GROUP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.group = new org.apache.airavata.gov.registry.models.Group();
+ struct.group = new org.apache.airavata.gov.registry.models.UserGroup();
struct.group.read(iprot);
struct.setGroupIsSet(true);
} else {
@@ -13759,7 +13759,7 @@ public class GovRegistryService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createGroup_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.group = new org.apache.airavata.gov.registry.models.Group();
+ struct.group = new org.apache.airavata.gov.registry.models.UserGroup();
struct.group.read(iprot);
struct.setGroupIsSet(true);
}
@@ -14246,7 +14246,7 @@ public class GovRegistryService {
schemes.put(TupleScheme.class, new updateGroup_argsTupleSchemeFactory());
}
- public org.apache.airavata.gov.registry.models.Group group; // required
+ public org.apache.airavata.gov.registry.models.UserGroup group; // 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 {
@@ -14311,7 +14311,7 @@ public class GovRegistryService {
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.GROUP, new org.apache.thrift.meta_data.FieldMetaData("group", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.gov.registry.models.Group.class)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.gov.registry.models.UserGroup.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateGroup_args.class, metaDataMap);
}
@@ -14320,7 +14320,7 @@ public class GovRegistryService {
}
public updateGroup_args(
- org.apache.airavata.gov.registry.models.Group group)
+ org.apache.airavata.gov.registry.models.UserGroup group)
{
this();
this.group = group;
@@ -14331,7 +14331,7 @@ public class GovRegistryService {
*/
public updateGroup_args(updateGroup_args other) {
if (other.isSetGroup()) {
- this.group = new org.apache.airavata.gov.registry.models.Group(other.group);
+ this.group = new org.apache.airavata.gov.registry.models.UserGroup(other.group);
}
}
@@ -14344,11 +14344,11 @@ public class GovRegistryService {
this.group = null;
}
- public org.apache.airavata.gov.registry.models.Group getGroup() {
+ public org.apache.airavata.gov.registry.models.UserGroup getGroup() {
return this.group;
}
- public updateGroup_args setGroup(org.apache.airavata.gov.registry.models.Group group) {
+ public updateGroup_args setGroup(org.apache.airavata.gov.registry.models.UserGroup group) {
this.group = group;
return this;
}
@@ -14374,7 +14374,7 @@ public class GovRegistryService {
if (value == null) {
unsetGroup();
} else {
- setGroup((org.apache.airavata.gov.registry.models.Group)value);
+ setGroup((org.apache.airavata.gov.registry.models.UserGroup)value);
}
break;
@@ -14536,7 +14536,7 @@ public class GovRegistryService {
switch (schemeField.id) {
case 1: // GROUP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.group = new org.apache.airavata.gov.registry.models.Group();
+ struct.group = new org.apache.airavata.gov.registry.models.UserGroup();
struct.group.read(iprot);
struct.setGroupIsSet(true);
} else {
@@ -14586,7 +14586,7 @@ public class GovRegistryService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateGroup_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.group = new org.apache.airavata.gov.registry.models.Group();
+ struct.group = new org.apache.airavata.gov.registry.models.UserGroup();
struct.group.read(iprot);
struct.setGroupIsSet(true);
}
@@ -16250,7 +16250,7 @@ public class GovRegistryService {
schemes.put(TupleScheme.class, new getGroup_resultTupleSchemeFactory());
}
- public org.apache.airavata.gov.registry.models.Group success; // required
+ public org.apache.airavata.gov.registry.models.UserGroup success; // required
public org.apache.airavata.gov.registry.models.GovRegistryException gre; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -16319,7 +16319,7 @@ public class GovRegistryService {
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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.gov.registry.models.Group.class)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.gov.registry.models.UserGroup.class)));
tmpMap.put(_Fields.GRE, new org.apache.thrift.meta_data.FieldMetaData("gre", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -16330,7 +16330,7 @@ public class GovRegistryService {
}
public getGroup_result(
- org.apache.airavata.gov.registry.models.Group success,
+ org.apache.airavata.gov.registry.models.UserGroup success,
org.apache.airavata.gov.registry.models.GovRegistryException gre)
{
this();
@@ -16343,7 +16343,7 @@ public class GovRegistryService {
*/
public getGroup_result(getGroup_result other) {
if (other.isSetSuccess()) {
- this.success = new org.apache.airavata.gov.registry.models.Group(other.success);
+ this.success = new org.apache.airavata.gov.registry.models.UserGroup(other.success);
}
if (other.isSetGre()) {
this.gre = new org.apache.airavata.gov.registry.models.GovRegistryException(other.gre);
@@ -16360,11 +16360,11 @@ public class GovRegistryService {
this.gre = null;
}
- public org.apache.airavata.gov.registry.models.Group getSuccess() {
+ public org.apache.airavata.gov.registry.models.UserGroup getSuccess() {
return this.success;
}
- public getGroup_result setSuccess(org.apache.airavata.gov.registry.models.Group success) {
+ public getGroup_result setSuccess(org.apache.airavata.gov.registry.models.UserGroup success) {
this.success = success;
return this;
}
@@ -16414,7 +16414,7 @@ public class GovRegistryService {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((org.apache.airavata.gov.registry.models.Group)value);
+ setSuccess((org.apache.airavata.gov.registry.models.UserGroup)value);
}
break;
@@ -16618,7 +16618,7 @@ public class GovRegistryService {
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new org.apache.airavata.gov.registry.models.Group();
+ struct.success = new org.apache.airavata.gov.registry.models.UserGroup();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
@@ -16697,7 +16697,7 @@ public class GovRegistryService {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
- struct.success = new org.apache.airavata.gov.registry.models.Group();
+ struct.success = new org.apache.airavata.gov.registry.models.UserGroup();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
@@ -17272,7 +17272,7 @@ public class GovRegistryService {
schemes.put(TupleScheme.class, new getGroups_resultTupleSchemeFactory());
}
- public List<org.apache.airavata.gov.registry.models.Group> success; // required
+ public List<org.apache.airavata.gov.registry.models.UserGroup> success; // 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 {
@@ -17338,7 +17338,7 @@ public class GovRegistryService {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.gov.registry.models.Group.class))));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.gov.registry.models.UserGroup.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGroups_result.class, metaDataMap);
}
@@ -17347,7 +17347,7 @@ public class GovRegistryService {
}
public getGroups_result(
- List<org.apache.airavata.gov.registry.models.Group> success)
+ List<org.apache.airavata.gov.registry.models.UserGroup> success)
{
this();
this.success = success;
@@ -17358,9 +17358,9 @@ public class GovRegistryService {
*/
public getGroups_result(getGroups_result other) {
if (other.isSetSuccess()) {
- List<org.apache.airavata.gov.registry.models.Group> __this__success = new ArrayList<org.apache.airavata.gov.registry.models.Group>(other.success.size());
- for (org.apache.airavata.gov.registry.models.Group other_element : other.success) {
- __this__success.add(new org.apache.airavata.gov.registry.models.Group(other_element));
+ List<org.apache.airavata.gov.registry.models.UserGroup> __this__success = new ArrayList<org.apache.airavata.gov.registry.models.UserGroup>(other.success.size());
+ for (org.apache.airavata.gov.registry.models.UserGroup other_element : other.success) {
+ __this__success.add(new org.apache.airavata.gov.registry.models.UserGroup(other_element));
}
this.success = __this__success;
}
@@ -17379,22 +17379,22 @@ public class GovRegistryService {
return (this.success == null) ? 0 : this.success.size();
}
- public java.util.Iterator<org.apache.airavata.gov.registry.models.Group> getSuccessIterator() {
+ public java.util.Iterator<org.apache.airavata.gov.registry.models.UserGroup> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
- public void addToSuccess(org.apache.airavata.gov.registry.models.Group elem) {
+ public void addToSuccess(org.apache.airavata.gov.registry.models.UserGroup elem) {
if (this.success == null) {
- this.success = new ArrayList<org.apache.airavata.gov.registry.models.Group>();
+ this.success = new ArrayList<org.apache.airavata.gov.registry.models.UserGroup>();
}
this.success.add(elem);
}
- public List<org.apache.airavata.gov.registry.models.Group> getSuccess() {
+ public List<org.apache.airavata.gov.registry.models.UserGroup> getSuccess() {
return this.success;
}
- public getGroups_result setSuccess(List<org.apache.airavata.gov.registry.models.Group> success) {
+ public getGroups_result setSuccess(List<org.apache.airavata.gov.registry.models.UserGroup> success) {
this.success = success;
return this;
}
@@ -17420,7 +17420,7 @@ public class GovRegistryService {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<org.apache.airavata.gov.registry.models.Group>)value);
+ setSuccess((List<org.apache.airavata.gov.registry.models.UserGroup>)value);
}
break;
@@ -17578,11 +17578,11 @@ public class GovRegistryService {
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.success = new ArrayList<org.apache.airavata.gov.registry.models.Group>(_list16.size);
- org.apache.airavata.gov.registry.models.Group _elem17;
+ struct.success = new ArrayList<org.apache.airavata.gov.registry.models.UserGroup>(_list16.size);
+ org.apache.airavata.gov.registry.models.UserGroup _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
- _elem17 = new org.apache.airavata.gov.registry.models.Group();
+ _elem17 = new org.apache.airavata.gov.registry.models.UserGroup();
_elem17.read(iprot);
struct.success.add(_elem17);
}
@@ -17612,7 +17612,7 @@ public class GovRegistryService {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (org.apache.airavata.gov.registry.models.Group _iter19 : struct.success)
+ for (org.apache.airavata.gov.registry.models.UserGroup _iter19 : struct.success)
{
_iter19.write(oprot);
}
@@ -17645,7 +17645,7 @@ public class GovRegistryService {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (org.apache.airavata.gov.registry.models.Group _iter20 : struct.success)
+ for (org.apache.airavata.gov.registry.models.UserGroup _iter20 : struct.success)
{
_iter20.write(oprot);
}
@@ -17660,11 +17660,11 @@ public class GovRegistryService {
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<org.apache.airavata.gov.registry.models.Group>(_list21.size);
- org.apache.airavata.gov.registry.models.Group _elem22;
+ struct.success = new ArrayList<org.apache.airavata.gov.registry.models.UserGroup>(_list21.size);
+ org.apache.airavata.gov.registry.models.UserGroup _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
- _elem22 = new org.apache.airavata.gov.registry.models.Group();
+ _elem22 = new org.apache.airavata.gov.registry.models.UserGroup();
_elem22.read(iprot);
struct.success.add(_elem22);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/pom.xml b/airavata-gov-registry/pom.xml
index fb65085..46f801f 100644
--- a/airavata-gov-registry/pom.xml
+++ b/airavata-gov-registry/pom.xml
@@ -17,5 +17,4 @@
<module>airavata-gov-registry-stubs</module>
<module>airavata-gov-registry-core</module>
</modules>
-
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift b/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
index f7289e2..bbf2e89 100644
--- a/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
+++ b/airavata-gov-registry/thrift_models/gov_reg_cpi.thrift
@@ -45,11 +45,11 @@ service GovRegistryService {
/**
* Group Operations
**/
- bool createGroup(1: required gov_reg_models.Group group) throws (1: gov_reg_models.GovRegistryException gre)
- bool updateGroup(1: required gov_reg_models.Group group) throws (1: gov_reg_models.GovRegistryException gre)
+ bool createGroup(1: required gov_reg_models.UserGroup group) throws (1: gov_reg_models.GovRegistryException gre)
+ bool updateGroup(1: required gov_reg_models.UserGroup group) throws (1: gov_reg_models.GovRegistryException gre)
bool deleteGroup(1: required string groupId) throws (1: gov_reg_models.GovRegistryException gre)
- gov_reg_models.Group getGroup(1: required string groupId) throws (1: gov_reg_models.GovRegistryException gre)
- list<gov_reg_models.Group> getGroups(1: required string domain, 2: required i32 offset, 3: required i32 limit)
+ gov_reg_models.UserGroup getGroup(1: required string groupId) throws (1: gov_reg_models.GovRegistryException gre)
+ list<gov_reg_models.UserGroup> getGroups(1: required string domain, 2: required i32 offset, 3: required i32 limit)
bool addUsersToGroup(1: required list<string> userIds, 2: required string groupId) throws (1: gov_reg_models.GovRegistryException gre);
bool removeUsersFromGroup(1: required list<string> userIds, 2: required string groupId) throws (1: gov_reg_models.GovRegistryException gre);
http://git-wip-us.apache.org/repos/asf/airavata/blob/0e21ebcd/airavata-gov-registry/thrift_models/gov_reg_models.thrift
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/thrift_models/gov_reg_models.thrift b/airavata-gov-registry/thrift_models/gov_reg_models.thrift
index ad081ae..c2d64eb 100644
--- a/airavata-gov-registry/thrift_models/gov_reg_models.thrift
+++ b/airavata-gov-registry/thrift_models/gov_reg_models.thrift
@@ -43,7 +43,7 @@ enum GroupType {
MULTI_USER
}
- struct Group {
+ struct UserGroup {
1: optional string groupId = DO_NOT_SET_AT_CLIENTS_ID,
2: optional string domainId,
3: optional string name,
[30/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
new file mode 100644
index 0000000..211ee5c
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
@@ -0,0 +1,1154 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._Fields>, java.io.Serializable, Cloneable, Comparable<UserGroup> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserGroup");
+
+ private static final org.apache.thrift.protocol.TField GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)8);
+ private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)9);
+ private static final org.apache.thrift.protocol.TField GROUP_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("groupType", org.apache.thrift.protocol.TType.I32, (short)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserGroupStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserGroupTupleSchemeFactory());
+ }
+
+ public String groupId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public String ownerId; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType groupType; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ GROUP_ID((short)1, "groupId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)6, "description"),
+ OWNER_ID((short)7, "ownerId"),
+ CREATED_TIME((short)8, "createdTime"),
+ UPDATED_TIME((short)9, "updatedTime"),
+ /**
+ *
+ * @see GroupType
+ */
+ GROUP_TYPE((short)10, "groupType");
+
+ 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: // GROUP_ID
+ return GROUP_ID;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 6: // DESCRIPTION
+ return DESCRIPTION;
+ case 7: // OWNER_ID
+ return OWNER_ID;
+ case 8: // CREATED_TIME
+ return CREATED_TIME;
+ case 9: // UPDATED_TIME
+ return UPDATED_TIME;
+ case 10: // GROUP_TYPE
+ return GROUP_TYPE;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.GROUP_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_Fields.OWNER_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME,_Fields.GROUP_TYPE};
+ 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.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.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.GROUP_TYPE, new org.apache.thrift.meta_data.FieldMetaData("groupType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserGroup.class, metaDataMap);
+ }
+
+ public UserGroup() {
+ this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public UserGroup(UserGroup other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetGroupId()) {
+ this.groupId = other.groupId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ if (other.isSetGroupType()) {
+ this.groupType = other.groupType;
+ }
+ }
+
+ public UserGroup deepCopy() {
+ return new UserGroup(this);
+ }
+
+ @Override
+ public void clear() {
+ this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ this.description = null;
+ this.ownerId = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ this.groupType = null;
+ }
+
+ public String getGroupId() {
+ return this.groupId;
+ }
+
+ public UserGroup setGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ public void unsetGroupId() {
+ this.groupId = null;
+ }
+
+ /** Returns true if field groupId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupId() {
+ return this.groupId != null;
+ }
+
+ public void setGroupIdIsSet(boolean value) {
+ if (!value) {
+ this.groupId = null;
+ }
+ }
+
+ public String getDomainId() {
+ return this.domainId;
+ }
+
+ public UserGroup setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public UserGroup setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public UserGroup setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public UserGroup setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public UserGroup setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public UserGroup setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public GroupType getGroupType() {
+ return this.groupType;
+ }
+
+ /**
+ *
+ * @see GroupType
+ */
+ public UserGroup setGroupType(GroupType groupType) {
+ this.groupType = groupType;
+ return this;
+ }
+
+ public void unsetGroupType() {
+ this.groupType = null;
+ }
+
+ /** Returns true if field groupType is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupType() {
+ return this.groupType != null;
+ }
+
+ public void setGroupTypeIsSet(boolean value) {
+ if (!value) {
+ this.groupType = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case GROUP_ID:
+ if (value == null) {
+ unsetGroupId();
+ } else {
+ setGroupId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ case GROUP_TYPE:
+ if (value == null) {
+ unsetGroupType();
+ } else {
+ setGroupType((GroupType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case GROUP_ID:
+ return getGroupId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ case GROUP_TYPE:
+ return getGroupType();
+
+ }
+ 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 GROUP_ID:
+ return isSetGroupId();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ case GROUP_TYPE:
+ return isSetGroupType();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof UserGroup)
+ return this.equals((UserGroup)that);
+ return false;
+ }
+
+ public boolean equals(UserGroup that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_groupId = true && this.isSetGroupId();
+ boolean that_present_groupId = true && that.isSetGroupId();
+ if (this_present_groupId || that_present_groupId) {
+ if (!(this_present_groupId && that_present_groupId))
+ return false;
+ if (!this.groupId.equals(that.groupId))
+ return false;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ boolean this_present_groupType = true && this.isSetGroupType();
+ boolean that_present_groupType = true && that.isSetGroupType();
+ if (this_present_groupType || that_present_groupType) {
+ if (!(this_present_groupType && that_present_groupType))
+ return false;
+ if (!this.groupType.equals(that.groupType))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_groupId = true && (isSetGroupId());
+ list.add(present_groupId);
+ if (present_groupId)
+ list.add(groupId);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_ownerId = true && (isSetOwnerId());
+ list.add(present_ownerId);
+ if (present_ownerId)
+ list.add(ownerId);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ boolean present_groupType = true && (isSetGroupType());
+ list.add(present_groupType);
+ if (present_groupType)
+ list.add(groupType.getValue());
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(UserGroup other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetGroupId()).compareTo(other.isSetGroupId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupId, other.groupId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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;
+ }
+ }
+ 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("UserGroup(");
+ boolean first = true;
+
+ if (isSetGroupId()) {
+ sb.append("groupId:");
+ if (this.groupId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ first = false;
+ }
+ if (isSetGroupType()) {
+ if (!first) sb.append(", ");
+ sb.append("groupType:");
+ if (this.groupType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupType);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ 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 UserGroupStandardSchemeFactory implements SchemeFactory {
+ public UserGroupStandardScheme getScheme() {
+ return new UserGroupStandardScheme();
+ }
+ }
+
+ private static class UserGroupStandardScheme extends StandardScheme<UserGroup> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, UserGroup 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: // GROUP_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // GROUP_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.groupType = org.apache.airavata.sharing.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ 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, UserGroup struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.groupId != null) {
+ if (struct.isSetGroupId()) {
+ oprot.writeFieldBegin(GROUP_ID_FIELD_DESC);
+ oprot.writeString(struct.groupId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.groupType != null) {
+ if (struct.isSetGroupType()) {
+ oprot.writeFieldBegin(GROUP_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.groupType.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserGroupTupleSchemeFactory implements SchemeFactory {
+ public UserGroupTupleScheme getScheme() {
+ return new UserGroupTupleScheme();
+ }
+ }
+
+ private static class UserGroupTupleScheme extends TupleScheme<UserGroup> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetGroupId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(3);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetGroupType()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetGroupId()) {
+ oprot.writeString(struct.groupId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ if (struct.isSetGroupType()) {
+ oprot.writeI32(struct.groupType.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, UserGroup struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ struct.groupId = iprot.readString();
+ struct.setGroupIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.groupType = org.apache.airavata.sharing.registry.models.GroupType.findByValue(iprot.readI32());
+ struct.setGroupTypeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/sharing_modelsConstants.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/sharing_modelsConstants.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/sharing_modelsConstants.java
new file mode 100644
index 0000000..07fc3c7
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/sharing_modelsConstants.java
@@ -0,0 +1,41 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+public class sharing_modelsConstants {
+
+ public static final String DO_NOT_SET_AT_CLIENTS_ID = "DO_NOT_SET_AT_CLIENTS_ID";
+
+}
[32/50] [abbrv] airavata git commit: WIP
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
new file mode 100644
index 0000000..752df80
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
@@ -0,0 +1,924 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class EntityType implements org.apache.thrift.TBase<EntityType, EntityType._Fields>, java.io.Serializable, Cloneable, Comparable<EntityType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EntityType");
+
+ 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 org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
+ 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)5);
+ 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)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new EntityTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new EntityTypeTupleSchemeFactory());
+ }
+
+ public String entityTypeId; // optional
+ public String domainId; // optional
+ public String name; // optional
+ public String description; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ ENTITY_TYPE_ID((short)1, "entityTypeId"),
+ DOMAIN_ID((short)2, "domainId"),
+ NAME((short)3, "name"),
+ DESCRIPTION((short)4, "description"),
+ CREATED_TIME((short)5, "createdTime"),
+ UPDATED_TIME((short)6, "updatedTime");
+
+ 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;
+ case 2: // DOMAIN_ID
+ return DOMAIN_ID;
+ case 3: // NAME
+ return NAME;
+ case 4: // DESCRIPTION
+ return DESCRIPTION;
+ case 5: // CREATED_TIME
+ return CREATED_TIME;
+ case 6: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.ENTITY_TYPE_ID,_Fields.DOMAIN_ID,_Fields.NAME,_Fields.DESCRIPTION,_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);
+ tmpMap.put(_Fields.ENTITY_TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("entityTypeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DOMAIN_ID, new org.apache.thrift.meta_data.FieldMetaData("domainId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EntityType.class, metaDataMap);
+ }
+
+ public EntityType() {
+ this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public EntityType(EntityType other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetEntityTypeId()) {
+ this.entityTypeId = other.entityTypeId;
+ }
+ if (other.isSetDomainId()) {
+ this.domainId = other.domainId;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public EntityType deepCopy() {
+ return new EntityType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
+
+ this.domainId = null;
+ this.name = null;
+ this.description = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getEntityTypeId() {
+ return this.entityTypeId;
+ }
+
+ public EntityType 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 String getDomainId() {
+ return this.domainId;
+ }
+
+ public EntityType setDomainId(String domainId) {
+ this.domainId = domainId;
+ return this;
+ }
+
+ public void unsetDomainId() {
+ this.domainId = null;
+ }
+
+ /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDomainId() {
+ return this.domainId != null;
+ }
+
+ public void setDomainIdIsSet(boolean value) {
+ if (!value) {
+ this.domainId = null;
+ }
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public EntityType setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public EntityType setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public EntityType setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public EntityType setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ if (value == null) {
+ unsetEntityTypeId();
+ } else {
+ setEntityTypeId((String)value);
+ }
+ break;
+
+ case DOMAIN_ID:
+ if (value == null) {
+ unsetDomainId();
+ } else {
+ setDomainId((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ENTITY_TYPE_ID:
+ return getEntityTypeId();
+
+ case DOMAIN_ID:
+ return getDomainId();
+
+ case NAME:
+ return getName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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();
+ case DOMAIN_ID:
+ return isSetDomainId();
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof EntityType)
+ return this.equals((EntityType)that);
+ return false;
+ }
+
+ public boolean equals(EntityType 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;
+ }
+
+ boolean this_present_domainId = true && this.isSetDomainId();
+ boolean that_present_domainId = true && that.isSetDomainId();
+ if (this_present_domainId || that_present_domainId) {
+ if (!(this_present_domainId && that_present_domainId))
+ return false;
+ if (!this.domainId.equals(that.domainId))
+ return false;
+ }
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ 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);
+
+ boolean present_domainId = true && (isSetDomainId());
+ list.add(present_domainId);
+ if (present_domainId)
+ list.add(domainId);
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(EntityType 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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDomainId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("EntityType(");
+ boolean first = true;
+
+ if (isSetEntityTypeId()) {
+ sb.append("entityTypeId:");
+ if (this.entityTypeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.entityTypeId);
+ }
+ first = false;
+ }
+ if (isSetDomainId()) {
+ if (!first) sb.append(", ");
+ sb.append("domainId:");
+ if (this.domainId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.domainId);
+ }
+ first = false;
+ }
+ if (isSetName()) {
+ if (!first) sb.append(", ");
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ }
+ if (isSetDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 EntityTypeStandardSchemeFactory implements SchemeFactory {
+ public EntityTypeStandardScheme getScheme() {
+ return new EntityTypeStandardScheme();
+ }
+ }
+
+ private static class EntityTypeStandardScheme extends StandardScheme<EntityType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, EntityType 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;
+ case 2: // DOMAIN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, EntityType struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.entityTypeId != null) {
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeFieldBegin(ENTITY_TYPE_ID_FIELD_DESC);
+ oprot.writeString(struct.entityTypeId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.domainId != null) {
+ if (struct.isSetDomainId()) {
+ oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+ oprot.writeString(struct.domainId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.name != null) {
+ if (struct.isSetName()) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class EntityTypeTupleSchemeFactory implements SchemeFactory {
+ public EntityTypeTupleScheme getScheme() {
+ return new EntityTypeTupleScheme();
+ }
+ }
+
+ private static class EntityTypeTupleScheme extends TupleScheme<EntityType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, EntityType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetEntityTypeId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDomainId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(3);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(4);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetEntityTypeId()) {
+ oprot.writeString(struct.entityTypeId);
+ }
+ if (struct.isSetDomainId()) {
+ oprot.writeString(struct.domainId);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, EntityType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.entityTypeId = iprot.readString();
+ struct.setEntityTypeIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.domainId = iprot.readString();
+ struct.setDomainIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java
new file mode 100644
index 0000000..2314b0a
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GovRegistryException.java
@@ -0,0 +1,391 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class GovRegistryException extends TException implements org.apache.thrift.TBase<GovRegistryException, GovRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<GovRegistryException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GovRegistryException");
+
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 GovRegistryExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GovRegistryExceptionTupleSchemeFactory());
+ }
+
+ public String message; // 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 {
+ MESSAGE((short)1, "message");
+
+ 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: // MESSAGE
+ return MESSAGE;
+ 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(GovRegistryException.class, metaDataMap);
+ }
+
+ public GovRegistryException() {
+ }
+
+ public GovRegistryException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GovRegistryException(GovRegistryException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public GovRegistryException deepCopy() {
+ return new GovRegistryException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.message = null;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public GovRegistryException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GovRegistryException)
+ return this.equals((GovRegistryException)that);
+ return false;
+ }
+
+ public boolean equals(GovRegistryException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_message = true && (isSetMessage());
+ list.add(present_message);
+ if (present_message)
+ list.add(message);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GovRegistryException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("GovRegistryException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (message == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' 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 GovRegistryExceptionStandardSchemeFactory implements SchemeFactory {
+ public GovRegistryExceptionStandardScheme getScheme() {
+ return new GovRegistryExceptionStandardScheme();
+ }
+ }
+
+ private static class GovRegistryExceptionStandardScheme extends StandardScheme<GovRegistryException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GovRegistryException 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: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, GovRegistryException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GovRegistryExceptionTupleSchemeFactory implements SchemeFactory {
+ public GovRegistryExceptionTupleScheme getScheme() {
+ return new GovRegistryExceptionTupleScheme();
+ }
+ }
+
+ private static class GovRegistryExceptionTupleScheme extends TupleScheme<GovRegistryException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GovRegistryException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.message);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GovRegistryException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
new file mode 100644
index 0000000..61f3564
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
@@ -0,0 +1,41 @@
+/**
+ * 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;
+
+
+public enum GroupChildType implements org.apache.thrift.TEnum {
+ USER(0),
+ GROUP(1);
+
+ private final int value;
+
+ private GroupChildType(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 GroupChildType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return USER;
+ case 1:
+ return GROUP;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
new file mode 100644
index 0000000..8fc2cd8
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
@@ -0,0 +1,830 @@
+/**
+ * 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 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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-23")
+public class GroupMembership implements org.apache.thrift.TBase<GroupMembership, GroupMembership._Fields>, java.io.Serializable, Cloneable, Comparable<GroupMembership> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupMembership");
+
+ private static final org.apache.thrift.protocol.TField PARENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CHILD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("childId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField CHILD_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("childType", org.apache.thrift.protocol.TType.I32, (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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GroupMembershipStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GroupMembershipTupleSchemeFactory());
+ }
+
+ public String parentId; // optional
+ public String childId; // optional
+ /**
+ *
+ * @see GroupChildType
+ */
+ public GroupChildType childType; // optional
+ public long createdTime; // optional
+ public long updatedTime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PARENT_ID((short)1, "parentId"),
+ CHILD_ID((short)2, "childId"),
+ /**
+ *
+ * @see GroupChildType
+ */
+ CHILD_TYPE((short)3, "childType"),
+ CREATED_TIME((short)4, "createdTime"),
+ UPDATED_TIME((short)5, "updatedTime");
+
+ 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: // PARENT_ID
+ return PARENT_ID;
+ case 2: // CHILD_ID
+ return CHILD_ID;
+ case 3: // CHILD_TYPE
+ return CHILD_TYPE;
+ case 4: // CREATED_TIME
+ return CREATED_TIME;
+ case 5: // UPDATED_TIME
+ return UPDATED_TIME;
+ 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 __CREATEDTIME_ISSET_ID = 0;
+ private static final int __UPDATEDTIME_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.PARENT_ID,_Fields.CHILD_ID,_Fields.CHILD_TYPE,_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);
+ tmpMap.put(_Fields.PARENT_ID, new org.apache.thrift.meta_data.FieldMetaData("parentId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CHILD_ID, new org.apache.thrift.meta_data.FieldMetaData("childId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CHILD_TYPE, new org.apache.thrift.meta_data.FieldMetaData("childType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GroupChildType.class)));
+ tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GroupMembership.class, metaDataMap);
+ }
+
+ public GroupMembership() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GroupMembership(GroupMembership other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetParentId()) {
+ this.parentId = other.parentId;
+ }
+ if (other.isSetChildId()) {
+ this.childId = other.childId;
+ }
+ if (other.isSetChildType()) {
+ this.childType = other.childType;
+ }
+ this.createdTime = other.createdTime;
+ this.updatedTime = other.updatedTime;
+ }
+
+ public GroupMembership deepCopy() {
+ return new GroupMembership(this);
+ }
+
+ @Override
+ public void clear() {
+ this.parentId = null;
+ this.childId = null;
+ this.childType = null;
+ setCreatedTimeIsSet(false);
+ this.createdTime = 0;
+ setUpdatedTimeIsSet(false);
+ this.updatedTime = 0;
+ }
+
+ public String getParentId() {
+ return this.parentId;
+ }
+
+ public GroupMembership setParentId(String parentId) {
+ this.parentId = parentId;
+ return this;
+ }
+
+ public void unsetParentId() {
+ this.parentId = null;
+ }
+
+ /** Returns true if field parentId is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentId() {
+ return this.parentId != null;
+ }
+
+ public void setParentIdIsSet(boolean value) {
+ if (!value) {
+ this.parentId = null;
+ }
+ }
+
+ public String getChildId() {
+ return this.childId;
+ }
+
+ public GroupMembership setChildId(String childId) {
+ this.childId = childId;
+ return this;
+ }
+
+ public void unsetChildId() {
+ this.childId = null;
+ }
+
+ /** Returns true if field childId is set (has been assigned a value) and false otherwise */
+ public boolean isSetChildId() {
+ return this.childId != null;
+ }
+
+ public void setChildIdIsSet(boolean value) {
+ if (!value) {
+ this.childId = null;
+ }
+ }
+
+ /**
+ *
+ * @see GroupChildType
+ */
+ public GroupChildType getChildType() {
+ return this.childType;
+ }
+
+ /**
+ *
+ * @see GroupChildType
+ */
+ public GroupMembership setChildType(GroupChildType childType) {
+ this.childType = childType;
+ return this;
+ }
+
+ public void unsetChildType() {
+ this.childType = null;
+ }
+
+ /** Returns true if field childType is set (has been assigned a value) and false otherwise */
+ public boolean isSetChildType() {
+ return this.childType != null;
+ }
+
+ public void setChildTypeIsSet(boolean value) {
+ if (!value) {
+ this.childType = null;
+ }
+ }
+
+ public long getCreatedTime() {
+ return this.createdTime;
+ }
+
+ public GroupMembership setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ setCreatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field createdTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIME_ISSET_ID);
+ }
+
+ public void setCreatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIME_ISSET_ID, value);
+ }
+
+ public long getUpdatedTime() {
+ return this.updatedTime;
+ }
+
+ public GroupMembership setUpdatedTime(long updatedTime) {
+ this.updatedTime = updatedTime;
+ setUpdatedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdatedTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
+ }
+
+ public void setUpdatedTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PARENT_ID:
+ if (value == null) {
+ unsetParentId();
+ } else {
+ setParentId((String)value);
+ }
+ break;
+
+ case CHILD_ID:
+ if (value == null) {
+ unsetChildId();
+ } else {
+ setChildId((String)value);
+ }
+ break;
+
+ case CHILD_TYPE:
+ if (value == null) {
+ unsetChildType();
+ } else {
+ setChildType((GroupChildType)value);
+ }
+ break;
+
+ case CREATED_TIME:
+ if (value == null) {
+ unsetCreatedTime();
+ } else {
+ setCreatedTime((Long)value);
+ }
+ break;
+
+ case UPDATED_TIME:
+ if (value == null) {
+ unsetUpdatedTime();
+ } else {
+ setUpdatedTime((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PARENT_ID:
+ return getParentId();
+
+ case CHILD_ID:
+ return getChildId();
+
+ case CHILD_TYPE:
+ return getChildType();
+
+ case CREATED_TIME:
+ return getCreatedTime();
+
+ case UPDATED_TIME:
+ return getUpdatedTime();
+
+ }
+ 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 PARENT_ID:
+ return isSetParentId();
+ case CHILD_ID:
+ return isSetChildId();
+ case CHILD_TYPE:
+ return isSetChildType();
+ case CREATED_TIME:
+ return isSetCreatedTime();
+ case UPDATED_TIME:
+ return isSetUpdatedTime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GroupMembership)
+ return this.equals((GroupMembership)that);
+ return false;
+ }
+
+ public boolean equals(GroupMembership that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_parentId = true && this.isSetParentId();
+ boolean that_present_parentId = true && that.isSetParentId();
+ if (this_present_parentId || that_present_parentId) {
+ if (!(this_present_parentId && that_present_parentId))
+ return false;
+ if (!this.parentId.equals(that.parentId))
+ return false;
+ }
+
+ boolean this_present_childId = true && this.isSetChildId();
+ boolean that_present_childId = true && that.isSetChildId();
+ if (this_present_childId || that_present_childId) {
+ if (!(this_present_childId && that_present_childId))
+ return false;
+ if (!this.childId.equals(that.childId))
+ return false;
+ }
+
+ boolean this_present_childType = true && this.isSetChildType();
+ boolean that_present_childType = true && that.isSetChildType();
+ if (this_present_childType || that_present_childType) {
+ if (!(this_present_childType && that_present_childType))
+ return false;
+ if (!this.childType.equals(that.childType))
+ return false;
+ }
+
+ boolean this_present_createdTime = true && this.isSetCreatedTime();
+ boolean that_present_createdTime = true && that.isSetCreatedTime();
+ if (this_present_createdTime || that_present_createdTime) {
+ if (!(this_present_createdTime && that_present_createdTime))
+ return false;
+ if (this.createdTime != that.createdTime)
+ return false;
+ }
+
+ boolean this_present_updatedTime = true && this.isSetUpdatedTime();
+ boolean that_present_updatedTime = true && that.isSetUpdatedTime();
+ if (this_present_updatedTime || that_present_updatedTime) {
+ if (!(this_present_updatedTime && that_present_updatedTime))
+ return false;
+ if (this.updatedTime != that.updatedTime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_parentId = true && (isSetParentId());
+ list.add(present_parentId);
+ if (present_parentId)
+ list.add(parentId);
+
+ boolean present_childId = true && (isSetChildId());
+ list.add(present_childId);
+ if (present_childId)
+ list.add(childId);
+
+ boolean present_childType = true && (isSetChildType());
+ list.add(present_childType);
+ if (present_childType)
+ list.add(childType.getValue());
+
+ boolean present_createdTime = true && (isSetCreatedTime());
+ list.add(present_createdTime);
+ if (present_createdTime)
+ list.add(createdTime);
+
+ boolean present_updatedTime = true && (isSetUpdatedTime());
+ list.add(present_updatedTime);
+ if (present_updatedTime)
+ list.add(updatedTime);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GroupMembership other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParentId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentId, other.parentId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetChildId()).compareTo(other.isSetChildId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetChildId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childId, other.childId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetChildType()).compareTo(other.isSetChildType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetChildType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childType, other.childType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTime, other.createdTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("GroupMembership(");
+ boolean first = true;
+
+ if (isSetParentId()) {
+ sb.append("parentId:");
+ if (this.parentId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parentId);
+ }
+ first = false;
+ }
+ if (isSetChildId()) {
+ if (!first) sb.append(", ");
+ sb.append("childId:");
+ if (this.childId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.childId);
+ }
+ first = false;
+ }
+ if (isSetChildType()) {
+ if (!first) sb.append(", ");
+ sb.append("childType:");
+ if (this.childType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.childType);
+ }
+ first = false;
+ }
+ if (isSetCreatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("createdTime:");
+ sb.append(this.createdTime);
+ first = false;
+ }
+ if (isSetUpdatedTime()) {
+ if (!first) sb.append(", ");
+ sb.append("updatedTime:");
+ sb.append(this.updatedTime);
+ 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 GroupMembershipStandardSchemeFactory implements SchemeFactory {
+ public GroupMembershipStandardScheme getScheme() {
+ return new GroupMembershipStandardScheme();
+ }
+ }
+
+ private static class GroupMembershipStandardScheme extends StandardScheme<GroupMembership> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GroupMembership 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: // PARENT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parentId = iprot.readString();
+ struct.setParentIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CHILD_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.childId = iprot.readString();
+ struct.setChildIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // CHILD_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.childType = org.apache.airavata.sharing.registry.models.GroupChildType.findByValue(iprot.readI32());
+ struct.setChildTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPDATED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(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, GroupMembership struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.parentId != null) {
+ if (struct.isSetParentId()) {
+ oprot.writeFieldBegin(PARENT_ID_FIELD_DESC);
+ oprot.writeString(struct.parentId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.childId != null) {
+ if (struct.isSetChildId()) {
+ oprot.writeFieldBegin(CHILD_ID_FIELD_DESC);
+ oprot.writeString(struct.childId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.childType != null) {
+ if (struct.isSetChildType()) {
+ oprot.writeFieldBegin(CHILD_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.childType.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createdTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updatedTime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GroupMembershipTupleSchemeFactory implements SchemeFactory {
+ public GroupMembershipTupleScheme getScheme() {
+ return new GroupMembershipTupleScheme();
+ }
+ }
+
+ private static class GroupMembershipTupleScheme extends TupleScheme<GroupMembership> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GroupMembership struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetParentId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetChildId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetChildType()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreatedTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUpdatedTime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetParentId()) {
+ oprot.writeString(struct.parentId);
+ }
+ if (struct.isSetChildId()) {
+ oprot.writeString(struct.childId);
+ }
+ if (struct.isSetChildType()) {
+ oprot.writeI32(struct.childType.getValue());
+ }
+ if (struct.isSetCreatedTime()) {
+ oprot.writeI64(struct.createdTime);
+ }
+ if (struct.isSetUpdatedTime()) {
+ oprot.writeI64(struct.updatedTime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GroupMembership struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.parentId = iprot.readString();
+ struct.setParentIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.childId = iprot.readString();
+ struct.setChildIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.childType = org.apache.airavata.sharing.registry.models.GroupChildType.findByValue(iprot.readI32());
+ struct.setChildTypeIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createdTime = iprot.readI64();
+ struct.setCreatedTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.updatedTime = iprot.readI64();
+ struct.setUpdatedTimeIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/f3c365ab/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
----------------------------------------------------------------------
diff --git a/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
new file mode 100644
index 0000000..5727f83
--- /dev/null
+++ b/modules/airavata-sharing-registry/airavata-sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.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 GroupType implements org.apache.thrift.TEnum {
+ SINGLE_USER(0),
+ MULTI_USER(1);
+
+ private final int value;
+
+ private GroupType(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 GroupType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SINGLE_USER;
+ case 1:
+ return MULTI_USER;
+ default:
+ return null;
+ }
+ }
+}
[02/50] [abbrv] airavata git commit: Updated readme to avoid
known_host adding prompt
Posted by sc...@apache.org.
Updated readme to avoid known_host adding prompt
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/21545bea
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/21545bea
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/21545bea
Branch: refs/heads/airavata-gov-registry
Commit: 21545bea2b338dcc8491cb15aee85787fdb38e92
Parents: d5a9c8a
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Mon Sep 12 12:29:29 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Mon Sep 12 12:29:29 2016 -0400
----------------------------------------------------------------------
README.md | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/21545bea/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 794099a..9ce4e47 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# mesos-deployment
This project setup Apache Mesos master and slave clusters on Cloud Infrastructures using Anisble
+If you are working with new set of hosts which you haven't ssh login to those host from the machine you are suppose to run your Ansible play. It will prompt you to get permission to add to known_hosts list, if you wan't remove this prompt and you know the consequences of disabling this feature and you want tor remove this prompt behavior run this on your terminal `export ANSIBLE_HOST_KEY_CHECKING=False`
## Configurations
[20/50] [abbrv] airavata git commit: initial commit
Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/4f9e7dcd/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
new file mode 100644
index 0000000..3bd763f
--- /dev/null
+++ b/airavata-gov-registry/airavata-gov-registry-stubs/src/main/java/org/apache/airavata/gov/registry/service/cpi/GovRegistryService.java
@@ -0,0 +1,33673 @@
+/**
+ * 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.gov.registry.service.cpi;
+
+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;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-20")
+public class GovRegistryService {
+
+ public interface Iface {
+
+ /**
+ * * Domain Operations
+ * *
+ *
+ * @param domain
+ */
+ public boolean createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * User Operations
+ * *
+ *
+ * @param user
+ */
+ public boolean registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.User getUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * Group Operations
+ * *
+ *
+ * @param group
+ */
+ public boolean createGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.Group getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.Group> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public Map<String,org.apache.airavata.gov.registry.models.GroupType> getGroupMembers(String groupId) throws org.apache.thrift.TException;
+
+ /**
+ * * EntityType Operations
+ * *
+ *
+ * @param entityType
+ */
+ public boolean createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+ /**
+ * * Entity Operations
+ * *
+ *
+ * @param entity
+ */
+ public boolean registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deleteEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.Entity> searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ /**
+ * * EntityType Operations
+ * *
+ *
+ * @param permisionType
+ */
+ public boolean createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public org.apache.airavata.gov.registry.models.PermissionType getPermissionType(String permisionTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ public List<org.apache.airavata.gov.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void createDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void registerUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updatedUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createGroup(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateGroup(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getGroupMembers(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntityTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void registerEntity(org.apache.airavata.gov.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateEntity(org.apache.airavata.gov.registry.models.Entity entity, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deletePermissionType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getPermissionType(String permisionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public boolean createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createDomain(domain);
+ return recv_createDomain();
+ }
+
+ public void send_createDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.thrift.TException
+ {
+ createDomain_args args = new createDomain_args();
+ args.setDomain(domain);
+ sendBase("createDomain", args);
+ }
+
+ public boolean recv_createDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createDomain_result result = new createDomain_result();
+ receiveBase(result, "createDomain");
+ 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, "createDomain failed: unknown result");
+ }
+
+ public boolean updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateDomain(domain);
+ return recv_updateDomain();
+ }
+
+ public void send_updateDomain(org.apache.airavata.gov.registry.models.Domain domain) throws org.apache.thrift.TException
+ {
+ updateDomain_args args = new updateDomain_args();
+ args.setDomain(domain);
+ sendBase("updateDomain", args);
+ }
+
+ public boolean recv_updateDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateDomain_result result = new updateDomain_result();
+ receiveBase(result, "updateDomain");
+ 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, "updateDomain failed: unknown result");
+ }
+
+ public boolean deleteDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteDomain(domainId);
+ return recv_deleteDomain();
+ }
+
+ public void send_deleteDomain(String domainId) throws org.apache.thrift.TException
+ {
+ deleteDomain_args args = new deleteDomain_args();
+ args.setDomainId(domainId);
+ sendBase("deleteDomain", args);
+ }
+
+ public boolean recv_deleteDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteDomain_result result = new deleteDomain_result();
+ receiveBase(result, "deleteDomain");
+ 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, "deleteDomain failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getDomain(domainId);
+ return recv_getDomain();
+ }
+
+ public void send_getDomain(String domainId) throws org.apache.thrift.TException
+ {
+ getDomain_args args = new getDomain_args();
+ args.setDomainId(domainId);
+ sendBase("getDomain", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.Domain recv_getDomain() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getDomain_result result = new getDomain_result();
+ receiveBase(result, "getDomain");
+ 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, "getDomain failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getDomains(offset, limit);
+ return recv_getDomains();
+ }
+
+ public void send_getDomains(int offset, int limit) throws org.apache.thrift.TException
+ {
+ getDomains_args args = new getDomains_args();
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getDomains", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Domain> recv_getDomains() throws org.apache.thrift.TException
+ {
+ getDomains_result result = new getDomains_result();
+ receiveBase(result, "getDomains");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDomains failed: unknown result");
+ }
+
+ public boolean registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_registerUser(user);
+ return recv_registerUser();
+ }
+
+ public void send_registerUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.thrift.TException
+ {
+ registerUser_args args = new registerUser_args();
+ args.setUser(user);
+ sendBase("registerUser", args);
+ }
+
+ public boolean recv_registerUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ registerUser_result result = new registerUser_result();
+ receiveBase(result, "registerUser");
+ 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, "registerUser failed: unknown result");
+ }
+
+ public boolean updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updatedUser(user);
+ return recv_updatedUser();
+ }
+
+ public void send_updatedUser(org.apache.airavata.gov.registry.models.User user) throws org.apache.thrift.TException
+ {
+ updatedUser_args args = new updatedUser_args();
+ args.setUser(user);
+ sendBase("updatedUser", args);
+ }
+
+ public boolean recv_updatedUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updatedUser_result result = new updatedUser_result();
+ receiveBase(result, "updatedUser");
+ 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, "updatedUser failed: unknown result");
+ }
+
+ public boolean deleteUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteUser(userId);
+ return recv_deleteUser();
+ }
+
+ public void send_deleteUser(String userId) throws org.apache.thrift.TException
+ {
+ deleteUser_args args = new deleteUser_args();
+ args.setUserId(userId);
+ sendBase("deleteUser", args);
+ }
+
+ public boolean recv_deleteUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteUser_result result = new deleteUser_result();
+ receiveBase(result, "deleteUser");
+ 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, "deleteUser failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.User getUser(String userId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getUser(userId);
+ return recv_getUser();
+ }
+
+ public void send_getUser(String userId) throws org.apache.thrift.TException
+ {
+ getUser_args args = new getUser_args();
+ args.setUserId(userId);
+ sendBase("getUser", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.User recv_getUser() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getUser_result result = new getUser_result();
+ receiveBase(result, "getUser");
+ 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, "getUser failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getUsers(domain, offset, limit);
+ return recv_getUsers();
+ }
+
+ public void send_getUsers(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getUsers_args args = new getUsers_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getUsers", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.User> recv_getUsers() throws org.apache.thrift.TException
+ {
+ getUsers_result result = new getUsers_result();
+ receiveBase(result, "getUsers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
+ }
+
+ public boolean createGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createGroup(group);
+ return recv_createGroup();
+ }
+
+ public void send_createGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.thrift.TException
+ {
+ createGroup_args args = new createGroup_args();
+ args.setGroup(group);
+ sendBase("createGroup", args);
+ }
+
+ public boolean recv_createGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createGroup_result result = new createGroup_result();
+ receiveBase(result, "createGroup");
+ 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, "createGroup failed: unknown result");
+ }
+
+ public boolean updateGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateGroup(group);
+ return recv_updateGroup();
+ }
+
+ public void send_updateGroup(org.apache.airavata.gov.registry.models.Group group) throws org.apache.thrift.TException
+ {
+ updateGroup_args args = new updateGroup_args();
+ args.setGroup(group);
+ sendBase("updateGroup", args);
+ }
+
+ public boolean recv_updateGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateGroup_result result = new updateGroup_result();
+ receiveBase(result, "updateGroup");
+ 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, "updateGroup failed: unknown result");
+ }
+
+ public boolean deleteGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteGroup(groupId);
+ return recv_deleteGroup();
+ }
+
+ public void send_deleteGroup(String groupId) throws org.apache.thrift.TException
+ {
+ deleteGroup_args args = new deleteGroup_args();
+ args.setGroupId(groupId);
+ sendBase("deleteGroup", args);
+ }
+
+ public boolean recv_deleteGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteGroup_result result = new deleteGroup_result();
+ receiveBase(result, "deleteGroup");
+ 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, "deleteGroup failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.Group getGroup(String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getGroup(groupId);
+ return recv_getGroup();
+ }
+
+ public void send_getGroup(String groupId) throws org.apache.thrift.TException
+ {
+ getGroup_args args = new getGroup_args();
+ args.setGroupId(groupId);
+ sendBase("getGroup", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.Group recv_getGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getGroup_result result = new getGroup_result();
+ receiveBase(result, "getGroup");
+ 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, "getGroup failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Group> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getGroups(domain, offset, limit);
+ return recv_getGroups();
+ }
+
+ public void send_getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getGroups_args args = new getGroups_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getGroups", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Group> recv_getGroups() throws org.apache.thrift.TException
+ {
+ getGroups_result result = new getGroups_result();
+ receiveBase(result, "getGroups");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroups failed: unknown result");
+ }
+
+ public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_addUsersToGroup(userIds, groupId);
+ return recv_addUsersToGroup();
+ }
+
+ public void send_addUsersToGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
+ {
+ addUsersToGroup_args args = new addUsersToGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ sendBase("addUsersToGroup", args);
+ }
+
+ public boolean recv_addUsersToGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ addUsersToGroup_result result = new addUsersToGroup_result();
+ receiveBase(result, "addUsersToGroup");
+ 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, "addUsersToGroup failed: unknown result");
+ }
+
+ public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_removeUsersFromGroup(userIds, groupId);
+ return recv_removeUsersFromGroup();
+ }
+
+ public void send_removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
+ {
+ removeUsersFromGroup_args args = new removeUsersFromGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ sendBase("removeUsersFromGroup", args);
+ }
+
+ public boolean recv_removeUsersFromGroup() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ removeUsersFromGroup_result result = new removeUsersFromGroup_result();
+ receiveBase(result, "removeUsersFromGroup");
+ 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, "removeUsersFromGroup failed: unknown result");
+ }
+
+ public Map<String,org.apache.airavata.gov.registry.models.GroupType> getGroupMembers(String groupId) throws org.apache.thrift.TException
+ {
+ send_getGroupMembers(groupId);
+ return recv_getGroupMembers();
+ }
+
+ public void send_getGroupMembers(String groupId) throws org.apache.thrift.TException
+ {
+ getGroupMembers_args args = new getGroupMembers_args();
+ args.setGroupId(groupId);
+ sendBase("getGroupMembers", args);
+ }
+
+ public Map<String,org.apache.airavata.gov.registry.models.GroupType> recv_getGroupMembers() throws org.apache.thrift.TException
+ {
+ getGroupMembers_result result = new getGroupMembers_result();
+ receiveBase(result, "getGroupMembers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembers failed: unknown result");
+ }
+
+ public boolean createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createEntityType(entityType);
+ return recv_createEntityType();
+ }
+
+ public void send_createEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.thrift.TException
+ {
+ createEntityType_args args = new createEntityType_args();
+ args.setEntityType(entityType);
+ sendBase("createEntityType", args);
+ }
+
+ public boolean recv_createEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createEntityType_result result = new createEntityType_result();
+ receiveBase(result, "createEntityType");
+ 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, "createEntityType failed: unknown result");
+ }
+
+ public boolean updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateEntityType(entityType);
+ return recv_updateEntityType();
+ }
+
+ public void send_updateEntityType(org.apache.airavata.gov.registry.models.EntityType entityType) throws org.apache.thrift.TException
+ {
+ updateEntityType_args args = new updateEntityType_args();
+ args.setEntityType(entityType);
+ sendBase("updateEntityType", args);
+ }
+
+ public boolean recv_updateEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateEntityType_result result = new updateEntityType_result();
+ receiveBase(result, "updateEntityType");
+ 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, "updateEntityType failed: unknown result");
+ }
+
+ public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteEntityType(entityTypeId);
+ return recv_deleteEntityType();
+ }
+
+ public void send_deleteEntityType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ deleteEntityType_args args = new deleteEntityType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("deleteEntityType", args);
+ }
+
+ public boolean recv_deleteEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteEntityType_result result = new deleteEntityType_result();
+ receiveBase(result, "deleteEntityType");
+ 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, "deleteEntityType failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getEntityType(entityTypeId);
+ return recv_getEntityType();
+ }
+
+ public void send_getEntityType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ getEntityType_args args = new getEntityType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("getEntityType", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.EntityType recv_getEntityType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getEntityType_result result = new getEntityType_result();
+ receiveBase(result, "getEntityType");
+ 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, "getEntityType failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ send_getEntityTypes(domain, offset, limit);
+ return recv_getEntityTypes();
+ }
+
+ public void send_getEntityTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getEntityTypes_args args = new getEntityTypes_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getEntityTypes", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.EntityType> recv_getEntityTypes() throws org.apache.thrift.TException
+ {
+ getEntityTypes_result result = new getEntityTypes_result();
+ receiveBase(result, "getEntityTypes");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEntityTypes failed: unknown result");
+ }
+
+ public boolean registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_registerEntity(entity);
+ return recv_registerEntity();
+ }
+
+ public void send_registerEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.thrift.TException
+ {
+ registerEntity_args args = new registerEntity_args();
+ args.setEntity(entity);
+ sendBase("registerEntity", args);
+ }
+
+ public boolean recv_registerEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ registerEntity_result result = new registerEntity_result();
+ receiveBase(result, "registerEntity");
+ 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, "registerEntity failed: unknown result");
+ }
+
+ public boolean updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updateEntity(entity);
+ return recv_updateEntity();
+ }
+
+ public void send_updateEntity(org.apache.airavata.gov.registry.models.Entity entity) throws org.apache.thrift.TException
+ {
+ updateEntity_args args = new updateEntity_args();
+ args.setEntity(entity);
+ sendBase("updateEntity", args);
+ }
+
+ public boolean recv_updateEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updateEntity_result result = new updateEntity_result();
+ receiveBase(result, "updateEntity");
+ 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, "updateEntity failed: unknown result");
+ }
+
+ public boolean deleteEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deleteEntity(entityId);
+ return recv_deleteEntity();
+ }
+
+ public void send_deleteEntity(String entityId) throws org.apache.thrift.TException
+ {
+ deleteEntity_args args = new deleteEntity_args();
+ args.setEntityId(entityId);
+ sendBase("deleteEntity", args);
+ }
+
+ public boolean recv_deleteEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deleteEntity_result result = new deleteEntity_result();
+ receiveBase(result, "deleteEntity");
+ 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, "deleteEntity failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getEntity(entityId);
+ return recv_getEntity();
+ }
+
+ public void send_getEntity(String entityId) throws org.apache.thrift.TException
+ {
+ getEntity_args args = new getEntity_args();
+ args.setEntityId(entityId);
+ sendBase("getEntity", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.Entity recv_getEntity() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getEntity_result result = new getEntity_result();
+ receiveBase(result, "getEntity");
+ 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, "getEntity failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Entity> searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_searchEntities(domain, entityType, filters, offset, limit);
+ return recv_searchEntities();
+ }
+
+ public void send_searchEntities(String domain, String entityType, Map<String,String> filters, int offset, int limit) throws org.apache.thrift.TException
+ {
+ searchEntities_args args = new searchEntities_args();
+ args.setDomain(domain);
+ args.setEntityType(entityType);
+ args.setFilters(filters);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("searchEntities", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Entity> recv_searchEntities() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ searchEntities_result result = new searchEntities_result();
+ receiveBase(result, "searchEntities");
+ 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, "searchEntities failed: unknown result");
+ }
+
+ public boolean createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_createPermissionType(permisionType);
+ return recv_createPermissionType();
+ }
+
+ public void send_createPermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.thrift.TException
+ {
+ createPermissionType_args args = new createPermissionType_args();
+ args.setPermisionType(permisionType);
+ sendBase("createPermissionType", args);
+ }
+
+ public boolean recv_createPermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ createPermissionType_result result = new createPermissionType_result();
+ receiveBase(result, "createPermissionType");
+ 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, "createPermissionType failed: unknown result");
+ }
+
+ public boolean updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_updatePermissionType(permisionType);
+ return recv_updatePermissionType();
+ }
+
+ public void send_updatePermissionType(org.apache.airavata.gov.registry.models.PermissionType permisionType) throws org.apache.thrift.TException
+ {
+ updatePermissionType_args args = new updatePermissionType_args();
+ args.setPermisionType(permisionType);
+ sendBase("updatePermissionType", args);
+ }
+
+ public boolean recv_updatePermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ updatePermissionType_result result = new updatePermissionType_result();
+ receiveBase(result, "updatePermissionType");
+ 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, "updatePermissionType failed: unknown result");
+ }
+
+ public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_deletePermissionType(entityTypeId);
+ return recv_deletePermissionType();
+ }
+
+ public void send_deletePermissionType(String entityTypeId) throws org.apache.thrift.TException
+ {
+ deletePermissionType_args args = new deletePermissionType_args();
+ args.setEntityTypeId(entityTypeId);
+ sendBase("deletePermissionType", args);
+ }
+
+ public boolean recv_deletePermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ deletePermissionType_result result = new deletePermissionType_result();
+ receiveBase(result, "deletePermissionType");
+ 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, "deletePermissionType failed: unknown result");
+ }
+
+ public org.apache.airavata.gov.registry.models.PermissionType getPermissionType(String permisionTypeId) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getPermissionType(permisionTypeId);
+ return recv_getPermissionType();
+ }
+
+ public void send_getPermissionType(String permisionTypeId) throws org.apache.thrift.TException
+ {
+ getPermissionType_args args = new getPermissionType_args();
+ args.setPermisionTypeId(permisionTypeId);
+ sendBase("getPermissionType", args);
+ }
+
+ public org.apache.airavata.gov.registry.models.PermissionType recv_getPermissionType() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getPermissionType_result result = new getPermissionType_result();
+ receiveBase(result, "getPermissionType");
+ 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, "getPermissionType failed: unknown result");
+ }
+
+ public List<org.apache.airavata.gov.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ send_getPermissionTypes(domain, offset, limit);
+ return recv_getPermissionTypes();
+ }
+
+ public void send_getPermissionTypes(String domain, int offset, int limit) throws org.apache.thrift.TException
+ {
+ getPermissionTypes_args args = new getPermissionTypes_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ sendBase("getPermissionTypes", args);
+ }
+
+ public List<org.apache.airavata.gov.registry.models.PermissionType> recv_getPermissionTypes() throws org.apache.airavata.gov.registry.models.GovRegistryException, org.apache.thrift.TException
+ {
+ getPermissionTypes_result result = new getPermissionTypes_result();
+ receiveBase(result, "getPermissionTypes");
+ 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, "getPermissionTypes 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> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void createDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createDomain_call method_call = new createDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.Domain domain;
+ public createDomain_call(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createDomain_args args = new createDomain_args();
+ args.setDomain(domain);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_createDomain();
+ }
+ }
+
+ public void updateDomain(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateDomain_call method_call = new updateDomain_call(domain, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.Domain domain;
+ public updateDomain_call(org.apache.airavata.gov.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateDomain_args args = new updateDomain_args();
+ args.setDomain(domain);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_updateDomain();
+ }
+ }
+
+ public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteDomain_call method_call = new deleteDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domainId;
+ public deleteDomain_call(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domainId = domainId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteDomain_args args = new deleteDomain_args();
+ args.setDomainId(domainId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_deleteDomain();
+ }
+ }
+
+ public void getDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getDomain_call method_call = new getDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getDomain_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domainId;
+ public getDomain_call(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domainId = domainId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDomain", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getDomain_args args = new getDomain_args();
+ args.setDomainId(domainId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.gov.registry.models.Domain getResult() throws org.apache.airavata.gov.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_getDomain();
+ }
+ }
+
+ public void getDomains(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getDomains_call method_call = new getDomains_call(offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getDomains_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private int offset;
+ private int limit;
+ public getDomains_call(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDomains", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getDomains_args args = new getDomains_args();
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Domain> getResult() throws 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_getDomains();
+ }
+ }
+
+ public void registerUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ registerUser_call method_call = new registerUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class registerUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.User user;
+ public registerUser_call(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.user = user;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ registerUser_args args = new registerUser_args();
+ args.setUser(user);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_registerUser();
+ }
+ }
+
+ public void updatedUser(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updatedUser_call method_call = new updatedUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updatedUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.User user;
+ public updatedUser_call(org.apache.airavata.gov.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.user = user;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatedUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updatedUser_args args = new updatedUser_args();
+ args.setUser(user);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_updatedUser();
+ }
+ }
+
+ public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteUser_call method_call = new deleteUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userId;
+ public deleteUser_call(String userId, 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.userId = userId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteUser_args args = new deleteUser_args();
+ args.setUserId(userId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_deleteUser();
+ }
+ }
+
+ public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getUser_call method_call = new getUser_call(userId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userId;
+ public getUser_call(String userId, 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.userId = userId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getUser_args args = new getUser_args();
+ args.setUserId(userId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.gov.registry.models.User getResult() throws org.apache.airavata.gov.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_getUser();
+ }
+ }
+
+ public void getUsers(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getUsers_call method_call = new getUsers_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domain;
+ private int offset;
+ private int limit;
+ public getUsers_call(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getUsers_args args = new getUsers_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.gov.registry.models.User> getResult() throws 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_getUsers();
+ }
+ }
+
+ public void createGroup(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createGroup_call method_call = new createGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.Group group;
+ public createGroup_call(org.apache.airavata.gov.registry.models.Group group, 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.group = group;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createGroup_args args = new createGroup_args();
+ args.setGroup(group);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_createGroup();
+ }
+ }
+
+ public void updateGroup(org.apache.airavata.gov.registry.models.Group group, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateGroup_call method_call = new updateGroup_call(group, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.gov.registry.models.Group group;
+ public updateGroup_call(org.apache.airavata.gov.registry.models.Group group, 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.group = group;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateGroup_args args = new updateGroup_args();
+ args.setGroup(group);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_updateGroup();
+ }
+ }
+
+ public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteGroup_call method_call = new deleteGroup_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String groupId;
+ public deleteGroup_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteGroup_args args = new deleteGroup_args();
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_deleteGroup();
+ }
+ }
+
+ public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroup_call method_call = new getGroup_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String groupId;
+ public getGroup_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getGroup_args args = new getGroup_args();
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public org.apache.airavata.gov.registry.models.Group getResult() throws org.apache.airavata.gov.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_getGroup();
+ }
+ }
+
+ public void getGroups(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroups_call method_call = new getGroups_call(domain, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String domain;
+ private int offset;
+ private int limit;
+ public getGroups_call(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.domain = domain;
+ this.offset = offset;
+ this.limit = limit;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getGroups_args args = new getGroups_args();
+ args.setDomain(domain);
+ args.setOffset(offset);
+ args.setLimit(limit);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.gov.registry.models.Group> getResult() throws 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_getGroups();
+ }
+ }
+
+ public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ addUsersToGroup_call method_call = new addUsersToGroup_call(userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class addUsersToGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private List<String> userIds;
+ private String groupId;
+ public addUsersToGroup_call(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userIds = userIds;
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUsersToGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ addUsersToGroup_args args = new addUsersToGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_addUsersToGroup();
+ }
+ }
+
+ public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ removeUsersFromGroup_call method_call = new removeUsersFromGroup_call(userIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class removeUsersFromGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private List<String> userIds;
+ private String groupId;
+ public removeUsersFromGroup_call(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userIds = userIds;
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeUsersFromGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ removeUsersFromGroup_args args = new removeUsersFromGroup_args();
+ args.setUserIds(userIds);
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.airavata.gov.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_removeUsersFromGroup();
+ }
+ }
+
+ public void getGroupMembers(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getGroupMembers_call method_call = new getGroupMembers_call(groupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getGroupMembers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String groupId;
+ public getGroupMembers_call(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.groupId = groupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroupMembers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getGroupMembers_args args = new getGroupMembers_args();
+ args.setGroupId(groupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<String,org.apache.airavata.gov.registry.mo
<TRUNCATED>