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/16 22:25:43 UTC

[01/51] [abbrv] airavata git commit: Adding SSHCredentialSummary model & adding desc field to SSHCredential [Forced Update!]

Repository: airavata
Updated Branches:
  refs/heads/airavata-gov-registry 146ccc774 -> b6e07d7ba (forced update)


http://git-wip-us.apache.org/repos/asf/airavata/blob/5aa40b8a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
index 3e9de8d..b7ba8b4 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
@@ -50,7 +50,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-08-09")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
 public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSHCredential._Fields>, java.io.Serializable, Cloneable, Comparable<SSHCredential> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHCredential");
 
@@ -61,6 +61,7 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
   private static final org.apache.thrift.protocol.TField PRIVATE_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("privateKey", org.apache.thrift.protocol.TType.STRING, (short)5);
   private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)6);
   private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)7);
+  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)8);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -75,6 +76,7 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
   public String privateKey; // optional
   public long persistedTime; // optional
   public String token; // optional
+  public String description; // 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 {
@@ -84,7 +86,8 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
     PUBLIC_KEY((short)4, "publicKey"),
     PRIVATE_KEY((short)5, "privateKey"),
     PERSISTED_TIME((short)6, "persistedTime"),
-    TOKEN((short)7, "token");
+    TOKEN((short)7, "token"),
+    DESCRIPTION((short)8, "description");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -113,6 +116,8 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
           return PERSISTED_TIME;
         case 7: // TOKEN
           return TOKEN;
+        case 8: // DESCRIPTION
+          return DESCRIPTION;
         default:
           return null;
       }
@@ -155,7 +160,7 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
   // isset id assignments
   private static final int __PERSISTEDTIME_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.PASSPHRASE,_Fields.PUBLIC_KEY,_Fields.PRIVATE_KEY,_Fields.PERSISTED_TIME,_Fields.TOKEN};
+  private static final _Fields optionals[] = {_Fields.PASSPHRASE,_Fields.PUBLIC_KEY,_Fields.PRIVATE_KEY,_Fields.PERSISTED_TIME,_Fields.TOKEN,_Fields.DESCRIPTION};
   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);
@@ -173,6 +178,8 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", 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)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHCredential.class, metaDataMap);
   }
@@ -213,6 +220,9 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
     if (other.isSetToken()) {
       this.token = other.token;
     }
+    if (other.isSetDescription()) {
+      this.description = other.description;
+    }
   }
 
   public SSHCredential deepCopy() {
@@ -229,6 +239,7 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
     setPersistedTimeIsSet(false);
     this.persistedTime = 0;
     this.token = null;
+    this.description = null;
   }
 
   public String getGatewayId() {
@@ -398,6 +409,30 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
     }
   }
 
+  public String getDescription() {
+    return this.description;
+  }
+
+  public SSHCredential 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 void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case GATEWAY_ID:
@@ -456,6 +491,14 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
       }
       break;
 
+    case DESCRIPTION:
+      if (value == null) {
+        unsetDescription();
+      } else {
+        setDescription((String)value);
+      }
+      break;
+
     }
   }
 
@@ -482,6 +525,9 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
     case TOKEN:
       return getToken();
 
+    case DESCRIPTION:
+      return getDescription();
+
     }
     throw new IllegalStateException();
   }
@@ -507,6 +553,8 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
       return isSetPersistedTime();
     case TOKEN:
       return isSetToken();
+    case DESCRIPTION:
+      return isSetDescription();
     }
     throw new IllegalStateException();
   }
@@ -587,6 +635,15 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
         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;
+    }
+
     return true;
   }
 
@@ -629,6 +686,11 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
     if (present_token)
       list.add(token);
 
+    boolean present_description = true && (isSetDescription());
+    list.add(present_description);
+    if (present_description)
+      list.add(description);
+
     return list.hashCode();
   }
 
@@ -710,6 +772,16 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
         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;
+      }
+    }
     return 0;
   }
 
@@ -791,6 +863,16 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
       }
       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;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -898,6 +980,14 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 8: // 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;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -956,6 +1046,13 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
           oprot.writeFieldEnd();
         }
       }
+      if (struct.description != null) {
+        if (struct.isSetDescription()) {
+          oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+          oprot.writeString(struct.description);
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -991,7 +1088,10 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
       if (struct.isSetToken()) {
         optionals.set(4);
       }
-      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetDescription()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
       if (struct.isSetPassphrase()) {
         oprot.writeString(struct.passphrase);
       }
@@ -1007,6 +1107,9 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
       if (struct.isSetToken()) {
         oprot.writeString(struct.token);
       }
+      if (struct.isSetDescription()) {
+        oprot.writeString(struct.description);
+      }
     }
 
     @Override
@@ -1016,7 +1119,7 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
       struct.setGatewayIdIsSet(true);
       struct.username = iprot.readString();
       struct.setUsernameIsSet(true);
-      BitSet incoming = iprot.readBitSet(5);
+      BitSet incoming = iprot.readBitSet(6);
       if (incoming.get(0)) {
         struct.passphrase = iprot.readString();
         struct.setPassphraseIsSet(true);
@@ -1037,6 +1140,10 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSH
         struct.token = iprot.readString();
         struct.setTokenIsSet(true);
       }
+      if (incoming.get(5)) {
+        struct.description = iprot.readString();
+        struct.setDescriptionIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/5aa40b8a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java
new file mode 100644
index 0000000..d0a8a12
--- /dev/null
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java
@@ -0,0 +1,937 @@
+    /*
+     * 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.
+     */
+/**
+ * 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.credential.store.datamodel;
+
+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-10-10")
+public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredentialSummary, SSHCredentialSummary._Fields>, java.io.Serializable, Cloneable, Comparable<SSHCredentialSummary> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHCredentialSummary");
+
+  private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField PUBLIC_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("publicKey", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)4);
+  private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SSHCredentialSummaryStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SSHCredentialSummaryTupleSchemeFactory());
+  }
+
+  public String gatewayId; // required
+  public String username; // required
+  public String publicKey; // optional
+  public long persistedTime; // optional
+  public String token; // optional
+  public String description; // 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 {
+    GATEWAY_ID((short)1, "gatewayId"),
+    USERNAME((short)2, "username"),
+    PUBLIC_KEY((short)3, "publicKey"),
+    PERSISTED_TIME((short)4, "persistedTime"),
+    TOKEN((short)5, "token"),
+    DESCRIPTION((short)6, "description");
+
+    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: // GATEWAY_ID
+          return GATEWAY_ID;
+        case 2: // USERNAME
+          return USERNAME;
+        case 3: // PUBLIC_KEY
+          return PUBLIC_KEY;
+        case 4: // PERSISTED_TIME
+          return PERSISTED_TIME;
+        case 5: // TOKEN
+          return TOKEN;
+        case 6: // DESCRIPTION
+          return DESCRIPTION;
+        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 __PERSISTEDTIME_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.PUBLIC_KEY,_Fields.PERSISTED_TIME,_Fields.TOKEN,_Fields.DESCRIPTION};
+  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.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PUBLIC_KEY, new org.apache.thrift.meta_data.FieldMetaData("publicKey", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PERSISTED_TIME, new org.apache.thrift.meta_data.FieldMetaData("persistedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", 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)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHCredentialSummary.class, metaDataMap);
+  }
+
+  public SSHCredentialSummary() {
+  }
+
+  public SSHCredentialSummary(
+    String gatewayId,
+    String username)
+  {
+    this();
+    this.gatewayId = gatewayId;
+    this.username = username;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public SSHCredentialSummary(SSHCredentialSummary other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetGatewayId()) {
+      this.gatewayId = other.gatewayId;
+    }
+    if (other.isSetUsername()) {
+      this.username = other.username;
+    }
+    if (other.isSetPublicKey()) {
+      this.publicKey = other.publicKey;
+    }
+    this.persistedTime = other.persistedTime;
+    if (other.isSetToken()) {
+      this.token = other.token;
+    }
+    if (other.isSetDescription()) {
+      this.description = other.description;
+    }
+  }
+
+  public SSHCredentialSummary deepCopy() {
+    return new SSHCredentialSummary(this);
+  }
+
+  @Override
+  public void clear() {
+    this.gatewayId = null;
+    this.username = null;
+    this.publicKey = null;
+    setPersistedTimeIsSet(false);
+    this.persistedTime = 0;
+    this.token = null;
+    this.description = null;
+  }
+
+  public String getGatewayId() {
+    return this.gatewayId;
+  }
+
+  public SSHCredentialSummary setGatewayId(String gatewayId) {
+    this.gatewayId = gatewayId;
+    return this;
+  }
+
+  public void unsetGatewayId() {
+    this.gatewayId = null;
+  }
+
+  /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+  public boolean isSetGatewayId() {
+    return this.gatewayId != null;
+  }
+
+  public void setGatewayIdIsSet(boolean value) {
+    if (!value) {
+      this.gatewayId = null;
+    }
+  }
+
+  public String getUsername() {
+    return this.username;
+  }
+
+  public SSHCredentialSummary 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 String getPublicKey() {
+    return this.publicKey;
+  }
+
+  public SSHCredentialSummary setPublicKey(String publicKey) {
+    this.publicKey = publicKey;
+    return this;
+  }
+
+  public void unsetPublicKey() {
+    this.publicKey = null;
+  }
+
+  /** Returns true if field publicKey is set (has been assigned a value) and false otherwise */
+  public boolean isSetPublicKey() {
+    return this.publicKey != null;
+  }
+
+  public void setPublicKeyIsSet(boolean value) {
+    if (!value) {
+      this.publicKey = null;
+    }
+  }
+
+  public long getPersistedTime() {
+    return this.persistedTime;
+  }
+
+  public SSHCredentialSummary setPersistedTime(long persistedTime) {
+    this.persistedTime = persistedTime;
+    setPersistedTimeIsSet(true);
+    return this;
+  }
+
+  public void unsetPersistedTime() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID);
+  }
+
+  /** Returns true if field persistedTime is set (has been assigned a value) and false otherwise */
+  public boolean isSetPersistedTime() {
+    return EncodingUtils.testBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID);
+  }
+
+  public void setPersistedTimeIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID, value);
+  }
+
+  public String getToken() {
+    return this.token;
+  }
+
+  public SSHCredentialSummary setToken(String token) {
+    this.token = token;
+    return this;
+  }
+
+  public void unsetToken() {
+    this.token = null;
+  }
+
+  /** Returns true if field token is set (has been assigned a value) and false otherwise */
+  public boolean isSetToken() {
+    return this.token != null;
+  }
+
+  public void setTokenIsSet(boolean value) {
+    if (!value) {
+      this.token = null;
+    }
+  }
+
+  public String getDescription() {
+    return this.description;
+  }
+
+  public SSHCredentialSummary 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 void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case GATEWAY_ID:
+      if (value == null) {
+        unsetGatewayId();
+      } else {
+        setGatewayId((String)value);
+      }
+      break;
+
+    case USERNAME:
+      if (value == null) {
+        unsetUsername();
+      } else {
+        setUsername((String)value);
+      }
+      break;
+
+    case PUBLIC_KEY:
+      if (value == null) {
+        unsetPublicKey();
+      } else {
+        setPublicKey((String)value);
+      }
+      break;
+
+    case PERSISTED_TIME:
+      if (value == null) {
+        unsetPersistedTime();
+      } else {
+        setPersistedTime((Long)value);
+      }
+      break;
+
+    case TOKEN:
+      if (value == null) {
+        unsetToken();
+      } else {
+        setToken((String)value);
+      }
+      break;
+
+    case DESCRIPTION:
+      if (value == null) {
+        unsetDescription();
+      } else {
+        setDescription((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case GATEWAY_ID:
+      return getGatewayId();
+
+    case USERNAME:
+      return getUsername();
+
+    case PUBLIC_KEY:
+      return getPublicKey();
+
+    case PERSISTED_TIME:
+      return getPersistedTime();
+
+    case TOKEN:
+      return getToken();
+
+    case DESCRIPTION:
+      return getDescription();
+
+    }
+    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 GATEWAY_ID:
+      return isSetGatewayId();
+    case USERNAME:
+      return isSetUsername();
+    case PUBLIC_KEY:
+      return isSetPublicKey();
+    case PERSISTED_TIME:
+      return isSetPersistedTime();
+    case TOKEN:
+      return isSetToken();
+    case DESCRIPTION:
+      return isSetDescription();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof SSHCredentialSummary)
+      return this.equals((SSHCredentialSummary)that);
+    return false;
+  }
+
+  public boolean equals(SSHCredentialSummary that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_gatewayId = true && this.isSetGatewayId();
+    boolean that_present_gatewayId = true && that.isSetGatewayId();
+    if (this_present_gatewayId || that_present_gatewayId) {
+      if (!(this_present_gatewayId && that_present_gatewayId))
+        return false;
+      if (!this.gatewayId.equals(that.gatewayId))
+        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_publicKey = true && this.isSetPublicKey();
+    boolean that_present_publicKey = true && that.isSetPublicKey();
+    if (this_present_publicKey || that_present_publicKey) {
+      if (!(this_present_publicKey && that_present_publicKey))
+        return false;
+      if (!this.publicKey.equals(that.publicKey))
+        return false;
+    }
+
+    boolean this_present_persistedTime = true && this.isSetPersistedTime();
+    boolean that_present_persistedTime = true && that.isSetPersistedTime();
+    if (this_present_persistedTime || that_present_persistedTime) {
+      if (!(this_present_persistedTime && that_present_persistedTime))
+        return false;
+      if (this.persistedTime != that.persistedTime)
+        return false;
+    }
+
+    boolean this_present_token = true && this.isSetToken();
+    boolean that_present_token = true && that.isSetToken();
+    if (this_present_token || that_present_token) {
+      if (!(this_present_token && that_present_token))
+        return false;
+      if (!this.token.equals(that.token))
+        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;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_gatewayId = true && (isSetGatewayId());
+    list.add(present_gatewayId);
+    if (present_gatewayId)
+      list.add(gatewayId);
+
+    boolean present_username = true && (isSetUsername());
+    list.add(present_username);
+    if (present_username)
+      list.add(username);
+
+    boolean present_publicKey = true && (isSetPublicKey());
+    list.add(present_publicKey);
+    if (present_publicKey)
+      list.add(publicKey);
+
+    boolean present_persistedTime = true && (isSetPersistedTime());
+    list.add(present_persistedTime);
+    if (present_persistedTime)
+      list.add(persistedTime);
+
+    boolean present_token = true && (isSetToken());
+    list.add(present_token);
+    if (present_token)
+      list.add(token);
+
+    boolean present_description = true && (isSetDescription());
+    list.add(present_description);
+    if (present_description)
+      list.add(description);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(SSHCredentialSummary other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGatewayId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+      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(isSetPublicKey()).compareTo(other.isSetPublicKey());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPublicKey()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.publicKey, other.publicKey);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPersistedTime()).compareTo(other.isSetPersistedTime());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPersistedTime()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistedTime, other.persistedTime);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetToken()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
+      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;
+      }
+    }
+    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("SSHCredentialSummary(");
+    boolean first = true;
+
+    sb.append("gatewayId:");
+    if (this.gatewayId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.gatewayId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("username:");
+    if (this.username == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.username);
+    }
+    first = false;
+    if (isSetPublicKey()) {
+      if (!first) sb.append(", ");
+      sb.append("publicKey:");
+      if (this.publicKey == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.publicKey);
+      }
+      first = false;
+    }
+    if (isSetPersistedTime()) {
+      if (!first) sb.append(", ");
+      sb.append("persistedTime:");
+      sb.append(this.persistedTime);
+      first = false;
+    }
+    if (isSetToken()) {
+      if (!first) sb.append(", ");
+      sb.append("token:");
+      if (this.token == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.token);
+      }
+      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;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (gatewayId == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+    }
+    if (username == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' 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 {
+      // 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 SSHCredentialSummaryStandardSchemeFactory implements SchemeFactory {
+    public SSHCredentialSummaryStandardScheme getScheme() {
+      return new SSHCredentialSummaryStandardScheme();
+    }
+  }
+
+  private static class SSHCredentialSummaryStandardScheme extends StandardScheme<SSHCredentialSummary> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredentialSummary 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: // GATEWAY_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.gatewayId = iprot.readString();
+              struct.setGatewayIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // USERNAME
+            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 3: // PUBLIC_KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.publicKey = iprot.readString();
+              struct.setPublicKeyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // PERSISTED_TIME
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.persistedTime = iprot.readI64();
+              struct.setPersistedTimeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // TOKEN
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.token = iprot.readString();
+              struct.setTokenIsSet(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;
+          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, SSHCredentialSummary struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.gatewayId != null) {
+        oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+        oprot.writeString(struct.gatewayId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.username != null) {
+        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
+        oprot.writeString(struct.username);
+        oprot.writeFieldEnd();
+      }
+      if (struct.publicKey != null) {
+        if (struct.isSetPublicKey()) {
+          oprot.writeFieldBegin(PUBLIC_KEY_FIELD_DESC);
+          oprot.writeString(struct.publicKey);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.isSetPersistedTime()) {
+        oprot.writeFieldBegin(PERSISTED_TIME_FIELD_DESC);
+        oprot.writeI64(struct.persistedTime);
+        oprot.writeFieldEnd();
+      }
+      if (struct.token != null) {
+        if (struct.isSetToken()) {
+          oprot.writeFieldBegin(TOKEN_FIELD_DESC);
+          oprot.writeString(struct.token);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.description != null) {
+        if (struct.isSetDescription()) {
+          oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+          oprot.writeString(struct.description);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SSHCredentialSummaryTupleSchemeFactory implements SchemeFactory {
+    public SSHCredentialSummaryTupleScheme getScheme() {
+      return new SSHCredentialSummaryTupleScheme();
+    }
+  }
+
+  private static class SSHCredentialSummaryTupleScheme extends TupleScheme<SSHCredentialSummary> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, SSHCredentialSummary struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.gatewayId);
+      oprot.writeString(struct.username);
+      BitSet optionals = new BitSet();
+      if (struct.isSetPublicKey()) {
+        optionals.set(0);
+      }
+      if (struct.isSetPersistedTime()) {
+        optionals.set(1);
+      }
+      if (struct.isSetToken()) {
+        optionals.set(2);
+      }
+      if (struct.isSetDescription()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetPublicKey()) {
+        oprot.writeString(struct.publicKey);
+      }
+      if (struct.isSetPersistedTime()) {
+        oprot.writeI64(struct.persistedTime);
+      }
+      if (struct.isSetToken()) {
+        oprot.writeString(struct.token);
+      }
+      if (struct.isSetDescription()) {
+        oprot.writeString(struct.description);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, SSHCredentialSummary struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.gatewayId = iprot.readString();
+      struct.setGatewayIdIsSet(true);
+      struct.username = iprot.readString();
+      struct.setUsernameIsSet(true);
+      BitSet incoming = iprot.readBitSet(4);
+      if (incoming.get(0)) {
+        struct.publicKey = iprot.readString();
+        struct.setPublicKeyIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.persistedTime = iprot.readI64();
+        struct.setPersistedTimeIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.token = iprot.readString();
+        struct.setTokenIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.description = iprot.readString();
+        struct.setDescriptionIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/5aa40b8a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
index f884930..c1b4d85 100644
--- a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
+++ b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
@@ -41,6 +41,9 @@ service CredentialStoreService {
   string addSSHCredential (1: required credential_store_data_models.SSHCredential sshCredential)
                         throws (1:credential_store_errors.CredentialStoreException csException);
 
+  string addSSHCredentialSummary (1: required credential_store_data_models.SSHCredentialSummary sshCredentialSummary)
+                          throws (1:credential_store_errors.CredentialStoreException csException);
+
   string addCertificateCredential (1: required credential_store_data_models.CertificateCredential certificateCredential)
                         throws (1:credential_store_errors.CredentialStoreException csException);
 
@@ -50,6 +53,9 @@ service CredentialStoreService {
   credential_store_data_models.SSHCredential getSSHCredential (1: required string tokenId, 2: required string gatewayId)
                         throws (1:credential_store_errors.CredentialStoreException csException);
 
+  credential_store_data_models.SSHCredentialSummary getSSHCredentialSummary (1: required string tokenId, 2: required string gatewayId)
+                          throws (1:credential_store_errors.CredentialStoreException csException);
+
   credential_store_data_models.CertificateCredential getCertificateCredential (1: required string tokenId, 2: required string gatewayId)
                         throws (1:credential_store_errors.CredentialStoreException csException);
 
@@ -64,6 +70,8 @@ service CredentialStoreService {
 
   bool deleteSSHCredential(1: required string tokenId, 2: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException);
 
+  bool deleteSSHCredentialSummary(1: required string tokenId, 2: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException);
+
   bool deletePWDCredential(1: required string tokenId, 2: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException);
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/5aa40b8a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift b/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
index ae4d900..c7998e3 100644
--- a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
+++ b/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
@@ -31,7 +31,17 @@ struct SSHCredential {
     4: optional string publicKey,
     5: optional string privateKey,
     6: optional i64 persistedTime,
-    7: optional string token
+    7: optional string token,
+    8: optional string description
+}
+
+struct SSHCredentialSummary {
+    1: required string gatewayId,
+    2: required string username,
+    3: optional string publicKey,
+    4: optional i64 persistedTime,
+    5: optional string token,
+    6: optional string description
 }
 
 struct CommunityUser {


[39/51] [abbrv] airavata git commit: adding docs

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

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

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


[17/51] [abbrv] airavata git commit: adding search criteria as a new struct

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_cpi.thrift b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
index 3b26a27..02a7768 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -73,8 +73,7 @@ service GovRegistryService {
     bool updateEntity(1: required sharing_models.Entity entity) throws (1: sharing_models.SharingRegistryException gre)
     bool deleteEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException gre)
     sharing_models.Entity getEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException gre)
-    list<sharing_models.Entity> searchEntities(1: required string userId, 2: required string entityTypeId, 3: required map<sharing_models.EntitySearchFields,
-     string> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.SharingRegistryException gre)
+    list<sharing_models.Entity> searchEntities(1: required string userId, 2: required string entityTypeId, 3: required list<sharing_models.SearchCriteria> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.SharingRegistryException gre)
     list<sharing_models.User> getListOfSharedUsers(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
     list<sharing_models.UserGroup> getListOfSharedGroups(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/thrift_models/sharing_models.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_models.thrift b/modules/sharing-registry/thrift_models/sharing_models.thrift
index 8e78143..79bb564 100644
--- a/modules/sharing-registry/thrift_models/sharing_models.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_models.thrift
@@ -78,12 +78,27 @@ struct EntityType {
     6: optional i64 updatedTime
 }
 
-enum EntitySearchFields {
+enum EntitySearchField {
     NAME,
     DESCRIPTION,
-    FULL_TEXT
+    FULL_TEXT,
+    PRRENT_ENTITY_ID,
+    CREATED_TIME,
+    UPDATED_TIME
 }
 
+enum SearchCondition {
+    EQUAL,
+    LIKE,
+    GTE,
+    LTE
+}
+
+struct SearchCriteria {
+    1: optional EntitySearchField searchField,
+    2: optional string value,
+    3: optional SearchCondition searchCondition
+}
 
 struct Entity {
     1: optional string entityId = DO_NOT_SET_AT_CLIENTS_ID,


[04/51] [abbrv] airavata git commit: removing add and delete method for SSHCredentialSummary, serverhandler implemented got get method

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/077fd2c8/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
index f5c4276..209bcce 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
@@ -68,8 +68,6 @@ public class CredentialStoreService {
      */
     public String addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
-    public String addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
-
     public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
     public String addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
@@ -90,8 +88,6 @@ public class CredentialStoreService {
 
     public boolean deleteSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
-    public boolean deleteSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
-
     public boolean deletePWDCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
   }
@@ -102,8 +98,6 @@ public class CredentialStoreService {
 
     public void addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
     public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -124,8 +118,6 @@ public class CredentialStoreService {
 
     public void deleteSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void deleteSSHCredentialSummary(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
     public void deletePWDCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
   }
@@ -198,32 +190,6 @@ public class CredentialStoreService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSSHCredential failed: unknown result");
     }
 
-    public String addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
-    {
-      send_addSSHCredentialSummary(sshCredentialSummary);
-      return recv_addSSHCredentialSummary();
-    }
-
-    public void send_addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary) throws org.apache.thrift.TException
-    {
-      addSSHCredentialSummary_args args = new addSSHCredentialSummary_args();
-      args.setSshCredentialSummary(sshCredentialSummary);
-      sendBase("addSSHCredentialSummary", args);
-    }
-
-    public String recv_addSSHCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
-    {
-      addSSHCredentialSummary_result result = new addSSHCredentialSummary_result();
-      receiveBase(result, "addSSHCredentialSummary");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.csException != null) {
-        throw result.csException;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSSHCredentialSummary failed: unknown result");
-    }
-
     public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
     {
       send_addCertificateCredential(certificateCredential);
@@ -489,33 +455,6 @@ public class CredentialStoreService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteSSHCredential failed: unknown result");
     }
 
-    public boolean deleteSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
-    {
-      send_deleteSSHCredentialSummary(tokenId, gatewayId);
-      return recv_deleteSSHCredentialSummary();
-    }
-
-    public void send_deleteSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.thrift.TException
-    {
-      deleteSSHCredentialSummary_args args = new deleteSSHCredentialSummary_args();
-      args.setTokenId(tokenId);
-      args.setGatewayId(gatewayId);
-      sendBase("deleteSSHCredentialSummary", args);
-    }
-
-    public boolean recv_deleteSSHCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
-    {
-      deleteSSHCredentialSummary_result result = new deleteSSHCredentialSummary_result();
-      receiveBase(result, "deleteSSHCredentialSummary");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.csException != null) {
-        throw result.csException;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteSSHCredentialSummary failed: unknown result");
-    }
-
     public boolean deletePWDCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
     {
       send_deletePWDCredential(tokenId, gatewayId);
@@ -622,38 +561,6 @@ public class CredentialStoreService {
       }
     }
 
-    public void addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      addSSHCredentialSummary_call method_call = new addSSHCredentialSummary_call(sshCredentialSummary, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class addSSHCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary;
-      public addSSHCredentialSummary_call(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary, 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.sshCredentialSummary = sshCredentialSummary;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSSHCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        addSSHCredentialSummary_args args = new addSSHCredentialSummary_args();
-        args.setSshCredentialSummary(sshCredentialSummary);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public String getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_addSSHCredentialSummary();
-      }
-    }
-
     public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       addCertificateCredential_call method_call = new addCertificateCredential_call(certificateCredential, resultHandler, this, ___protocolFactory, ___transport);
@@ -989,41 +896,6 @@ public class CredentialStoreService {
       }
     }
 
-    public void deleteSSHCredentialSummary(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      deleteSSHCredentialSummary_call method_call = new deleteSSHCredentialSummary_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class deleteSSHCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String tokenId;
-      private String gatewayId;
-      public deleteSSHCredentialSummary_call(String tokenId, String gatewayId, 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.tokenId = tokenId;
-        this.gatewayId = gatewayId;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteSSHCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        deleteSSHCredentialSummary_args args = new deleteSSHCredentialSummary_args();
-        args.setTokenId(tokenId);
-        args.setGatewayId(gatewayId);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public boolean getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_deleteSSHCredentialSummary();
-      }
-    }
-
     public void deletePWDCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       deletePWDCredential_call method_call = new deletePWDCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
@@ -1074,7 +946,6 @@ public class CredentialStoreService {
     private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
       processMap.put("getCSServiceVersion", new getCSServiceVersion());
       processMap.put("addSSHCredential", new addSSHCredential());
-      processMap.put("addSSHCredentialSummary", new addSSHCredentialSummary());
       processMap.put("addCertificateCredential", new addCertificateCredential());
       processMap.put("addPasswordCredential", new addPasswordCredential());
       processMap.put("getSSHCredential", new getSSHCredential());
@@ -1085,7 +956,6 @@ public class CredentialStoreService {
       processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway());
       processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway());
       processMap.put("deleteSSHCredential", new deleteSSHCredential());
-      processMap.put("deleteSSHCredentialSummary", new deleteSSHCredentialSummary());
       processMap.put("deletePWDCredential", new deletePWDCredential());
       return processMap;
     }
@@ -1134,30 +1004,6 @@ public class CredentialStoreService {
       }
     }
 
-    public static class addSSHCredentialSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSSHCredentialSummary_args> {
-      public addSSHCredentialSummary() {
-        super("addSSHCredentialSummary");
-      }
-
-      public addSSHCredentialSummary_args getEmptyArgsInstance() {
-        return new addSSHCredentialSummary_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public addSSHCredentialSummary_result getResult(I iface, addSSHCredentialSummary_args args) throws org.apache.thrift.TException {
-        addSSHCredentialSummary_result result = new addSSHCredentialSummary_result();
-        try {
-          result.success = iface.addSSHCredentialSummary(args.sshCredentialSummary);
-        } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
-          result.csException = csException;
-        }
-        return result;
-      }
-    }
-
     public static class addCertificateCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addCertificateCredential_args> {
       public addCertificateCredential() {
         super("addCertificateCredential");
@@ -1399,31 +1245,6 @@ public class CredentialStoreService {
       }
     }
 
-    public static class deleteSSHCredentialSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteSSHCredentialSummary_args> {
-      public deleteSSHCredentialSummary() {
-        super("deleteSSHCredentialSummary");
-      }
-
-      public deleteSSHCredentialSummary_args getEmptyArgsInstance() {
-        return new deleteSSHCredentialSummary_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public deleteSSHCredentialSummary_result getResult(I iface, deleteSSHCredentialSummary_args args) throws org.apache.thrift.TException {
-        deleteSSHCredentialSummary_result result = new deleteSSHCredentialSummary_result();
-        try {
-          result.success = iface.deleteSSHCredentialSummary(args.tokenId, args.gatewayId);
-          result.setSuccessIsSet(true);
-        } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
-          result.csException = csException;
-        }
-        return result;
-      }
-    }
-
     public static class deletePWDCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deletePWDCredential_args> {
       public deletePWDCredential() {
         super("deletePWDCredential");
@@ -1464,7 +1285,6 @@ public class CredentialStoreService {
     private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
       processMap.put("getCSServiceVersion", new getCSServiceVersion());
       processMap.put("addSSHCredential", new addSSHCredential());
-      processMap.put("addSSHCredentialSummary", new addSSHCredentialSummary());
       processMap.put("addCertificateCredential", new addCertificateCredential());
       processMap.put("addPasswordCredential", new addPasswordCredential());
       processMap.put("getSSHCredential", new getSSHCredential());
@@ -1475,7 +1295,6 @@ public class CredentialStoreService {
       processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway());
       processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway());
       processMap.put("deleteSSHCredential", new deleteSSHCredential());
-      processMap.put("deleteSSHCredentialSummary", new deleteSSHCredentialSummary());
       processMap.put("deletePWDCredential", new deletePWDCredential());
       return processMap;
     }
@@ -1588,63 +1407,6 @@ public class CredentialStoreService {
       }
     }
 
-    public static class addSSHCredentialSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addSSHCredentialSummary_args, String> {
-      public addSSHCredentialSummary() {
-        super("addSSHCredentialSummary");
-      }
-
-      public addSSHCredentialSummary_args getEmptyArgsInstance() {
-        return new addSSHCredentialSummary_args();
-      }
-
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            addSSHCredentialSummary_result result = new addSSHCredentialSummary_result();
-            result.success = o;
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            addSSHCredentialSummary_result result = new addSSHCredentialSummary_result();
-            if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
-                        result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
-                        result.setCsExceptionIsSet(true);
-                        msg = result;
-            }
-             else 
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, addSSHCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.addSSHCredentialSummary(args.sshCredentialSummary,resultHandler);
-      }
-    }
-
     public static class addCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addCertificateCredential_args, String> {
       public addCertificateCredential() {
         super("addCertificateCredential");
@@ -2216,64 +1978,6 @@ public class CredentialStoreService {
       }
     }
 
-    public static class deleteSSHCredentialSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSSHCredentialSummary_args, Boolean> {
-      public deleteSSHCredentialSummary() {
-        super("deleteSSHCredentialSummary");
-      }
-
-      public deleteSSHCredentialSummary_args getEmptyArgsInstance() {
-        return new deleteSSHCredentialSummary_args();
-      }
-
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            deleteSSHCredentialSummary_result result = new deleteSSHCredentialSummary_result();
-            result.success = o;
-            result.setSuccessIsSet(true);
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            deleteSSHCredentialSummary_result result = new deleteSSHCredentialSummary_result();
-            if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
-                        result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
-                        result.setCsExceptionIsSet(true);
-                        msg = result;
-            }
-             else 
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, deleteSSHCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteSSHCredentialSummary(args.tokenId, args.gatewayId,resultHandler);
-      }
-    }
-
     public static class deletePWDCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePWDCredential_args, Boolean> {
       public deletePWDCredential() {
         super("deletePWDCredential");
@@ -3770,22 +3474,22 @@ public class CredentialStoreService {
 
   }
 
-  public static class addSSHCredentialSummary_args implements org.apache.thrift.TBase<addSSHCredentialSummary_args, addSSHCredentialSummary_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSSHCredentialSummary_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSSHCredentialSummary_args");
+  public static class addCertificateCredential_args implements org.apache.thrift.TBase<addCertificateCredential_args, addCertificateCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_args");
 
-    private static final org.apache.thrift.protocol.TField SSH_CREDENTIAL_SUMMARY_FIELD_DESC = new org.apache.thrift.protocol.TField("sshCredentialSummary", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField CERTIFICATE_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("certificateCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addSSHCredentialSummary_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addSSHCredentialSummary_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new addCertificateCredential_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addCertificateCredential_argsTupleSchemeFactory());
     }
 
-    public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary; // required
+    public org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential; // 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 {
-      SSH_CREDENTIAL_SUMMARY((short)1, "sshCredentialSummary");
+      CERTIFICATE_CREDENTIAL((short)1, "certificateCredential");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -3800,8 +3504,8 @@ public class CredentialStoreService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // SSH_CREDENTIAL_SUMMARY
-            return SSH_CREDENTIAL_SUMMARY;
+          case 1: // CERTIFICATE_CREDENTIAL
+            return CERTIFICATE_CREDENTIAL;
           default:
             return null;
         }
@@ -3845,71 +3549,71 @@ public class CredentialStoreService {
     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.SSH_CREDENTIAL_SUMMARY, new org.apache.thrift.meta_data.FieldMetaData("sshCredentialSummary", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.SSHCredentialSummary.class)));
+      tmpMap.put(_Fields.CERTIFICATE_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("certificateCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.CertificateCredential.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredentialSummary_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_args.class, metaDataMap);
     }
 
-    public addSSHCredentialSummary_args() {
+    public addCertificateCredential_args() {
     }
 
-    public addSSHCredentialSummary_args(
-      org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary)
+    public addCertificateCredential_args(
+      org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential)
     {
       this();
-      this.sshCredentialSummary = sshCredentialSummary;
+      this.certificateCredential = certificateCredential;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addSSHCredentialSummary_args(addSSHCredentialSummary_args other) {
-      if (other.isSetSshCredentialSummary()) {
-        this.sshCredentialSummary = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(other.sshCredentialSummary);
+    public addCertificateCredential_args(addCertificateCredential_args other) {
+      if (other.isSetCertificateCredential()) {
+        this.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential(other.certificateCredential);
       }
     }
 
-    public addSSHCredentialSummary_args deepCopy() {
-      return new addSSHCredentialSummary_args(this);
+    public addCertificateCredential_args deepCopy() {
+      return new addCertificateCredential_args(this);
     }
 
     @Override
     public void clear() {
-      this.sshCredentialSummary = null;
+      this.certificateCredential = null;
     }
 
-    public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getSshCredentialSummary() {
-      return this.sshCredentialSummary;
+    public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential() {
+      return this.certificateCredential;
     }
 
-    public addSSHCredentialSummary_args setSshCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary) {
-      this.sshCredentialSummary = sshCredentialSummary;
+    public addCertificateCredential_args setCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) {
+      this.certificateCredential = certificateCredential;
       return this;
     }
 
-    public void unsetSshCredentialSummary() {
-      this.sshCredentialSummary = null;
+    public void unsetCertificateCredential() {
+      this.certificateCredential = null;
     }
 
-    /** Returns true if field sshCredentialSummary is set (has been assigned a value) and false otherwise */
-    public boolean isSetSshCredentialSummary() {
-      return this.sshCredentialSummary != null;
+    /** Returns true if field certificateCredential is set (has been assigned a value) and false otherwise */
+    public boolean isSetCertificateCredential() {
+      return this.certificateCredential != null;
     }
 
-    public void setSshCredentialSummaryIsSet(boolean value) {
+    public void setCertificateCredentialIsSet(boolean value) {
       if (!value) {
-        this.sshCredentialSummary = null;
+        this.certificateCredential = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case SSH_CREDENTIAL_SUMMARY:
+      case CERTIFICATE_CREDENTIAL:
         if (value == null) {
-          unsetSshCredentialSummary();
+          unsetCertificateCredential();
         } else {
-          setSshCredentialSummary((org.apache.airavata.credential.store.datamodel.SSHCredentialSummary)value);
+          setCertificateCredential((org.apache.airavata.credential.store.datamodel.CertificateCredential)value);
         }
         break;
 
@@ -3918,8 +3622,8 @@ public class CredentialStoreService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case SSH_CREDENTIAL_SUMMARY:
-        return getSshCredentialSummary();
+      case CERTIFICATE_CREDENTIAL:
+        return getCertificateCredential();
 
       }
       throw new IllegalStateException();
@@ -3932,9 +3636,9 @@ public class CredentialStoreService {
       }
 
       switch (field) {
-      case SSH_CREDENTIAL_SUMMARY:
-        return isSetSshCredentialSummary();
-      }
+      case CERTIFICATE_CREDENTIAL:
+        return isSetCertificateCredential();
+      }
       throw new IllegalStateException();
     }
 
@@ -3942,21 +3646,21 @@ public class CredentialStoreService {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addSSHCredentialSummary_args)
-        return this.equals((addSSHCredentialSummary_args)that);
+      if (that instanceof addCertificateCredential_args)
+        return this.equals((addCertificateCredential_args)that);
       return false;
     }
 
-    public boolean equals(addSSHCredentialSummary_args that) {
+    public boolean equals(addCertificateCredential_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_sshCredentialSummary = true && this.isSetSshCredentialSummary();
-      boolean that_present_sshCredentialSummary = true && that.isSetSshCredentialSummary();
-      if (this_present_sshCredentialSummary || that_present_sshCredentialSummary) {
-        if (!(this_present_sshCredentialSummary && that_present_sshCredentialSummary))
+      boolean this_present_certificateCredential = true && this.isSetCertificateCredential();
+      boolean that_present_certificateCredential = true && that.isSetCertificateCredential();
+      if (this_present_certificateCredential || that_present_certificateCredential) {
+        if (!(this_present_certificateCredential && that_present_certificateCredential))
           return false;
-        if (!this.sshCredentialSummary.equals(that.sshCredentialSummary))
+        if (!this.certificateCredential.equals(that.certificateCredential))
           return false;
       }
 
@@ -3967,28 +3671,28 @@ public class CredentialStoreService {
     public int hashCode() {
       List<Object> list = new ArrayList<Object>();
 
-      boolean present_sshCredentialSummary = true && (isSetSshCredentialSummary());
-      list.add(present_sshCredentialSummary);
-      if (present_sshCredentialSummary)
-        list.add(sshCredentialSummary);
+      boolean present_certificateCredential = true && (isSetCertificateCredential());
+      list.add(present_certificateCredential);
+      if (present_certificateCredential)
+        list.add(certificateCredential);
 
       return list.hashCode();
     }
 
     @Override
-    public int compareTo(addSSHCredentialSummary_args other) {
+    public int compareTo(addCertificateCredential_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetSshCredentialSummary()).compareTo(other.isSetSshCredentialSummary());
+      lastComparison = Boolean.valueOf(isSetCertificateCredential()).compareTo(other.isSetCertificateCredential());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetSshCredentialSummary()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshCredentialSummary, other.sshCredentialSummary);
+      if (isSetCertificateCredential()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.certificateCredential, other.certificateCredential);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -4010,14 +3714,14 @@ public class CredentialStoreService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addSSHCredentialSummary_args(");
+      StringBuilder sb = new StringBuilder("addCertificateCredential_args(");
       boolean first = true;
 
-      sb.append("sshCredentialSummary:");
-      if (this.sshCredentialSummary == null) {
+      sb.append("certificateCredential:");
+      if (this.certificateCredential == null) {
         sb.append("null");
       } else {
-        sb.append(this.sshCredentialSummary);
+        sb.append(this.certificateCredential);
       }
       first = false;
       sb.append(")");
@@ -4026,12 +3730,12 @@ public class CredentialStoreService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (sshCredentialSummary == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'sshCredentialSummary' was not present! Struct: " + toString());
+      if (certificateCredential == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'certificateCredential' was not present! Struct: " + toString());
       }
       // check for sub-struct validity
-      if (sshCredentialSummary != null) {
-        sshCredentialSummary.validate();
+      if (certificateCredential != null) {
+        certificateCredential.validate();
       }
     }
 
@@ -4051,15 +3755,15 @@ public class CredentialStoreService {
       }
     }
 
-    private static class addSSHCredentialSummary_argsStandardSchemeFactory implements SchemeFactory {
-      public addSSHCredentialSummary_argsStandardScheme getScheme() {
-        return new addSSHCredentialSummary_argsStandardScheme();
+    private static class addCertificateCredential_argsStandardSchemeFactory implements SchemeFactory {
+      public addCertificateCredential_argsStandardScheme getScheme() {
+        return new addCertificateCredential_argsStandardScheme();
       }
     }
 
-    private static class addSSHCredentialSummary_argsStandardScheme extends StandardScheme<addSSHCredentialSummary_args> {
+    private static class addCertificateCredential_argsStandardScheme extends StandardScheme<addCertificateCredential_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addSSHCredentialSummary_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -4069,11 +3773,11 @@ public class CredentialStoreService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // SSH_CREDENTIAL_SUMMARY
+            case 1: // CERTIFICATE_CREDENTIAL
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.sshCredentialSummary = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary();
-                struct.sshCredentialSummary.read(iprot);
-                struct.setSshCredentialSummaryIsSet(true);
+                struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential();
+                struct.certificateCredential.read(iprot);
+                struct.setCertificateCredentialIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -4089,13 +3793,13 @@ public class CredentialStoreService {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addSSHCredentialSummary_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.sshCredentialSummary != null) {
-          oprot.writeFieldBegin(SSH_CREDENTIAL_SUMMARY_FIELD_DESC);
-          struct.sshCredentialSummary.write(oprot);
+        if (struct.certificateCredential != null) {
+          oprot.writeFieldBegin(CERTIFICATE_CREDENTIAL_FIELD_DESC);
+          struct.certificateCredential.write(oprot);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -4104,41 +3808,41 @@ public class CredentialStoreService {
 
     }
 
-    private static class addSSHCredentialSummary_argsTupleSchemeFactory implements SchemeFactory {
-      public addSSHCredentialSummary_argsTupleScheme getScheme() {
-        return new addSSHCredentialSummary_argsTupleScheme();
+    private static class addCertificateCredential_argsTupleSchemeFactory implements SchemeFactory {
+      public addCertificateCredential_argsTupleScheme getScheme() {
+        return new addCertificateCredential_argsTupleScheme();
       }
     }
 
-    private static class addSSHCredentialSummary_argsTupleScheme extends TupleScheme<addSSHCredentialSummary_args> {
+    private static class addCertificateCredential_argsTupleScheme extends TupleScheme<addCertificateCredential_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredentialSummary_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        struct.sshCredentialSummary.write(oprot);
+        struct.certificateCredential.write(oprot);
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addSSHCredentialSummary_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.sshCredentialSummary = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary();
-        struct.sshCredentialSummary.read(iprot);
-        struct.setSshCredentialSummaryIsSet(true);
+        struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential();
+        struct.certificateCredential.read(iprot);
+        struct.setCertificateCredentialIsSet(true);
       }
     }
 
   }
 
-  public static class addSSHCredentialSummary_result implements org.apache.thrift.TBase<addSSHCredentialSummary_result, addSSHCredentialSummary_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSSHCredentialSummary_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSSHCredentialSummary_result");
+  public static class addCertificateCredential_result implements org.apache.thrift.TBase<addCertificateCredential_result, addCertificateCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
     private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addSSHCredentialSummary_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addSSHCredentialSummary_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new addCertificateCredential_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addCertificateCredential_resultTupleSchemeFactory());
     }
 
     public String success; // required
@@ -4214,13 +3918,13 @@ public class CredentialStoreService {
       tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredentialSummary_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_result.class, metaDataMap);
     }
 
-    public addSSHCredentialSummary_result() {
+    public addCertificateCredential_result() {
     }
 
-    public addSSHCredentialSummary_result(
+    public addCertificateCredential_result(
       String success,
       org.apache.airavata.credential.store.exception.CredentialStoreException csException)
     {
@@ -4232,7 +3936,7 @@ public class CredentialStoreService {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addSSHCredentialSummary_result(addSSHCredentialSummary_result other) {
+    public addCertificateCredential_result(addCertificateCredential_result other) {
       if (other.isSetSuccess()) {
         this.success = other.success;
       }
@@ -4241,8 +3945,8 @@ public class CredentialStoreService {
       }
     }
 
-    public addSSHCredentialSummary_result deepCopy() {
-      return new addSSHCredentialSummary_result(this);
+    public addCertificateCredential_result deepCopy() {
+      return new addCertificateCredential_result(this);
     }
 
     @Override
@@ -4255,7 +3959,7 @@ public class CredentialStoreService {
       return this.success;
     }
 
-    public addSSHCredentialSummary_result setSuccess(String success) {
+    public addCertificateCredential_result setSuccess(String success) {
       this.success = success;
       return this;
     }
@@ -4279,7 +3983,7 @@ public class CredentialStoreService {
       return this.csException;
     }
 
-    public addSSHCredentialSummary_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+    public addCertificateCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
       this.csException = csException;
       return this;
     }
@@ -4351,12 +4055,12 @@ public class CredentialStoreService {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addSSHCredentialSummary_result)
-        return this.equals((addSSHCredentialSummary_result)that);
+      if (that instanceof addCertificateCredential_result)
+        return this.equals((addCertificateCredential_result)that);
       return false;
     }
 
-    public boolean equals(addSSHCredentialSummary_result that) {
+    public boolean equals(addCertificateCredential_result that) {
       if (that == null)
         return false;
 
@@ -4399,7 +4103,7 @@ public class CredentialStoreService {
     }
 
     @Override
-    public int compareTo(addSSHCredentialSummary_result other) {
+    public int compareTo(addCertificateCredential_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -4443,7 +4147,7 @@ public class CredentialStoreService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addSSHCredentialSummary_result(");
+      StringBuilder sb = new StringBuilder("addCertificateCredential_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -4486,15 +4190,15 @@ public class CredentialStoreService {
       }
     }
 
-    private static class addSSHCredentialSummary_resultStandardSchemeFactory implements SchemeFactory {
-      public addSSHCredentialSummary_resultStandardScheme getScheme() {
-        return new addSSHCredentialSummary_resultStandardScheme();
+    private static class addCertificateCredential_resultStandardSchemeFactory implements SchemeFactory {
+      public addCertificateCredential_resultStandardScheme getScheme() {
+        return new addCertificateCredential_resultStandardScheme();
       }
     }
 
-    private static class addSSHCredentialSummary_resultStandardScheme extends StandardScheme<addSSHCredentialSummary_result> {
+    private static class addCertificateCredential_resultStandardScheme extends StandardScheme<addCertificateCredential_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addSSHCredentialSummary_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -4532,7 +4236,7 @@ public class CredentialStoreService {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addSSHCredentialSummary_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -4552,16 +4256,16 @@ public class CredentialStoreService {
 
     }
 
-    private static class addSSHCredentialSummary_resultTupleSchemeFactory implements SchemeFactory {
-      public addSSHCredentialSummary_resultTupleScheme getScheme() {
-        return new addSSHCredentialSummary_resultTupleScheme();
+    private static class addCertificateCredential_resultTupleSchemeFactory implements SchemeFactory {
+      public addCertificateCredential_resultTupleScheme getScheme() {
+        return new addCertificateCredential_resultTupleScheme();
       }
     }
 
-    private static class addSSHCredentialSummary_resultTupleScheme extends TupleScheme<addSSHCredentialSummary_result> {
+    private static class addCertificateCredential_resultTupleScheme extends TupleScheme<addCertificateCredential_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredentialSummary_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -4580,7 +4284,7 @@ public class CredentialStoreService {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addSSHCredentialSummary_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
@@ -4597,22 +4301,22 @@ public class CredentialStoreService {
 
   }
 
-  public static class addCertificateCredential_args implements org.apache.thrift.TBase<addCertificateCredential_args, addCertificateCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_args");
+  public static class addPasswordCredential_args implements org.apache.thrift.TBase<addPasswordCredential_args, addPasswordCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addPasswordCredential_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPasswordCredential_args");
 
-    private static final org.apache.thrift.protocol.TField CERTIFICATE_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("certificateCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField PASSWORD_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("passwordCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addCertificateCredential_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addCertificateCredential_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new addPasswordCredential_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addPasswordCredential_argsTupleSchemeFactory());
     }
 
-    public org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential; // required
+    public org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential; // 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 {
-      CERTIFICATE_CREDENTIAL((short)1, "certificateCredential");
+      PASSWORD_CREDENTIAL((short)1, "passwordCredential");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -4627,8 +4331,8 @@ public class CredentialStoreService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // CERTIFICATE_CREDENTIAL
-            return CERTIFICATE_CREDENTIAL;
+          case 1: // PASSWORD_CREDENTIAL
+            return PASSWORD_CREDENTIAL;
           default:
             return null;
         }
@@ -4672,71 +4376,71 @@ public class CredentialStoreService {
     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.CERTIFICATE_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("certificateCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.CertificateCredential.class)));
+      tmpMap.put(_Fields.PASSWORD_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("passwordCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.PasswordCredential.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPasswordCredential_args.class, metaDataMap);
     }
 
-    public addCertificateCredential_args() {
+    public addPasswordCredential_args() {
     }
 
-    public addCertificateCredential_args(
-      org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential)
+    public addPasswordCredential_args(
+      org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential)
     {
       this();
-      this.certificateCredential = certificateCredential;
+      this.passwordCredential = passwordCredential;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addCertificateCredential_args(addCertificateCredential_args other) {
-      if (other.isSetCertificateCredential()) {
-        this.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential(other.certificateCredential);
+    public addPasswordCredential_args(addPasswordCredential_args other) {
+      if (other.isSetPasswordCredential()) {
+        this.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential(other.passwordCredential);
       }
     }
 
-    public addCertificateCredential_args deepCopy() {
-      return new addCertificateCredential_args(this);
+    public addPasswordCredential_args deepCopy() {
+      return new addPasswordCredential_args(this);
     }
 
     @Override
     public void clear() {
-      this.certificateCredential = null;
+      this.passwordCredential = null;
     }
 
-    public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential() {
-      return this.certificateCredential;
+    public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential() {
+      return this.passwordCredential;
     }
 
-    public addCertificateCredential_args setCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) {
-      this.certificateCredential = certificateCredential;
+    public addPasswordCredential_args setPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) {
+      this.passwordCredential = passwordCredential;
       return this;
     }
 
-    public void unsetCertificateCredential() {
-      this.certificateCredential = null;
+    public void unsetPasswordCredential() {
+      this.passwordCredential = null;
     }
 
-    /** Returns true if field certificateCredential is set (has been assigned a value) and false otherwise */
-    public boolean isSetCertificateCredential() {
-      return this.certificateCredential != null;
+    /** Returns true if field passwordCredential is set (has been assigned a value) and false otherwise */
+    public boolean isSetPasswordCredential() {
+      return this.passwordCredential != null;
     }
 
-    public void setCertificateCredentialIsSet(boolean value) {
+    public void setPasswordCredentialIsSet(boolean value) {
       if (!value) {
-        this.certificateCredential = null;
+        this.passwordCredential = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case CERTIFICATE_CREDENTIAL:
+      case PASSWORD_CREDENTIAL:
         if (value == null) {
-          unsetCertificateCredential();
+          unsetPasswordCredential();
         } else {
-          setCertificateCredential((org.apache.airavata.credential.store.datamodel.CertificateCredential)value);
+          setPasswordCredential((org.apache.airavata.credential.store.datamodel.PasswordCredential)value);
         }
         break;
 
@@ -4745,8 +4449,8 @@ public class CredentialStoreService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case CERTIFICATE_CREDENTIAL:
-        return getCertificateCredential();
+      case PASSWORD_CREDENTIAL:
+        return getPasswordCredential();
 
       }
       throw new IllegalStateException();
@@ -4759,8 +4463,8 @@ public class CredentialStoreService {
       }
 
       switch (field) {
-      case CERTIFICATE_CREDENTIAL:
-        return isSetCertificateCredential();
+      case PASSWORD_CREDENTIAL:
+        return isSetPasswordCredential();
       }
       throw new IllegalStateException();
     }
@@ -4769,21 +4473,21 @@ public class CredentialStoreService {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addCertificateCredential_args)
-        return this.equals((addCertificateCredential_args)that);
+      if (that instanceof addPasswordCredential_args)
+        return this.equals((addPasswordCredential_args)that);
       return false;
     }
 
-    public boolean equals(addCertificateCredential_args that) {
+    public boolean equals(addPasswordCredential_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_certificateCredential = true && this.isSetCertificateCredential();
-      boolean that_present_certificateCredential = true && that.isSetCertificateCredential();
-      if (this_present_certificateCredential || that_present_certificateCredential) {
-        if (!(this_present_certificateCredential && that_present_certificateCredential))
+      boolean this_present_passwordCredential = true && this.isSetPasswordCredential();
+      boolean that_present_passwordCredential = true && that.isSetPasswordCredential();
+      if (this_present_passwordCredential || that_present_passwordCredential) {
+        if (!(this_present_passwordCredential && that_present_passwordCredential))
           return false;
-        if (!this.certificateCredential.equals(that.certificateCredential))
+        if (!this.passwordCredential.equals(that.passwordCredential))
           return false;
       }
 
@@ -4794,28 +4498,28 @@ public class CredentialStoreService {
     public int hashCode() {
       List<Object> list = new ArrayList<Object>();
 
-      boolean present_certificateCredential = true && (isSetCertificateCredential());
-      list.add(present_certificateCredential);
-      if (present_certificateCredential)
-        list.add(certificateCredential);
+      boolean present_passwordCredential = true && (isSetPasswordCredential());
+      list.add(present_passwordCredential);
+      if (present_passwordCredential)
+        list.add(passwordCredential);
 
       return list.hashCode();
     }
 
     @Override
-    public int compareTo(addCertificateCredential_args other) {
+    public int compareTo(addPasswordCredential_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetCertificateCredential()).compareTo(other.isSetCertificateCredential());
+      lastComparison = Boolean.valueOf(isSetPasswordCredential()).compareTo(other.isSetPasswordCredential());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetCertificateCredential()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.certificateCredential, other.certificateCredential);
+      if (isSetPasswordCredential()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwordCredential, other.passwordCredential);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -4837,14 +4541,14 @@ public class CredentialStoreService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addCertificateCredential_args(");
+      StringBuilder sb = new StringBuilder("addPasswordCredential_args(");
       boolean first = true;
 
-      sb.append("certificateCredential:");
-      if (this.certificateCredential == null) {
+      sb.append("passwordCredential:");
+      if (this.passwordCredential == null) {
         sb.append("null");
       } else {
-        sb.append(this.certificateCredential);
+        sb.append(this.passwordCredential);
       }
       first = false;
       sb.append(")");
@@ -4853,12 +4557,12 @@ public class CredentialStoreService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (certificateCredential == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'certificateCredential' was not present! Struct: " + toString());
+      if (passwordCredential == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'passwordCredential' was not present! Struct: " + toString());
       }
       // check for sub-struct validity
-      if (certificateCredential != null) {
-        certificateCredential.validate();
+      if (passwordCredential != null) {
+        passwordCredential.validate();
       }
     }
 
@@ -4878,15 +4582,15 @@ public class CredentialStoreService {
       }
     }
 
-    private static class addCertificateCredential_argsStandardSchemeFactory implements SchemeFactory {
-      public addCertificateCredential_argsStandardScheme getScheme() {
-        return new addCertificateCredential_argsStandardScheme();
+    private static class addPasswordCredential_argsStandardSchemeFactory implements SchemeFactory {
+      public addPasswordCredential_argsStandardScheme getScheme() {
+        return new addPasswordCredential_argsStandardScheme();
       }
     }
 
-    private static class addCertificateCredential_argsStandardScheme extends StandardScheme<addCertificateCredential_args> {
+    private static class addPasswordCredential_argsStandardScheme extends StandardScheme<addPasswordCredential_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -4896,11 +4600,11 @@ public class CredentialStoreService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // CERTIFICATE_CREDENTIAL
+            case 1: // PASSWORD_CREDENTIAL
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential();
-                struct.certificateCredential.read(iprot);
-                struct.setCertificateCredentialIsSet(true);
+                struct.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential();
+                struct.passwordCredential.read(iprot);
+                struct.setPasswordCredentialIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -4916,13 +4620,13 @@ public class CredentialStoreService {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.certificateCredential != null) {
-          oprot.writeFieldBegin(CERTIFICATE_CREDENTIAL_FIELD_DESC);
-          struct.certificateCredential.write(oprot);
+        if (struct.passwordCredential != null) {
+          oprot.writeFieldBegin(PASSWORD_CREDENTIAL_FIELD_DESC);
+          struct.passwordCredential.write(oprot);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -4931,41 +4635,41 @@ public class CredentialStoreService {
 
     }
 
-    private static class addCertificateCredential_argsTupleSchemeFactory implements SchemeFactory {
-      public addCertificateCredential_argsTupleScheme getScheme() {
-        return new addCertificateCredential_argsTupleScheme();
+    private static class addPasswordCredential_argsTupleSchemeFactory implements SchemeFactory {
+      public addPasswordCredential_argsTupleScheme getScheme() {
+        return new addPasswordCredential_argsTupleScheme();
       }
     }
 
-    private static class addCertificateCredential_argsTupleScheme extends TupleScheme<addCertificateCredential_args> {
+    private static class addPasswordCredential_argsTupleScheme extends TupleScheme<addPasswordCredential_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        struct.certificateCredential.write(oprot);
+        struct.passwordCredential.write(oprot);
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential();
-        struct.certificateCredential.read(iprot);
-        struct.setCertificateCredentialIsSet(true);
+        struct.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential();
+        struct.passwordCredential.read(iprot);
+        struct.setPasswordCredentialIsSet(true);
       }
     }
 
   }
 
-  public static class addCertificateCredential_result implements org.apache.thrift.TBase<addCertificateCredential_result, addCertificateCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_result");
-
+  public static class addPasswordCredential_result implements org.apache.thrift.TBase<addPasswordCredential_result, addPasswordCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addPasswordCredential_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPasswordCredential_result");
+
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
     private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addCertificateCredential_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addCertificateCredential_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new addPasswordCredential_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addPasswordCredential_resultTupleSchemeFactory());
     }
 
     public String success; // required
@@ -5041,13 +4745,13 @@ public class CredentialStoreService {
       tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPasswordCredential_result.class, metaDataMap);
     }
 
-    public addCertificateCredential_result() {
+    public addPasswordCredential_result() {
     }
 
-    public addCertificateCredential_result(
+    public addPasswordCredential_result(
       String success,
       org.apache.airavata.credential.store.exception.CredentialStoreException csException)
     {
@@ -5059,7 +4763,7 @@ public class CredentialStoreService {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addCertificateCredential_result(addCertificateCredential_result other) {
+    public addPasswordCredential_result(addPasswordCredential_result other) {
       if (other.isSetSuccess()) {
         this.success = other.success;
       }
@@ -5068,8 +4772,8 @@ public class CredentialStoreService {
       }
     }
 
-    public addCertificateCredential_result deepCopy() {
-      return new addCertificateCredential_result(this);
+    public addPasswordCredential_result deepCopy() {
+      return new addPasswordCredential_result(this);
     }
 
     @Override
@@ -5082,7 +4786,7 @@ public class CredentialStoreService {
       return this.success;
     }
 
-    public addCertificateCredential_result setSuccess(String success) {
+    public addPasswordCredential_result setSuccess(String success) {
       this.success = success;
       return this;
     }
@@ -5106,7 +4810,7 @@ public class CredentialStoreService {
       return this.csException;
     }
 
-    public addCertificateCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+    public addPasswordCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
       this.csException = csException;
       return this;
     }
@@ -5178,12 +4882,12 @@ public class CredentialStoreService {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addCertificateCredential_result)
-        return this.equals((addCertificateCredential_result)that);
+      if (that instanceof addPasswordCredential_result)
+        return this.equals((addPasswordCredential_result)that);
       return false;
     }
 
-    public boolean equals(addCertificateCredential_result that) {
+    public boolean equals(addPasswordCredential_result that) {
       if (that == null)
         return false;
 
@@ -5226,7 +4930,7 @@ public class CredentialStoreService {
     }
 
     @Override
-    public int compareTo(addCertificateCredential_result other) {
+    public int compareTo(addPasswordCredential_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -5270,7 +4974,7 @@ public class CredentialStoreService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addCertificateCredential_result(");
+      StringBuilder sb = new StringBuilder("addPasswordCredential_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -5313,15 +5017,15 @@ public class CredentialStoreService {
       }
     }
 
-    private static class addCertificateCredential_resultStandardSchemeFactory implements SchemeFactory {
-      public addCertificateCredential_resultStandardScheme getScheme() {
-        return new addCertificateCredential_resultStandardScheme();
+    private static class addPasswordCredential_resultStandardSchemeFactory implements SchemeFactory {
+      public addPasswordCredential_resultStandardScheme getScheme() {
+        return new addPasswordCredential_resultStandardScheme();
       }
     }
 
-    private static class addCertificateCredential_resultStandardScheme extends StandardScheme<addCertificateCredential_result> {
+    private static class addPasswordCredential_resultStandardScheme extends StandardScheme<addPasswordCredential_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addPasswordCredential_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -5359,7 +5063,7 @@ public class CredentialStoreService {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addPasswordCredential_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -5379,16 +5083,16 @@ public class CredentialStoreService {
 
     }
 
-    private static class addCertificateCredential_resultTupleSchemeFactory implements SchemeFactory {
-      public addCertificateCredential_resultTupleScheme getScheme() {
-        return new addCertificateCredential_resultTupleScheme();
+    private static class addPasswordCredential_resultTupleSchemeFactory implements SchemeFactory {
+      public addPasswordCredential_resultTupleScheme getScheme() {
+        return new addPasswordCredential_resultTupleScheme();
       }
     }
 
-    private static class addCertificateCredential_resultTupleScheme extends TupleScheme<addCertificateCredential_result> {
+    private static class addPasswordCredential_resultTupleScheme extends TupleScheme<addPasswordCredential_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -5407,7 +5111,7 @@ public class CredentialStoreService {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
@@ -5424,22 +5128,25 @@ public class CredentialStoreService {
 
   }
 
-  public static class addPasswordCredential_args implements org.apache.thrift.TBase<addPasswordCredential_args, addPasswordCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addPasswordCredential_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPasswordCredential_args");
+  public static class getSSHCredential_args implements org.apache.thrift.TBase<getSSHCredential_args, getSSHCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSSHCredential_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSSHCredential_args");
 
-    private static final org.apache.thrift.protocol.TField PASSWORD_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("passwordCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addPasswordCredential_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addPasswordCredential_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new getSSHCredential_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getSSHCredential_argsTupleSchemeFactory());
     }
 
-    public org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential; // required
+    public String tokenId; // required
+    public String gatewayId; // 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 {
-      PASSWORD_CREDENTIAL((short)1, "passwordCredential");
+      TOKEN_ID((short)1, "tokenId"),
+      GATEWAY_ID((short)2, "gatewayId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -5454,8 +5161,10 @@ public class CredentialStoreService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // PASSWORD_CREDENTIAL
-            return PASSWORD_CREDENTIAL;
+          case 1: // TOKEN_ID
+            return TOKEN_ID;
+          case 2: // GATEWAY_ID
+            return GATEWAY_ID;
           default:
             return null;
         }
@@ -5499,71 +5208,111 @@ public class CredentialStoreService {
     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.PASSWORD_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("passwordCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.PasswordCredential.class)));
+      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", 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(addPasswordCredential_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSSHCredential_args.class, metaDataMap);
     }
 
-    public addPasswordCredential_args() {
+    public getSSHCredential_args() {
     }
 
-    public addPasswordCredential_args(
-      org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential)
+    public getSSHCredential_args(
+      String tokenId,
+      String gatewayId)
     {
       this();
-      this.passwordCredential = passwordCredential;
+      this.tokenId = tokenId;
+      this.gatewayId = gatewayId;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addPasswordCredential_args(addPasswordCredential_args other) {
-      if (other.isSetPasswordCredential()) {
-        this.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential(other.passwordCredential);
+    public getSSHCredential_args(getSSHCredential_args other) {
+      if (other.isSetTokenId()) {
+        this.tokenId = other.tokenId;
+      }
+      if (other.isSetGatewayId()) {
+        this.gatewayId = other.gatewayId;
       }
     }
 
-    public addPasswordCredential_args deepCopy() {
-      return new addPasswordCredential_args(this);
+    public getSSHCredential_args deepCopy() {
+      return new getSSHCredential_args(this);
     }
 
     @Override
     public void clear() {
-      this.passwordCredential = null;
+      this.tokenId = null;
+      this.gatewayId = null;
     }
 
-    public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential() {
-      return this.passwordCredential;
+    public String getTokenId() {
+      return this.tokenId;
     }
 
-    public addPasswordCredential_args setPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) {
-      this.passwordCredential = passwordCredential;
+    public getSSHCredential_args setTokenId(String tokenId) {
+      this.tokenId = tokenId;
       return this;
     }
 
-    public void unsetPasswordCredential() {
-      this.passwordCredential = null;
+    public void unsetTokenId() {
+      this.tokenId = null;
     }
 
-    /** Returns true if field passwordCredential is set (has been assigned a value) and false otherwise */
-    public boolean isSetPasswordCredential() {
-      return this.passwordCredential != null;
+    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
+    public boolean isSetTokenId() {
+      return this.tokenId != null;
     }
 
-    public void setPasswordCredentialIsSet(boolean value) {
+    public void setTokenIdIsSet(boolean value) {
       if (!value) {
-        this.passwordCredential = null;
+        this.tokenId = null;
+      }
+    }
+
+    public String getGatewayId() {
+      return this.gatewayId;
+    }
+
+    public getSSHCredential_args setGatewayId(String gatewayId) {
+      this.gatewayId = gatewayId;
+      return this;
+    }
+
+    public void unsetGatewayId() {
+      this.gatewayId = null;
+    }
+
+    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+    public boolean isSetGatewayId() {
+      return this.gatewayId != null;
+    }
+
+    public void setGatewayIdIsSet(boolean value) {
+      if (!value) {
+        this.gatewayId = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case PASSWORD_CREDENTIAL:
+      case TOKEN_ID:
         if (value == null) {
-          unsetPasswordCredential();
+          unsetTokenId();
         } else {
-          setPasswordCredential((org.apache.airavata.credential.store.datamodel.PasswordCredential)value);
+          setTokenId((String)value);
+        }
+        break;
+
+      case GATEWAY_ID:
+        if (value == null) {
+          unsetGatewayId();
+        } else {
+          setGatewayId((String)value);
         }
         break;
 
@@ -5572,8 +5321,11 @@ public class CredentialStoreService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case PASSWORD_CREDENTIAL:
-        return getPasswordCredential();
+      case TOKEN_ID:
+        return getTokenId();
+
+      case GATEWAY_ID:
+        return getGatewayId();
 
       }
       throw new IllegalStateException();
@@ -5586,8 +5338,10 @@ public class CredentialStoreService {
       }
 
       switch (field) {
-      case PASSWORD_CREDENTIAL:
-        return isSetPasswordCredential();
+      case TOKEN_ID:
+        return isSetTokenId();
+      case GATEWAY_ID:
+        return isSetGatewayId();
       }
       throw new IllegalStateException();
     }
@@ -5596,21 +5350,30 @@ public class CredentialStoreService {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addPasswordCredential_args)
-        return this.equals((addPasswordCredential_args)that);
+      if (that instanceof getSSHCredential_args)
+        return this.equals((getSSHCredential_args)that);
       return false;
     }
 
-    public boolean equals(addPasswordCredential_args that) {
+    public boolean equals(getSSHCredential_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_passwordCredential = true && this.isSetPasswordCredential();
-      boolean that_present_passwordCredential = true && that.isSetPasswordCredential();
-      if (this_present_passwordCredential || that_present_passwordCredential) {
-        if (!(this_present_passwordCredential && that_present_passwordCredential))
+      boolean this_present_tokenId = true && this.isSetTokenId();
+      boolean that_present_tokenId = true && that.isSetTokenId();
+      if (this_present_tokenId || that_present_tokenId) {
+        if (!(this_present_tokenId && that_present_tokenId))
           return false;
-        if (!this.passwordCredential.equals(that.passwordCredential))
+        if (!this.tokenId.equals(that.tokenId))
+          return false;
+      }
+
+      boolean this_present_gatewayId = true && this.isSetGatewayId();
+      boolean that_present_gatewayId = true && that.isSetGatewayId();
+      if (this_present_gatewayId || that_present_gatewayId) {
+        if (!(this_present_gatewayId && that_present_gatewayId))
+          return false;
+        if (!this.gatewayId.equals(that.gatewayId))
           return false;
       }
 
@@ -5621,28 +5384,43 @@ public class CredentialStoreService {
     public int hashCode() {
       List<Object> list

<TRUNCATED>

[05/51] [abbrv] airavata git commit: removing add and delete method for SSHCredentialSummary, serverhandler implemented got get method

Posted by sc...@apache.org.
removing add and delete method for SSHCredentialSummary, serverhandler implemented got get method


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

Branch: refs/heads/airavata-gov-registry
Commit: 077fd2c81d7b443f040e1ff0fb8af24b9c9b5f8a
Parents: 157efab
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 16:34:38 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 11:30:42 2016 -0400

----------------------------------------------------------------------
 .../impl/ssh/SSHCredentialSummary.java          |  101 -
 .../server/CredentialStoreServerHandler.java    |   25 +
 .../store/cpi/CredentialStoreService.java       | 4216 +++++-------------
 3 files changed, 1110 insertions(+), 3232 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/077fd2c8/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/impl/ssh/SSHCredentialSummary.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/impl/ssh/SSHCredentialSummary.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/impl/ssh/SSHCredentialSummary.java
deleted file mode 100644
index f838eaa..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/impl/ssh/SSHCredentialSummary.java
+++ /dev/null
@@ -1,101 +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.credential.store.credential.impl.ssh;
-
-import org.apache.airavata.credential.store.credential.Credential;
-
-import java.io.Serializable;
-
-/**
- * An SSH Credential Summary class which is an extension of Airavata Credential
- */
-public class SSHCredentialSummary extends Credential implements Serializable {
-
-    /**
-	 *
-	 */
-	private static final long serialVersionUID = 1235236447420198981L;
-
-    private byte[] publicKey;
-    private String gateway;
-    private String username;
-    private String token;
-    private String description;
-
-    @Override
-    public String getToken() {
-        return token;
-    }
-
-    @Override
-    public void setToken(String token) {
-        this.token = token;
-    }
-
-
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-
-    public SSHCredentialSummary() {
-    }
-
-    public SSHCredentialSummary(byte[] publicKey, String token, String gateway, String username) {
-        this.publicKey = publicKey;
-        this.gateway = gateway;
-        this.username = username;
-        this.token = token;
-        this.setPortalUserName(username);
-    }
-
-
-    public byte[] getPublicKey() {
-        return publicKey;
-    }
-
-    public void setPublicKey(byte[] pubKey) {
-        this.publicKey = pubKey;
-    }
-
-	public String getGateway() {
-		return gateway;
-	}
-
-	public void setGateway(String gateway) {
-		this.gateway = gateway;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/077fd2c8/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
index 0f1ac93..b7d52ce 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
@@ -30,6 +30,7 @@ import org.apache.airavata.credential.store.credential.Credential;
 import org.apache.airavata.credential.store.datamodel.CertificateCredential;
 import org.apache.airavata.credential.store.datamodel.PasswordCredential;
 import org.apache.airavata.credential.store.datamodel.SSHCredential;
+import org.apache.airavata.credential.store.datamodel.SSHCredentialSummary;
 import org.apache.airavata.credential.store.store.CredentialStoreException;
 import org.apache.airavata.credential.store.store.impl.CertificateCredentialWriter;
 import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
@@ -187,6 +188,30 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
     }
 
     @Override
+    public SSHCredentialSummary getSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException {
+        try {
+            Credential credential = credentialReader.getCredential(gatewayId, tokenId);
+            if (credential instanceof org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) {
+                org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential credential1 = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential;
+                SSHCredentialSummary sshCredentialSummary = new SSHCredentialSummary();
+                sshCredentialSummary.setUsername(credential1.getPortalUserName());
+                sshCredentialSummary.setGatewayId(credential1.getGateway());
+                sshCredentialSummary.setPublicKey(new String(credential1.getPublicKey()));
+                sshCredentialSummary.setToken(credential1.getToken());
+                sshCredentialSummary.setPersistedTime(credential1.getCertificateRequestedTime().getTime());
+                return sshCredentialSummary;
+            } else {
+                log.info("Could not find SSH credential for token - " + tokenId + " and "
+                        + "gateway id - " + gatewayId);
+                return null;
+            }
+        } catch (CredentialStoreException e) {
+            log.error("Error occurred while retrieving SSH credential Summary for token - " +  tokenId + " and gateway id - " + gatewayId, e);
+            throw new org.apache.airavata.credential.store.exception.CredentialStoreException("Error occurred while retrieving SSH credential Summary for token - " +  tokenId + " and gateway id - " + gatewayId);
+        }
+    }
+
+    @Override
     public CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException {
         try {
             Credential credential = credentialReader.getCredential(gatewayId, tokenId);


[48/51] [abbrv] airavata git commit: fixing id issues

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
index 25ab01a..106ff41 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 public class SharingRegistryService {
 
   public interface Iface {
@@ -92,16 +92,18 @@ public class SharingRegistryService {
     /**
      * <p>API method to delete user</p>
      * 
+     * @param domainId
      * @param userId
      */
-    public boolean deleteUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteUser(String domainId, String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get a user</p>
      * 
+     * @param domainId
      * @param userId
      */
-    public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.User getUser(String domainId, String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get a list of users in a specific domain Users will be reverse sorted based on the created time.</p>
@@ -132,16 +134,18 @@ public class SharingRegistryService {
     /**
      * <p>API method to delete a group</p>
      * 
+     * @param domainId
      * @param groupId
      */
-    public boolean deleteGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteGroup(String domainId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get a group</p>
      * 
+     * @param domainId
      * @param groupId
      */
-    public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String domainId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get groups in a domainId. Results are reverse sorted based on created time.</p>
@@ -155,52 +159,58 @@ public class SharingRegistryService {
     /**
      * <p>API method to add list of users to a group</p>
      * 
+     * @param domainId
      * @param userIds
      * @param groupId
      */
-    public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean addUsersToGroup(String domainId, List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to remove users from a group</p>
      * 
+     * @param domainId
      * @param userIds
      * @param groupId
      */
-    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean removeUsersFromGroup(String domainId, List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get list of child users in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
      * 
+     * @param domainId
      * @param groupId
      * @param offset
      * @param limit
      */
-    public List<org.apache.airavata.sharing.registry.models.User> getGroupMembersOfTypeUser(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.User> getGroupMembersOfTypeUser(String domainId, String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get list of child groups in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
      * 
+     * @param domainId
      * @param groupId
      * @param offset
      * @param limit
      */
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroupMembersOfTypeGroup(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroupMembersOfTypeGroup(String domainId, String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to add a child group to a parent group.</p>
      * 
+     * @param domainId
      * @param childIds
      * @param groupId
      */
-    public boolean addChildGroupsToParentGroup(List<String> childIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean addChildGroupsToParentGroup(String domainId, List<String> childIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to remove a child group from parent group.</p>
      * 
+     * @param domainId
      * @param childId
      * @param groupId
      */
-    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean removeChildGroupFromParentGroup(String domainId, String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to create a new entity type</p>
@@ -219,16 +229,18 @@ public class SharingRegistryService {
     /**
      * <p>API method to delete entity type</p>
      * 
+     * @param domainId
      * @param entityTypeId
      */
-    public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteEntityType(String domainId, String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get an entity type</p>
      * 
+     * @param domainId
      * @param entityTypeId
      */
-    public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String domainId, String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get entity types in a domainId. Results are reverse time sorted based on creation time</p>
@@ -256,43 +268,48 @@ public class SharingRegistryService {
     /**
      * <p>API method to delete entity</p>
      * 
+     * @param domainId
      * @param entityId
      */
-    public boolean deleteEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteEntity(String domainId, String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get entity</p>
      * 
+     * @param domainId
      * @param entityId
      */
-    public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.Entity getEntity(String domainId, String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to search entities</p>
      * 
+     * @param domainId
      * @param userId
      * @param entityTypeId
      * @param filters
      * @param offset
      * @param limit
      */
-    public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String domainId, String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get a list of shared users given the entity id</p>
      * 
+     * @param domainId
      * @param entityId
      * @param permissionTypeId
      */
-    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String domainId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get a list of shared groups given the entity id</p>
      * 
+     * @param domainId
      * @param entityId
      * @param permissionTypeId
      */
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String domainId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to create permission type</p>
@@ -311,16 +328,18 @@ public class SharingRegistryService {
     /**
      * <p>API method to delete permission type</p>
      * 
-     * @param entityTypeId
+     * @param domainId
+     * @param permissionTypeId
      */
-    public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean deletePermissionType(String domainId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get permission type</p>
      * 
+     * @param domainId
      * @param permissionTypeId
      */
-    public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String domainId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to get list of permission types in a given domainId. Results are reverse time sorted based on creation time</p>
@@ -401,9 +420,9 @@ public class SharingRegistryService {
 
     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 deleteUser(String domainId, 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 getUser(String domainId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getUsers(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -411,31 +430,31 @@ public class SharingRegistryService {
 
     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 deleteGroup(String domainId, 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 getGroup(String domainId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getGroups(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void addUsersToGroup(String domainId, 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 removeUsersFromGroup(String domainId, List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getGroupMembersOfTypeUser(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getGroupMembersOfTypeUser(String domainId, String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getGroupMembersOfTypeGroup(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getGroupMembersOfTypeGroup(String domainId, String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void addChildGroupsToParentGroup(List<String> childIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void addChildGroupsToParentGroup(String domainId, List<String> childIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void removeChildGroupFromParentGroup(String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void removeChildGroupFromParentGroup(String domainId, String childId, 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 deleteEntityType(String domainId, 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 getEntityType(String domainId, String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getEntityTypes(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -443,23 +462,23 @@ public class SharingRegistryService {
 
     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 deleteEntity(String domainId, 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 getEntity(String domainId, String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void searchEntities(String domainId, String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getListOfSharedUsers(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getListOfSharedUsers(String domainId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getListOfSharedGroups(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getListOfSharedGroups(String domainId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void deletePermissionType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void deletePermissionType(String domainId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getPermissionType(String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getPermissionType(String domainId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getPermissionTypes(String domainId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -678,15 +697,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteUser(String domainId, String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_deleteUser(userId);
+      send_deleteUser(domainId, userId);
       return recv_deleteUser();
     }
 
-    public void send_deleteUser(String userId) throws org.apache.thrift.TException
+    public void send_deleteUser(String domainId, String userId) throws org.apache.thrift.TException
     {
       deleteUser_args args = new deleteUser_args();
+      args.setDomainId(domainId);
       args.setUserId(userId);
       sendBase("deleteUser", args);
     }
@@ -704,15 +724,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.User getUser(String domainId, String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getUser(userId);
+      send_getUser(domainId, userId);
       return recv_getUser();
     }
 
-    public void send_getUser(String userId) throws org.apache.thrift.TException
+    public void send_getUser(String domainId, String userId) throws org.apache.thrift.TException
     {
       getUser_args args = new getUser_args();
+      args.setDomainId(domainId);
       args.setUserId(userId);
       sendBase("getUser", args);
     }
@@ -810,15 +831,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteGroup(String domainId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_deleteGroup(groupId);
+      send_deleteGroup(domainId, groupId);
       return recv_deleteGroup();
     }
 
-    public void send_deleteGroup(String groupId) throws org.apache.thrift.TException
+    public void send_deleteGroup(String domainId, String groupId) throws org.apache.thrift.TException
     {
       deleteGroup_args args = new deleteGroup_args();
+      args.setDomainId(domainId);
       args.setGroupId(groupId);
       sendBase("deleteGroup", args);
     }
@@ -836,15 +858,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String domainId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getGroup(groupId);
+      send_getGroup(domainId, groupId);
       return recv_getGroup();
     }
 
-    public void send_getGroup(String groupId) throws org.apache.thrift.TException
+    public void send_getGroup(String domainId, String groupId) throws org.apache.thrift.TException
     {
       getGroup_args args = new getGroup_args();
+      args.setDomainId(domainId);
       args.setGroupId(groupId);
       sendBase("getGroup", args);
     }
@@ -887,15 +910,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public boolean addUsersToGroup(String domainId, List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_addUsersToGroup(userIds, groupId);
+      send_addUsersToGroup(domainId, userIds, groupId);
       return recv_addUsersToGroup();
     }
 
-    public void send_addUsersToGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
+    public void send_addUsersToGroup(String domainId, List<String> userIds, String groupId) throws org.apache.thrift.TException
     {
       addUsersToGroup_args args = new addUsersToGroup_args();
+      args.setDomainId(domainId);
       args.setUserIds(userIds);
       args.setGroupId(groupId);
       sendBase("addUsersToGroup", args);
@@ -914,15 +938,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public boolean removeUsersFromGroup(String domainId, List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_removeUsersFromGroup(userIds, groupId);
+      send_removeUsersFromGroup(domainId, userIds, groupId);
       return recv_removeUsersFromGroup();
     }
 
-    public void send_removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.thrift.TException
+    public void send_removeUsersFromGroup(String domainId, List<String> userIds, String groupId) throws org.apache.thrift.TException
     {
       removeUsersFromGroup_args args = new removeUsersFromGroup_args();
+      args.setDomainId(domainId);
       args.setUserIds(userIds);
       args.setGroupId(groupId);
       sendBase("removeUsersFromGroup", args);
@@ -941,15 +966,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeUsersFromGroup failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.User> getGroupMembersOfTypeUser(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> getGroupMembersOfTypeUser(String domainId, String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getGroupMembersOfTypeUser(groupId, offset, limit);
+      send_getGroupMembersOfTypeUser(domainId, groupId, offset, limit);
       return recv_getGroupMembersOfTypeUser();
     }
 
-    public void send_getGroupMembersOfTypeUser(String groupId, int offset, int limit) throws org.apache.thrift.TException
+    public void send_getGroupMembersOfTypeUser(String domainId, String groupId, int offset, int limit) throws org.apache.thrift.TException
     {
       getGroupMembersOfTypeUser_args args = new getGroupMembersOfTypeUser_args();
+      args.setDomainId(domainId);
       args.setGroupId(groupId);
       args.setOffset(offset);
       args.setLimit(limit);
@@ -969,15 +995,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembersOfTypeUser failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroupMembersOfTypeGroup(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroupMembersOfTypeGroup(String domainId, String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getGroupMembersOfTypeGroup(groupId, offset, limit);
+      send_getGroupMembersOfTypeGroup(domainId, groupId, offset, limit);
       return recv_getGroupMembersOfTypeGroup();
     }
 
-    public void send_getGroupMembersOfTypeGroup(String groupId, int offset, int limit) throws org.apache.thrift.TException
+    public void send_getGroupMembersOfTypeGroup(String domainId, String groupId, int offset, int limit) throws org.apache.thrift.TException
     {
       getGroupMembersOfTypeGroup_args args = new getGroupMembersOfTypeGroup_args();
+      args.setDomainId(domainId);
       args.setGroupId(groupId);
       args.setOffset(offset);
       args.setLimit(limit);
@@ -997,15 +1024,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembersOfTypeGroup failed: unknown result");
     }
 
-    public boolean addChildGroupsToParentGroup(List<String> childIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean addChildGroupsToParentGroup(String domainId, List<String> childIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_addChildGroupsToParentGroup(childIds, groupId);
+      send_addChildGroupsToParentGroup(domainId, childIds, groupId);
       return recv_addChildGroupsToParentGroup();
     }
 
-    public void send_addChildGroupsToParentGroup(List<String> childIds, String groupId) throws org.apache.thrift.TException
+    public void send_addChildGroupsToParentGroup(String domainId, List<String> childIds, String groupId) throws org.apache.thrift.TException
     {
       addChildGroupsToParentGroup_args args = new addChildGroupsToParentGroup_args();
+      args.setDomainId(domainId);
       args.setChildIds(childIds);
       args.setGroupId(groupId);
       sendBase("addChildGroupsToParentGroup", args);
@@ -1024,15 +1052,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addChildGroupsToParentGroup failed: unknown result");
     }
 
-    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean removeChildGroupFromParentGroup(String domainId, String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_removeChildGroupFromParentGroup(childId, groupId);
+      send_removeChildGroupFromParentGroup(domainId, childId, groupId);
       return recv_removeChildGroupFromParentGroup();
     }
 
-    public void send_removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.thrift.TException
+    public void send_removeChildGroupFromParentGroup(String domainId, String childId, String groupId) throws org.apache.thrift.TException
     {
       removeChildGroupFromParentGroup_args args = new removeChildGroupFromParentGroup_args();
+      args.setDomainId(domainId);
       args.setChildId(childId);
       args.setGroupId(groupId);
       sendBase("removeChildGroupFromParentGroup", args);
@@ -1103,15 +1132,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteEntityType(String domainId, String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_deleteEntityType(entityTypeId);
+      send_deleteEntityType(domainId, entityTypeId);
       return recv_deleteEntityType();
     }
 
-    public void send_deleteEntityType(String entityTypeId) throws org.apache.thrift.TException
+    public void send_deleteEntityType(String domainId, String entityTypeId) throws org.apache.thrift.TException
     {
       deleteEntityType_args args = new deleteEntityType_args();
+      args.setDomainId(domainId);
       args.setEntityTypeId(entityTypeId);
       sendBase("deleteEntityType", args);
     }
@@ -1129,15 +1159,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String domainId, String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getEntityType(entityTypeId);
+      send_getEntityType(domainId, entityTypeId);
       return recv_getEntityType();
     }
 
-    public void send_getEntityType(String entityTypeId) throws org.apache.thrift.TException
+    public void send_getEntityType(String domainId, String entityTypeId) throws org.apache.thrift.TException
     {
       getEntityType_args args = new getEntityType_args();
+      args.setDomainId(domainId);
       args.setEntityTypeId(entityTypeId);
       sendBase("getEntityType", args);
     }
@@ -1235,15 +1266,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteEntity(String domainId, String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_deleteEntity(entityId);
+      send_deleteEntity(domainId, entityId);
       return recv_deleteEntity();
     }
 
-    public void send_deleteEntity(String entityId) throws org.apache.thrift.TException
+    public void send_deleteEntity(String domainId, String entityId) throws org.apache.thrift.TException
     {
       deleteEntity_args args = new deleteEntity_args();
+      args.setDomainId(domainId);
       args.setEntityId(entityId);
       sendBase("deleteEntity", args);
     }
@@ -1261,15 +1293,16 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.Entity getEntity(String domainId, String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getEntity(entityId);
+      send_getEntity(domainId, entityId);
       return recv_getEntity();
     }
 
-    public void send_getEntity(String entityId) throws org.apache.thrift.TException
+    public void send_getEntity(String domainId, String entityId) throws org.apache.thrift.TException
     {
       getEntity_args args = new getEntity_args();
+      args.setDomainId(domainId);
       args.setEntityId(entityId);
       sendBase("getEntity", args);
     }
@@ -1287,15 +1320,16 @@ public class SharingRegistryService {
       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 userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String domainId, String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_searchEntities(userId, entityTypeId, filters, offset, limit);
+      send_searchEntities(domainId, userId, entityTypeId, filters, offset, limit);
       return recv_searchEntities();
     }
 
-    public void send_searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.thrift.TException
+    public void send_searchEntities(String domainId, String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.thrift.TException
     {
       searchEntities_args args = new searchEntities_args();
+      args.setDomainId(domainId);
       args.setUserId(userId);
       args.setEntityTypeId(entityTypeId);
       args.setFilters(filters);
@@ -1317,15 +1351,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchEntities failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String domainId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getListOfSharedUsers(entityId, permissionTypeId);
+      send_getListOfSharedUsers(domainId, entityId, permissionTypeId);
       return recv_getListOfSharedUsers();
     }
 
-    public void send_getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.thrift.TException
+    public void send_getListOfSharedUsers(String domainId, String entityId, String permissionTypeId) throws org.apache.thrift.TException
     {
       getListOfSharedUsers_args args = new getListOfSharedUsers_args();
+      args.setDomainId(domainId);
       args.setEntityId(entityId);
       args.setPermissionTypeId(permissionTypeId);
       sendBase("getListOfSharedUsers", args);
@@ -1344,15 +1379,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedUsers failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String domainId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getListOfSharedGroups(entityId, permissionTypeId);
+      send_getListOfSharedGroups(domainId, entityId, permissionTypeId);
       return recv_getListOfSharedGroups();
     }
 
-    public void send_getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.thrift.TException
+    public void send_getListOfSharedGroups(String domainId, String entityId, String permissionTypeId) throws org.apache.thrift.TException
     {
       getListOfSharedGroups_args args = new getListOfSharedGroups_args();
+      args.setDomainId(domainId);
       args.setEntityId(entityId);
       args.setPermissionTypeId(permissionTypeId);
       sendBase("getListOfSharedGroups", args);
@@ -1423,16 +1459,17 @@ public class SharingRegistryService {
       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.SharingRegistryException, org.apache.thrift.TException
+    public boolean deletePermissionType(String domainId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_deletePermissionType(entityTypeId);
+      send_deletePermissionType(domainId, permissionTypeId);
       return recv_deletePermissionType();
     }
 
-    public void send_deletePermissionType(String entityTypeId) throws org.apache.thrift.TException
+    public void send_deletePermissionType(String domainId, String permissionTypeId) throws org.apache.thrift.TException
     {
       deletePermissionType_args args = new deletePermissionType_args();
-      args.setEntityTypeId(entityTypeId);
+      args.setDomainId(domainId);
+      args.setPermissionTypeId(permissionTypeId);
       sendBase("deletePermissionType", args);
     }
 
@@ -1449,15 +1486,16 @@ public class SharingRegistryService {
       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 permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String domainId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_getPermissionType(permissionTypeId);
+      send_getPermissionType(domainId, permissionTypeId);
       return recv_getPermissionType();
     }
 
-    public void send_getPermissionType(String permissionTypeId) throws org.apache.thrift.TException
+    public void send_getPermissionType(String domainId, String permissionTypeId) throws org.apache.thrift.TException
     {
       getPermissionType_args args = new getPermissionType_args();
+      args.setDomainId(domainId);
       args.setPermissionTypeId(permissionTypeId);
       sendBase("getPermissionType", args);
     }
@@ -1895,23 +1933,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void deleteUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void deleteUser(String domainId, 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);
+      deleteUser_call method_call = new deleteUser_call(domainId, 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 domainId;
       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 {
+      public deleteUser_call(String domainId, 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.domainId = domainId;
         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.setDomainId(domainId);
         args.setUserId(userId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -1927,23 +1968,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void getUser(String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getUser(String domainId, 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);
+      getUser_call method_call = new getUser_call(domainId, 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 domainId;
       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 {
+      public getUser_call(String domainId, 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.domainId = domainId;
         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.setDomainId(domainId);
         args.setUserId(userId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2061,23 +2105,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void deleteGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void deleteGroup(String domainId, 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);
+      deleteGroup_call method_call = new deleteGroup_call(domainId, 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 domainId;
       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 {
+      public deleteGroup_call(String domainId, 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.domainId = domainId;
         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.setDomainId(domainId);
         args.setGroupId(groupId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2093,23 +2140,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void getGroup(String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getGroup(String domainId, 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);
+      getGroup_call method_call = new getGroup_call(domainId, 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 domainId;
       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 {
+      public getGroup_call(String domainId, 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.domainId = domainId;
         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.setDomainId(domainId);
         args.setGroupId(groupId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2163,18 +2213,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void addUsersToGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void addUsersToGroup(String domainId, 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);
+      addUsersToGroup_call method_call = new addUsersToGroup_call(domainId, 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 String domainId;
       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 {
+      public addUsersToGroup_call(String domainId, 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.domainId = domainId;
         this.userIds = userIds;
         this.groupId = groupId;
       }
@@ -2182,6 +2234,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUsersToGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
         addUsersToGroup_args args = new addUsersToGroup_args();
+        args.setDomainId(domainId);
         args.setUserIds(userIds);
         args.setGroupId(groupId);
         args.write(prot);
@@ -2198,18 +2251,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void removeUsersFromGroup(List<String> userIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void removeUsersFromGroup(String domainId, 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);
+      removeUsersFromGroup_call method_call = new removeUsersFromGroup_call(domainId, 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 String domainId;
       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 {
+      public removeUsersFromGroup_call(String domainId, 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.domainId = domainId;
         this.userIds = userIds;
         this.groupId = groupId;
       }
@@ -2217,6 +2272,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeUsersFromGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
         removeUsersFromGroup_args args = new removeUsersFromGroup_args();
+        args.setDomainId(domainId);
         args.setUserIds(userIds);
         args.setGroupId(groupId);
         args.write(prot);
@@ -2233,19 +2289,21 @@ public class SharingRegistryService {
       }
     }
 
-    public void getGroupMembersOfTypeUser(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getGroupMembersOfTypeUser(String domainId, String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getGroupMembersOfTypeUser_call method_call = new getGroupMembersOfTypeUser_call(groupId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+      getGroupMembersOfTypeUser_call method_call = new getGroupMembersOfTypeUser_call(domainId, groupId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getGroupMembersOfTypeUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String groupId;
       private int offset;
       private int limit;
-      public getGroupMembersOfTypeUser_call(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public getGroupMembersOfTypeUser_call(String domainId, String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.domainId = domainId;
         this.groupId = groupId;
         this.offset = offset;
         this.limit = limit;
@@ -2254,6 +2312,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroupMembersOfTypeUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getGroupMembersOfTypeUser_args args = new getGroupMembersOfTypeUser_args();
+        args.setDomainId(domainId);
         args.setGroupId(groupId);
         args.setOffset(offset);
         args.setLimit(limit);
@@ -2271,19 +2330,21 @@ public class SharingRegistryService {
       }
     }
 
-    public void getGroupMembersOfTypeGroup(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getGroupMembersOfTypeGroup(String domainId, String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getGroupMembersOfTypeGroup_call method_call = new getGroupMembersOfTypeGroup_call(groupId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+      getGroupMembersOfTypeGroup_call method_call = new getGroupMembersOfTypeGroup_call(domainId, groupId, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getGroupMembersOfTypeGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String groupId;
       private int offset;
       private int limit;
-      public getGroupMembersOfTypeGroup_call(String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public getGroupMembersOfTypeGroup_call(String domainId, String groupId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.domainId = domainId;
         this.groupId = groupId;
         this.offset = offset;
         this.limit = limit;
@@ -2292,6 +2353,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGroupMembersOfTypeGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getGroupMembersOfTypeGroup_args args = new getGroupMembersOfTypeGroup_args();
+        args.setDomainId(domainId);
         args.setGroupId(groupId);
         args.setOffset(offset);
         args.setLimit(limit);
@@ -2309,18 +2371,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void addChildGroupsToParentGroup(List<String> childIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void addChildGroupsToParentGroup(String domainId, List<String> childIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      addChildGroupsToParentGroup_call method_call = new addChildGroupsToParentGroup_call(childIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
+      addChildGroupsToParentGroup_call method_call = new addChildGroupsToParentGroup_call(domainId, childIds, groupId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class addChildGroupsToParentGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private List<String> childIds;
       private String groupId;
-      public addChildGroupsToParentGroup_call(List<String> childIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public addChildGroupsToParentGroup_call(String domainId, List<String> childIds, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.domainId = domainId;
         this.childIds = childIds;
         this.groupId = groupId;
       }
@@ -2328,6 +2392,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addChildGroupsToParentGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
         addChildGroupsToParentGroup_args args = new addChildGroupsToParentGroup_args();
+        args.setDomainId(domainId);
         args.setChildIds(childIds);
         args.setGroupId(groupId);
         args.write(prot);
@@ -2344,18 +2409,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void removeChildGroupFromParentGroup(String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void removeChildGroupFromParentGroup(String domainId, String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      removeChildGroupFromParentGroup_call method_call = new removeChildGroupFromParentGroup_call(childId, groupId, resultHandler, this, ___protocolFactory, ___transport);
+      removeChildGroupFromParentGroup_call method_call = new removeChildGroupFromParentGroup_call(domainId, childId, groupId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class removeChildGroupFromParentGroup_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String childId;
       private String groupId;
-      public removeChildGroupFromParentGroup_call(String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public removeChildGroupFromParentGroup_call(String domainId, String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.domainId = domainId;
         this.childId = childId;
         this.groupId = groupId;
       }
@@ -2363,6 +2430,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeChildGroupFromParentGroup", org.apache.thrift.protocol.TMessageType.CALL, 0));
         removeChildGroupFromParentGroup_args args = new removeChildGroupFromParentGroup_args();
+        args.setDomainId(domainId);
         args.setChildId(childId);
         args.setGroupId(groupId);
         args.write(prot);
@@ -2443,23 +2511,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void deleteEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void deleteEntityType(String domainId, String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      deleteEntityType_call method_call = new deleteEntityType_call(entityTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      deleteEntityType_call method_call = new deleteEntityType_call(domainId, entityTypeId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class deleteEntityType_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityTypeId;
-      public deleteEntityType_call(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public deleteEntityType_call(String domainId, String entityTypeId, 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;
         this.entityTypeId = entityTypeId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteEntityType", org.apache.thrift.protocol.TMessageType.CALL, 0));
         deleteEntityType_args args = new deleteEntityType_args();
+        args.setDomainId(domainId);
         args.setEntityTypeId(entityTypeId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2475,23 +2546,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void getEntityType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getEntityType(String domainId, String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getEntityType_call method_call = new getEntityType_call(entityTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      getEntityType_call method_call = new getEntityType_call(domainId, entityTypeId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getEntityType_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityTypeId;
-      public getEntityType_call(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public getEntityType_call(String domainId, String entityTypeId, 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;
         this.entityTypeId = entityTypeId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getEntityType", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getEntityType_args args = new getEntityType_args();
+        args.setDomainId(domainId);
         args.setEntityTypeId(entityTypeId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2609,23 +2683,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void deleteEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void deleteEntity(String domainId, String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      deleteEntity_call method_call = new deleteEntity_call(entityId, resultHandler, this, ___protocolFactory, ___transport);
+      deleteEntity_call method_call = new deleteEntity_call(domainId, entityId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class deleteEntity_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityId;
-      public deleteEntity_call(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public deleteEntity_call(String domainId, String entityId, 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;
         this.entityId = entityId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteEntity", org.apache.thrift.protocol.TMessageType.CALL, 0));
         deleteEntity_args args = new deleteEntity_args();
+        args.setDomainId(domainId);
         args.setEntityId(entityId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2641,23 +2718,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void getEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getEntity(String domainId, String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getEntity_call method_call = new getEntity_call(entityId, resultHandler, this, ___protocolFactory, ___transport);
+      getEntity_call method_call = new getEntity_call(domainId, entityId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getEntity_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityId;
-      public getEntity_call(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public getEntity_call(String domainId, String entityId, 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;
         this.entityId = entityId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getEntity", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getEntity_args args = new getEntity_args();
+        args.setDomainId(domainId);
         args.setEntityId(entityId);
         args.write(prot);
         prot.writeMessageEnd();
@@ -2673,21 +2753,23 @@ public class SharingRegistryService {
       }
     }
 
-    public void searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void searchEntities(String domainId, String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      searchEntities_call method_call = new searchEntities_call(userId, entityTypeId, filters, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
+      searchEntities_call method_call = new searchEntities_call(domainId, userId, entityTypeId, filters, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class searchEntities_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String userId;
       private String entityTypeId;
       private List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters;
       private int offset;
       private int limit;
-      public searchEntities_call(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public searchEntities_call(String domainId, String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, 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.domainId = domainId;
         this.userId = userId;
         this.entityTypeId = entityTypeId;
         this.filters = filters;
@@ -2698,6 +2780,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("searchEntities", org.apache.thrift.protocol.TMessageType.CALL, 0));
         searchEntities_args args = new searchEntities_args();
+        args.setDomainId(domainId);
         args.setUserId(userId);
         args.setEntityTypeId(entityTypeId);
         args.setFilters(filters);
@@ -2717,18 +2800,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void getListOfSharedUsers(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getListOfSharedUsers(String domainId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getListOfSharedUsers_call method_call = new getListOfSharedUsers_call(entityId, permissionTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      getListOfSharedUsers_call method_call = new getListOfSharedUsers_call(domainId, entityId, permissionTypeId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getListOfSharedUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityId;
       private String permissionTypeId;
-      public getListOfSharedUsers_call(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public getListOfSharedUsers_call(String domainId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.domainId = domainId;
         this.entityId = entityId;
         this.permissionTypeId = permissionTypeId;
       }
@@ -2736,6 +2821,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getListOfSharedUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getListOfSharedUsers_args args = new getListOfSharedUsers_args();
+        args.setDomainId(domainId);
         args.setEntityId(entityId);
         args.setPermissionTypeId(permissionTypeId);
         args.write(prot);
@@ -2752,18 +2838,20 @@ public class SharingRegistryService {
       }
     }
 
-    public void getListOfSharedGroups(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getListOfSharedGroups(String domainId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getListOfSharedGroups_call method_call = new getListOfSharedGroups_call(entityId, permissionTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      getListOfSharedGroups_call method_call = new getListOfSharedGroups_call(domainId, entityId, permissionTypeId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getListOfSharedGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityId;
       private String permissionTypeId;
-      public getListOfSharedGroups_call(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public getListOfSharedGroups_call(String domainId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
+        this.domainId = domainId;
         this.entityId = entityId;
         this.permissionTypeId = permissionTypeId;
       }
@@ -2771,6 +2859,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getListOfSharedGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getListOfSharedGroups_args args = new getListOfSharedGroups_args();
+        args.setDomainId(domainId);
         args.setEntityId(entityId);
         args.setPermissionTypeId(permissionTypeId);
         args.write(prot);
@@ -2851,24 +2940,27 @@ public class SharingRegistryService {
       }
     }
 
-    public void deletePermissionType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void deletePermissionType(String domainId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      deletePermissionType_call method_call = new deletePermissionType_call(entityTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      deletePermissionType_call method_call = new deletePermissionType_call(domainId, permissionTypeId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class deletePermissionType_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private String entityTypeId;
-      public deletePermissionType_call(String entityTypeId, 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 String domainId;
+      private String permissionTypeId;
+      public deletePermissionType_call(String domainId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
-        this.entityTypeId = entityTypeId;
+        this.domainId = domainId;
+        this.permissionTypeId = permissionTypeId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deletePermissionType", org.apache.thrift.protocol.TMessageType.CALL, 0));
         deletePermissionType_args args = new deletePermissionType_args();
-        args.setEntityTypeId(entityTypeId);
+        args.setDomainId(domainId);
+        args.setPermissionTypeId(permissionTypeId);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -2883,23 +2975,26 @@ public class SharingRegistryService {
       }
     }
 
-    public void getPermissionType(String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getPermissionType(String domainId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) 

<TRUNCATED>

[23/51] [abbrv] airavata git commit: adding separate distribution

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/ConnectionPool.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/ConnectionPool.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/ConnectionPool.java
new file mode 100644
index 0000000..02484f7
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/ConnectionPool.java
@@ -0,0 +1,382 @@
+/*
+ *
+ * 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;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Stack;
+import java.util.concurrent.Semaphore;
+
+
+/**
+ * A class for preallocating, recycling, and managing JDBC connections.
+ */
+public class ConnectionPool {
+    private static final Logger logger = LoggerFactory.getLogger(ConnectionPool.class);
+
+    private long MAX_IDLE_TIME = 5 * 60 * 1000; // 5 minutes
+
+    private String driver;
+    private String url;
+    private String username;
+    private String password;
+    private String jdbcUrl;
+
+    private int maxConnections;
+
+    private boolean autoCommit = true;
+    private boolean waitIfBusy;
+
+    private Semaphore needConnection = new Semaphore(0);
+    private boolean stop;
+
+    private Stack<Connection> availableConnections;
+    private Stack<Connection> busyConnections;
+
+    private HashMap<Connection, Long> lastAccessTimeRecord = new HashMap<Connection, Long>();
+
+    private String urlType = "";
+
+    private DataSource datasource;
+
+    private int transactionIsolation = Connection.TRANSACTION_NONE;
+
+    private Thread clenupThread;
+    private Thread producerThread;
+
+    public ConnectionPool(String driver, String url, String username, String password, int initialConnections,
+                          int maxConnections, boolean waitIfBusy) throws SQLException {
+        this.driver = driver;
+        this.url = url;
+        this.username = username;
+        this.password = password;
+        this.urlType = "speratedURL";
+        initialize(initialConnections, maxConnections, waitIfBusy);
+    }
+
+    public ConnectionPool(String driver, String jdbcUrl, int initialConnections, int maxConnections,
+                          boolean waitIfBusy, boolean autoCommit, int transactionIsolation) throws SQLException {
+        this.driver = driver;
+        this.jdbcUrl = jdbcUrl;
+        this.urlType = "simpleURL";
+        this.autoCommit = autoCommit;
+        this.transactionIsolation = transactionIsolation;
+        initialize(initialConnections, maxConnections, waitIfBusy);
+    }
+
+    public ConnectionPool(String driver, String jdbcUrl, int initialConnections, int maxConnections, boolean waitIfBusy)
+            throws SQLException {
+        this.driver = driver;
+        this.jdbcUrl = jdbcUrl;
+        this.urlType = "simpleURL";
+        initialize(initialConnections, maxConnections, waitIfBusy);
+    }
+
+    public ConnectionPool(DataSource dataSource, int initialConnections, int maxConnections, boolean waitIfBusy)
+            throws SQLException {
+        this.urlType = "dataSource";
+        this.datasource = dataSource;
+        initialize(initialConnections, maxConnections, waitIfBusy);
+    }
+
+    /**
+     * Check if this connection pool is auto commit or not
+     *
+     * @return
+     */
+    public boolean isAutoCommit() {
+        return this.autoCommit;
+    }
+
+    private void initialize(int initialConnections, int maxConnections, boolean waitIfBusy) throws SQLException {
+        this.maxConnections = maxConnections;
+        this.waitIfBusy = waitIfBusy;
+
+        int sizeOfConnections = (initialConnections > maxConnections) ? maxConnections : initialConnections;
+
+        availableConnections = new Stack<Connection>();
+        busyConnections = new Stack<Connection>();
+
+        for (int i = 0; i < sizeOfConnections; i++) {
+            Connection con = makeNewConnection();
+            setTimeStamp(con);
+            availableConnections.push(con);
+
+        }
+
+        producerThread = new Thread(new FillUpThread());
+        producerThread.start();
+
+        clenupThread = new Thread(new CleanUpThread());
+        clenupThread.start();
+    }
+
+    public synchronized Connection getConnection() throws SQLException {
+        if (!availableConnections.isEmpty()) {
+            Connection existingConnection = availableConnections.pop();
+
+            // If connection on available list is closed (e.g.,
+            // it timed out), then remove it from available list
+            // and race for a connection again.
+            if (existingConnection.isClosed()) {
+                lastAccessTimeRecord.remove(existingConnection);
+                // notifyAll for fairness
+                notifyAll();
+            } else {
+                busyConnections.push(existingConnection);
+                setTimeStamp(existingConnection);
+                return existingConnection;
+            }
+        } else if (!waitIfBusy && busyConnections.size() >= maxConnections) {
+            // You reached maxConnections limit and waitIfBusy flag is false.
+            // Throw SQLException in such a case.
+            throw new SQLException("Connection limit reached");
+        } else {
+
+            if (busyConnections.size() < maxConnections) {
+                // available connection is empty, but total number of connection
+                // doesn't reach maxConnection. Request for more connection
+                needConnection.release();
+            }
+
+            try {
+                // wait for free connection
+                wait();
+            } catch (InterruptedException ie) {
+            }
+        }
+        // always race for connection forever
+        return getConnection();
+    }
+
+    // This explicitly makes a new connection. Called in
+    // the foreground when initializing the ConnectionPool,
+    // and called in the background when running.
+    private Connection makeNewConnection() throws SQLException {
+        try {
+            // Load database driver if not already loaded
+            Class.forName(driver);
+            Connection connection;
+            // Establish network connection to database
+            if (urlType.equals("speratedURL")) {
+                connection = DriverManager.getConnection(url, username, password);
+            } else if (urlType.equals("simpleURL")) {
+                connection = DriverManager.getConnection(jdbcUrl);
+            } else { // if(urlType.equals("dataSource")){
+                connection = datasource.getConnection();
+            }
+            connection.setTransactionIsolation(this.transactionIsolation);
+            connection.setAutoCommit(this.autoCommit);
+            return connection;
+        } catch (ClassNotFoundException cnfe) {
+            // Simplify try/catch blocks of people using this by
+            // throwing only one exception type.
+            throw new SQLException("Can't find class for driver: " + driver);
+        }
+    }
+
+    private synchronized void fillUpConnection(Connection conn) {
+        setTimeStamp(conn);
+        availableConnections.push(conn);
+
+        // notify all since new connection is created
+        notifyAll();
+    }
+
+    private void setTimeStamp(Connection connection) {
+        lastAccessTimeRecord.put(connection, System.currentTimeMillis());
+    }
+
+    // The database connection cannot be left idle for too long, otherwise TCP
+    // connection will be broken.
+    /**
+     * From http://forums.mysql.com/read.php?39,28450,57460#msg-57460 Okay, then it looks like wait_timeout on the
+     * server is killing your connection (it is set to 8 hours of idle time by default). Either set that value higher on
+     * your server, or configure your connection pool to not hold connections idle that long (I prefer the latter). Most
+     * folks I know that run MySQL with a connection pool in high-load production environments only let connections sit
+     * idle for a matter of minutes, since it only takes a few milliseconds to open a connection, and the longer one
+     * sits idle the more chance it will go "bad" because of a network hiccup or the MySQL server being restarted.
+     *
+     * @throws java.sql.SQLException
+     */
+    private boolean isConnectionStale(Connection connection) {
+        long currentTime = System.currentTimeMillis();
+        long lastAccess = lastAccessTimeRecord.get(connection);
+        if (currentTime - lastAccess > MAX_IDLE_TIME) {
+            return true;
+        } else
+            return false;
+    }
+
+    private synchronized void closeStaleConnections() {
+        // close idle connections
+        Iterator<Connection> iter = availableConnections.iterator();
+        while (iter.hasNext()) {
+            Connection existingConnection = iter.next();
+            if (isConnectionStale(existingConnection)) {
+                try {
+                    existingConnection.close();
+                    iter.remove();
+                } catch (SQLException sql) {
+                    logger.error(sql.getMessage(), sql);
+                }
+            }
+        }
+        // close busy connections that have been checked out for too long.
+        // This should not happen since this means program has bug for not
+        // releasing connections .
+        iter = busyConnections.iterator();
+        while (iter.hasNext()) {
+            Connection busyConnection = iter.next();
+            if (isConnectionStale(busyConnection)) {
+                try {
+                    busyConnection.close();
+                    iter.remove();
+                    logger.warn("****Connection has checked out too long. Forced release. Check the program for calling release connection [free(Connection) method]");
+                } catch (SQLException sql) {
+                    logger.error(sql.getMessage(), sql);
+                }
+            }
+        }
+    }
+
+    public synchronized void free(Connection connection) {
+        busyConnections.removeElement(connection);
+        availableConnections.addElement(connection);
+        // Wake up threads that are waiting for a connection
+        notifyAll();
+    }
+
+    /**
+     * Close all the connections. Use with caution: be sure no connections are in use before calling. Note that you are
+     * not <I>required</I> to call this when done with a ConnectionPool, since connections are guaranteed to be closed
+     * when garbage collected. But this method gives more control regarding when the connections are closed.
+     */
+    public synchronized void dispose() {
+        logger.info("Connection Pool Shutting down");
+
+        // stop clean up thread
+        this.stop = true;
+        this.clenupThread.interrupt();
+
+        // stop producer up thread
+        this.producerThread.interrupt();
+
+        // close all connection
+        closeConnections(availableConnections);
+        availableConnections = new Stack<Connection>();
+        closeConnections(busyConnections);
+        busyConnections = new Stack<Connection>();
+        lastAccessTimeRecord.clear();
+
+        logger.info("All connection is closed");
+
+        try {
+            this.clenupThread.join();
+            this.producerThread.join();
+        } catch (Exception e) {
+            logger.error("Cannot shutdown cleanup thread", e);
+        }
+
+        logger.info("Connection Pool Shutdown");
+    }
+
+    private void closeConnections(Stack<Connection> connections) {
+        while (!connections.isEmpty()) {
+            Connection connection = connections.pop();
+            try {
+                if (!connection.isClosed()) {
+                    connection.close();
+                }
+            } catch (SQLException sqle) {
+                // Ignore errors; garbage collect anyhow
+                logger.warn(sqle.getMessage());
+            }
+        }
+    }
+
+    public synchronized String toString() {
+        String info = "ConnectionPool(" + url + "," + username + ")" + ", available=" + availableConnections.size()
+                + ", busy=" + busyConnections.size() + ", max=" + maxConnections;
+        return (info);
+    }
+
+    class CleanUpThread implements Runnable {
+        public void run() {
+            while (!stop) {
+                try {
+                    Thread.sleep(MAX_IDLE_TIME);
+                    closeStaleConnections();
+                } catch (InterruptedException e) {
+                    logger.info("Clean up thread is interrupted to close");
+                }
+            }
+        }
+    }
+
+    class FillUpThread implements Runnable {
+        public void run() {
+            while (!stop) {
+                try {
+                    // block until get
+                    needConnection.acquire();
+
+                    Connection conn = makeNewConnection();
+                    fillUpConnection(conn);
+                } catch (SQLException e) {
+                    // cannot create connection (increase semaphore value back)
+                    needConnection.release();
+                    logger.error(e.getMessage(), e);
+                } catch (InterruptedException e) {
+                    logger.info("Fill up thread is interrupted to close");
+                    break;
+                }
+            }
+        }
+    }
+
+    public void shutdown() throws SQLException{
+        for (Connection c : availableConnections) {
+            try {
+                c.close();
+            } catch (SQLException e) {
+                logger.error("Error while closing the connection", e);
+                throw new SQLException("Error while closing the connection", e);
+            }
+        }
+
+        for (Connection c : busyConnections) {
+            try {
+                c.close();
+            } catch (SQLException e) {
+                logger.error("Error while closing the connection", e);
+                throw new SQLException("Error while closing the connection", e);
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
new file mode 100644
index 0000000..387e0e5
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
@@ -0,0 +1,101 @@
+/*
+ *
+ * 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 = 1000;
+
+    public static class DomainTable {
+        public static String DOMAIN_ID = "domainId";
+        public static String NAME = "name";
+        public static String DESCRIPTION = "description";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
+    }
+
+    public static class UserTable {
+        public static String USER_ID = "userId";
+        public static String DOMAIN_ID = "domainId";
+        public static String USER_NAME = "userName";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
+    }
+
+    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 final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
+    }
+
+    public static class GroupMembershipTable {
+        public static String PARENT_ID = "parentId";
+        public static String CHILD_ID = "childId";
+        public static String CHILD_TYPE = "childType";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
+    }
+
+    public static class EntityTypeTable {
+        public static String ENTITY_TYPE_ID = "entityTypeId";
+        public static String DOMAIN_ID = "domainId";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
+    }
+
+    public static class PermissionTypeTable {
+        public static String ENTITY_TYPE_ID = "permissionTypeId";
+        public static String DOMAIN_ID = "domainId";
+        public static String NAME = "name";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
+    }
+
+    public static class EntityTable {
+        public static String ENTITY_ID = "entityId";
+        public static String PARENT_ENTITY_ID = "parentEntityId";
+        public static String ENTITY_TYPE_ID = "entityTypeId";
+        public static String NAME = "name";
+        public static String DESCRIPTION = "description";
+        public static String FULL_TEXT = "fullText";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
+    }
+
+    public static class SharingTable {
+        public static String PERMISSION_TYPE_ID = "permissionTypeId";
+        public static String ENTITY_ID = "entityId";
+        public static String GROUP_ID = "groupId";
+        public static String INHERITED_PARENT_ID = "inheritedParentId";
+        public static final String SHARING_TYPE = "sharingType";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DatabaseCreator.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DatabaseCreator.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DatabaseCreator.java
new file mode 100644
index 0000000..5aa423c
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DatabaseCreator.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.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+/**
+ * This class creates the database tables required for airavata with default configuration this
+ * class creates derby database in server mode. User can specify required database in appropriate
+ * properties files.
+ */
+public class DatabaseCreator {
+    private final static Logger logger = LoggerFactory.getLogger(DatabaseCreator.class);
+
+    public enum DatabaseType {
+        derby("(?i).*derby.*"), mysql("(?i).*mysql.*"), other("");
+
+        private String pattern;
+
+        private DatabaseType(String matchingPattern) {
+            this.pattern = matchingPattern;
+        }
+
+        public String getMatchingPattern() {
+            return this.pattern;
+        }
+    }
+
+    private static DatabaseType[] supportedDatabase = new DatabaseType[] { DatabaseType.derby, DatabaseType.mysql };
+
+    private static Logger log = LoggerFactory.getLogger(DatabaseCreator.class);
+    private static final String delimiter = ";";
+
+    /**
+     * Creates database
+     *
+     * @throws Exception
+     */
+    public static void createRegistryDatabase(String prefix, Connection conn) throws Exception {
+        createDatabase(prefix, conn);
+    }
+
+
+
+    /**
+     * Checks whether database tables are created by using select * on given table name
+     *
+     * @param tableName
+     *            Table which should be existed
+     * @return <code>true</core> if checkSQL is success, else <code>false</code> .
+     */
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+
+            log.debug("Running a query to test the database tables existence.");
+
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * executes given sql
+     *
+     * @param sql
+     * @throws Exception
+     */
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            log.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            log.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                log.info(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                log.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    log.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    /**
+     * computes relatational database type using database name
+     *
+     * @return DatabaseType
+     * @throws Exception
+     *
+     */
+    public static DatabaseType getDatabaseType(Connection conn) throws Exception {
+        try {
+            if (conn != null && (!conn.isClosed())) {
+                DatabaseMetaData metaData = conn.getMetaData();
+                String databaseProductName = metaData.getDatabaseProductName();
+                return checkType(databaseProductName);
+            }
+        } catch (SQLException e) {
+            String msg = "Failed to create Airavata database." + e.getMessage();
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+        return DatabaseType.other;
+    }
+
+    /**
+     * Overloaded method with String input
+     *
+     * @return DatabaseType
+     * @throws Exception
+     *
+     */
+    public static DatabaseType getDatabaseType(String dbUrl) throws Exception {
+        return checkType(dbUrl);
+    }
+
+    private static DatabaseType checkType(String text) throws Exception {
+        try {
+            if (text != null) {
+                for (DatabaseType type : supportedDatabase) {
+                    if (text.matches(type.getMatchingPattern()))
+                        return type;
+                }
+            }
+            String msg = "Unsupported database: " + text
+                    + ". Database will not be created automatically by the Airavata. "
+                    + "Please create the database using appropriate database scripts for " + "the database.";
+            throw new Exception(msg);
+
+        } catch (SQLException e) {
+            String msg = "Failed to create Airavatadatabase." + e.getMessage();
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+    }
+
+    /**
+     * Get scripts location which is prefix + "-" + databaseType + ".sql"
+     *
+     * @param prefix
+     * @param databaseType
+     * @return script location
+     */
+    private static String getScriptLocation(String prefix, DatabaseType databaseType) {
+        String scriptName = prefix + "-" + databaseType + ".sql";
+        log.debug("Loading database script from :" + scriptName);
+        return  scriptName;
+    }
+
+    private static void createDatabase(String prefix, Connection conn) throws Exception {
+        Statement statement = null;
+        try {
+            conn.setAutoCommit(false);
+            statement = conn.createStatement();
+            executeSQLScript(getScriptLocation(prefix, DatabaseCreator.getDatabaseType(conn)), conn);
+            conn.commit();
+            log.debug("Tables are created successfully.");
+        } catch (SQLException e) {
+            String msg = "Failed to create database tables for Airavata resource store. " + e.getMessage();
+            log.error(msg, e);
+            conn.rollback();
+            throw new Exception(msg, e);
+        } finally {
+            conn.setAutoCommit(true);
+            try {
+                if (statement != null) {
+                    statement.close();
+                }
+            } catch (SQLException e) {
+                log.error("Failed to close statement.", e);
+            }
+        }
+    }
+
+    private static void executeSQLScript(String dbscriptName, Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+
+        try {
+            InputStream is = DatabaseCreator.class.getClassLoader().getResourceAsStream(dbscriptName);
+            if(is == null) {
+                logger.info("Script file not found at " + dbscriptName + ". Uses default database script file");
+                DatabaseType databaseType = DatabaseCreator.getDatabaseType(conn);
+                if(databaseType.equals(DatabaseType.derby)){
+                    is = DatabaseCreator.class.getClassLoader().getResourceAsStream("experiment-derby.sql");
+                }else if(databaseType.equals(DatabaseType.mysql)){
+                    is = DatabaseCreator.class.getClassLoader().getResourceAsStream("experiment-mysql.sql");
+                }
+            }
+            reader = new BufferedReader(new InputStreamReader(is));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                line = line.trim();
+                if (line.startsWith("//")) {
+                    continue;
+                }
+                if (line.startsWith("--")) {
+                    continue;
+                }
+                StringTokenizer st = new StringTokenizer(line);
+                if (st.hasMoreTokens()) {
+                    String token = st.nextToken();
+                    if ("REM".equalsIgnoreCase(token)) {
+                        continue;
+                    }
+                }
+                sql.append(" ").append(line);
+
+                // SQL defines "--" as a comment to EOL
+                // and in Oracle it may contain a hint
+                // so we cannot just remove it, instead we must end it
+                if (line.indexOf("--") >= 0) {
+                    sql.append("\n");
+                }
+                if ((checkStringBufferEndsWith(sql, delimiter))) {
+                    executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                    sql.replace(0, sql.length(), "");
+                }
+            }
+            // Catch any statements not followed by ;
+            if (sql.length() > 0) {
+                executeSQL(sql.toString(), conn);
+            }
+        } catch (IOException e) {
+            log.error("Error occurred while executing SQL script for creating Airavata database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+
+        } finally {
+            if (reader != null) {
+                reader.close();
+            }
+        }
+    }
+
+    /**
+     * Checks that a string buffer ends up with a given string. It may sound trivial with the existing JDK API but the
+     * various implementation among JDKs can make those methods extremely resource intensive and perform poorly due to
+     * massive memory allocation and copying. See
+     *
+     * @param buffer
+     *            the buffer to perform the check on
+     * @param suffix
+     *            the suffix
+     * @return <code>true</code> if the character sequence represented by the argument is a suffix of the character
+     *         sequence represented by the StringBuffer object; <code>false</code> otherwise. Note that the result will
+     *         be <code>true</code> if the argument is the empty string.
+     */
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
new file mode 100644
index 0000000..f879c15
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
@@ -0,0 +1,230 @@
+/*
+ *
+ * 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.SharingRegistryException;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.*;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URI;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class JPAUtils {
+    private final static Logger logger = LoggerFactory.getLogger(JPAUtils.class);
+
+    public static final String PERSISTENCE_UNIT_NAME = "airavata-sharing-registry";
+    public static final String SHARING_REG_JDBC_DRIVER = "sharingcatalog.jdbc.driver";
+    public static final String SHARING_REG_JDBC_URL = "sharingcatalog.jdbc.url";
+    public static final String SHARING_REG_JDBC_USER = "sharingcatalog.jdbc.user";
+    public static final String SHARING_REG_JDBC_PWD = "sharingcatalog.jdbc.password";
+    public static final String SHARING_REG_VALIDATION_QUERY = "sharingcatalog.validationQuery";
+    public static final String JPA_CACHE_SIZE = "jpa.cache.size";
+    public static final String JPA_CACHE_ENABLED = "cache.enable";
+
+    public static final String CONFIGURATION = "CONFIGURATION";
+    public static final String START_DERBY_ENABLE = "start.derby.server.mode";
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    private static NetworkServerControl server;
+    private static JdbcStorage db;
+    private static String jdbcURl;
+    private static String jdbcDriver;
+    private static String jdbcUser;
+    private static String jdbcPassword;
+
+
+    @PersistenceUnit(unitName = PERSISTENCE_UNIT_NAME)
+    protected static EntityManagerFactory factory;
+    @PersistenceContext(unitName = PERSISTENCE_UNIT_NAME)
+    private static EntityManager entityManager;
+
+    public static EntityManager getEntityManager() throws SharingRegistryException {
+        if (factory == null) {
+            String connectionProperties = "DriverClassName=" + readServerProperties(SHARING_REG_JDBC_DRIVER) + "," +
+                    "Url=" + readServerProperties(SHARING_REG_JDBC_URL) + "?autoReconnect=true," +
+                    "Username=" + readServerProperties(SHARING_REG_JDBC_USER) + "," +
+                    "Password=" + readServerProperties(SHARING_REG_JDBC_PWD) +
+                    ",validationQuery=" + readServerProperties(SHARING_REG_VALIDATION_QUERY);
+//
+
+//            String connectionProperties = "DriverClassName=com.mysql.jdbc.Driver," +
+//                    "Url=jdbc:mysql://localhost:3306/airavata_sharing_catalog?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;
+    }
+
+    public static <R> R execute(Committer<EntityManager, R> committer) throws SharingRegistryException {
+        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();
+            }
+        }
+    }
+
+    public static void initializeDB() throws SharingRegistryException {
+        jdbcDriver = readServerProperties(SHARING_REG_JDBC_DRIVER);
+        jdbcURl = readServerProperties(SHARING_REG_JDBC_URL);
+        jdbcUser = readServerProperties(SHARING_REG_JDBC_USER);
+        jdbcPassword = readServerProperties(SHARING_REG_JDBC_PWD);
+        jdbcURl = jdbcURl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+
+        if (getDBType(jdbcURl).equals("derby") && isDerbyStartEnabled()) {
+            startDerbyInServerMode();
+        }
+        db = new JdbcStorage(10, 50, jdbcURl, jdbcDriver, true);
+
+        Connection conn = null;
+        try {
+            conn = db.connect();
+            if (!DatabaseCreator.isDatabaseStructureCreated(CONFIGURATION, conn)) {
+                DatabaseCreator.createRegistryDatabase("database_scripts/sharing-registry", conn);
+                logger.info("New Database created for Sharing Catalog !!! ");
+            } else {
+                logger.info("Database already created for Sharing Catalog !!!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            db.closeConnection(conn);
+            try {
+                if(conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error("Error while closing database connection...", e.getMessage(), e);
+            }
+        }
+    }
+
+    public static String getDBType(String jdbcUrl){
+        try{
+            String cleanURI = jdbcUrl.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getScheme();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return null;
+        }
+    }
+
+    public static boolean isDerbyStartEnabled(){
+        try {
+            String s = ServerSettings.getSetting(START_DERBY_ENABLE);
+            if("true".equals(s)){
+                return true;
+            }
+        }  catch (ApplicationSettingsException e) {
+            logger.error("Unable to read airavata server properties", e.getMessage(), e);
+            return false;
+        }
+        return false;
+    }
+
+    public static void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
+                    getPort(jdbcURl),
+                    jdbcUser, jdbcPassword);
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+    }
+
+    public static void stopDerbyInServerMode() {
+        System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "false");
+        if (server!=null){
+            try {
+                server.shutdown();
+            } catch (Exception e) {
+                logger.error("Error when stopping the derby server : "+e.getLocalizedMessage());
+            }
+        }
+    }
+
+    public static int getPort(String jdbcURL){
+        try{
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getPort();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return -1;
+        }
+    }
+
+    public static String readServerProperties(String propertyName) throws SharingRegistryException {
+        try {
+            return ServerSettings.getSetting(propertyName);
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read airavata-server.properties...", e);
+            throw new SharingRegistryException("Unable to read airavata-server.properties...");
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/JdbcStorage.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/JdbcStorage.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/JdbcStorage.java
new file mode 100644
index 0000000..377c50b
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/JdbcStorage.java
@@ -0,0 +1,175 @@
+/*
+ *
+ * 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;
+
+import java.sql.*;
+
+public class JdbcStorage {
+    private static Logger log = LoggerFactory.getLogger(JdbcStorage.class);
+
+    private ConnectionPool connectionPool;
+
+    public JdbcStorage(String jdbcUrl, String jdbcDriver) {
+        // default init connection and max connection
+        this(3, 50, jdbcUrl, jdbcDriver, true);
+    }
+
+    public JdbcStorage(int initCon, int maxCon, String url, String driver, boolean enableTransactions) {
+        try {
+            if (enableTransactions) {
+                connectionPool = new ConnectionPool(driver, url, initCon, maxCon, true, false,
+                        Connection.TRANSACTION_SERIALIZABLE);
+            } else {
+                connectionPool = new ConnectionPool(driver, url, initCon, maxCon, true);
+            }
+        } catch (Exception e) {
+            throw new RuntimeException("Failed to create database connection pool.", e);
+        }
+    }
+
+    /**
+     * Check if this connection pool is auto commit or not
+     *
+     * @return
+     */
+    public boolean isAutoCommit() {
+        return connectionPool.isAutoCommit();
+    }
+
+    public void commit(Connection conn) {
+        try {
+            if (conn != null && !conn.getAutoCommit()) {
+                conn.commit();
+            }
+        } catch (SQLException sqle) {
+            log.error("Cannot commit data", sqle);
+        }
+    }
+
+    public void commitAndFree(Connection conn) {
+        commit(conn);
+        closeConnection(conn);
+    }
+
+    public void rollback(Connection conn) {
+        try {
+            if (conn != null && !conn.getAutoCommit()) {
+                conn.rollback();
+            }
+        } catch (SQLException sqle) {
+            log.error("Cannot Rollback data", sqle);
+        }
+    }
+
+    public void rollbackAndFree(Connection conn) {
+        rollback(conn);
+        closeConnection(conn);
+    }
+
+    public Connection connect() {
+
+        Connection conn = null;
+        try {
+            conn = connectionPool.getConnection();
+        } catch (SQLException e) {
+            log.error(e.getMessage(), e);
+        }
+        return conn;
+    }
+
+    /**
+     * This method is provided so that you can have better control over the statement. For example: You can use
+     * stmt.setString to convert quotation mark automatically in an UPDATE statement
+     *
+     * NOTE: Statement is closed after execution
+     */
+    public int executeUpdateAndClose(PreparedStatement stmt) throws SQLException {
+        int rows = 0;
+        try {
+            rows = stmt.executeUpdate();
+            if (rows == 0) {
+                log.info("Problem: 0 rows affected by insert/update/delete statement.");
+            }
+        } finally {
+            stmt.close();
+        }
+        return rows;
+    }
+
+    public int countRow(String tableName, String columnName) throws SQLException {
+        String query = new String("SELECT COUNT(" + columnName + ") FROM " + tableName);
+        int count = -1;
+        Connection conn = null;
+        PreparedStatement stmt = null;
+        try {
+            conn = connectionPool.getConnection();
+            stmt = conn.prepareStatement(query);
+            ResultSet rs = stmt.executeQuery();
+            rs.next();
+            count = rs.getInt(1);
+            commit(conn);
+        } catch (SQLException sql) {
+            rollback(conn);
+            throw sql;
+        } finally {
+            try {
+                if (stmt != null && !stmt.isClosed()) {
+                    stmt.close();
+                }
+            } finally {
+                closeConnection(conn);
+            }
+        }
+        return count;
+    }
+
+    public void quietlyClose(Connection conn, Statement... stmts) {
+        if (stmts != null) {
+            for (Statement stmt : stmts) {
+                try {
+                    if (stmt != null && !stmt.isClosed()) {
+                        stmt.close();
+                    }
+                } catch (SQLException sql) {
+                    log.error(sql.getMessage(), sql);
+                }
+            }
+        }
+        closeConnection(conn);
+    }
+
+    public void closeConnection(Connection conn) {
+        if (conn != null) {
+            connectionPool.free(conn);
+        }
+    }
+
+    public void closeAllConnections() {
+        if (connectionPool != null)
+            connectionPool.dispose();
+    }
+
+    public void shutdown() throws SQLException {
+        connectionPool.shutdown();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java
new file mode 100644
index 0000000..de6bea9
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
new file mode 100644
index 0000000..96fdb90
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.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.sharing.registry.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SharingRegistryServer {
+    private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServer.class);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
new file mode 100644
index 0000000..7f2eb32
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -0,0 +1,613 @@
+/*
+ *
+ * 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.common.exception.ApplicationSettingsException;
+import org.apache.airavata.sharing.registry.db.entities.GroupMembershipEntityPK;
+import org.apache.airavata.sharing.registry.db.entities.SharingEntityPK;
+import 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.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.lang.reflect.Field;
+import java.util.*;
+
+public class SharingRegistryServerHandler implements GovRegistryService.Iface{
+    private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServerHandler.class);
+
+    public static String GLOBAL_PERMISSION_NAME = "OWNER";
+
+    private DomainRepository domainRepository;
+    private UserRepository userRepository;
+    private UserGroupRepository userGroupRepository;
+    private GroupMembershipRepository groupMembershipRepository;
+    private EntityTypeRepository entityTypeRepository;
+    private PermissionTypeRepository permissionTypeRepository;
+    private EntityRepository entityRepository;
+    private SharingRepository sharingRepository;
+
+    public SharingRegistryServerHandler() throws ApplicationSettingsException, TException {
+        JPAUtils.initializeDB();
+
+        this.domainRepository = new DomainRepository();
+        this.userRepository = new UserRepository();
+        this.userGroupRepository = new UserGroupRepository();
+        this.groupMembershipRepository = new GroupMembershipRepository();
+        this.entityTypeRepository = new EntityTypeRepository();
+        this.permissionTypeRepository = new PermissionTypeRepository();
+        this.entityRepository = new EntityRepository();
+        this.sharingRepository = new SharingRepository();
+    }
+
+    /**
+     * * Domain Operations
+     * *
+     */
+    @Override
+    public String createDomain(Domain domain) throws SharingRegistryException, TException {
+        if(domainRepository.get(domain.domainId) != null)
+            throw new SharingRegistryException("There exist domain with given domain id");
+
+        domain.setCreatedTime(System.currentTimeMillis());
+        domain.setUpdatedTime(System.currentTimeMillis());
+        domainRepository.create(domain);
+
+        //create the global permission for the domain
+        PermissionType permissionType = new PermissionType();
+        permissionType.setPermissionTypeId(domain.domainId+":"+GLOBAL_PERMISSION_NAME);
+        permissionType.setDomainId(domain.domainId);
+        permissionType.setName(GLOBAL_PERMISSION_NAME);
+        permissionType.setDescription("GLOBAL permission to " + domain.domainId);
+        permissionType.setCreatedTime(System.currentTimeMillis());
+        permissionType.setUpdatedTime(System.currentTimeMillis());
+        permissionTypeRepository.create(permissionType);
+
+        return domain.domainId;
+    }
+
+    @Override
+    public boolean updateDomain(Domain domain) throws SharingRegistryException, TException {
+        Domain oldDomain = domainRepository.get(domain.domainId);
+        domain.setCreatedTime(oldDomain.createdTime);
+        domain.setUpdatedTime(System.currentTimeMillis());
+        domain = getUpdatedObject(oldDomain, domain);
+        domainRepository.update(domain);
+        return true;
+    }
+
+    @Override
+    public boolean deleteDomain(String domainId) throws SharingRegistryException, TException {
+        domainRepository.delete(domainId);
+        return true;
+    }
+
+    @Override
+    public Domain getDomain(String domainId) throws SharingRegistryException, TException {
+        return domainRepository.get(domainId);
+    }
+
+    @Override
+    public List<Domain> getDomains(int offset, int limit) throws TException {
+        return domainRepository.select(new HashMap<>(), offset, limit);
+    }
+
+    /**
+     * * User Operations
+     * *
+     */
+    @Override
+    public String createUser(User user) throws SharingRegistryException, TException {
+        if(userRepository.get(user.userId) != null)
+            throw new SharingRegistryException("There exist user with given user id");
+
+        user.setCreatedTime(System.currentTimeMillis());
+        user.setUpdatedTime(System.currentTimeMillis());
+        userRepository.create(user);
+
+        UserGroup userGroup = new UserGroup();
+        userGroup.setGroupId(user.userId);
+        userGroup.setDomainId(user.domainId);
+        userGroup.setName(user.userName);
+        userGroup.setDescription("user " + user.userName + " group");
+        userGroup.setOwnerId(user.userId);
+        userGroup.setGroupType(GroupType.SINGLE_USER);
+        createGroup(userGroup);
+
+        return user.userId;
+    }
+
+    @Override
+    public boolean updatedUser(User user) throws SharingRegistryException, TException {
+        User oldUser = userRepository.get(user.userId);
+        user.setCreatedTime(oldUser.createdTime);
+        user.setUpdatedTime(System.currentTimeMillis());
+        user = getUpdatedObject(oldUser, user);
+        userRepository.update(user);
+
+        UserGroup userGroup = userGroupRepository.get(user.userId);
+        userGroup.setName(user.userName);
+        userGroup.setDescription("user " + user.userName + " group");
+        updateGroup(userGroup);
+        return true;
+    }
+
+    @Override
+    public boolean deleteUser(String userId) throws SharingRegistryException, TException {
+        userRepository.delete(userId);
+        userGroupRepository.delete(userId);
+        return true;
+    }
+
+    @Override
+    public User getUser(String userId) throws SharingRegistryException, TException {
+        return userRepository.get(userId);
+    }
+
+    @Override
+    public List<User> getUsers(String domain, int offset, int limit) throws SharingRegistryException, TException {
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.UserTable.DOMAIN_ID, domain);
+        return userRepository.select(filters, offset, limit);
+    }
+
+    /**
+     * * Group Operations
+     * *
+     */
+    @Override
+    public String createGroup(UserGroup group) throws SharingRegistryException, TException {
+        if(userGroupRepository.get(group.groupId) != null)
+            throw new SharingRegistryException("There exist group with given group id");
+
+        group.setCreatedTime(System.currentTimeMillis());
+        group.setUpdatedTime(System.currentTimeMillis());
+        userGroupRepository.create(group);
+        return group.groupId;
+    }
+
+    @Override
+    public boolean updateGroup(UserGroup group) throws SharingRegistryException, TException {
+        group.setUpdatedTime(System.currentTimeMillis());
+        UserGroup oldGroup = userGroupRepository.get(group.groupId);
+        group.setCreatedTime(oldGroup.createdTime);
+        group = getUpdatedObject(oldGroup, group);
+        userGroupRepository.update(group);
+        return true;
+    }
+
+    @Override
+    public boolean deleteGroup(String groupId) throws SharingRegistryException, TException {
+        userGroupRepository.delete(groupId);
+        return true;
+    }
+
+    @Override
+    public UserGroup getGroup(String groupId) throws SharingRegistryException, TException {
+        return userGroupRepository.get(groupId);
+    }
+
+    @Override
+    public List<UserGroup> getGroups(String domain, int offset, int limit) throws TException {
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.UserTable.DOMAIN_ID, domain);
+        return userGroupRepository.select(filters, offset, limit);
+    }
+
+    @Override
+    public boolean addUsersToGroup(List<String> userIds, String groupId) throws SharingRegistryException, TException {
+        for(int i=0; i < userIds.size(); i++){
+            GroupMembership groupMembership = new GroupMembership();
+            groupMembership.setParentId(groupId);
+            groupMembership.setChildId(userIds.get(i));
+            groupMembership.setChildType(GroupChildType.USER);
+            groupMembership.setCreatedTime(System.currentTimeMillis());
+            groupMembership.setUpdatedTime(System.currentTimeMillis());
+            groupMembershipRepository.create(groupMembership);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws SharingRegistryException, TException {
+        for(int i=0; i < userIds.size(); i++){
+            GroupMembershipEntityPK groupMembershipEntityPK = new GroupMembershipEntityPK();
+            groupMembershipEntityPK.setParentId(groupId);
+            groupMembershipEntityPK.setChildId(userIds.get(i));
+            groupMembershipRepository.delete(groupMembershipEntityPK);
+        }
+        return true;
+    }
+
+    @Override
+    public Map<String, GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws SharingRegistryException, TException {
+        HashMap<String, GroupChildType> groupMembers = new HashMap<>();
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.GroupMembershipTable.PARENT_ID, groupId);
+        List<GroupMembership> groupMembershipList = groupMembershipRepository.select(filters, 0, -1);
+        groupMembershipList.stream().forEach(gm->{groupMembers.put(gm.getChildId(), gm.getChildType());});
+        return groupMembers;
+    }
+
+    @Override
+    public boolean addChildGroupToParentGroup(String childId, String groupId) throws SharingRegistryException, TException {
+        //Todo check for cyclic dependencies
+        GroupMembership groupMembership = new GroupMembership();
+        groupMembership.setParentId(groupId);
+        groupMembership.setChildId(childId);
+        groupMembership.setChildType(GroupChildType.GROUP);
+        groupMembership.setCreatedTime(System.currentTimeMillis());
+        groupMembership.setUpdatedTime(System.currentTimeMillis());
+        groupMembershipRepository.create(groupMembership);
+        return true;
+    }
+
+    @Override
+    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws SharingRegistryException, TException {
+        GroupMembershipEntityPK groupMembershipEntityPK = new GroupMembershipEntityPK();
+        groupMembershipEntityPK.setParentId(groupId);
+        groupMembershipEntityPK.setChildId(childId);
+        groupMembershipRepository.delete(groupMembershipEntityPK);
+        return true;
+    }
+
+    /**
+     * * EntityType Operations
+     * *
+     */
+    @Override
+    public String createEntityType(EntityType entityType) throws SharingRegistryException, TException {
+        if(entityTypeRepository.get(entityType.entityTypeId) != null)
+            throw new SharingRegistryException("There exist EntityType with given EntityType id");
+
+        entityType.setCreatedTime(System.currentTimeMillis());
+        entityType.setUpdatedTime(System.currentTimeMillis());
+        entityTypeRepository.create(entityType);
+        return entityType.entityTypeId;
+    }
+
+    @Override
+    public boolean updateEntityType(EntityType entityType) throws SharingRegistryException, TException {
+        entityType.setUpdatedTime(System.currentTimeMillis());
+        EntityType oldEntityType = entityTypeRepository.get(entityType.entityTypeId);
+        entityType.setCreatedTime(oldEntityType.createdTime);
+        entityType = getUpdatedObject(oldEntityType, entityType);
+        entityTypeRepository.update(entityType);
+        return true;
+    }
+
+    @Override
+    public boolean deleteEntityType(String entityTypeId) throws SharingRegistryException, TException {
+        entityTypeRepository.delete(entityTypeId);
+        return true;
+    }
+
+    @Override
+    public EntityType getEntityType(String entityTypeId) throws SharingRegistryException, TException {
+        return entityTypeRepository.get(entityTypeId);
+    }
+
+    @Override
+    public List<EntityType> getEntityTypes(String domain, int offset, int limit) throws TException {
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.EntityTypeTable.DOMAIN_ID, domain);
+        return entityTypeRepository.select(domain, offset, limit);
+    }
+
+    /**
+     * * Permission Operations
+     * *
+     */
+    @Override
+    public String createPermissionType(PermissionType permissionType) throws SharingRegistryException, TException {
+        if(permissionTypeRepository.get(permissionType.permissionTypeId) != null)
+            throw new SharingRegistryException("There exist PermissionType with given PermissionType id");
+        permissionType.setCreatedTime(System.currentTimeMillis());
+        permissionType.setUpdatedTime(System.currentTimeMillis());
+        permissionTypeRepository.create(permissionType);
+        return permissionType.permissionTypeId;
+    }
+
+    @Override
+    public boolean updatePermissionType(PermissionType permissionType) throws SharingRegistryException, TException {
+        permissionType.setUpdatedTime(System.currentTimeMillis());
+        PermissionType oldPermissionType = permissionTypeRepository.get(permissionType.permissionTypeId);
+        permissionType = getUpdatedObject(oldPermissionType, permissionType);
+        permissionTypeRepository.update(permissionType);
+        return true;
+    }
+
+    @Override
+    public boolean deletePermissionType(String entityTypeId) throws SharingRegistryException, TException {
+        permissionTypeRepository.delete(entityTypeId);
+        return true;
+    }
+
+    @Override
+    public PermissionType getPermissionType(String permissionTypeId) throws SharingRegistryException, TException {
+        return permissionTypeRepository.get(permissionTypeId);
+    }
+
+    @Override
+    public List<PermissionType> getPermissionTypes(String domain, int offset, int limit) throws SharingRegistryException, TException {
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.PermissionTypeTable.DOMAIN_ID, domain);
+        return permissionTypeRepository.select(filters, offset, limit);
+    }
+
+    /**
+     * * Entity Operations
+     * *
+     */
+    @Override
+    public String createEntity(Entity entity) throws SharingRegistryException, TException {
+        if(entityRepository.get(entity.entityId) != null)
+            throw new SharingRegistryException("There exist Entity with given Entity id");
+
+        if(!userRepository.isExists(entity.getOwnerId())){
+            User user = new User();
+            user.setUserId(entity.getOwnerId());
+            user.setDomainId(entity.domainId);
+            user.setUserName(user.userId.split("@")[0]);
+
+            createUser(user);
+        }
+
+        entity.setCreatedTime(System.currentTimeMillis());
+        entity.setUpdatedTime(System.currentTimeMillis());
+        entityRepository.create(entity);
+
+        //Assigning global permission for the owner
+        Sharing newSharing = new Sharing();
+        newSharing.setPermissionTypeId(permissionTypeRepository.getGlobalPermissionTypeIdForDomain(entity.domainId));
+        newSharing.setEntityId(entity.entityId);
+        newSharing.setGroupId(entity.ownerId);
+        newSharing.setSharingType(SharingType.DIRECT_CASCADING);
+        newSharing.setInheritedParentId(entity.entityId);
+        newSharing.setCreatedTime(System.currentTimeMillis());
+        newSharing.setUpdatedTime(System.currentTimeMillis());
+
+        sharingRepository.create(newSharing);
+
+        //creating records for inherited permissions
+        if(entity.getParentEntityId() != null && entity.getParentEntityId() != ""){
+            List<Sharing> sharings = sharingRepository.getCascadingPermissionsForEntity(entity.parentEntityId);
+            for(Sharing sharing : sharings){
+                newSharing = new Sharing();
+                newSharing.setPermissionTypeId(sharing.permissionTypeId);
+                newSharing.setEntityId(entity.entityId);
+                newSharing.setGroupId(sharing.groupId);
+                newSharing.setInheritedParentId(sharing.inheritedParentId);
+                newSharing.setSharingType(SharingType.INDIRECT_CASCADING);
+                newSharing.setCreatedTime(System.currentTimeMillis());
+                newSharing.setUpdatedTime(System.currentTimeMillis());
+
+                sharingRepository.create(newSharing);
+            }
+        }
+
+        return entity.entityId;
+    }
+
+    @Override
+    public boolean updateEntity(Entity entity) throws SharingRegistryException, TException {
+        //TODO Check for permission changes
+        entity.setUpdatedTime(System.currentTimeMillis());
+        Entity oldEntity = entityRepository.get(entity.getEntityId());
+        entity.setCreatedTime(oldEntity.createdTime);
+        entity = getUpdatedObject(oldEntity, entity);
+        entityRepository.update(entity);
+        return true;
+    }
+
+    @Override
+    public boolean deleteEntity(String entityId) throws SharingRegistryException, TException {
+        //TODO Check for permission changes
+        entityRepository.delete(entityId);
+        return true;
+    }
+
+    @Override
+    public Entity getEntity(String entityId) throws SharingRegistryException, TException {
+        return entityRepository.get(entityId);
+    }
+
+    @Override
+    public List<Entity> searchEntities(String userId, String entityTypeId, List<SearchCriteria> filters,
+                                       int offset, int limit) throws SharingRegistryException, TException {
+        List<String> groupIds = new ArrayList<>();
+        groupIds.add(userId);
+        groupMembershipRepository.getAllParentMembershipsForChild(userId).stream().forEach(gm->groupIds.add(gm.parentId));
+        return entityRepository.searchEntities(groupIds, entityTypeId, filters, offset, limit);
+    }
+
+    @Override
+    public List<User> getListOfSharedUsers(String entityId, String permissionTypeId) throws SharingRegistryException, TException {
+        return userRepository.getAccessibleUsers(entityId, permissionTypeId);
+    }
+
+    @Override
+    public List<UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws SharingRegistryException, TException {
+        return userGroupRepository.getAccessibleGroups(entityId, permissionTypeId);
+    }
+
+    /**
+     * * Sharing Entity with Users and Groups
+     * *
+     *
+     * @param entityId
+     * @param userList
+     * @param permissionType
+     */
+    @Override
+    public boolean shareEntityWithUsers(String entityId, List<String> userList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
+        return shareEntity(entityId, userList, permissionTypeId, GroupType.SINGLE_USER, cascadePermission);
+    }
+
+    @Override
+    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
+        return shareEntity(entityId, groupList, permissionTypeId, GroupType.MULTI_USER, cascadePermission);
+    }
+
+    private boolean shareEntity(String entityId, List<String> groupOrUserList, String permissionTypeId, GroupType groupType, boolean cascadePermission)  throws SharingRegistryException, TException {
+        //Adding permission for the specified users/groups for the specified entity
+        LinkedList<Entity> temp = new LinkedList<>();
+        for(String userId : groupOrUserList){
+            Sharing sharing = new Sharing();
+            sharing.setPermissionTypeId(permissionTypeId);
+            sharing.setEntityId(entityId);
+            sharing.setGroupId(userId);
+            sharing.setInheritedParentId(entityId);
+            if(cascadePermission) {
+                sharing.setSharingType(SharingType.DIRECT_CASCADING);
+            }else {
+                sharing.setSharingType(SharingType.DIRECT_NON_CASCADING);
+            }
+            sharing.setCreatedTime(System.currentTimeMillis());
+            sharing.setUpdatedTime(System.currentTimeMillis());
+
+            sharingRepository.create(sharing);
+        }
+
+        if(cascadePermission){
+            //Adding permission for the specified users/groups for all child entities
+            entityRepository.getChildEntities(entityId).stream().forEach(e-> temp.addLast(e));
+            while(temp.size() > 0){
+                Entity entity = temp.pop();
+                String childEntityId = entity.entityId;
+                for(String userId : groupOrUserList){
+                    Sharing sharing = new Sharing();
+                    sharing.setPermissionTypeId(permissionTypeId);
+                    sharing.setEntityId(childEntityId);
+                    sharing.setGroupId(userId);
+                    sharing.setInheritedParentId(entityId);
+                    sharing.setSharingType(SharingType.INDIRECT_CASCADING);
+                    sharing.setInheritedParentId(entityId);
+                    sharing.setCreatedTime(System.currentTimeMillis());
+                    sharing.setUpdatedTime(System.currentTimeMillis());
+                    sharingRepository.create(sharing);
+                    entityRepository.getChildEntities(childEntityId).stream().forEach(e-> temp.addLast(e));
+                }
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String permissionTypeId) throws SharingRegistryException, TException {
+        return revokeEntitySharing(entityId, userList, permissionTypeId);
+    }
+
+
+    @Override
+    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String permissionTypeId) throws SharingRegistryException, TException {
+        return revokeEntitySharing(entityId, groupList, permissionTypeId);
+    }
+
+    @Override
+    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws SharingRegistryException, TException {
+        //check whether the user has permission directly or indirectly
+        List<GroupMembership> parentMemberships = groupMembershipRepository.getAllParentMembershipsForChild(userId);
+        List<String> groupIds = new ArrayList<>();
+        parentMemberships.stream().forEach(pm->groupIds.add(pm.parentId));
+        groupIds.add(userId);
+        return sharingRepository.hasAccess(entityId, groupIds, Arrays.asList(permissionTypeId,
+                permissionTypeRepository.getGlobalPermissionTypeIdForDomain(domainId)));
+    }
+
+    public boolean revokeEntitySharing(String entityId, List<String> groupOrUserList, String permissionTypeId) throws SharingRegistryException {
+        //revoking permission for the entity
+        for(String groupId : groupOrUserList){
+            SharingEntityPK sharingEntityPK = new SharingEntityPK();
+            sharingEntityPK.setEntityId(entityId);
+            sharingEntityPK.setGroupId(groupId);
+            sharingEntityPK.setPermissionTypeId(permissionTypeId);
+            sharingEntityPK.setInheritedParentId(entityId);
+
+            sharingRepository.delete(sharingEntityPK);
+        }
+
+        //revoking permission from inheritance
+        List<Sharing> temp = new ArrayList<>();
+        sharingRepository.getIndirectSharedChildren(entityId, permissionTypeId).stream().forEach(s->temp.add(s));
+        for(Sharing sharing : temp){
+            String childEntityId = sharing.entityId;
+            for(String groupId : groupOrUserList){
+                SharingEntityPK sharingEntityPK = new SharingEntityPK();
+                sharingEntityPK.setEntityId(childEntityId);
+                sharingEntityPK.setGroupId(groupId);
+                sharingEntityPK.setPermissionTypeId(permissionTypeId);
+                sharingEntityPK.setInheritedParentId(entityId);
+
+                sharingRepository.delete(sharingEntityPK);
+            }
+        }
+        return true;
+    }
+
+
+
+    private <T> T getUpdatedObject(T oldEntity, T newEntity) throws SharingRegistryException {
+        Field[] newEntityFields = newEntity.getClass().getDeclaredFields();
+        Hashtable newHT = fieldsToHT(newEntityFields, newEntity);
+
+        Class oldEntityClass = oldEntity.getClass();
+        Field[] oldEntityFields = oldEntityClass.getDeclaredFields();
+
+        for (Field field : oldEntityFields){
+            field.setAccessible(true);
+            Object o = newHT.get(field.getName());
+            if (o != null){
+                Field f = null;
+                try {
+                    f = oldEntityClass.getDeclaredField(field.getName());
+                    f.setAccessible(true);
+                    logger.debug("setting " + f.getName());
+                    f.set(oldEntity, o);
+                } catch (Exception e) {
+                    throw new SharingRegistryException(e.getMessage());
+                }
+            }
+        }
+        return oldEntity;
+    }
+
+    private static Hashtable<String, Object> fieldsToHT(Field[] fields, Object obj){
+        Hashtable<String,Object> hashtable = new Hashtable<>();
+        for (Field field: fields){
+            field.setAccessible(true);
+            try {
+                Object retrievedObject = field.get(obj);
+                if (retrievedObject != null){
+                    logger.debug("scanning " + field.getName());
+                    hashtable.put(field.getName(), field.get(obj));
+                }
+            } catch (IllegalAccessException e) {
+                e.printStackTrace();
+            }
+        }
+        return hashtable;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml b/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..7b08528
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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-sharing-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.SharingUserEntity</class>
+        <class>org.apache.airavata.sharing.registry.db.entities.UserGroupEntity</class>
+    </persistence-unit>
+</persistence>


[03/51] [abbrv] airavata git commit: Adding SSHCredentialSummary model & adding desc field to SSHCredential

Posted by sc...@apache.org.
Adding SSHCredentialSummary model & adding desc field to SSHCredential


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

Branch: refs/heads/airavata-gov-registry
Commit: 5aa40b8a611f3f6778bdb1a72d6757f9d243465b
Parents: 81d8dee
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 12:58:25 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 11:30:42 2016 -0400

----------------------------------------------------------------------
 .../store/cpi/CredentialStoreService.java       | 5239 ++++++++++++++----
 .../store/datamodel/SSHCredential.java          |  117 +-
 .../store/datamodel/SSHCredentialSummary.java   |  937 ++++
 .../component-cpis/credential-store-cpi.thrift  |    8 +
 .../credential_store_data_models.thrift         |   12 +-
 5 files changed, 5249 insertions(+), 1064 deletions(-)
----------------------------------------------------------------------



[06/51] [abbrv] airavata git commit: adding method to get all ssh pub key Summaries

Posted by sc...@apache.org.
adding method to get all ssh pub key Summaries


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

Branch: refs/heads/airavata-gov-registry
Commit: c4fb53222205543b85f2b9926ef6c0c98ecfb02e
Parents: 077fd2c
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 18:27:52 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 11:30:42 2016 -0400

----------------------------------------------------------------------
 .../server/CredentialStoreServerHandler.java    |   36 +-
 .../store/cpi/CredentialStoreService.java       | 1093 +++++++++++++++++-
 2 files changed, 1083 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c4fb5322/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
index b7d52ce..e8d0ef2 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
@@ -49,10 +49,7 @@ import java.io.IOException;
 import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
 import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 
 public class CredentialStoreServerHandler implements CredentialStoreService.Iface {
     protected static Logger log = LoggerFactory.getLogger(CredentialStoreServerHandler.class);
@@ -95,6 +92,9 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
             if (sshCredential.getPrivateKey() != null) {
                 credential.setPrivateKey(sshCredential.getPrivateKey().getBytes());
             }
+            if(sshCredential.getDescription() != null){
+                credential.setDescription(sshCredential.getDescription());
+            }
             if (sshCredential.getPublicKey() != null) {
                 credential.setPublicKey(sshCredential.getPublicKey().getBytes());
             }
@@ -175,6 +175,7 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
                 sshCredential.setPassphrase(credential1.getPassphrase());
                 sshCredential.setToken(credential1.getToken());
                 sshCredential.setPersistedTime(credential1.getCertificateRequestedTime().getTime());
+                sshCredential.setDescription(credential1.getDescription());
                 return sshCredential;
             } else {
                 log.info("Could not find SSH credentials for token - " + tokenId + " and "
@@ -199,6 +200,7 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
                 sshCredentialSummary.setPublicKey(new String(credential1.getPublicKey()));
                 sshCredentialSummary.setToken(credential1.getToken());
                 sshCredentialSummary.setPersistedTime(credential1.getCertificateRequestedTime().getTime());
+                sshCredentialSummary.setDescription(credential1.getDescription());
                 return sshCredentialSummary;
             } else {
                 log.info("Could not find SSH credential for token - " + tokenId + " and "
@@ -324,6 +326,32 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
     }
 
     @Override
+    public List<SSHCredentialSummary> getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException {
+        Map<String, String> sshKeyMap = new HashMap<>();
+        List<SSHCredentialSummary> summaryList = new ArrayList<>();
+        try {
+            List<Credential> allCredentials = credentialReader.getAllCredentialsPerGateway(gatewayId);
+            if (allCredentials != null && !allCredentials.isEmpty()){
+                for (Credential credential : allCredentials) {
+                    if (credential instanceof org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) {
+                        org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredential = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential;
+                        SSHCredentialSummary sshCredentialSummary = new SSHCredentialSummary();
+                        sshCredentialSummary.setToken(sshCredential.getToken());
+                        sshCredentialSummary.setUsername(sshCredential.getPortalUserName());
+                        sshCredentialSummary.setGatewayId(sshCredential.getGateway());
+                        sshCredentialSummary.setDescription(sshCredential.getDescription());
+                        summaryList.add(sshCredentialSummary);
+                    }
+                }
+            }
+        } catch (CredentialStoreException e) {
+            log.error("Error occurred while retrieving credential Summary", e);
+            throw new org.apache.airavata.credential.store.exception.CredentialStoreException("Error occurred while retrieving credential Summary");
+        }
+        return summaryList;
+    }
+
+    @Override
     public Map<String, String> getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException {
         Map<String, String> pwdCredMap = new HashMap<>();
         try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/c4fb5322/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
index 209bcce..93e088c 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
@@ -22,33 +22,21 @@
  */
 package org.apache.airavata.credential.store.cpi;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+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.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.annotation.Generated;
+import java.util.*;
+
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
 public class CredentialStoreService {
@@ -84,6 +72,8 @@ public class CredentialStoreService {
 
     public Map<String,String> getAllSSHKeysForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
+
     public Map<String,String> getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
     public boolean deleteSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
@@ -114,6 +104,8 @@ public class CredentialStoreService {
 
     public void getAllSSHKeysForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void getAllGatewaySSHCredentialSummary(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void getAllPWDCredentialsForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void deleteSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -402,6 +394,32 @@ public class CredentialStoreService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSSHKeysForGateway failed: unknown result");
     }
 
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      send_getAllGatewaySSHCredentialSummary(gatewayId);
+      return recv_getAllGatewaySSHCredentialSummary();
+    }
+
+    public void send_getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.thrift.TException
+    {
+      getAllGatewaySSHCredentialSummary_args args = new getAllGatewaySSHCredentialSummary_args();
+      args.setGatewayId(gatewayId);
+      sendBase("getAllGatewaySSHCredentialSummary", args);
+    }
+
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> recv_getAllGatewaySSHCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      getAllGatewaySSHCredentialSummary_result result = new getAllGatewaySSHCredentialSummary_result();
+      receiveBase(result, "getAllGatewaySSHCredentialSummary");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.csException != null) {
+        throw result.csException;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGatewaySSHCredentialSummary failed: unknown result");
+    }
+
     public Map<String,String> getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
     {
       send_getAllPWDCredentialsForGateway(gatewayId);
@@ -829,6 +847,38 @@ public class CredentialStoreService {
       }
     }
 
+    public void getAllGatewaySSHCredentialSummary(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getAllGatewaySSHCredentialSummary_call method_call = new getAllGatewaySSHCredentialSummary_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getAllGatewaySSHCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String gatewayId;
+      public getAllGatewaySSHCredentialSummary_call(String gatewayId, 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.gatewayId = gatewayId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllGatewaySSHCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getAllGatewaySSHCredentialSummary_args args = new getAllGatewaySSHCredentialSummary_args();
+        args.setGatewayId(gatewayId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getAllGatewaySSHCredentialSummary();
+      }
+    }
+
     public void getAllPWDCredentialsForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       getAllPWDCredentialsForGateway_call method_call = new getAllPWDCredentialsForGateway_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport);
@@ -954,6 +1004,7 @@ public class CredentialStoreService {
       processMap.put("getPasswordCredential", new getPasswordCredential());
       processMap.put("getAllSSHKeysForUser", new getAllSSHKeysForUser());
       processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway());
+      processMap.put("getAllGatewaySSHCredentialSummary", new getAllGatewaySSHCredentialSummary());
       processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway());
       processMap.put("deleteSSHCredential", new deleteSSHCredential());
       processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -1196,6 +1247,30 @@ public class CredentialStoreService {
       }
     }
 
+    public static class getAllGatewaySSHCredentialSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllGatewaySSHCredentialSummary_args> {
+      public getAllGatewaySSHCredentialSummary() {
+        super("getAllGatewaySSHCredentialSummary");
+      }
+
+      public getAllGatewaySSHCredentialSummary_args getEmptyArgsInstance() {
+        return new getAllGatewaySSHCredentialSummary_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getAllGatewaySSHCredentialSummary_result getResult(I iface, getAllGatewaySSHCredentialSummary_args args) throws org.apache.thrift.TException {
+        getAllGatewaySSHCredentialSummary_result result = new getAllGatewaySSHCredentialSummary_result();
+        try {
+          result.success = iface.getAllGatewaySSHCredentialSummary(args.gatewayId);
+        } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+          result.csException = csException;
+        }
+        return result;
+      }
+    }
+
     public static class getAllPWDCredentialsForGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPWDCredentialsForGateway_args> {
       public getAllPWDCredentialsForGateway() {
         super("getAllPWDCredentialsForGateway");
@@ -1293,6 +1368,7 @@ public class CredentialStoreService {
       processMap.put("getPasswordCredential", new getPasswordCredential());
       processMap.put("getAllSSHKeysForUser", new getAllSSHKeysForUser());
       processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway());
+      processMap.put("getAllGatewaySSHCredentialSummary", new getAllGatewaySSHCredentialSummary());
       processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway());
       processMap.put("deleteSSHCredential", new deleteSSHCredential());
       processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -1863,6 +1939,63 @@ public class CredentialStoreService {
       }
     }
 
+    public static class getAllGatewaySSHCredentialSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewaySSHCredentialSummary_args, List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>> {
+      public getAllGatewaySSHCredentialSummary() {
+        super("getAllGatewaySSHCredentialSummary");
+      }
+
+      public getAllGatewaySSHCredentialSummary_args getEmptyArgsInstance() {
+        return new getAllGatewaySSHCredentialSummary_args();
+      }
+
+      public AsyncMethodCallback<List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>>() { 
+          public void onComplete(List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> o) {
+            getAllGatewaySSHCredentialSummary_result result = new getAllGatewaySSHCredentialSummary_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getAllGatewaySSHCredentialSummary_result result = new getAllGatewaySSHCredentialSummary_result();
+            if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
+                        result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
+                        result.setCsExceptionIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getAllGatewaySSHCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>> resultHandler) throws TException {
+        iface.getAllGatewaySSHCredentialSummary(args.gatewayId,resultHandler);
+      }
+    }
+
     public static class getAllPWDCredentialsForGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllPWDCredentialsForGateway_args, Map<String,String>> {
       public getAllPWDCredentialsForGateway() {
         super("getAllPWDCredentialsForGateway");
@@ -10588,6 +10721,882 @@ public class CredentialStoreService {
 
   }
 
+  public static class getAllGatewaySSHCredentialSummary_args implements org.apache.thrift.TBase<getAllGatewaySSHCredentialSummary_args, getAllGatewaySSHCredentialSummary_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllGatewaySSHCredentialSummary_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewaySSHCredentialSummary_args");
+
+    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", 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 getAllGatewaySSHCredentialSummary_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllGatewaySSHCredentialSummary_argsTupleSchemeFactory());
+    }
+
+    public String gatewayId; // 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 {
+      GATEWAY_ID((short)1, "gatewayId");
+
+      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: // GATEWAY_ID
+            return GATEWAY_ID;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", 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(getAllGatewaySSHCredentialSummary_args.class, metaDataMap);
+    }
+
+    public getAllGatewaySSHCredentialSummary_args() {
+    }
+
+    public getAllGatewaySSHCredentialSummary_args(
+      String gatewayId)
+    {
+      this();
+      this.gatewayId = gatewayId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getAllGatewaySSHCredentialSummary_args(getAllGatewaySSHCredentialSummary_args other) {
+      if (other.isSetGatewayId()) {
+        this.gatewayId = other.gatewayId;
+      }
+    }
+
+    public getAllGatewaySSHCredentialSummary_args deepCopy() {
+      return new getAllGatewaySSHCredentialSummary_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.gatewayId = null;
+    }
+
+    public String getGatewayId() {
+      return this.gatewayId;
+    }
+
+    public getAllGatewaySSHCredentialSummary_args setGatewayId(String gatewayId) {
+      this.gatewayId = gatewayId;
+      return this;
+    }
+
+    public void unsetGatewayId() {
+      this.gatewayId = null;
+    }
+
+    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+    public boolean isSetGatewayId() {
+      return this.gatewayId != null;
+    }
+
+    public void setGatewayIdIsSet(boolean value) {
+      if (!value) {
+        this.gatewayId = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case GATEWAY_ID:
+        if (value == null) {
+          unsetGatewayId();
+        } else {
+          setGatewayId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case GATEWAY_ID:
+        return getGatewayId();
+
+      }
+      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 GATEWAY_ID:
+        return isSetGatewayId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getAllGatewaySSHCredentialSummary_args)
+        return this.equals((getAllGatewaySSHCredentialSummary_args)that);
+      return false;
+    }
+
+    public boolean equals(getAllGatewaySSHCredentialSummary_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_gatewayId = true && this.isSetGatewayId();
+      boolean that_present_gatewayId = true && that.isSetGatewayId();
+      if (this_present_gatewayId || that_present_gatewayId) {
+        if (!(this_present_gatewayId && that_present_gatewayId))
+          return false;
+        if (!this.gatewayId.equals(that.gatewayId))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_gatewayId = true && (isSetGatewayId());
+      list.add(present_gatewayId);
+      if (present_gatewayId)
+        list.add(gatewayId);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(getAllGatewaySSHCredentialSummary_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetGatewayId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+        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("getAllGatewaySSHCredentialSummary_args(");
+      boolean first = true;
+
+      sb.append("gatewayId:");
+      if (this.gatewayId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gatewayId);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (gatewayId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' 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 getAllGatewaySSHCredentialSummary_argsStandardSchemeFactory implements SchemeFactory {
+      public getAllGatewaySSHCredentialSummary_argsStandardScheme getScheme() {
+        return new getAllGatewaySSHCredentialSummary_argsStandardScheme();
+      }
+    }
+
+    private static class getAllGatewaySSHCredentialSummary_argsStandardScheme extends StandardScheme<getAllGatewaySSHCredentialSummary_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHCredentialSummary_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // GATEWAY_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.gatewayId = iprot.readString();
+                struct.setGatewayIdIsSet(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, getAllGatewaySSHCredentialSummary_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.gatewayId != null) {
+          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.gatewayId);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getAllGatewaySSHCredentialSummary_argsTupleSchemeFactory implements SchemeFactory {
+      public getAllGatewaySSHCredentialSummary_argsTupleScheme getScheme() {
+        return new getAllGatewaySSHCredentialSummary_argsTupleScheme();
+      }
+    }
+
+    private static class getAllGatewaySSHCredentialSummary_argsTupleScheme extends TupleScheme<getAllGatewaySSHCredentialSummary_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCredentialSummary_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.gatewayId);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCredentialSummary_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.gatewayId = iprot.readString();
+        struct.setGatewayIdIsSet(true);
+      }
+    }
+
+  }
+
+  public static class getAllGatewaySSHCredentialSummary_result implements org.apache.thrift.TBase<getAllGatewaySSHCredentialSummary_result, getAllGatewaySSHCredentialSummary_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllGatewaySSHCredentialSummary_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewaySSHCredentialSummary_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+    private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getAllGatewaySSHCredentialSummary_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllGatewaySSHCredentialSummary_resultTupleSchemeFactory());
+    }
+
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> success; // required
+    public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success"),
+      CS_EXCEPTION((short)1, "csException");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          case 1: // CS_EXCEPTION
+            return CS_EXCEPTION;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.SSHCredentialSummary.class))));
+      tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllGatewaySSHCredentialSummary_result.class, metaDataMap);
+    }
+
+    public getAllGatewaySSHCredentialSummary_result() {
+    }
+
+    public getAllGatewaySSHCredentialSummary_result(
+      List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> success,
+      org.apache.airavata.credential.store.exception.CredentialStoreException csException)
+    {
+      this();
+      this.success = success;
+      this.csException = csException;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getAllGatewaySSHCredentialSummary_result(getAllGatewaySSHCredentialSummary_result other) {
+      if (other.isSetSuccess()) {
+        List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> __this__success = new ArrayList<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>(other.success.size());
+        for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary other_element : other.success) {
+          __this__success.add(new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(other_element));
+        }
+        this.success = __this__success;
+      }
+      if (other.isSetCsException()) {
+        this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException);
+      }
+    }
+
+    public getAllGatewaySSHCredentialSummary_result deepCopy() {
+      return new getAllGatewaySSHCredentialSummary_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+      this.csException = null;
+    }
+
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public java.util.Iterator<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary elem) {
+      if (this.success == null) {
+        this.success = new ArrayList<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getSuccess() {
+      return this.success;
+    }
+
+    public getAllGatewaySSHCredentialSummary_result setSuccess(List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() {
+      return this.csException;
+    }
+
+    public getAllGatewaySSHCredentialSummary_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+      this.csException = csException;
+      return this;
+    }
+
+    public void unsetCsException() {
+      this.csException = null;
+    }
+
+    /** Returns true if field csException is set (has been assigned a value) and false otherwise */
+    public boolean isSetCsException() {
+      return this.csException != null;
+    }
+
+    public void setCsExceptionIsSet(boolean value) {
+      if (!value) {
+        this.csException = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>)value);
+        }
+        break;
+
+      case CS_EXCEPTION:
+        if (value == null) {
+          unsetCsException();
+        } else {
+          setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
+      case CS_EXCEPTION:
+        return getCsException();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      case CS_EXCEPTION:
+        return isSetCsException();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getAllGatewaySSHCredentialSummary_result)
+        return this.equals((getAllGatewaySSHCredentialSummary_result)that);
+      return false;
+    }
+
+    public boolean equals(getAllGatewaySSHCredentialSummary_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_csException = true && this.isSetCsException();
+      boolean that_present_csException = true && that.isSetCsException();
+      if (this_present_csException || that_present_csException) {
+        if (!(this_present_csException && that_present_csException))
+          return false;
+        if (!this.csException.equals(that.csException))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_success = true && (isSetSuccess());
+      list.add(present_success);
+      if (present_success)
+        list.add(success);
+
+      boolean present_csException = true && (isSetCsException());
+      list.add(present_csException);
+      if (present_csException)
+        list.add(csException);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(getAllGatewaySSHCredentialSummary_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetCsException()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException);
+        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("getAllGatewaySSHCredentialSummary_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("csException:");
+      if (this.csException == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.csException);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class getAllGatewaySSHCredentialSummary_resultStandardSchemeFactory implements SchemeFactory {
+      public getAllGatewaySSHCredentialSummary_resultStandardScheme getScheme() {
+        return new getAllGatewaySSHCredentialSummary_resultStandardScheme();
+      }
+    }
+
+    private static class getAllGatewaySSHCredentialSummary_resultStandardScheme extends StandardScheme<getAllGatewaySSHCredentialSummary_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHCredentialSummary_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
+                  struct.success = new ArrayList<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>(_list20.size);
+                  org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _elem21;
+                  for (int _i22 = 0; _i22 < _list20.size; ++_i22)
+                  {
+                    _elem21 = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary();
+                    _elem21.read(iprot);
+                    struct.success.add(_elem21);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // CS_EXCEPTION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException();
+                struct.csException.read(iprot);
+                struct.setCsExceptionIsSet(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, getAllGatewaySSHCredentialSummary_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+            for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _iter23 : struct.success)
+            {
+              _iter23.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.csException != null) {
+          oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC);
+          struct.csException.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getAllGatewaySSHCredentialSummary_resultTupleSchemeFactory implements SchemeFactory {
+      public getAllGatewaySSHCredentialSummary_resultTupleScheme getScheme() {
+        return new getAllGatewaySSHCredentialSummary_resultTupleScheme();
+      }
+    }
+
+    private static class getAllGatewaySSHCredentialSummary_resultTupleScheme extends TupleScheme<getAllGatewaySSHCredentialSummary_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCredentialSummary_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetCsException()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          {
+            oprot.writeI32(struct.success.size());
+            for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _iter24 : struct.success)
+            {
+              _iter24.write(oprot);
+            }
+          }
+        }
+        if (struct.isSetCsException()) {
+          struct.csException.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCredentialSummary_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          {
+            org.apache.thrift.protocol.TList _list25 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>(_list25.size);
+            org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _elem26;
+            for (int _i27 = 0; _i27 < _list25.size; ++_i27)
+            {
+              _elem26 = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary();
+              _elem26.read(iprot);
+              struct.success.add(_elem26);
+            }
+          }
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException();
+          struct.csException.read(iprot);
+          struct.setCsExceptionIsSet(true);
+        }
+      }
+    }
+
+  }
+
   public static class getAllPWDCredentialsForGateway_args implements org.apache.thrift.TBase<getAllPWDCredentialsForGateway_args, getAllPWDCredentialsForGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPWDCredentialsForGateway_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPWDCredentialsForGateway_args");
 
@@ -11334,15 +12343,15 @@ public class CredentialStoreService {
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                 {
-                  org.apache.thrift.protocol.TMap _map20 = iprot.readMapBegin();
-                  struct.success = new HashMap<String,String>(2*_map20.size);
-                  String _key21;
-                  String _val22;
-                  for (int _i23 = 0; _i23 < _map20.size; ++_i23)
+                  org.apache.thrift.protocol.TMap _map28 = iprot.readMapBegin();
+                  struct.success = new HashMap<String,String>(2*_map28.size);
+                  String _key29;
+                  String _val30;
+                  for (int _i31 = 0; _i31 < _map28.size; ++_i31)
                   {
-                    _key21 = iprot.readString();
-                    _val22 = iprot.readString();
-                    struct.success.put(_key21, _val22);
+                    _key29 = iprot.readString();
+                    _val30 = iprot.readString();
+                    struct.success.put(_key29, _val30);
                   }
                   iprot.readMapEnd();
                 }
@@ -11379,10 +12388,10 @@ public class CredentialStoreService {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
-            for (Map.Entry<String, String> _iter24 : struct.success.entrySet())
+            for (Map.Entry<String, String> _iter32 : struct.success.entrySet())
             {
-              oprot.writeString(_iter24.getKey());
-              oprot.writeString(_iter24.getValue());
+              oprot.writeString(_iter32.getKey());
+              oprot.writeString(_iter32.getValue());
             }
             oprot.writeMapEnd();
           }
@@ -11421,10 +12430,10 @@ public class CredentialStoreService {
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (Map.Entry<String, String> _iter25 : struct.success.entrySet())
+            for (Map.Entry<String, String> _iter33 : struct.success.entrySet())
             {
-              oprot.writeString(_iter25.getKey());
-              oprot.writeString(_iter25.getValue());
+              oprot.writeString(_iter33.getKey());
+              oprot.writeString(_iter33.getValue());
             }
           }
         }
@@ -11439,15 +12448,15 @@ public class CredentialStoreService {
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TMap _map26 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-            struct.success = new HashMap<String,String>(2*_map26.size);
-            String _key27;
-            String _val28;
-            for (int _i29 = 0; _i29 < _map26.size; ++_i29)
+            org.apache.thrift.protocol.TMap _map34 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.success = new HashMap<String,String>(2*_map34.size);
+            String _key35;
+            String _val36;
+            for (int _i37 = 0; _i37 < _map34.size; ++_i37)
             {
-              _key27 = iprot.readString();
-              _val28 = iprot.readString();
-              struct.success.put(_key27, _val28);
+              _key35 = iprot.readString();
+              _val36 = iprot.readString();
+              struct.success.put(_key35, _val36);
             }
           }
           struct.setSuccessIsSet(true);


[28/51] [abbrv] airavata git commit: implementing sharing server

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_cpi.thrift b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
index 02a7768..f3a91dc 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -22,7 +22,7 @@ namespace java org.apache.airavata.sharing.registry.service.cpi
 
 include "./sharing_models.thrift"
 
-service GovRegistryService {
+service SharingRegistryService {
 
     /**
      * Domain Operations


[02/51] [abbrv] airavata git commit: Adding SSHCredentialSummary model & adding desc field to SSHCredential

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5aa40b8a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
index 565e9c6..f5c4276 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
@@ -50,7 +50,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-08-09")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
 public class CredentialStoreService {
 
   public interface Iface {
@@ -68,12 +68,16 @@ public class CredentialStoreService {
      */
     public String addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
+    public String addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
+
     public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
     public String addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
     public org.apache.airavata.credential.store.datamodel.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
+    public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
+
     public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
     public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
@@ -86,6 +90,8 @@ public class CredentialStoreService {
 
     public boolean deleteSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
+    public boolean deleteSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
+
     public boolean deletePWDCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
   }
@@ -96,12 +102,16 @@ public class CredentialStoreService {
 
     public void addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void getSSHCredentialSummary(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void getCertificateCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getPasswordCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -114,6 +124,8 @@ public class CredentialStoreService {
 
     public void deleteSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void deleteSSHCredentialSummary(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void deletePWDCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
   }
@@ -186,6 +198,32 @@ public class CredentialStoreService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSSHCredential failed: unknown result");
     }
 
+    public String addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      send_addSSHCredentialSummary(sshCredentialSummary);
+      return recv_addSSHCredentialSummary();
+    }
+
+    public void send_addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary) throws org.apache.thrift.TException
+    {
+      addSSHCredentialSummary_args args = new addSSHCredentialSummary_args();
+      args.setSshCredentialSummary(sshCredentialSummary);
+      sendBase("addSSHCredentialSummary", args);
+    }
+
+    public String recv_addSSHCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      addSSHCredentialSummary_result result = new addSSHCredentialSummary_result();
+      receiveBase(result, "addSSHCredentialSummary");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.csException != null) {
+        throw result.csException;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSSHCredentialSummary failed: unknown result");
+    }
+
     public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
     {
       send_addCertificateCredential(certificateCredential);
@@ -265,6 +303,33 @@ public class CredentialStoreService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHCredential failed: unknown result");
     }
 
+    public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      send_getSSHCredentialSummary(tokenId, gatewayId);
+      return recv_getSSHCredentialSummary();
+    }
+
+    public void send_getSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.thrift.TException
+    {
+      getSSHCredentialSummary_args args = new getSSHCredentialSummary_args();
+      args.setTokenId(tokenId);
+      args.setGatewayId(gatewayId);
+      sendBase("getSSHCredentialSummary", args);
+    }
+
+    public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary recv_getSSHCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      getSSHCredentialSummary_result result = new getSSHCredentialSummary_result();
+      receiveBase(result, "getSSHCredentialSummary");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.csException != null) {
+        throw result.csException;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHCredentialSummary failed: unknown result");
+    }
+
     public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
     {
       send_getCertificateCredential(tokenId, gatewayId);
@@ -424,6 +489,33 @@ public class CredentialStoreService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteSSHCredential failed: unknown result");
     }
 
+    public boolean deleteSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      send_deleteSSHCredentialSummary(tokenId, gatewayId);
+      return recv_deleteSSHCredentialSummary();
+    }
+
+    public void send_deleteSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.thrift.TException
+    {
+      deleteSSHCredentialSummary_args args = new deleteSSHCredentialSummary_args();
+      args.setTokenId(tokenId);
+      args.setGatewayId(gatewayId);
+      sendBase("deleteSSHCredentialSummary", args);
+    }
+
+    public boolean recv_deleteSSHCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      deleteSSHCredentialSummary_result result = new deleteSSHCredentialSummary_result();
+      receiveBase(result, "deleteSSHCredentialSummary");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.csException != null) {
+        throw result.csException;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteSSHCredentialSummary failed: unknown result");
+    }
+
     public boolean deletePWDCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
     {
       send_deletePWDCredential(tokenId, gatewayId);
@@ -530,6 +622,38 @@ public class CredentialStoreService {
       }
     }
 
+    public void addSSHCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addSSHCredentialSummary_call method_call = new addSSHCredentialSummary_call(sshCredentialSummary, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addSSHCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary;
+      public addSSHCredentialSummary_call(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary, 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.sshCredentialSummary = sshCredentialSummary;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSSHCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addSSHCredentialSummary_args args = new addSSHCredentialSummary_args();
+        args.setSshCredentialSummary(sshCredentialSummary);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_addSSHCredentialSummary();
+      }
+    }
+
     public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       addCertificateCredential_call method_call = new addCertificateCredential_call(certificateCredential, resultHandler, this, ___protocolFactory, ___transport);
@@ -629,6 +753,41 @@ public class CredentialStoreService {
       }
     }
 
+    public void getSSHCredentialSummary(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getSSHCredentialSummary_call method_call = new getSSHCredentialSummary_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getSSHCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String tokenId;
+      private String gatewayId;
+      public getSSHCredentialSummary_call(String tokenId, String gatewayId, 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.tokenId = tokenId;
+        this.gatewayId = gatewayId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getSSHCredentialSummary_args args = new getSSHCredentialSummary_args();
+        args.setTokenId(tokenId);
+        args.setGatewayId(gatewayId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getSSHCredentialSummary();
+      }
+    }
+
     public void getCertificateCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       getCertificateCredential_call method_call = new getCertificateCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
@@ -830,6 +989,41 @@ public class CredentialStoreService {
       }
     }
 
+    public void deleteSSHCredentialSummary(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      deleteSSHCredentialSummary_call method_call = new deleteSSHCredentialSummary_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class deleteSSHCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String tokenId;
+      private String gatewayId;
+      public deleteSSHCredentialSummary_call(String tokenId, String gatewayId, 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.tokenId = tokenId;
+        this.gatewayId = gatewayId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteSSHCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        deleteSSHCredentialSummary_args args = new deleteSSHCredentialSummary_args();
+        args.setTokenId(tokenId);
+        args.setGatewayId(gatewayId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_deleteSSHCredentialSummary();
+      }
+    }
+
     public void deletePWDCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       deletePWDCredential_call method_call = new deletePWDCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
@@ -880,15 +1074,18 @@ public class CredentialStoreService {
     private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
       processMap.put("getCSServiceVersion", new getCSServiceVersion());
       processMap.put("addSSHCredential", new addSSHCredential());
+      processMap.put("addSSHCredentialSummary", new addSSHCredentialSummary());
       processMap.put("addCertificateCredential", new addCertificateCredential());
       processMap.put("addPasswordCredential", new addPasswordCredential());
       processMap.put("getSSHCredential", new getSSHCredential());
+      processMap.put("getSSHCredentialSummary", new getSSHCredentialSummary());
       processMap.put("getCertificateCredential", new getCertificateCredential());
       processMap.put("getPasswordCredential", new getPasswordCredential());
       processMap.put("getAllSSHKeysForUser", new getAllSSHKeysForUser());
       processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway());
       processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway());
       processMap.put("deleteSSHCredential", new deleteSSHCredential());
+      processMap.put("deleteSSHCredentialSummary", new deleteSSHCredentialSummary());
       processMap.put("deletePWDCredential", new deletePWDCredential());
       return processMap;
     }
@@ -937,6 +1134,30 @@ public class CredentialStoreService {
       }
     }
 
+    public static class addSSHCredentialSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSSHCredentialSummary_args> {
+      public addSSHCredentialSummary() {
+        super("addSSHCredentialSummary");
+      }
+
+      public addSSHCredentialSummary_args getEmptyArgsInstance() {
+        return new addSSHCredentialSummary_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public addSSHCredentialSummary_result getResult(I iface, addSSHCredentialSummary_args args) throws org.apache.thrift.TException {
+        addSSHCredentialSummary_result result = new addSSHCredentialSummary_result();
+        try {
+          result.success = iface.addSSHCredentialSummary(args.sshCredentialSummary);
+        } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+          result.csException = csException;
+        }
+        return result;
+      }
+    }
+
     public static class addCertificateCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addCertificateCredential_args> {
       public addCertificateCredential() {
         super("addCertificateCredential");
@@ -1009,6 +1230,30 @@ public class CredentialStoreService {
       }
     }
 
+    public static class getSSHCredentialSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHCredentialSummary_args> {
+      public getSSHCredentialSummary() {
+        super("getSSHCredentialSummary");
+      }
+
+      public getSSHCredentialSummary_args getEmptyArgsInstance() {
+        return new getSSHCredentialSummary_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getSSHCredentialSummary_result getResult(I iface, getSSHCredentialSummary_args args) throws org.apache.thrift.TException {
+        getSSHCredentialSummary_result result = new getSSHCredentialSummary_result();
+        try {
+          result.success = iface.getSSHCredentialSummary(args.tokenId, args.gatewayId);
+        } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+          result.csException = csException;
+        }
+        return result;
+      }
+    }
+
     public static class getCertificateCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCertificateCredential_args> {
       public getCertificateCredential() {
         super("getCertificateCredential");
@@ -1154,6 +1399,31 @@ public class CredentialStoreService {
       }
     }
 
+    public static class deleteSSHCredentialSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteSSHCredentialSummary_args> {
+      public deleteSSHCredentialSummary() {
+        super("deleteSSHCredentialSummary");
+      }
+
+      public deleteSSHCredentialSummary_args getEmptyArgsInstance() {
+        return new deleteSSHCredentialSummary_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public deleteSSHCredentialSummary_result getResult(I iface, deleteSSHCredentialSummary_args args) throws org.apache.thrift.TException {
+        deleteSSHCredentialSummary_result result = new deleteSSHCredentialSummary_result();
+        try {
+          result.success = iface.deleteSSHCredentialSummary(args.tokenId, args.gatewayId);
+          result.setSuccessIsSet(true);
+        } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+          result.csException = csException;
+        }
+        return result;
+      }
+    }
+
     public static class deletePWDCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deletePWDCredential_args> {
       public deletePWDCredential() {
         super("deletePWDCredential");
@@ -1194,15 +1464,18 @@ public class CredentialStoreService {
     private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
       processMap.put("getCSServiceVersion", new getCSServiceVersion());
       processMap.put("addSSHCredential", new addSSHCredential());
+      processMap.put("addSSHCredentialSummary", new addSSHCredentialSummary());
       processMap.put("addCertificateCredential", new addCertificateCredential());
       processMap.put("addPasswordCredential", new addPasswordCredential());
       processMap.put("getSSHCredential", new getSSHCredential());
+      processMap.put("getSSHCredentialSummary", new getSSHCredentialSummary());
       processMap.put("getCertificateCredential", new getCertificateCredential());
       processMap.put("getPasswordCredential", new getPasswordCredential());
       processMap.put("getAllSSHKeysForUser", new getAllSSHKeysForUser());
       processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway());
       processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway());
       processMap.put("deleteSSHCredential", new deleteSSHCredential());
+      processMap.put("deleteSSHCredentialSummary", new deleteSSHCredentialSummary());
       processMap.put("deletePWDCredential", new deletePWDCredential());
       return processMap;
     }
@@ -1315,6 +1588,63 @@ public class CredentialStoreService {
       }
     }
 
+    public static class addSSHCredentialSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addSSHCredentialSummary_args, String> {
+      public addSSHCredentialSummary() {
+        super("addSSHCredentialSummary");
+      }
+
+      public addSSHCredentialSummary_args getEmptyArgsInstance() {
+        return new addSSHCredentialSummary_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            addSSHCredentialSummary_result result = new addSSHCredentialSummary_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            addSSHCredentialSummary_result result = new addSSHCredentialSummary_result();
+            if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
+                        result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
+                        result.setCsExceptionIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, addSSHCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.addSSHCredentialSummary(args.sshCredentialSummary,resultHandler);
+      }
+    }
+
     public static class addCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addCertificateCredential_args, String> {
       public addCertificateCredential() {
         super("addCertificateCredential");
@@ -1486,20 +1816,20 @@ public class CredentialStoreService {
       }
     }
 
-    public static class getCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCertificateCredential_args, org.apache.airavata.credential.store.datamodel.CertificateCredential> {
-      public getCertificateCredential() {
-        super("getCertificateCredential");
+    public static class getSSHCredentialSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHCredentialSummary_args, org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> {
+      public getSSHCredentialSummary() {
+        super("getSSHCredentialSummary");
       }
 
-      public getCertificateCredential_args getEmptyArgsInstance() {
-        return new getCertificateCredential_args();
+      public getSSHCredentialSummary_args getEmptyArgsInstance() {
+        return new getSSHCredentialSummary_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential>() { 
-          public void onComplete(org.apache.airavata.credential.store.datamodel.CertificateCredential o) {
-            getCertificateCredential_result result = new getCertificateCredential_result();
+        return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>() { 
+          public void onComplete(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary o) {
+            getSSHCredentialSummary_result result = new getSSHCredentialSummary_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -1512,7 +1842,7 @@ public class CredentialStoreService {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getCertificateCredential_result result = new getCertificateCredential_result();
+            getSSHCredentialSummary_result result = new getSSHCredentialSummary_result();
             if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
                         result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
                         result.setCsExceptionIsSet(true);
@@ -1538,25 +1868,82 @@ public class CredentialStoreService {
         return false;
       }
 
-      public void start(I iface, getCertificateCredential_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential> resultHandler) throws TException {
-        iface.getCertificateCredential(args.tokenId, args.gatewayId,resultHandler);
+      public void start(I iface, getSSHCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> resultHandler) throws TException {
+        iface.getSSHCredentialSummary(args.tokenId, args.gatewayId,resultHandler);
       }
     }
 
-    public static class getPasswordCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPasswordCredential_args, org.apache.airavata.credential.store.datamodel.PasswordCredential> {
-      public getPasswordCredential() {
-        super("getPasswordCredential");
+    public static class getCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCertificateCredential_args, org.apache.airavata.credential.store.datamodel.CertificateCredential> {
+      public getCertificateCredential() {
+        super("getCertificateCredential");
       }
 
-      public getPasswordCredential_args getEmptyArgsInstance() {
-        return new getPasswordCredential_args();
+      public getCertificateCredential_args getEmptyArgsInstance() {
+        return new getCertificateCredential_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential>() { 
-          public void onComplete(org.apache.airavata.credential.store.datamodel.PasswordCredential o) {
-            getPasswordCredential_result result = new getPasswordCredential_result();
+        return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential>() { 
+          public void onComplete(org.apache.airavata.credential.store.datamodel.CertificateCredential o) {
+            getCertificateCredential_result result = new getCertificateCredential_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getCertificateCredential_result result = new getCertificateCredential_result();
+            if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
+                        result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
+                        result.setCsExceptionIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getCertificateCredential_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential> resultHandler) throws TException {
+        iface.getCertificateCredential(args.tokenId, args.gatewayId,resultHandler);
+      }
+    }
+
+    public static class getPasswordCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPasswordCredential_args, org.apache.airavata.credential.store.datamodel.PasswordCredential> {
+      public getPasswordCredential() {
+        super("getPasswordCredential");
+      }
+
+      public getPasswordCredential_args getEmptyArgsInstance() {
+        return new getPasswordCredential_args();
+      }
+
+      public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential>() { 
+          public void onComplete(org.apache.airavata.credential.store.datamodel.PasswordCredential o) {
+            getPasswordCredential_result result = new getPasswordCredential_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -1829,6 +2216,64 @@ public class CredentialStoreService {
       }
     }
 
+    public static class deleteSSHCredentialSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSSHCredentialSummary_args, Boolean> {
+      public deleteSSHCredentialSummary() {
+        super("deleteSSHCredentialSummary");
+      }
+
+      public deleteSSHCredentialSummary_args getEmptyArgsInstance() {
+        return new deleteSSHCredentialSummary_args();
+      }
+
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteSSHCredentialSummary_result result = new deleteSSHCredentialSummary_result();
+            result.success = o;
+            result.setSuccessIsSet(true);
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            deleteSSHCredentialSummary_result result = new deleteSSHCredentialSummary_result();
+            if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
+                        result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
+                        result.setCsExceptionIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, deleteSSHCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteSSHCredentialSummary(args.tokenId, args.gatewayId,resultHandler);
+      }
+    }
+
     public static class deletePWDCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePWDCredential_args, Boolean> {
       public deletePWDCredential() {
         super("deletePWDCredential");
@@ -3325,22 +3770,22 @@ public class CredentialStoreService {
 
   }
 
-  public static class addCertificateCredential_args implements org.apache.thrift.TBase<addCertificateCredential_args, addCertificateCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_args");
+  public static class addSSHCredentialSummary_args implements org.apache.thrift.TBase<addSSHCredentialSummary_args, addSSHCredentialSummary_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSSHCredentialSummary_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSSHCredentialSummary_args");
 
-    private static final org.apache.thrift.protocol.TField CERTIFICATE_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("certificateCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField SSH_CREDENTIAL_SUMMARY_FIELD_DESC = new org.apache.thrift.protocol.TField("sshCredentialSummary", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addCertificateCredential_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addCertificateCredential_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new addSSHCredentialSummary_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addSSHCredentialSummary_argsTupleSchemeFactory());
     }
 
-    public org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential; // required
+    public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary; // 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 {
-      CERTIFICATE_CREDENTIAL((short)1, "certificateCredential");
+      SSH_CREDENTIAL_SUMMARY((short)1, "sshCredentialSummary");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -3355,8 +3800,8 @@ public class CredentialStoreService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // CERTIFICATE_CREDENTIAL
-            return CERTIFICATE_CREDENTIAL;
+          case 1: // SSH_CREDENTIAL_SUMMARY
+            return SSH_CREDENTIAL_SUMMARY;
           default:
             return null;
         }
@@ -3400,71 +3845,71 @@ public class CredentialStoreService {
     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.CERTIFICATE_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("certificateCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.CertificateCredential.class)));
+      tmpMap.put(_Fields.SSH_CREDENTIAL_SUMMARY, new org.apache.thrift.meta_data.FieldMetaData("sshCredentialSummary", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.SSHCredentialSummary.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredentialSummary_args.class, metaDataMap);
     }
 
-    public addCertificateCredential_args() {
+    public addSSHCredentialSummary_args() {
     }
 
-    public addCertificateCredential_args(
-      org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential)
+    public addSSHCredentialSummary_args(
+      org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary)
     {
       this();
-      this.certificateCredential = certificateCredential;
+      this.sshCredentialSummary = sshCredentialSummary;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addCertificateCredential_args(addCertificateCredential_args other) {
-      if (other.isSetCertificateCredential()) {
-        this.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential(other.certificateCredential);
+    public addSSHCredentialSummary_args(addSSHCredentialSummary_args other) {
+      if (other.isSetSshCredentialSummary()) {
+        this.sshCredentialSummary = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(other.sshCredentialSummary);
       }
     }
 
-    public addCertificateCredential_args deepCopy() {
-      return new addCertificateCredential_args(this);
+    public addSSHCredentialSummary_args deepCopy() {
+      return new addSSHCredentialSummary_args(this);
     }
 
     @Override
     public void clear() {
-      this.certificateCredential = null;
+      this.sshCredentialSummary = null;
     }
 
-    public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential() {
-      return this.certificateCredential;
+    public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getSshCredentialSummary() {
+      return this.sshCredentialSummary;
     }
 
-    public addCertificateCredential_args setCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) {
-      this.certificateCredential = certificateCredential;
+    public addSSHCredentialSummary_args setSshCredentialSummary(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary sshCredentialSummary) {
+      this.sshCredentialSummary = sshCredentialSummary;
       return this;
     }
 
-    public void unsetCertificateCredential() {
-      this.certificateCredential = null;
+    public void unsetSshCredentialSummary() {
+      this.sshCredentialSummary = null;
     }
 
-    /** Returns true if field certificateCredential is set (has been assigned a value) and false otherwise */
-    public boolean isSetCertificateCredential() {
-      return this.certificateCredential != null;
+    /** Returns true if field sshCredentialSummary is set (has been assigned a value) and false otherwise */
+    public boolean isSetSshCredentialSummary() {
+      return this.sshCredentialSummary != null;
     }
 
-    public void setCertificateCredentialIsSet(boolean value) {
+    public void setSshCredentialSummaryIsSet(boolean value) {
       if (!value) {
-        this.certificateCredential = null;
+        this.sshCredentialSummary = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case CERTIFICATE_CREDENTIAL:
+      case SSH_CREDENTIAL_SUMMARY:
         if (value == null) {
-          unsetCertificateCredential();
+          unsetSshCredentialSummary();
         } else {
-          setCertificateCredential((org.apache.airavata.credential.store.datamodel.CertificateCredential)value);
+          setSshCredentialSummary((org.apache.airavata.credential.store.datamodel.SSHCredentialSummary)value);
         }
         break;
 
@@ -3473,8 +3918,8 @@ public class CredentialStoreService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case CERTIFICATE_CREDENTIAL:
-        return getCertificateCredential();
+      case SSH_CREDENTIAL_SUMMARY:
+        return getSshCredentialSummary();
 
       }
       throw new IllegalStateException();
@@ -3487,8 +3932,8 @@ public class CredentialStoreService {
       }
 
       switch (field) {
-      case CERTIFICATE_CREDENTIAL:
-        return isSetCertificateCredential();
+      case SSH_CREDENTIAL_SUMMARY:
+        return isSetSshCredentialSummary();
       }
       throw new IllegalStateException();
     }
@@ -3497,21 +3942,21 @@ public class CredentialStoreService {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addCertificateCredential_args)
-        return this.equals((addCertificateCredential_args)that);
+      if (that instanceof addSSHCredentialSummary_args)
+        return this.equals((addSSHCredentialSummary_args)that);
       return false;
     }
 
-    public boolean equals(addCertificateCredential_args that) {
+    public boolean equals(addSSHCredentialSummary_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_certificateCredential = true && this.isSetCertificateCredential();
-      boolean that_present_certificateCredential = true && that.isSetCertificateCredential();
-      if (this_present_certificateCredential || that_present_certificateCredential) {
-        if (!(this_present_certificateCredential && that_present_certificateCredential))
+      boolean this_present_sshCredentialSummary = true && this.isSetSshCredentialSummary();
+      boolean that_present_sshCredentialSummary = true && that.isSetSshCredentialSummary();
+      if (this_present_sshCredentialSummary || that_present_sshCredentialSummary) {
+        if (!(this_present_sshCredentialSummary && that_present_sshCredentialSummary))
           return false;
-        if (!this.certificateCredential.equals(that.certificateCredential))
+        if (!this.sshCredentialSummary.equals(that.sshCredentialSummary))
           return false;
       }
 
@@ -3522,28 +3967,28 @@ public class CredentialStoreService {
     public int hashCode() {
       List<Object> list = new ArrayList<Object>();
 
-      boolean present_certificateCredential = true && (isSetCertificateCredential());
-      list.add(present_certificateCredential);
-      if (present_certificateCredential)
-        list.add(certificateCredential);
+      boolean present_sshCredentialSummary = true && (isSetSshCredentialSummary());
+      list.add(present_sshCredentialSummary);
+      if (present_sshCredentialSummary)
+        list.add(sshCredentialSummary);
 
       return list.hashCode();
     }
 
     @Override
-    public int compareTo(addCertificateCredential_args other) {
+    public int compareTo(addSSHCredentialSummary_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetCertificateCredential()).compareTo(other.isSetCertificateCredential());
+      lastComparison = Boolean.valueOf(isSetSshCredentialSummary()).compareTo(other.isSetSshCredentialSummary());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetCertificateCredential()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.certificateCredential, other.certificateCredential);
+      if (isSetSshCredentialSummary()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshCredentialSummary, other.sshCredentialSummary);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -3565,14 +4010,14 @@ public class CredentialStoreService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addCertificateCredential_args(");
+      StringBuilder sb = new StringBuilder("addSSHCredentialSummary_args(");
       boolean first = true;
 
-      sb.append("certificateCredential:");
-      if (this.certificateCredential == null) {
+      sb.append("sshCredentialSummary:");
+      if (this.sshCredentialSummary == null) {
         sb.append("null");
       } else {
-        sb.append(this.certificateCredential);
+        sb.append(this.sshCredentialSummary);
       }
       first = false;
       sb.append(")");
@@ -3581,12 +4026,12 @@ public class CredentialStoreService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (certificateCredential == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'certificateCredential' was not present! Struct: " + toString());
+      if (sshCredentialSummary == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'sshCredentialSummary' was not present! Struct: " + toString());
       }
       // check for sub-struct validity
-      if (certificateCredential != null) {
-        certificateCredential.validate();
+      if (sshCredentialSummary != null) {
+        sshCredentialSummary.validate();
       }
     }
 
@@ -3606,15 +4051,15 @@ public class CredentialStoreService {
       }
     }
 
-    private static class addCertificateCredential_argsStandardSchemeFactory implements SchemeFactory {
-      public addCertificateCredential_argsStandardScheme getScheme() {
-        return new addCertificateCredential_argsStandardScheme();
+    private static class addSSHCredentialSummary_argsStandardSchemeFactory implements SchemeFactory {
+      public addSSHCredentialSummary_argsStandardScheme getScheme() {
+        return new addSSHCredentialSummary_argsStandardScheme();
       }
     }
 
-    private static class addCertificateCredential_argsStandardScheme extends StandardScheme<addCertificateCredential_args> {
+    private static class addSSHCredentialSummary_argsStandardScheme extends StandardScheme<addSSHCredentialSummary_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addSSHCredentialSummary_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -3624,11 +4069,11 @@ public class CredentialStoreService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // CERTIFICATE_CREDENTIAL
+            case 1: // SSH_CREDENTIAL_SUMMARY
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential();
-                struct.certificateCredential.read(iprot);
-                struct.setCertificateCredentialIsSet(true);
+                struct.sshCredentialSummary = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary();
+                struct.sshCredentialSummary.read(iprot);
+                struct.setSshCredentialSummaryIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -3644,13 +4089,13 @@ public class CredentialStoreService {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addSSHCredentialSummary_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.certificateCredential != null) {
-          oprot.writeFieldBegin(CERTIFICATE_CREDENTIAL_FIELD_DESC);
-          struct.certificateCredential.write(oprot);
+        if (struct.sshCredentialSummary != null) {
+          oprot.writeFieldBegin(SSH_CREDENTIAL_SUMMARY_FIELD_DESC);
+          struct.sshCredentialSummary.write(oprot);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -3659,41 +4104,41 @@ public class CredentialStoreService {
 
     }
 
-    private static class addCertificateCredential_argsTupleSchemeFactory implements SchemeFactory {
-      public addCertificateCredential_argsTupleScheme getScheme() {
-        return new addCertificateCredential_argsTupleScheme();
+    private static class addSSHCredentialSummary_argsTupleSchemeFactory implements SchemeFactory {
+      public addSSHCredentialSummary_argsTupleScheme getScheme() {
+        return new addSSHCredentialSummary_argsTupleScheme();
       }
     }
 
-    private static class addCertificateCredential_argsTupleScheme extends TupleScheme<addCertificateCredential_args> {
+    private static class addSSHCredentialSummary_argsTupleScheme extends TupleScheme<addSSHCredentialSummary_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredentialSummary_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        struct.certificateCredential.write(oprot);
+        struct.sshCredentialSummary.write(oprot);
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, addSSHCredentialSummary_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential();
-        struct.certificateCredential.read(iprot);
-        struct.setCertificateCredentialIsSet(true);
+        struct.sshCredentialSummary = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary();
+        struct.sshCredentialSummary.read(iprot);
+        struct.setSshCredentialSummaryIsSet(true);
       }
     }
 
   }
 
-  public static class addCertificateCredential_result implements org.apache.thrift.TBase<addCertificateCredential_result, addCertificateCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_result");
+  public static class addSSHCredentialSummary_result implements org.apache.thrift.TBase<addSSHCredentialSummary_result, addSSHCredentialSummary_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSSHCredentialSummary_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSSHCredentialSummary_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
     private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addCertificateCredential_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addCertificateCredential_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new addSSHCredentialSummary_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addSSHCredentialSummary_resultTupleSchemeFactory());
     }
 
     public String success; // required
@@ -3769,13 +4214,13 @@ public class CredentialStoreService {
       tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredentialSummary_result.class, metaDataMap);
     }
 
-    public addCertificateCredential_result() {
+    public addSSHCredentialSummary_result() {
     }
 
-    public addCertificateCredential_result(
+    public addSSHCredentialSummary_result(
       String success,
       org.apache.airavata.credential.store.exception.CredentialStoreException csException)
     {
@@ -3787,7 +4232,7 @@ public class CredentialStoreService {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addCertificateCredential_result(addCertificateCredential_result other) {
+    public addSSHCredentialSummary_result(addSSHCredentialSummary_result other) {
       if (other.isSetSuccess()) {
         this.success = other.success;
       }
@@ -3796,8 +4241,8 @@ public class CredentialStoreService {
       }
     }
 
-    public addCertificateCredential_result deepCopy() {
-      return new addCertificateCredential_result(this);
+    public addSSHCredentialSummary_result deepCopy() {
+      return new addSSHCredentialSummary_result(this);
     }
 
     @Override
@@ -3810,7 +4255,7 @@ public class CredentialStoreService {
       return this.success;
     }
 
-    public addCertificateCredential_result setSuccess(String success) {
+    public addSSHCredentialSummary_result setSuccess(String success) {
       this.success = success;
       return this;
     }
@@ -3834,7 +4279,7 @@ public class CredentialStoreService {
       return this.csException;
     }
 
-    public addCertificateCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+    public addSSHCredentialSummary_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
       this.csException = csException;
       return this;
     }
@@ -3906,12 +4351,12 @@ public class CredentialStoreService {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addCertificateCredential_result)
-        return this.equals((addCertificateCredential_result)that);
+      if (that instanceof addSSHCredentialSummary_result)
+        return this.equals((addSSHCredentialSummary_result)that);
       return false;
     }
 
-    public boolean equals(addCertificateCredential_result that) {
+    public boolean equals(addSSHCredentialSummary_result that) {
       if (that == null)
         return false;
 
@@ -3954,7 +4399,7 @@ public class CredentialStoreService {
     }
 
     @Override
-    public int compareTo(addCertificateCredential_result other) {
+    public int compareTo(addSSHCredentialSummary_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -3998,7 +4443,7 @@ public class CredentialStoreService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addCertificateCredential_result(");
+      StringBuilder sb = new StringBuilder("addSSHCredentialSummary_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -4041,15 +4486,15 @@ public class CredentialStoreService {
       }
     }
 
-    private static class addCertificateCredential_resultStandardSchemeFactory implements SchemeFactory {
-      public addCertificateCredential_resultStandardScheme getScheme() {
-        return new addCertificateCredential_resultStandardScheme();
+    private static class addSSHCredentialSummary_resultStandardSchemeFactory implements SchemeFactory {
+      public addSSHCredentialSummary_resultStandardScheme getScheme() {
+        return new addSSHCredentialSummary_resultStandardScheme();
       }
     }
 
-    private static class addCertificateCredential_resultStandardScheme extends StandardScheme<addCertificateCredential_result> {
+    private static class addSSHCredentialSummary_resultStandardScheme extends StandardScheme<addSSHCredentialSummary_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addSSHCredentialSummary_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -4087,7 +4532,7 @@ public class CredentialStoreService {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addSSHCredentialSummary_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -4107,16 +4552,16 @@ public class CredentialStoreService {
 
     }
 
-    private static class addCertificateCredential_resultTupleSchemeFactory implements SchemeFactory {
-      public addCertificateCredential_resultTupleScheme getScheme() {
-        return new addCertificateCredential_resultTupleScheme();
+    private static class addSSHCredentialSummary_resultTupleSchemeFactory implements SchemeFactory {
+      public addSSHCredentialSummary_resultTupleScheme getScheme() {
+        return new addSSHCredentialSummary_resultTupleScheme();
       }
     }
 
-    private static class addCertificateCredential_resultTupleScheme extends TupleScheme<addCertificateCredential_result> {
+    private static class addSSHCredentialSummary_resultTupleScheme extends TupleScheme<addSSHCredentialSummary_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredentialSummary_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -4135,7 +4580,7 @@ public class CredentialStoreService {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, addSSHCredentialSummary_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
@@ -4152,22 +4597,22 @@ public class CredentialStoreService {
 
   }
 
-  public static class addPasswordCredential_args implements org.apache.thrift.TBase<addPasswordCredential_args, addPasswordCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addPasswordCredential_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPasswordCredential_args");
+  public static class addCertificateCredential_args implements org.apache.thrift.TBase<addCertificateCredential_args, addCertificateCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_args");
 
-    private static final org.apache.thrift.protocol.TField PASSWORD_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("passwordCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField CERTIFICATE_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("certificateCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addPasswordCredential_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addPasswordCredential_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new addCertificateCredential_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addCertificateCredential_argsTupleSchemeFactory());
     }
 
-    public org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential; // required
+    public org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential; // 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 {
-      PASSWORD_CREDENTIAL((short)1, "passwordCredential");
+      CERTIFICATE_CREDENTIAL((short)1, "certificateCredential");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -4182,8 +4627,8 @@ public class CredentialStoreService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // PASSWORD_CREDENTIAL
-            return PASSWORD_CREDENTIAL;
+          case 1: // CERTIFICATE_CREDENTIAL
+            return CERTIFICATE_CREDENTIAL;
           default:
             return null;
         }
@@ -4227,71 +4672,71 @@ public class CredentialStoreService {
     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.PASSWORD_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("passwordCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.PasswordCredential.class)));
+      tmpMap.put(_Fields.CERTIFICATE_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("certificateCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.CertificateCredential.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPasswordCredential_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_args.class, metaDataMap);
     }
 
-    public addPasswordCredential_args() {
+    public addCertificateCredential_args() {
     }
 
-    public addPasswordCredential_args(
-      org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential)
+    public addCertificateCredential_args(
+      org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential)
     {
       this();
-      this.passwordCredential = passwordCredential;
+      this.certificateCredential = certificateCredential;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addPasswordCredential_args(addPasswordCredential_args other) {
-      if (other.isSetPasswordCredential()) {
-        this.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential(other.passwordCredential);
+    public addCertificateCredential_args(addCertificateCredential_args other) {
+      if (other.isSetCertificateCredential()) {
+        this.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential(other.certificateCredential);
       }
     }
 
-    public addPasswordCredential_args deepCopy() {
-      return new addPasswordCredential_args(this);
+    public addCertificateCredential_args deepCopy() {
+      return new addCertificateCredential_args(this);
     }
 
     @Override
     public void clear() {
-      this.passwordCredential = null;
+      this.certificateCredential = null;
     }
 
-    public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential() {
-      return this.passwordCredential;
+    public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential() {
+      return this.certificateCredential;
     }
 
-    public addPasswordCredential_args setPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) {
-      this.passwordCredential = passwordCredential;
+    public addCertificateCredential_args setCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) {
+      this.certificateCredential = certificateCredential;
       return this;
     }
 
-    public void unsetPasswordCredential() {
-      this.passwordCredential = null;
+    public void unsetCertificateCredential() {
+      this.certificateCredential = null;
     }
 
-    /** Returns true if field passwordCredential is set (has been assigned a value) and false otherwise */
-    public boolean isSetPasswordCredential() {
-      return this.passwordCredential != null;
+    /** Returns true if field certificateCredential is set (has been assigned a value) and false otherwise */
+    public boolean isSetCertificateCredential() {
+      return this.certificateCredential != null;
     }
 
-    public void setPasswordCredentialIsSet(boolean value) {
+    public void setCertificateCredentialIsSet(boolean value) {
       if (!value) {
-        this.passwordCredential = null;
+        this.certificateCredential = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case PASSWORD_CREDENTIAL:
+      case CERTIFICATE_CREDENTIAL:
         if (value == null) {
-          unsetPasswordCredential();
+          unsetCertificateCredential();
         } else {
-          setPasswordCredential((org.apache.airavata.credential.store.datamodel.PasswordCredential)value);
+          setCertificateCredential((org.apache.airavata.credential.store.datamodel.CertificateCredential)value);
         }
         break;
 
@@ -4300,8 +4745,8 @@ public class CredentialStoreService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case PASSWORD_CREDENTIAL:
-        return getPasswordCredential();
+      case CERTIFICATE_CREDENTIAL:
+        return getCertificateCredential();
 
       }
       throw new IllegalStateException();
@@ -4314,8 +4759,8 @@ public class CredentialStoreService {
       }
 
       switch (field) {
-      case PASSWORD_CREDENTIAL:
-        return isSetPasswordCredential();
+      case CERTIFICATE_CREDENTIAL:
+        return isSetCertificateCredential();
       }
       throw new IllegalStateException();
     }
@@ -4324,21 +4769,21 @@ public class CredentialStoreService {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addPasswordCredential_args)
-        return this.equals((addPasswordCredential_args)that);
+      if (that instanceof addCertificateCredential_args)
+        return this.equals((addCertificateCredential_args)that);
       return false;
     }
 
-    public boolean equals(addPasswordCredential_args that) {
+    public boolean equals(addCertificateCredential_args that) {
       if (that == null)
         return false;
 
-      boolean this_present_passwordCredential = true && this.isSetPasswordCredential();
-      boolean that_present_passwordCredential = true && that.isSetPasswordCredential();
-      if (this_present_passwordCredential || that_present_passwordCredential) {
-        if (!(this_present_passwordCredential && that_present_passwordCredential))
+      boolean this_present_certificateCredential = true && this.isSetCertificateCredential();
+      boolean that_present_certificateCredential = true && that.isSetCertificateCredential();
+      if (this_present_certificateCredential || that_present_certificateCredential) {
+        if (!(this_present_certificateCredential && that_present_certificateCredential))
           return false;
-        if (!this.passwordCredential.equals(that.passwordCredential))
+        if (!this.certificateCredential.equals(that.certificateCredential))
           return false;
       }
 
@@ -4349,28 +4794,28 @@ public class CredentialStoreService {
     public int hashCode() {
       List<Object> list = new ArrayList<Object>();
 
-      boolean present_passwordCredential = true && (isSetPasswordCredential());
-      list.add(present_passwordCredential);
-      if (present_passwordCredential)
-        list.add(passwordCredential);
+      boolean present_certificateCredential = true && (isSetCertificateCredential());
+      list.add(present_certificateCredential);
+      if (present_certificateCredential)
+        list.add(certificateCredential);
 
       return list.hashCode();
     }
 
     @Override
-    public int compareTo(addPasswordCredential_args other) {
+    public int compareTo(addCertificateCredential_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetPasswordCredential()).compareTo(other.isSetPasswordCredential());
+      lastComparison = Boolean.valueOf(isSetCertificateCredential()).compareTo(other.isSetCertificateCredential());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetPasswordCredential()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwordCredential, other.passwordCredential);
+      if (isSetCertificateCredential()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.certificateCredential, other.certificateCredential);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -4392,14 +4837,14 @@ public class CredentialStoreService {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addPasswordCredential_args(");
+      StringBuilder sb = new StringBuilder("addCertificateCredential_args(");
       boolean first = true;
 
-      sb.append("passwordCredential:");
-      if (this.passwordCredential == null) {
+      sb.append("certificateCredential:");
+      if (this.certificateCredential == null) {
         sb.append("null");
       } else {
-        sb.append(this.passwordCredential);
+        sb.append(this.certificateCredential);
       }
       first = false;
       sb.append(")");
@@ -4408,12 +4853,12 @@ public class CredentialStoreService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (passwordCredential == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'passwordCredential' was not present! Struct: " + toString());
+      if (certificateCredential == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'certificateCredential' was not present! Struct: " + toString());
       }
       // check for sub-struct validity
-      if (passwordCredential != null) {
-        passwordCredential.validate();
+      if (certificateCredential != null) {
+        certificateCredential.validate();
       }
     }
 
@@ -4433,15 +4878,15 @@ public class CredentialStoreService {
       }
     }
 
-    private static class addPasswordCredential_argsStandardSchemeFactory implements SchemeFactory {
-      public addPasswordCredential_argsStandardScheme getScheme() {
-        return new addPasswordCredential_argsStandardScheme();
+    private static class addCertificateCredential_argsStandardSchemeFactory implements SchemeFactory {
+      public addCertificateCredential_argsStandardScheme getScheme() {
+        return new addCertificateCredential_argsStandardScheme();
       }
     }
 
-    private static class addPasswordCredential_argsStandardScheme extends StandardScheme<addPasswordCredential_args> {
+    private static class addCertificateCredential_argsStandardScheme extends StandardScheme<addCertificateCredential_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -4451,11 +4896,11 @@ public class CredentialStoreService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // PASSWORD_CREDENTIAL
+            case 1: // CERTIFICATE_CREDENTIAL
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential();
-                struct.passwordCredential.read(iprot);
-                struct.setPasswordCredentialIsSet(true);
+                struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential();
+                struct.certificateCredential.read(iprot);
+                struct.setCertificateCredentialIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -4471,13 +4916,13 @@ public class CredentialStoreService {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.passwordCredential != null) {
-          oprot.writeFieldBegin(PASSWORD_CREDENTIAL_FIELD_DESC);
-          struct.passwordCredential.write(oprot);
+        if (struct.certificateCredential != null) {
+          oprot.writeFieldBegin(CERTIFICATE_CREDENTIAL_FIELD_DESC);
+          struct.certificateCredential.write(oprot);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -4486,41 +4931,41 @@ public class CredentialStoreService {
 
     }
 
-    private static class addPasswordCredential_argsTupleSchemeFactory implements SchemeFactory {
-      public addPasswordCredential_argsTupleScheme getScheme() {
-        return new addPasswordCredential_argsTupleScheme();
+    private static class addCertificateCredential_argsTupleSchemeFactory implements SchemeFactory {
+      public addCertificateCredential_argsTupleScheme getScheme() {
+        return new addCertificateCredential_argsTupleScheme();
       }
     }
 
-    private static class addPasswordCredential_argsTupleScheme extends TupleScheme<addPasswordCredential_args> {
+    private static class addCertificateCredential_argsTupleScheme extends TupleScheme<addCertificateCredential_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        struct.passwordCredential.write(oprot);
+        struct.certificateCredential.write(oprot);
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential();
-        struct.passwordCredential.read(iprot);
-        struct.setPasswordCredentialIsSet(true);
+        struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential();
+        struct.certificateCredential.read(iprot);
+        struct.setCertificateCredentialIsSet(true);
       }
     }
 
   }
 
-  public static class addPasswordCredential_result implements org.apache.thrift.TBase<addPasswordCredential_result, addPasswordCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addPasswordCredential_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPasswordCredential_result");
+  public static class addCertificateCredential_result implements org.apache.thrift.TBase<addCertificateCredential_result, addCertificateCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_result");
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
     private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new addPasswordCredential_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new addPasswordCredential_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new addCertificateCredential_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new addCertificateCredential_resultTupleSchemeFactory());
     }
 
     public String success; // required
@@ -4596,13 +5041,13 @@ public class CredentialStoreService {
       tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPasswordCredential_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_result.class, metaDataMap);
     }
 
-    public addPasswordCredential_result() {
+    public addCertificateCredential_result() {
     }
 
-    public addPasswordCredential_result(
+    public addCertificateCredential_result(
       String success,
       org.apache.airavata.credential.store.exception.CredentialStoreException csException)
     {
@@ -4614,7 +5059,7 @

<TRUNCATED>

[13/51] [abbrv] airavata git commit: Adding Airavata Api level changes associated with last commit

Posted by sc...@apache.org.
Adding Airavata Api level changes associated with last commit


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

Branch: refs/heads/airavata-gov-registry
Commit: 8e59d800f4bf6984d1c84d9f940161a0ba218638
Parents: ac76936
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Wed Oct 12 13:08:58 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 13:08:58 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |   28 +
 .../java/org/apache/airavata/api/Airavata.java  | 8473 ++++++++++--------
 .../airavata-apis/airavata_api.thrift           |   23 +
 3 files changed, 5033 insertions(+), 3491 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8e59d800/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 9441119..0b61e0f 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
@@ -516,6 +516,34 @@ public class AiravataServerHandler implements Airavata.Iface {
     }
 
     @Override
+    public List<CredentialSummary> getAllSSHPubKeysSummaryForUserInGateway(AuthzToken authzToken, String gatewayId, String userId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+        try {
+            List<CredentialSummary> allCredentialSummaries =  new ArrayList<>();
+            if (csClient == null){
+                csClient = getCredentialStoreServiceClient();
+            }
+            List<SSHCredentialSummary> sshSummaryListForUser = csClient.getAllSSHCredentialSummaryForUserInGateway(gatewayId,userId);
+            for(SSHCredentialSummary key : sshSummaryListForUser){
+                CredentialSummary userPubKeySummary = new CredentialSummary();
+                userPubKeySummary.setGatewayId(key.getGatewayId());
+                userPubKeySummary.setUsername(key.getUsername());
+                userPubKeySummary.setPublicKey(key.getPublicKey());
+                userPubKeySummary.setDescription(key.getDescription());
+                userPubKeySummary.setPersistedTime(key.getPersistedTime());
+                allCredentialSummaries.add(userPubKeySummary);
+            }
+            logger.debug("Airavata retrieved all SSH pub keys summaries for gateway Id : " + gatewayId + " & user ID : " +userId);
+            return allCredentialSummaries;
+        }catch (Exception e){
+            logger.error("Error occurred while retrieving SSH public keys summaries for user : " + userId , e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error occurred while retrieving SSH public keys summaries for user : " + userId + ". More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
+    @Override
     @SecurityCheck
     public Map<String, String> getAllGatewayPWDCredentials(AuthzToken authzToken, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
         try {


[08/51] [abbrv] airavata git commit: Merge branch 'ssh-cred-model-change' of github.com:anujbhan/airavata into ssh-cred-model-change

Posted by sc...@apache.org.
Merge branch 'ssh-cred-model-change' of github.com:anujbhan/airavata into ssh-cred-model-change


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

Branch: refs/heads/airavata-gov-registry
Commit: d8c17d98fd280516aa55dfa11930789ec81589a9
Parents: cc74960 b654836
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Wed Oct 12 11:36:09 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 11:36:09 2016 -0400

----------------------------------------------------------------------

----------------------------------------------------------------------



[33/51] [abbrv] airavata git commit: changing the module name

Posted by sc...@apache.org.
changing the module name


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

Branch: refs/heads/airavata-gov-registry
Commit: fe76d11e33006bd7429981734ba56f2fdaca8957
Parents: 1764699
Author: scnakandala <su...@gmail.com>
Authored: Thu Oct 13 17:56:05 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Oct 13 17:56:05 2016 -0400

----------------------------------------------------------------------
 modules/sharing-registry/sharing-registry-distribution/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fe76d11e/modules/sharing-registry/sharing-registry-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/pom.xml b/modules/sharing-registry/sharing-registry-distribution/pom.xml
index f818807..f9bff9a 100644
--- a/modules/sharing-registry/sharing-registry-distribution/pom.xml
+++ b/modules/sharing-registry/sharing-registry-distribution/pom.xml
@@ -9,7 +9,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>airavata-sharing-distribution</artifactId>
+    <artifactId>airavata-sharing-registry-distribution</artifactId>
 
     <dependencies>
         <dependency>


[42/51] [abbrv] airavata git commit: adding docs

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


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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index 7d8270f..a0e89a5 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -34,7 +34,18 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+/**
+ * <p>Domain is the entity that enables multi-tenency in this componenet. Every tenant will be
+ * operating separately it's own silo which is identified by the domain id. In the current implementation domain id
+ * will be same as the domain name</p>
+ * <li>domainId : Will be generated by the server based on the domain name</li>
+ * <li><b>name</b> : A single word name that identifies the domain e.g seagrid, ultrascan</li>
+ * <li>description : A short description for the domain</li>
+ * <li>createdTime : Will be set by the system</li>
+ * <li>updatedTime : Will be set by the system</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class Domain implements org.apache.thrift.TBase<Domain, Domain._Fields>, java.io.Serializable, Cloneable, Comparable<Domain> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Domain");
 


[50/51] [abbrv] airavata git commit: fixing id issues

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
index e444c43..00dd367 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
@@ -29,72 +29,75 @@ public class DBConstants {
     public static int SELECT_MAX_ROWS = 1000;
 
     public static class DomainTable {
-        public static String DOMAIN_ID = "domainId";
-        public static String NAME = "name";
-        public static String DESCRIPTION = "description";
+        public static final String DOMAIN_ID = "domainId";
+        public static final String NAME = "name";
+        public static final String DESCRIPTION = "description";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class UserTable {
-        public static String USER_ID = "userId";
-        public static String DOMAIN_ID = "domainId";
-        public static String USER_NAME = "userName";
+        public static final String USER_ID = "userId";
+        public static final String DOMAIN_ID = "domainId";
+        public static final String USER_NAME = "userName";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";
     }
 
     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 String GROUP_CARDINALITY = "groupCardinality";
+        public static final String GROUP_ID = "groupId";
+        public static final String DOMAIN_ID = "domainId";
+        public static final String NAME = "name";
+        public static final String DESCRIPTION = "description";
+        public static final String OWNER_ID = "ownerId";
+        public static final String GROUP_TYPE = "groupType";
+        public static final String GROUP_CARDINALITY = "groupCardinality";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class GroupMembershipTable {
-        public static String PARENT_ID = "parentId";
-        public static String CHILD_ID = "childId";
-        public static String CHILD_TYPE = "childType";
+        public static final String PARENT_ID = "parentId";
+        public static final String CHILD_ID = "childId";
+        public static final String CHILD_TYPE = "childType";
+        public static final String DOMAIN_ID = "domainId";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class EntityTypeTable {
-        public static String ENTITY_TYPE_ID = "entityTypeId";
-        public static String DOMAIN_ID = "domainId";
+        public static final String ENTITY_TYPE_ID = "entityTypeId";
+        public static final String DOMAIN_ID = "domainId";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class PermissionTypeTable {
-        public static String ENTITY_TYPE_ID = "permissionTypeId";
-        public static String DOMAIN_ID = "domainId";
-        public static String NAME = "name";
+        public static final String ENTITY_TYPE_ID = "permissionTypeId";
+        public static final String DOMAIN_ID = "domainId";
+        public static final String NAME = "name";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class EntityTable {
-        public static String ENTITY_ID = "entityId";
-        public static String PARENT_ENTITY_ID = "parentEntityId";
-        public static String ENTITY_TYPE_ID = "entityTypeId";
-        public static String NAME = "name";
-        public static String DESCRIPTION = "description";
-        public static String FULL_TEXT = "fullText";
+        public static final String ENTITY_ID = "entityId";
+        public static final String PARENT_ENTITY_ID = "parentEntityId";
+        public static final String ENTITY_TYPE_ID = "entityTypeId";
+        public static final String NAME = "name";
+        public static final String DESCRIPTION = "description";
+        public static final String FULL_TEXT = "fullText";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";
+        public static final String DOMAIN_ID = "domainId";
     }
 
     public static class SharingTable {
-        public static String PERMISSION_TYPE_ID = "permissionTypeId";
-        public static String ENTITY_ID = "entityId";
-        public static String GROUP_ID = "groupId";
-        public static String INHERITED_PARENT_ID = "inheritedParentId";
+        public static final String DOMAIN_ID = "domainId";
+        public static final String PERMISSION_TYPE_ID = "permissionTypeId";
+        public static final String ENTITY_ID = "entityId";
+        public static final String GROUP_ID = "groupId";
+        public static final String INHERITED_PARENT_ID = "inheritedParentId";
         public static final String SHARING_TYPE = "sharingType";
         public static final String CREATED_TIME = "createdTime";
         public static final String UPDATED_TIME = "updatedTime";

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
index 5757f61..5dc3dbc 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -21,8 +21,7 @@
 package org.apache.airavata.sharing.registry.server;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.sharing.registry.db.entities.GroupMembershipEntityPK;
-import org.apache.airavata.sharing.registry.db.entities.SharingEntityPK;
+import org.apache.airavata.sharing.registry.db.entities.*;
 import 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;
@@ -120,7 +119,10 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      */
     @Override
     public String registerUser(User user) throws SharingRegistryException, TException {
-        if(userRepository.get(user.userId) != null)
+        UserPK userPK = new UserPK();
+        userPK.setUserId(user.getUserId());
+        userPK.setDomainId(user.domainId);
+        if(userRepository.get(userPK) != null)
             throw new SharingRegistryException("There exist user with given user id");
 
         user.setCreatedTime(System.currentTimeMillis());
@@ -142,13 +144,19 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
 
     @Override
     public boolean updatedUser(User user) throws SharingRegistryException, TException {
-        User oldUser = userRepository.get(user.userId);
+        UserPK userPK = new UserPK();
+        userPK.setUserId(user.userId);
+        userPK.setDomainId(user.domainId);
+        User oldUser = userRepository.get(userPK);
         user.setCreatedTime(oldUser.createdTime);
         user.setUpdatedTime(System.currentTimeMillis());
         user = getUpdatedObject(oldUser, user);
         userRepository.update(user);
 
-        UserGroup userGroup = userGroupRepository.get(user.userId);
+        UserGroupPK userGroupPK = new UserGroupPK();
+        userGroupPK.setGroupId(user.getUserId());
+        userGroupPK.setDomainId(user.domainId);
+        UserGroup userGroup = userGroupRepository.get(userGroupPK);
         userGroup.setName(user.userName);
         userGroup.setDescription("user " + user.userName + " group");
         updateGroup(userGroup);
@@ -156,15 +164,25 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public boolean deleteUser(String userId) throws SharingRegistryException, TException {
-        userRepository.delete(userId);
-        userGroupRepository.delete(userId);
+    public boolean deleteUser(String domainId, String userId) throws SharingRegistryException, TException {
+        UserPK userPK = new UserPK();
+        userPK.setUserId(userId);
+        userPK.setDomainId(domainId);
+        userRepository.delete(userPK);
+
+        UserGroupPK userGroupPK = new UserGroupPK();
+        userGroupPK.setGroupId(userId);
+        userGroupPK.setDomainId(domainId);
+        userGroupRepository.delete(userGroupPK);
         return true;
     }
 
     @Override
-    public User getUser(String userId) throws SharingRegistryException, TException {
-        return userRepository.get(userId);
+    public User getUser(String domainId, String userId) throws SharingRegistryException, TException {
+        UserPK userPK = new UserPK();
+        userPK.setUserId(userId);
+        userPK.setDomainId(domainId);
+        return userRepository.get(userPK);
     }
 
     @Override
@@ -180,7 +198,10 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      */
     @Override
     public String createGroup(UserGroup group) throws SharingRegistryException, TException {
-        if(userGroupRepository.get(group.groupId) != null)
+        UserGroupPK userGroupPK = new UserGroupPK();
+        userGroupPK.setGroupId(group.groupId);
+        userGroupPK.setDomainId(group.domainId);
+        if(userGroupRepository.get(userGroupPK) != null)
             throw new SharingRegistryException("There exist group with given group id");
 
         group.setCreatedTime(System.currentTimeMillis());
@@ -192,7 +213,10 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     @Override
     public boolean updateGroup(UserGroup group) throws SharingRegistryException, TException {
         group.setUpdatedTime(System.currentTimeMillis());
-        UserGroup oldGroup = userGroupRepository.get(group.groupId);
+        UserGroupPK userGroupPK = new UserGroupPK();
+        userGroupPK.setGroupId(group.groupId);
+        userGroupPK.setDomainId(group.domainId);
+        UserGroup oldGroup = userGroupRepository.get(userGroupPK);
         group.setCreatedTime(oldGroup.createdTime);
         group = getUpdatedObject(oldGroup, group);
         userGroupRepository.update(group);
@@ -200,14 +224,20 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public boolean deleteGroup(String groupId) throws SharingRegistryException, TException {
-        userGroupRepository.delete(groupId);
+    public boolean deleteGroup(String domainId, String groupId) throws SharingRegistryException, TException {
+        UserGroupPK userGroupPK = new UserGroupPK();
+        userGroupPK.setGroupId(groupId);
+        userGroupPK.setDomainId(domainId);
+        userGroupRepository.delete(userGroupPK);
         return true;
     }
 
     @Override
-    public UserGroup getGroup(String groupId) throws SharingRegistryException, TException {
-        return userGroupRepository.get(groupId);
+    public UserGroup getGroup(String domainId, String groupId) throws SharingRegistryException, TException {
+        UserGroupPK userGroupPK = new UserGroupPK();
+        userGroupPK.setGroupId(groupId);
+        userGroupPK.setDomainId(domainId);
+        return userGroupRepository.get(userGroupPK);
     }
 
     @Override
@@ -218,12 +248,13 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public boolean addUsersToGroup(List<String> userIds, String groupId) throws SharingRegistryException, TException {
+    public boolean addUsersToGroup(String domainId, List<String> userIds, String groupId) throws SharingRegistryException, TException {
         for(int i=0; i < userIds.size(); i++){
             GroupMembership groupMembership = new GroupMembership();
             groupMembership.setParentId(groupId);
             groupMembership.setChildId(userIds.get(i));
             groupMembership.setChildType(GroupChildType.USER);
+            groupMembership.setDomainId(domainId);
             groupMembership.setCreatedTime(System.currentTimeMillis());
             groupMembership.setUpdatedTime(System.currentTimeMillis());
             groupMembershipRepository.create(groupMembership);
@@ -232,36 +263,40 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws SharingRegistryException, TException {
+    public boolean removeUsersFromGroup(String domainId, List<String> userIds, String groupId) throws SharingRegistryException, TException {
         for(int i=0; i < userIds.size(); i++){
-            GroupMembershipEntityPK groupMembershipEntityPK = new GroupMembershipEntityPK();
-            groupMembershipEntityPK.setParentId(groupId);
-            groupMembershipEntityPK.setChildId(userIds.get(i));
-            groupMembershipRepository.delete(groupMembershipEntityPK);
+            GroupMembershipPK groupMembershipPK = new GroupMembershipPK();
+            groupMembershipPK.setParentId(groupId);
+            groupMembershipPK.setChildId(userIds.get(i));
+            groupMembershipPK.setDomainId(domainId);
+            groupMembershipRepository.delete(groupMembershipPK);
         }
         return true;
     }
 
     @Override
-    public List<User> getGroupMembersOfTypeUser(String groupId, int offset, int limit) throws SharingRegistryException, TException {
-        List<User> groupMemberUsers = groupMembershipRepository.getAllChildUsers(groupId);
+    public List<User> getGroupMembersOfTypeUser(String domainId, String groupId, int offset, int limit) throws SharingRegistryException, TException {
+        //TODO limit offset
+        List<User> groupMemberUsers = groupMembershipRepository.getAllChildUsers(domainId, groupId);
         return groupMemberUsers;
     }
 
     @Override
-    public List<UserGroup> getGroupMembersOfTypeGroup(String groupId, int offset, int limit) throws SharingRegistryException, TException {
-        List<UserGroup> groupMemberGroups = groupMembershipRepository.getAllChildGroups(groupId);
+    public List<UserGroup> getGroupMembersOfTypeGroup(String domainId, String groupId, int offset, int limit) throws SharingRegistryException, TException {
+        //TODO limit offset
+        List<UserGroup> groupMemberGroups = groupMembershipRepository.getAllChildGroups(domainId, groupId);
         return groupMemberGroups;
     }
 
     @Override
-    public boolean addChildGroupsToParentGroup(List<String> childIds, String groupId) throws SharingRegistryException, TException {
+    public boolean addChildGroupsToParentGroup(String domainId, List<String> childIds, String groupId) throws SharingRegistryException, TException {
         for(String childId : childIds) {
             //Todo check for cyclic dependencies
             GroupMembership groupMembership = new GroupMembership();
             groupMembership.setParentId(groupId);
             groupMembership.setChildId(childId);
             groupMembership.setChildType(GroupChildType.GROUP);
+            groupMembership.setDomainId(domainId);
             groupMembership.setCreatedTime(System.currentTimeMillis());
             groupMembership.setUpdatedTime(System.currentTimeMillis());
             groupMembershipRepository.create(groupMembership);
@@ -270,11 +305,12 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws SharingRegistryException, TException {
-        GroupMembershipEntityPK groupMembershipEntityPK = new GroupMembershipEntityPK();
-        groupMembershipEntityPK.setParentId(groupId);
-        groupMembershipEntityPK.setChildId(childId);
-        groupMembershipRepository.delete(groupMembershipEntityPK);
+    public boolean removeChildGroupFromParentGroup(String domainId, String childId, String groupId) throws SharingRegistryException, TException {
+        GroupMembershipPK groupMembershipPK = new GroupMembershipPK();
+        groupMembershipPK.setParentId(groupId);
+        groupMembershipPK.setChildId(childId);
+        groupMembershipPK.setDomainId(domainId);
+        groupMembershipRepository.delete(groupMembershipPK);
         return true;
     }
 
@@ -284,7 +320,10 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      */
     @Override
     public String createEntityType(EntityType entityType) throws SharingRegistryException, TException {
-        if(entityTypeRepository.get(entityType.entityTypeId) != null)
+        EntityTypePK entityTypePK = new EntityTypePK();
+        entityTypePK.setDomainId(entityType.domainId);
+        entityTypePK.setEntityTypeId(entityType.entityTypeId);
+        if(entityTypeRepository.get(entityTypePK) != null)
             throw new SharingRegistryException("There exist EntityType with given EntityType id");
 
         entityType.setCreatedTime(System.currentTimeMillis());
@@ -296,7 +335,10 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     @Override
     public boolean updateEntityType(EntityType entityType) throws SharingRegistryException, TException {
         entityType.setUpdatedTime(System.currentTimeMillis());
-        EntityType oldEntityType = entityTypeRepository.get(entityType.entityTypeId);
+        EntityTypePK entityTypePK = new EntityTypePK();
+        entityTypePK.setDomainId(entityType.domainId);
+        entityTypePK.setEntityTypeId(entityType.entityTypeId);
+        EntityType oldEntityType = entityTypeRepository.get(entityTypePK);
         entityType.setCreatedTime(oldEntityType.createdTime);
         entityType = getUpdatedObject(oldEntityType, entityType);
         entityTypeRepository.update(entityType);
@@ -304,14 +346,20 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public boolean deleteEntityType(String entityTypeId) throws SharingRegistryException, TException {
-        entityTypeRepository.delete(entityTypeId);
+    public boolean deleteEntityType(String domainId, String entityTypeId) throws SharingRegistryException, TException {
+        EntityTypePK entityTypePK = new EntityTypePK();
+        entityTypePK.setDomainId(domainId);
+        entityTypePK.setEntityTypeId(entityTypeId);
+        entityTypeRepository.delete(entityTypePK);
         return true;
     }
 
     @Override
-    public EntityType getEntityType(String entityTypeId) throws SharingRegistryException, TException {
-        return entityTypeRepository.get(entityTypeId);
+    public EntityType getEntityType(String domainId, String entityTypeId) throws SharingRegistryException, TException {
+        EntityTypePK entityTypePK = new EntityTypePK();
+        entityTypePK.setDomainId(domainId);
+        entityTypePK.setEntityTypeId(entityTypeId);
+        return entityTypeRepository.get(entityTypePK);
     }
 
     @Override
@@ -327,7 +375,10 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      */
     @Override
     public String createPermissionType(PermissionType permissionType) throws SharingRegistryException, TException {
-        if(permissionTypeRepository.get(permissionType.permissionTypeId) != null)
+        PermissionTypePK permissionTypePK =  new PermissionTypePK();
+        permissionTypePK.setDomainId(permissionType.domainId);
+        permissionTypePK.setPermissionTypeId(permissionType.permissionTypeId);
+        if(permissionTypeRepository.get(permissionTypePK) != null)
             throw new SharingRegistryException("There exist PermissionType with given PermissionType id");
         permissionType.setCreatedTime(System.currentTimeMillis());
         permissionType.setUpdatedTime(System.currentTimeMillis());
@@ -338,21 +389,30 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     @Override
     public boolean updatePermissionType(PermissionType permissionType) throws SharingRegistryException, TException {
         permissionType.setUpdatedTime(System.currentTimeMillis());
-        PermissionType oldPermissionType = permissionTypeRepository.get(permissionType.permissionTypeId);
+        PermissionTypePK permissionTypePK =  new PermissionTypePK();
+        permissionTypePK.setDomainId(permissionType.domainId);
+        permissionTypePK.setPermissionTypeId(permissionType.permissionTypeId);
+        PermissionType oldPermissionType = permissionTypeRepository.get(permissionTypePK);
         permissionType = getUpdatedObject(oldPermissionType, permissionType);
         permissionTypeRepository.update(permissionType);
         return true;
     }
 
     @Override
-    public boolean deletePermissionType(String entityTypeId) throws SharingRegistryException, TException {
-        permissionTypeRepository.delete(entityTypeId);
+    public boolean deletePermissionType(String domainId, String permissionTypeId) throws SharingRegistryException, TException {
+        PermissionTypePK permissionTypePK =  new PermissionTypePK();
+        permissionTypePK.setDomainId(domainId);
+        permissionTypePK.setPermissionTypeId(permissionTypeId);
+        permissionTypeRepository.delete(permissionTypePK);
         return true;
     }
 
     @Override
-    public PermissionType getPermissionType(String permissionTypeId) throws SharingRegistryException, TException {
-        return permissionTypeRepository.get(permissionTypeId);
+    public PermissionType getPermissionType(String domainId, String permissionTypeId) throws SharingRegistryException, TException {
+        PermissionTypePK permissionTypePK =  new PermissionTypePK();
+        permissionTypePK.setDomainId(domainId);
+        permissionTypePK.setPermissionTypeId(permissionTypeId);
+        return permissionTypeRepository.get(permissionTypePK);
     }
 
     @Override
@@ -368,10 +428,17 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      */
     @Override
     public String registerEntity(Entity entity) throws SharingRegistryException, TException {
-        if(entityRepository.get(entity.entityId) != null)
+        EntityPK entityPK = new EntityPK();
+        entityPK.setDomainId(entity.domainId);
+        entityPK.setEntityId(entity.entityId);
+        if(entityRepository.get(entityPK) != null)
             throw new SharingRegistryException("There exist Entity with given Entity id");
 
-        if(!userRepository.isExists(entity.getOwnerId())){
+        UserPK userPK = new UserPK();
+        userPK.setDomainId(entity.domainId);
+        userPK.setUserId(entity.ownerId);
+        if(!userRepository.isExists(userPK)){
+            //Todo this is for Airavata easy integration. Proper thing is to throw an exception here
             User user = new User();
             user.setUserId(entity.getOwnerId());
             user.setDomainId(entity.domainId);
@@ -391,6 +458,7 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
         newSharing.setGroupId(entity.ownerId);
         newSharing.setSharingType(SharingType.DIRECT_CASCADING);
         newSharing.setInheritedParentId(entity.entityId);
+        newSharing.setDomainId(entity.domainId);
         newSharing.setCreatedTime(System.currentTimeMillis());
         newSharing.setUpdatedTime(System.currentTimeMillis());
 
@@ -398,7 +466,7 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
 
         //creating records for inherited permissions
         if(entity.getParentEntityId() != null && entity.getParentEntityId() != ""){
-            List<Sharing> sharings = sharingRepository.getCascadingPermissionsForEntity(entity.parentEntityId);
+            List<Sharing> sharings = sharingRepository.getCascadingPermissionsForEntity(entity.domainId, entity.parentEntityId);
             for(Sharing sharing : sharings){
                 newSharing = new Sharing();
                 newSharing.setPermissionTypeId(sharing.permissionTypeId);
@@ -406,6 +474,7 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
                 newSharing.setGroupId(sharing.groupId);
                 newSharing.setInheritedParentId(sharing.inheritedParentId);
                 newSharing.setSharingType(SharingType.INDIRECT_CASCADING);
+                newSharing.setDomainId(entity.domainId);
                 newSharing.setCreatedTime(System.currentTimeMillis());
                 newSharing.setUpdatedTime(System.currentTimeMillis());
 
@@ -420,7 +489,10 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     public boolean updateEntity(Entity entity) throws SharingRegistryException, TException {
         //TODO Check for permission changes
         entity.setUpdatedTime(System.currentTimeMillis());
-        Entity oldEntity = entityRepository.get(entity.getEntityId());
+        EntityPK entityPK = new EntityPK();
+        entityPK.setDomainId(entity.domainId);
+        entityPK.setEntityId(entity.entityId);
+        Entity oldEntity = entityRepository.get(entityPK);
         entity.setCreatedTime(oldEntity.createdTime);
         entity = getUpdatedObject(oldEntity, entity);
         entityRepository.update(entity);
@@ -428,34 +500,40 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public boolean deleteEntity(String entityId) throws SharingRegistryException, TException {
+    public boolean deleteEntity(String domainId, String entityId) throws SharingRegistryException, TException {
         //TODO Check for permission changes
-        entityRepository.delete(entityId);
+        EntityPK entityPK = new EntityPK();
+        entityPK.setDomainId(domainId);
+        entityPK.setEntityId(entityId);
+        entityRepository.delete(entityPK);
         return true;
     }
 
     @Override
-    public Entity getEntity(String entityId) throws SharingRegistryException, TException {
-        return entityRepository.get(entityId);
+    public Entity getEntity(String domainId, String entityId) throws SharingRegistryException, TException {
+        EntityPK entityPK = new EntityPK();
+        entityPK.setDomainId(domainId);
+        entityPK.setEntityId(entityId);
+        return entityRepository.get(entityPK);
     }
 
     @Override
-    public List<Entity> searchEntities(String userId, String entityTypeId, List<SearchCriteria> filters,
+    public List<Entity> searchEntities(String domainId, String userId, String entityTypeId, List<SearchCriteria> filters,
                                        int offset, int limit) throws SharingRegistryException, TException {
         List<String> groupIds = new ArrayList<>();
         groupIds.add(userId);
-        groupMembershipRepository.getAllParentMembershipsForChild(userId).stream().forEach(gm->groupIds.add(gm.parentId));
-        return entityRepository.searchEntities(groupIds, entityTypeId, filters, offset, limit);
+        groupMembershipRepository.getAllParentMembershipsForChild(domainId, userId).stream().forEach(gm->groupIds.add(gm.parentId));
+        return entityRepository.searchEntities(domainId, groupIds, entityTypeId, filters, offset, limit);
     }
 
     @Override
-    public List<User> getListOfSharedUsers(String entityId, String permissionTypeId) throws SharingRegistryException, TException {
-        return userRepository.getAccessibleUsers(entityId, permissionTypeId);
+    public List<User> getListOfSharedUsers(String domainId, String entityId, String permissionTypeId) throws SharingRegistryException, TException {
+        return userRepository.getAccessibleUsers(domainId, entityId, permissionTypeId);
     }
 
     @Override
-    public List<UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws SharingRegistryException, TException {
-        return userGroupRepository.getAccessibleGroups(entityId, permissionTypeId);
+    public List<UserGroup> getListOfSharedGroups(String domainId, String entityId, String permissionTypeId) throws SharingRegistryException, TException {
+        return userGroupRepository.getAccessibleGroups(domainId, entityId, permissionTypeId);
     }
 
     /**
@@ -489,6 +567,7 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
             sharing.setEntityId(entityId);
             sharing.setGroupId(userId);
             sharing.setInheritedParentId(entityId);
+            sharing.setDomainId(domainId);
             if(cascadePermission) {
                 sharing.setSharingType(SharingType.DIRECT_CASCADING);
             }else {
@@ -514,6 +593,7 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
                     sharing.setInheritedParentId(entityId);
                     sharing.setSharingType(SharingType.INDIRECT_CASCADING);
                     sharing.setInheritedParentId(entityId);
+                    sharing.setDomainId(domainId);
                     sharing.setCreatedTime(System.currentTimeMillis());
                     sharing.setUpdatedTime(System.currentTimeMillis());
                     sharingRepository.create(sharing);
@@ -538,11 +618,11 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     @Override
     public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws SharingRegistryException, TException {
         //check whether the user has permission directly or indirectly
-        List<GroupMembership> parentMemberships = groupMembershipRepository.getAllParentMembershipsForChild(userId);
+        List<GroupMembership> parentMemberships = groupMembershipRepository.getAllParentMembershipsForChild(domainId, userId);
         List<String> groupIds = new ArrayList<>();
         parentMemberships.stream().forEach(pm->groupIds.add(pm.parentId));
         groupIds.add(userId);
-        return sharingRepository.hasAccess(entityId, groupIds, Arrays.asList(permissionTypeId,
+        return sharingRepository.hasAccess(domainId, entityId, groupIds, Arrays.asList(permissionTypeId,
                 permissionTypeRepository.getGlobalPermissionTypeIdForDomain(domainId)));
     }
 
@@ -553,28 +633,30 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
 
         //revoking permission for the entity
         for(String groupId : groupOrUserList){
-            SharingEntityPK sharingEntityPK = new SharingEntityPK();
-            sharingEntityPK.setEntityId(entityId);
-            sharingEntityPK.setGroupId(groupId);
-            sharingEntityPK.setPermissionTypeId(permissionTypeId);
-            sharingEntityPK.setInheritedParentId(entityId);
-
-            sharingRepository.delete(sharingEntityPK);
+            SharingPK sharingPK = new SharingPK();
+            sharingPK.setEntityId(entityId);
+            sharingPK.setGroupId(groupId);
+            sharingPK.setPermissionTypeId(permissionTypeId);
+            sharingPK.setInheritedParentId(entityId);
+            sharingPK.setDomainId(domainId);
+
+            sharingRepository.delete(sharingPK);
         }
 
         //revoking permission from inheritance
         List<Sharing> temp = new ArrayList<>();
-        sharingRepository.getIndirectSharedChildren(entityId, permissionTypeId).stream().forEach(s->temp.add(s));
+        sharingRepository.getIndirectSharedChildren(domainId, entityId, permissionTypeId).stream().forEach(s->temp.add(s));
         for(Sharing sharing : temp){
             String childEntityId = sharing.entityId;
             for(String groupId : groupOrUserList){
-                SharingEntityPK sharingEntityPK = new SharingEntityPK();
-                sharingEntityPK.setEntityId(childEntityId);
-                sharingEntityPK.setGroupId(groupId);
-                sharingEntityPK.setPermissionTypeId(permissionTypeId);
-                sharingEntityPK.setInheritedParentId(entityId);
-
-                sharingRepository.delete(sharingEntityPK);
+                SharingPK sharingPK = new SharingPK();
+                sharingPK.setEntityId(childEntityId);
+                sharingPK.setGroupId(groupId);
+                sharingPK.setPermissionTypeId(permissionTypeId);
+                sharingPK.setInheritedParentId(entityId);
+                sharingPK.setDomainId(domainId);
+
+                sharingRepository.delete(sharingPK);
             }
         }
         return true;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml b/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
index 7b08528..a9f808c 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
+++ b/modules/sharing-registry/sharing-registry-server/src/main/resources/META-INF/persistence.xml
@@ -9,7 +9,7 @@
         <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.SharingUserEntity</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/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
index e1937fd..0b5167a 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
+++ b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
@@ -38,7 +38,7 @@ CREATE TABLE SHARING_USER (
   ICON BLOB,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (USER_ID),
+  PRIMARY KEY (USER_ID, DOMAIN_ID),
   FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
@@ -52,21 +52,21 @@ CREATE TABLE USER_GROUP (
   GROUP_CARDINALITY VARCHAR(255) NOT NULL,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (GROUP_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+  PRIMARY KEY (GROUP_ID, DOMAIN_ID),
+  FOREIGN KEY (OWNER_ID, DOMAIN_ID) REFERENCES SHARING_USER(USER_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 
 CREATE TABLE GROUP_MEMBERSHIP (
   PARENT_ID VARCHAR(255) NOT NULL,
   CHILD_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
   CHILD_TYPE VARCHAR(255) NOT NULL,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PARENT_ID, CHILD_ID),
-  FOREIGN KEY (PARENT_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (CHILD_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+  PRIMARY KEY (PARENT_ID, CHILD_ID, DOMAIN_ID),
+  FOREIGN KEY (PARENT_ID, DOMAIN_ID) REFERENCES USER_GROUP(GROUP_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (CHILD_ID, DOMAIN_ID) REFERENCES USER_GROUP(GROUP_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 CREATE TABLE ENTITY_TYPE (
@@ -76,7 +76,7 @@ CREATE TABLE ENTITY_TYPE (
   DESCRIPTION VARCHAR(255),
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (ENTITY_TYPE_ID),
+  PRIMARY KEY (ENTITY_TYPE_ID, DOMAIN_ID),
   FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
@@ -87,7 +87,7 @@ CREATE TABLE PERMISSION_TYPE (
   DESCRIPTION VARCHAR(255),
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PERMISSION_TYPE_ID),
+  PRIMARY KEY (PERMISSION_TYPE_ID, DOMAIN_ID),
   FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
@@ -99,38 +99,31 @@ CREATE TABLE ENTITY (
   PARENT_ENTITY_ID VARCHAR(255),
   NAME VARCHAR(255) NOT NULL,
   DESCRIPTION VARCHAR(255),
+  BINARY_DATA BLOB,
   FULL_TEXT CLOB,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (ENTITY_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+  PRIMARY KEY (ENTITY_ID, DOMAIN_ID),
+  FOREIGN KEY (ENTITY_TYPE_ID, DOMAIN_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (OWNER_ID, DOMAIN_ID) REFERENCES SHARING_USER(USER_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (PARENT_ENTITY_ID, DOMAIN_ID) REFERENCES ENTITY(ENTITY_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 -- ALTER TABLE ENTITY ADD FULLTEXT FULL_TEXT_INDEX(FULL_TEXT);
 
-CREATE TABLE ENTITY_METADATA (
-  ENTITY_ID VARCHAR (255) NOT NULL,
-  META_KEY VARCHAR (255) NOT NULL,
-  META_VALUE VARCHAR (255) NOT NULL,
-  PRIMARY KEY (ENTITY_ID, META_KEY),
-  FOREIGN KEY (ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
 CREATE TABLE SHARING (
   PERMISSION_TYPE_ID VARCHAR(255) NOT NULL,
   ENTITY_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR (255) NOT NULL,
   GROUP_ID VARCHAR(255) NOT NULL,
   SHARING_TYPE VARCHAR(255) NOT NULL,
   INHERITED_PARENT_ID VARCHAR(255),
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID, INHERITED_PARENT_ID),
-  FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (INHERITED_PARENT_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+  PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID, DOMAIN_ID, INHERITED_PARENT_ID),
+  FOREIGN KEY (PERMISSION_TYPE_ID, DOMAIN_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (INHERITED_PARENT_ID, DOMAIN_ID) REFERENCES ENTITY(ENTITY_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (GROUP_ID, DOMAIN_ID) REFERENCES USER_GROUP(GROUP_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 CREATE TABLE CONFIGURATION

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
index 675fad3..ce7a9bf 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
+++ b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
@@ -38,8 +38,8 @@ CREATE TABLE SHARING_USER (
   ICON BLOB,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (USER_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE
+  PRIMARY KEY (USER_ID, DOMAIN_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 CREATE TABLE USER_GROUP (
@@ -52,21 +52,21 @@ CREATE TABLE USER_GROUP (
   GROUP_CARDINALITY VARCHAR(255) NOT NULL,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (GROUP_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE,
-  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE CASCADE
+  PRIMARY KEY (GROUP_ID, DOMAIN_ID),
+  FOREIGN KEY (OWNER_ID, DOMAIN_ID) REFERENCES SHARING_USER(USER_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 
 CREATE TABLE GROUP_MEMBERSHIP (
   PARENT_ID VARCHAR(255) NOT NULL,
   CHILD_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
   CHILD_TYPE VARCHAR(255) NOT NULL,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  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
+  PRIMARY KEY (PARENT_ID, CHILD_ID, DOMAIN_ID),
+  FOREIGN KEY (PARENT_ID, DOMAIN_ID) REFERENCES USER_GROUP(GROUP_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (CHILD_ID, DOMAIN_ID) REFERENCES USER_GROUP(GROUP_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 CREATE TABLE ENTITY_TYPE (
@@ -76,8 +76,8 @@ CREATE TABLE ENTITY_TYPE (
   DESCRIPTION VARCHAR(255),
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (ENTITY_TYPE_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE
+  PRIMARY KEY (ENTITY_TYPE_ID, DOMAIN_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 CREATE TABLE PERMISSION_TYPE (
@@ -87,8 +87,8 @@ CREATE TABLE PERMISSION_TYPE (
   DESCRIPTION VARCHAR(255),
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PERMISSION_TYPE_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE
+  PRIMARY KEY (PERMISSION_TYPE_ID, DOMAIN_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 CREATE TABLE ENTITY (
@@ -99,38 +99,31 @@ CREATE TABLE ENTITY (
   PARENT_ENTITY_ID VARCHAR(255),
   NAME VARCHAR(255) NOT NULL,
   DESCRIPTION VARCHAR(255),
+  BINARY_DATA BLOB,
   FULL_TEXT TEXT,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  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 SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE CASCADE,
-  FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE CASCADE
+  PRIMARY KEY (ENTITY_ID, DOMAIN_ID),
+  FOREIGN KEY (ENTITY_TYPE_ID, DOMAIN_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (OWNER_ID, DOMAIN_ID) REFERENCES SHARING_USER(USER_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (PARENT_ENTITY_ID, DOMAIN_ID) REFERENCES ENTITY(ENTITY_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 ALTER TABLE ENTITY ADD FULLTEXT FULL_TEXT_INDEX(FULL_TEXT);
 
-CREATE TABLE ENTITY_METADATA (
-  ENTITY_ID VARCHAR (255) NOT NULL,
-  META_KEY VARCHAR (255) NOT NULL,
-  META_VALUE VARCHAR (255) NOT NULL,
-  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) NOT NULL,
   ENTITY_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR (255) NOT NULL,
   GROUP_ID VARCHAR(255) NOT NULL,
   SHARING_TYPE VARCHAR(255) NOT NULL,
   INHERITED_PARENT_ID VARCHAR(255),
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID, INHERITED_PARENT_ID),
-  FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID) ON DELETE CASCADE ON UPDATE CASCADE,
-  FOREIGN KEY (INHERITED_PARENT_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE CASCADE,
-  FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE CASCADE
+  PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID, DOMAIN_ID, INHERITED_PARENT_ID),
+  FOREIGN KEY (PERMISSION_TYPE_ID, DOMAIN_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (INHERITED_PARENT_ID, DOMAIN_ID) REFERENCES ENTITY(ENTITY_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (GROUP_ID, DOMAIN_ID) REFERENCES USER_GROUP(GROUP_ID, DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
 );
 
 CREATE TABLE CONFIGURATION

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
index df0dcba..499fc88 100644
--- a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
+++ b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
@@ -34,8 +34,6 @@ import org.slf4j.LoggerFactory;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
 
 public class SharingRegistryServerHandlerTest {
     private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServerHandlerTest.class);
@@ -130,12 +128,12 @@ public class SharingRegistryServerHandlerTest {
 
         Assert.assertNotNull(sharingRegistryServerHandler.createGroup(userGroup2));
 
-        sharingRegistryServerHandler.addUsersToGroup(Arrays.asList(userId1), groupId1);
-        sharingRegistryServerHandler.addUsersToGroup(Arrays.asList(userId2, userId3), groupId2);
-        sharingRegistryServerHandler.addChildGroupsToParentGroup(Arrays.asList(groupId2), groupId1);
+        sharingRegistryServerHandler.addUsersToGroup(domainId, Arrays.asList(userId1), groupId1);
+        sharingRegistryServerHandler.addUsersToGroup(domainId, Arrays.asList(userId2, userId3), groupId2);
+        sharingRegistryServerHandler.addChildGroupsToParentGroup(domainId, Arrays.asList(groupId2), groupId1);
 
-        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembersOfTypeGroup(groupId1, 0, 10).size() == 1);
-        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembersOfTypeUser(groupId2, 0, 10).size() == 2);
+        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembersOfTypeGroup(domainId, groupId1, 0, 10).size() == 1);
+        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembersOfTypeUser(domainId, groupId2, 0, 10).size() == 2);
 
 
         //Creating permission types
@@ -203,9 +201,6 @@ public class SharingRegistryServerHandlerTest {
         entity1.setOwnerId(userId1);
         entity1.setName("Project name 1");
         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());
@@ -221,9 +216,6 @@ public class SharingRegistryServerHandlerTest {
         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());
@@ -239,9 +231,6 @@ public class SharingRegistryServerHandlerTest {
         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());
@@ -260,9 +249,6 @@ public class SharingRegistryServerHandlerTest {
         entity4.setName("Input name");
         entity4.setDescription("Input file description");
         entity4.setParentEntityId(entityId3);
-        metadataMap = new HashMap<>();
-        metadataMap.put("key", "val");
-        entity4.setMetadata(metadataMap);
         entity4.setFullText("Input File");
         entity4.setCreatedTime(System.currentTimeMillis());
         entity4.setUpdatedTime(System.currentTimeMillis());
@@ -281,10 +267,10 @@ public class SharingRegistryServerHandlerTest {
         searchCriteria.setValue("Input");
         searchCriteria.setSearchField(EntitySearchField.NAME);
         filters.add(searchCriteria);
-        Assert.assertTrue(sharingRegistryServerHandler.searchEntities(userId1, entityTypeId3, filters, 0, -1).size() > 0);
+        Assert.assertTrue(sharingRegistryServerHandler.searchEntities(domainId, userId1, entityTypeId3, filters, 0, -1).size() > 0);
 
-        Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedUsers(entityId1, permissionTypeId1));
-        Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedGroups(entityId1, permissionTypeId1));
+        Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedUsers(domainId, entityId1, permissionTypeId1));
+        Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedGroups(domainId, entityId1, permissionTypeId1));
 
 //        sharingRegistryServerHandler.revokeEntitySharingFromUsers(entityId1, Arrays.asList(userId2), permissionTypeId1);
 //        sharingRegistryServerHandler.revokeEntitySharingFromGroups(entityId3, Arrays.asList(groupId2), permissionTypeId1);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index f7ea565..4d1f544 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : Will be set by the system</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 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/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
index 81aaf90..f1ae4b8 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
@@ -36,20 +36,20 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**
  * <p>Entity object which is used to register an entity in the system.</p>
- * <li><b>entityId</b> : Client id provided by the client</li>
+ * <li><b>entityId</b> : Entity id provided by the client</li>
  * <li><b>domainId</b> : Domain id</li>
  * <li><b>entityTypeId</b> : Entity type id</li>
  * <li><b>ownerId</b> : Owner id</li>
  * <li>parentEntityId : Parent entity id</li>
  * <li><b>name</b> : Name</li>
  * <li>description : Short description for the entity</li>
- * <li>metadata : Map of optional metadata</li>
+ * <li>binaryData : Any information stored in binary format</li>
  * <li>fullText : A string which will be considered for full text search</li>
  * <li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
  * <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 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");
 
@@ -60,7 +60,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
   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 BINARY_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryData", org.apache.thrift.protocol.TType.STRING, (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);
@@ -78,7 +78,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
   public String parentEntityId; // optional
   public String name; // optional
   public String description; // optional
-  public Map<String,String> metadata; // optional
+  public ByteBuffer binaryData; // optional
   public String fullText; // optional
   public long createdTime; // optional
   public long updatedTime; // optional
@@ -92,7 +92,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
     PARENT_ENTITY_ID((short)5, "parentEntityId"),
     NAME((short)6, "name"),
     DESCRIPTION((short)7, "description"),
-    METADATA((short)8, "metadata"),
+    BINARY_DATA((short)8, "binaryData"),
     FULL_TEXT((short)9, "fullText"),
     CREATED_TIME((short)10, "createdTime"),
     UPDATED_TIME((short)11, "updatedTime");
@@ -124,8 +124,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
           return NAME;
         case 7: // DESCRIPTION
           return DESCRIPTION;
-        case 8: // METADATA
-          return METADATA;
+        case 8: // BINARY_DATA
+          return BINARY_DATA;
         case 9: // FULL_TEXT
           return FULL_TEXT;
         case 10: // CREATED_TIME
@@ -175,7 +175,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.PARENT_ENTITY_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.BINARY_DATA,_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);
@@ -193,10 +193,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.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.BINARY_DATA, new org.apache.thrift.meta_data.FieldMetaData("binaryData", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     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, 
@@ -236,9 +234,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
     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.isSetBinaryData()) {
+      this.binaryData = org.apache.thrift.TBaseHelper.copyBinary(other.binaryData);
     }
     if (other.isSetFullText()) {
       this.fullText = other.fullText;
@@ -260,7 +257,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
     this.parentEntityId = null;
     this.name = null;
     this.description = null;
-    this.metadata = null;
+    this.binaryData = null;
     this.fullText = null;
     setCreatedTimeIsSet(false);
     this.createdTime = 0;
@@ -436,38 +433,37 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
     }
   }
 
-  public int getMetadataSize() {
-    return (this.metadata == null) ? 0 : this.metadata.size();
+  public byte[] getBinaryData() {
+    setBinaryData(org.apache.thrift.TBaseHelper.rightSize(binaryData));
+    return binaryData == null ? null : binaryData.array();
   }
 
-  public void putToMetadata(String key, String val) {
-    if (this.metadata == null) {
-      this.metadata = new HashMap<String,String>();
-    }
-    this.metadata.put(key, val);
+  public ByteBuffer bufferForBinaryData() {
+    return org.apache.thrift.TBaseHelper.copyBinary(binaryData);
   }
 
-  public Map<String,String> getMetadata() {
-    return this.metadata;
+  public Entity setBinaryData(byte[] binaryData) {
+    this.binaryData = binaryData == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(binaryData, binaryData.length));
+    return this;
   }
 
-  public Entity setMetadata(Map<String,String> metadata) {
-    this.metadata = metadata;
+  public Entity setBinaryData(ByteBuffer binaryData) {
+    this.binaryData = org.apache.thrift.TBaseHelper.copyBinary(binaryData);
     return this;
   }
 
-  public void unsetMetadata() {
-    this.metadata = null;
+  public void unsetBinaryData() {
+    this.binaryData = null;
   }
 
-  /** Returns true if field metadata is set (has been assigned a value) and false otherwise */
-  public boolean isSetMetadata() {
-    return this.metadata != null;
+  /** Returns true if field binaryData is set (has been assigned a value) and false otherwise */
+  public boolean isSetBinaryData() {
+    return this.binaryData != null;
   }
 
-  public void setMetadataIsSet(boolean value) {
+  public void setBinaryDataIsSet(boolean value) {
     if (!value) {
-      this.metadata = null;
+      this.binaryData = null;
     }
   }
 
@@ -599,11 +595,11 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
       }
       break;
 
-    case METADATA:
+    case BINARY_DATA:
       if (value == null) {
-        unsetMetadata();
+        unsetBinaryData();
       } else {
-        setMetadata((Map<String,String>)value);
+        setBinaryData((ByteBuffer)value);
       }
       break;
 
@@ -657,8 +653,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
     case DESCRIPTION:
       return getDescription();
 
-    case METADATA:
-      return getMetadata();
+    case BINARY_DATA:
+      return getBinaryData();
 
     case FULL_TEXT:
       return getFullText();
@@ -694,8 +690,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
       return isSetName();
     case DESCRIPTION:
       return isSetDescription();
-    case METADATA:
-      return isSetMetadata();
+    case BINARY_DATA:
+      return isSetBinaryData();
     case FULL_TEXT:
       return isSetFullText();
     case CREATED_TIME:
@@ -782,12 +778,12 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
         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))
+    boolean this_present_binaryData = true && this.isSetBinaryData();
+    boolean that_present_binaryData = true && that.isSetBinaryData();
+    if (this_present_binaryData || that_present_binaryData) {
+      if (!(this_present_binaryData && that_present_binaryData))
         return false;
-      if (!this.metadata.equals(that.metadata))
+      if (!this.binaryData.equals(that.binaryData))
         return false;
     }
 
@@ -860,10 +856,10 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
     if (present_description)
       list.add(description);
 
-    boolean present_metadata = true && (isSetMetadata());
-    list.add(present_metadata);
-    if (present_metadata)
-      list.add(metadata);
+    boolean present_binaryData = true && (isSetBinaryData());
+    list.add(present_binaryData);
+    if (present_binaryData)
+      list.add(binaryData);
 
     boolean present_fullText = true && (isSetFullText());
     list.add(present_fullText);
@@ -961,12 +957,12 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
+    lastComparison = Boolean.valueOf(isSetBinaryData()).compareTo(other.isSetBinaryData());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetMetadata()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
+    if (isSetBinaryData()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryData, other.binaryData);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -1090,13 +1086,13 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
       }
       first = false;
     }
-    if (isSetMetadata()) {
+    if (isSetBinaryData()) {
       if (!first) sb.append(", ");
-      sb.append("metadata:");
-      if (this.metadata == null) {
+      sb.append("binaryData:");
+      if (this.binaryData == null) {
         sb.append("null");
       } else {
-        sb.append(this.metadata);
+        org.apache.thrift.TBaseHelper.toString(this.binaryData, sb);
       }
       first = false;
     }
@@ -1223,22 +1219,10 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
               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);
+          case 8: // BINARY_DATA
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.binaryData = iprot.readBinary();
+              struct.setBinaryDataIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1331,18 +1315,10 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
           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();
-          }
+      if (struct.binaryData != null) {
+        if (struct.isSetBinaryData()) {
+          oprot.writeFieldBegin(BINARY_DATA_FIELD_DESC);
+          oprot.writeBinary(struct.binaryData);
           oprot.writeFieldEnd();
         }
       }
@@ -1402,7 +1378,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
       if (struct.isSetDescription()) {
         optionals.set(6);
       }
-      if (struct.isSetMetadata()) {
+      if (struct.isSetBinaryData()) {
         optionals.set(7);
       }
       if (struct.isSetFullText()) {
@@ -1436,15 +1412,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
       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.isSetBinaryData()) {
+        oprot.writeBinary(struct.binaryData);
       }
       if (struct.isSetFullText()) {
         oprot.writeString(struct.fullText);
@@ -1490,19 +1459,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
         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);
+        struct.binaryData = iprot.readBinary();
+        struct.setBinaryDataIsSet(true);
       }
       if (incoming.get(8)) {
         struct.fullText = iprot.readString();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
index 50d52de..2195848 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**
  * <p>client defined entity types</p>
- * <li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
+ * <li><b>entityTypeId</b> : Entity type id provided by the client</li>
  * <li><b>domainId</b> : Domain id of the domain.</li>
  * <li><b>name</b> : Name for the entity type. Should be a single word.</li>
  * <li>description : Short description for the entity type.</li>
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : Will be set by the system</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 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");
 
@@ -166,8 +166,6 @@ public class EntityType implements org.apache.thrift.TBase<EntityType, EntityTyp
   }
 
   public EntityType() {
-    this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
-
   }
 
   /**
@@ -197,8 +195,7 @@ public class EntityType implements org.apache.thrift.TBase<EntityType, EntityTyp
 
   @Override
   public void clear() {
-    this.entityTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
-
+    this.entityTypeId = null;
     this.domainId = null;
     this.name = null;
     this.description = null;


[10/51] [abbrv] airavata git commit: Adding getAllSSHKeyForUsersInGateway and removing dates in auto gen files

Posted by sc...@apache.org.
Adding getAllSSHKeyForUsersInGateway and removing dates in auto gen files


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

Branch: refs/heads/airavata-gov-registry
Commit: ac769369bb3b5c42d28ee0bc96b3fbfe251f8474
Parents: d8c17d9
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Wed Oct 12 12:53:56 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 12:53:56 2016 -0400

----------------------------------------------------------------------
 .../server/CredentialStoreServerHandler.java    |   35 +
 .../store/cpi/CredentialStoreService.java       | 1200 +++++++++++++++++-
 .../store/datamodel/CertificateCredential.java  |   27 +-
 .../store/datamodel/CommunityUser.java          |   26 +-
 .../store/datamodel/PasswordCredential.java     |   27 +-
 .../store/datamodel/SSHCredential.java          |   27 +-
 .../store/datamodel/SSHCredentialSummary.java   |   27 +-
 .../exception/CredentialStoreException.java     |    2 +-
 .../component-cpis/credential-store-cpi.thrift  |    2 +
 9 files changed, 1231 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
index e8d0ef2..4914395 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
@@ -340,6 +340,7 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
                         sshCredentialSummary.setUsername(sshCredential.getPortalUserName());
                         sshCredentialSummary.setGatewayId(sshCredential.getGateway());
                         sshCredentialSummary.setDescription(sshCredential.getDescription());
+                        sshCredentialSummary.setPublicKey(new String(sshCredential.getPublicKey()));
                         summaryList.add(sshCredentialSummary);
                     }
                 }
@@ -352,6 +353,40 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
     }
 
     @Override
+    public List<SSHCredentialSummary> getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException {
+        Map<String, String> sshKeyMap = new HashMap<>();
+        List<SSHCredentialSummary> summaryList = new ArrayList<>();
+        try {
+            List<Credential> allCredentials = credentialReader.getAllCredentials();
+            if (allCredentials != null && !allCredentials.isEmpty()){
+                for (Credential credential : allCredentials) {
+                    if (credential instanceof org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) {
+                        org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredential = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential;
+                        String portalUserName = sshCredential.getPortalUserName();
+                        String gateway = sshCredential.getGateway();
+                        if (portalUserName != null && gateway != null){
+                            if (portalUserName.equals(userId) && gateway.equals(gatewayId)) {
+                                org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredentialKey = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential;
+                                SSHCredentialSummary sshCredentialSummary = new SSHCredentialSummary();
+                                sshCredentialSummary.setToken(sshCredentialKey.getToken());
+                                sshCredentialSummary.setUsername(sshCredentialKey.getPortalUserName());
+                                sshCredentialSummary.setGatewayId(sshCredentialKey.getGateway());
+                                sshCredentialSummary.setDescription(sshCredentialKey.getDescription());
+                                sshCredentialSummary.setPublicKey(new String(sshCredentialKey.getPublicKey()));
+                                summaryList.add(sshCredentialSummary);
+                            }
+                        }
+                    }
+                }
+            }
+        } catch (CredentialStoreException e) {
+            log.error("Error occurred while retrieving credential Summary", e);
+            throw new org.apache.airavata.credential.store.exception.CredentialStoreException("Error occurred while retrieving credential Summary");
+        }
+        return summaryList;
+    }
+
+    @Override
     public Map<String, String> getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException {
         Map<String, String> pwdCredMap = new HashMap<>();
         try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
index 93e088c..1686c76 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
@@ -22,23 +22,35 @@
  */
 package org.apache.airavata.credential.store.cpi;
 
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-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.server.AbstractNonblockingServer.AsyncFrameBuffer;
+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 javax.annotation.Generated;
-import java.util.*;
-
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class CredentialStoreService {
 
   public interface Iface {
@@ -74,6 +86,8 @@ public class CredentialStoreService {
 
     public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
+
     public Map<String,String> getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
 
     public boolean deleteSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
@@ -106,6 +120,8 @@ public class CredentialStoreService {
 
     public void getAllGatewaySSHCredentialSummary(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void getAllPWDCredentialsForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void deleteSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -420,6 +436,33 @@ public class CredentialStoreService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGatewaySSHCredentialSummary failed: unknown result");
     }
 
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      send_getAllSSHCredentialSummaryForUserInGateway(gatewayId, userId);
+      return recv_getAllSSHCredentialSummaryForUserInGateway();
+    }
+
+    public void send_getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId) throws org.apache.thrift.TException
+    {
+      getAllSSHCredentialSummaryForUserInGateway_args args = new getAllSSHCredentialSummaryForUserInGateway_args();
+      args.setGatewayId(gatewayId);
+      args.setUserId(userId);
+      sendBase("getAllSSHCredentialSummaryForUserInGateway", args);
+    }
+
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> recv_getAllSSHCredentialSummaryForUserInGateway() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
+    {
+      getAllSSHCredentialSummaryForUserInGateway_result result = new getAllSSHCredentialSummaryForUserInGateway_result();
+      receiveBase(result, "getAllSSHCredentialSummaryForUserInGateway");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.csException != null) {
+        throw result.csException;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSSHCredentialSummaryForUserInGateway failed: unknown result");
+    }
+
     public Map<String,String> getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
     {
       send_getAllPWDCredentialsForGateway(gatewayId);
@@ -879,6 +922,41 @@ public class CredentialStoreService {
       }
     }
 
+    public void getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getAllSSHCredentialSummaryForUserInGateway_call method_call = new getAllSSHCredentialSummaryForUserInGateway_call(gatewayId, userId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getAllSSHCredentialSummaryForUserInGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String gatewayId;
+      private String userId;
+      public getAllSSHCredentialSummaryForUserInGateway_call(String gatewayId, 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.gatewayId = gatewayId;
+        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("getAllSSHCredentialSummaryForUserInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getAllSSHCredentialSummaryForUserInGateway_args args = new getAllSSHCredentialSummaryForUserInGateway_args();
+        args.setGatewayId(gatewayId);
+        args.setUserId(userId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getAllSSHCredentialSummaryForUserInGateway();
+      }
+    }
+
     public void getAllPWDCredentialsForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       getAllPWDCredentialsForGateway_call method_call = new getAllPWDCredentialsForGateway_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport);
@@ -1005,6 +1083,7 @@ public class CredentialStoreService {
       processMap.put("getAllSSHKeysForUser", new getAllSSHKeysForUser());
       processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway());
       processMap.put("getAllGatewaySSHCredentialSummary", new getAllGatewaySSHCredentialSummary());
+      processMap.put("getAllSSHCredentialSummaryForUserInGateway", new getAllSSHCredentialSummaryForUserInGateway());
       processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway());
       processMap.put("deleteSSHCredential", new deleteSSHCredential());
       processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -1271,6 +1350,30 @@ public class CredentialStoreService {
       }
     }
 
+    public static class getAllSSHCredentialSummaryForUserInGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllSSHCredentialSummaryForUserInGateway_args> {
+      public getAllSSHCredentialSummaryForUserInGateway() {
+        super("getAllSSHCredentialSummaryForUserInGateway");
+      }
+
+      public getAllSSHCredentialSummaryForUserInGateway_args getEmptyArgsInstance() {
+        return new getAllSSHCredentialSummaryForUserInGateway_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getAllSSHCredentialSummaryForUserInGateway_result getResult(I iface, getAllSSHCredentialSummaryForUserInGateway_args args) throws org.apache.thrift.TException {
+        getAllSSHCredentialSummaryForUserInGateway_result result = new getAllSSHCredentialSummaryForUserInGateway_result();
+        try {
+          result.success = iface.getAllSSHCredentialSummaryForUserInGateway(args.gatewayId, args.userId);
+        } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+          result.csException = csException;
+        }
+        return result;
+      }
+    }
+
     public static class getAllPWDCredentialsForGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPWDCredentialsForGateway_args> {
       public getAllPWDCredentialsForGateway() {
         super("getAllPWDCredentialsForGateway");
@@ -1369,6 +1472,7 @@ public class CredentialStoreService {
       processMap.put("getAllSSHKeysForUser", new getAllSSHKeysForUser());
       processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway());
       processMap.put("getAllGatewaySSHCredentialSummary", new getAllGatewaySSHCredentialSummary());
+      processMap.put("getAllSSHCredentialSummaryForUserInGateway", new getAllSSHCredentialSummaryForUserInGateway());
       processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway());
       processMap.put("deleteSSHCredential", new deleteSSHCredential());
       processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -1996,6 +2100,63 @@ public class CredentialStoreService {
       }
     }
 
+    public static class getAllSSHCredentialSummaryForUserInGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllSSHCredentialSummaryForUserInGateway_args, List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>> {
+      public getAllSSHCredentialSummaryForUserInGateway() {
+        super("getAllSSHCredentialSummaryForUserInGateway");
+      }
+
+      public getAllSSHCredentialSummaryForUserInGateway_args getEmptyArgsInstance() {
+        return new getAllSSHCredentialSummaryForUserInGateway_args();
+      }
+
+      public AsyncMethodCallback<List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>>() { 
+          public void onComplete(List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> o) {
+            getAllSSHCredentialSummaryForUserInGateway_result result = new getAllSSHCredentialSummaryForUserInGateway_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getAllSSHCredentialSummaryForUserInGateway_result result = new getAllSSHCredentialSummaryForUserInGateway_result();
+            if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
+                        result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
+                        result.setCsExceptionIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getAllSSHCredentialSummaryForUserInGateway_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>> resultHandler) throws TException {
+        iface.getAllSSHCredentialSummaryForUserInGateway(args.gatewayId, args.userId,resultHandler);
+      }
+    }
+
     public static class getAllPWDCredentialsForGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllPWDCredentialsForGateway_args, Map<String,String>> {
       public getAllPWDCredentialsForGateway() {
         super("getAllPWDCredentialsForGateway");
@@ -11597,6 +11758,983 @@ public class CredentialStoreService {
 
   }
 
+  public static class getAllSSHCredentialSummaryForUserInGateway_args implements org.apache.thrift.TBase<getAllSSHCredentialSummaryForUserInGateway_args, getAllSSHCredentialSummaryForUserInGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllSSHCredentialSummaryForUserInGateway_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHCredentialSummaryForUserInGateway_args");
+
+    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
+    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)2);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getAllSSHCredentialSummaryForUserInGateway_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllSSHCredentialSummaryForUserInGateway_argsTupleSchemeFactory());
+    }
+
+    public String gatewayId; // required
+    public String userId; // 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 {
+      GATEWAY_ID((short)1, "gatewayId"),
+      USER_ID((short)2, "userId");
+
+      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: // GATEWAY_ID
+            return GATEWAY_ID;
+          case 2: // USER_ID
+            return USER_ID;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", 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(getAllSSHCredentialSummaryForUserInGateway_args.class, metaDataMap);
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_args() {
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_args(
+      String gatewayId,
+      String userId)
+    {
+      this();
+      this.gatewayId = gatewayId;
+      this.userId = userId;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getAllSSHCredentialSummaryForUserInGateway_args(getAllSSHCredentialSummaryForUserInGateway_args other) {
+      if (other.isSetGatewayId()) {
+        this.gatewayId = other.gatewayId;
+      }
+      if (other.isSetUserId()) {
+        this.userId = other.userId;
+      }
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_args deepCopy() {
+      return new getAllSSHCredentialSummaryForUserInGateway_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.gatewayId = null;
+      this.userId = null;
+    }
+
+    public String getGatewayId() {
+      return this.gatewayId;
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_args setGatewayId(String gatewayId) {
+      this.gatewayId = gatewayId;
+      return this;
+    }
+
+    public void unsetGatewayId() {
+      this.gatewayId = null;
+    }
+
+    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+    public boolean isSetGatewayId() {
+      return this.gatewayId != null;
+    }
+
+    public void setGatewayIdIsSet(boolean value) {
+      if (!value) {
+        this.gatewayId = null;
+      }
+    }
+
+    public String getUserId() {
+      return this.userId;
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_args 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 void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case GATEWAY_ID:
+        if (value == null) {
+          unsetGatewayId();
+        } else {
+          setGatewayId((String)value);
+        }
+        break;
+
+      case USER_ID:
+        if (value == null) {
+          unsetUserId();
+        } else {
+          setUserId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case GATEWAY_ID:
+        return getGatewayId();
+
+      case USER_ID:
+        return getUserId();
+
+      }
+      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 GATEWAY_ID:
+        return isSetGatewayId();
+      case USER_ID:
+        return isSetUserId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getAllSSHCredentialSummaryForUserInGateway_args)
+        return this.equals((getAllSSHCredentialSummaryForUserInGateway_args)that);
+      return false;
+    }
+
+    public boolean equals(getAllSSHCredentialSummaryForUserInGateway_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_gatewayId = true && this.isSetGatewayId();
+      boolean that_present_gatewayId = true && that.isSetGatewayId();
+      if (this_present_gatewayId || that_present_gatewayId) {
+        if (!(this_present_gatewayId && that_present_gatewayId))
+          return false;
+        if (!this.gatewayId.equals(that.gatewayId))
+          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;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_gatewayId = true && (isSetGatewayId());
+      list.add(present_gatewayId);
+      if (present_gatewayId)
+        list.add(gatewayId);
+
+      boolean present_userId = true && (isSetUserId());
+      list.add(present_userId);
+      if (present_userId)
+        list.add(userId);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(getAllSSHCredentialSummaryForUserInGateway_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetGatewayId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      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;
+        }
+      }
+      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("getAllSSHCredentialSummaryForUserInGateway_args(");
+      boolean first = true;
+
+      sb.append("gatewayId:");
+      if (this.gatewayId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gatewayId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("userId:");
+      if (this.userId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.userId);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (gatewayId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+      }
+      if (userId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'userId' 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 getAllSSHCredentialSummaryForUserInGateway_argsStandardSchemeFactory implements SchemeFactory {
+      public getAllSSHCredentialSummaryForUserInGateway_argsStandardScheme getScheme() {
+        return new getAllSSHCredentialSummaryForUserInGateway_argsStandardScheme();
+      }
+    }
+
+    private static class getAllSSHCredentialSummaryForUserInGateway_argsStandardScheme extends StandardScheme<getAllSSHCredentialSummaryForUserInGateway_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // GATEWAY_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.gatewayId = iprot.readString();
+                struct.setGatewayIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // 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;
+            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, getAllSSHCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.gatewayId != null) {
+          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.gatewayId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.userId != null) {
+          oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+          oprot.writeString(struct.userId);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getAllSSHCredentialSummaryForUserInGateway_argsTupleSchemeFactory implements SchemeFactory {
+      public getAllSSHCredentialSummaryForUserInGateway_argsTupleScheme getScheme() {
+        return new getAllSSHCredentialSummaryForUserInGateway_argsTupleScheme();
+      }
+    }
+
+    private static class getAllSSHCredentialSummaryForUserInGateway_argsTupleScheme extends TupleScheme<getAllSSHCredentialSummaryForUserInGateway_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.gatewayId);
+        oprot.writeString(struct.userId);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.gatewayId = iprot.readString();
+        struct.setGatewayIdIsSet(true);
+        struct.userId = iprot.readString();
+        struct.setUserIdIsSet(true);
+      }
+    }
+
+  }
+
+  public static class getAllSSHCredentialSummaryForUserInGateway_result implements org.apache.thrift.TBase<getAllSSHCredentialSummaryForUserInGateway_result, getAllSSHCredentialSummaryForUserInGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllSSHCredentialSummaryForUserInGateway_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHCredentialSummaryForUserInGateway_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+    private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getAllSSHCredentialSummaryForUserInGateway_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllSSHCredentialSummaryForUserInGateway_resultTupleSchemeFactory());
+    }
+
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> success; // required
+    public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success"),
+      CS_EXCEPTION((short)1, "csException");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          case 1: // CS_EXCEPTION
+            return CS_EXCEPTION;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.SSHCredentialSummary.class))));
+      tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHCredentialSummaryForUserInGateway_result.class, metaDataMap);
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_result() {
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_result(
+      List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> success,
+      org.apache.airavata.credential.store.exception.CredentialStoreException csException)
+    {
+      this();
+      this.success = success;
+      this.csException = csException;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public getAllSSHCredentialSummaryForUserInGateway_result(getAllSSHCredentialSummaryForUserInGateway_result other) {
+      if (other.isSetSuccess()) {
+        List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> __this__success = new ArrayList<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>(other.success.size());
+        for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary other_element : other.success) {
+          __this__success.add(new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(other_element));
+        }
+        this.success = __this__success;
+      }
+      if (other.isSetCsException()) {
+        this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException);
+      }
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_result deepCopy() {
+      return new getAllSSHCredentialSummaryForUserInGateway_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+      this.csException = null;
+    }
+
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public java.util.Iterator<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary elem) {
+      if (this.success == null) {
+        this.success = new ArrayList<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> getSuccess() {
+      return this.success;
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_result setSuccess(List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary> success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() {
+      return this.csException;
+    }
+
+    public getAllSSHCredentialSummaryForUserInGateway_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
+      this.csException = csException;
+      return this;
+    }
+
+    public void unsetCsException() {
+      this.csException = null;
+    }
+
+    /** Returns true if field csException is set (has been assigned a value) and false otherwise */
+    public boolean isSetCsException() {
+      return this.csException != null;
+    }
+
+    public void setCsExceptionIsSet(boolean value) {
+      if (!value) {
+        this.csException = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((List<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>)value);
+        }
+        break;
+
+      case CS_EXCEPTION:
+        if (value == null) {
+          unsetCsException();
+        } else {
+          setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
+      case CS_EXCEPTION:
+        return getCsException();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
+      case CS_EXCEPTION:
+        return isSetCsException();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof getAllSSHCredentialSummaryForUserInGateway_result)
+        return this.equals((getAllSSHCredentialSummaryForUserInGateway_result)that);
+      return false;
+    }
+
+    public boolean equals(getAllSSHCredentialSummaryForUserInGateway_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
+      boolean this_present_csException = true && this.isSetCsException();
+      boolean that_present_csException = true && that.isSetCsException();
+      if (this_present_csException || that_present_csException) {
+        if (!(this_present_csException && that_present_csException))
+          return false;
+        if (!this.csException.equals(that.csException))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_success = true && (isSetSuccess());
+      list.add(present_success);
+      if (present_success)
+        list.add(success);
+
+      boolean present_csException = true && (isSetCsException());
+      list.add(present_csException);
+      if (present_csException)
+        list.add(csException);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(getAllSSHCredentialSummaryForUserInGateway_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetCsException()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException);
+        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("getAllSSHCredentialSummaryForUserInGateway_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("csException:");
+      if (this.csException == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.csException);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class getAllSSHCredentialSummaryForUserInGateway_resultStandardSchemeFactory implements SchemeFactory {
+      public getAllSSHCredentialSummaryForUserInGateway_resultStandardScheme getScheme() {
+        return new getAllSSHCredentialSummaryForUserInGateway_resultStandardScheme();
+      }
+    }
+
+    private static class getAllSSHCredentialSummaryForUserInGateway_resultStandardScheme extends StandardScheme<getAllSSHCredentialSummaryForUserInGateway_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
+                  struct.success = new ArrayList<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>(_list28.size);
+                  org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _elem29;
+                  for (int _i30 = 0; _i30 < _list28.size; ++_i30)
+                  {
+                    _elem29 = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary();
+                    _elem29.read(iprot);
+                    struct.success.add(_elem29);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // CS_EXCEPTION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException();
+                struct.csException.read(iprot);
+                struct.setCsExceptionIsSet(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, getAllSSHCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+            for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _iter31 : struct.success)
+            {
+              _iter31.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.csException != null) {
+          oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC);
+          struct.csException.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getAllSSHCredentialSummaryForUserInGateway_resultTupleSchemeFactory implements SchemeFactory {
+      public getAllSSHCredentialSummaryForUserInGateway_resultTupleScheme getScheme() {
+        return new getAllSSHCredentialSummaryForUserInGateway_resultTupleScheme();
+      }
+    }
+
+    private static class getAllSSHCredentialSummaryForUserInGateway_resultTupleScheme extends TupleScheme<getAllSSHCredentialSummaryForUserInGateway_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetCsException()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          {
+            oprot.writeI32(struct.success.size());
+            for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _iter32 : struct.success)
+            {
+              _iter32.write(oprot);
+            }
+          }
+        }
+        if (struct.isSetCsException()) {
+          struct.csException.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          {
+            org.apache.thrift.protocol.TList _list33 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<org.apache.airavata.credential.store.datamodel.SSHCredentialSummary>(_list33.size);
+            org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _elem34;
+            for (int _i35 = 0; _i35 < _list33.size; ++_i35)
+            {
+              _elem34 = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary();
+              _elem34.read(iprot);
+              struct.success.add(_elem34);
+            }
+          }
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException();
+          struct.csException.read(iprot);
+          struct.setCsExceptionIsSet(true);
+        }
+      }
+    }
+
+  }
+
   public static class getAllPWDCredentialsForGateway_args implements org.apache.thrift.TBase<getAllPWDCredentialsForGateway_args, getAllPWDCredentialsForGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPWDCredentialsForGateway_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPWDCredentialsForGateway_args");
 
@@ -12343,15 +13481,15 @@ public class CredentialStoreService {
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                 {
-                  org.apache.thrift.protocol.TMap _map28 = iprot.readMapBegin();
-                  struct.success = new HashMap<String,String>(2*_map28.size);
-                  String _key29;
-                  String _val30;
-                  for (int _i31 = 0; _i31 < _map28.size; ++_i31)
+                  org.apache.thrift.protocol.TMap _map36 = iprot.readMapBegin();
+                  struct.success = new HashMap<String,String>(2*_map36.size);
+                  String _key37;
+                  String _val38;
+                  for (int _i39 = 0; _i39 < _map36.size; ++_i39)
                   {
-                    _key29 = iprot.readString();
-                    _val30 = iprot.readString();
-                    struct.success.put(_key29, _val30);
+                    _key37 = iprot.readString();
+                    _val38 = iprot.readString();
+                    struct.success.put(_key37, _val38);
                   }
                   iprot.readMapEnd();
                 }
@@ -12388,10 +13526,10 @@ public class CredentialStoreService {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
-            for (Map.Entry<String, String> _iter32 : struct.success.entrySet())
+            for (Map.Entry<String, String> _iter40 : struct.success.entrySet())
             {
-              oprot.writeString(_iter32.getKey());
-              oprot.writeString(_iter32.getValue());
+              oprot.writeString(_iter40.getKey());
+              oprot.writeString(_iter40.getValue());
             }
             oprot.writeMapEnd();
           }
@@ -12430,10 +13568,10 @@ public class CredentialStoreService {
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (Map.Entry<String, String> _iter33 : struct.success.entrySet())
+            for (Map.Entry<String, String> _iter41 : struct.success.entrySet())
             {
-              oprot.writeString(_iter33.getKey());
-              oprot.writeString(_iter33.getValue());
+              oprot.writeString(_iter41.getKey());
+              oprot.writeString(_iter41.getValue());
             }
           }
         }
@@ -12448,15 +13586,15 @@ public class CredentialStoreService {
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TMap _map34 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-            struct.success = new HashMap<String,String>(2*_map34.size);
-            String _key35;
-            String _val36;
-            for (int _i37 = 0; _i37 < _map34.size; ++_i37)
+            org.apache.thrift.protocol.TMap _map42 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.success = new HashMap<String,String>(2*_map42.size);
+            String _key43;
+            String _val44;
+            for (int _i45 = 0; _i45 < _map42.size; ++_i45)
             {
-              _key35 = iprot.readString();
-              _val36 = iprot.readString();
-              struct.success.put(_key35, _val36);
+              _key43 = iprot.readString();
+              _val44 = iprot.readString();
+              struct.success.put(_key43, _val44);
             }
           }
           struct.setSuccessIsSet(true);

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
index b41a4ad..76232b0 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
@@ -22,35 +22,18 @@
  */
 package org.apache.airavata.credential.store.datamodel;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
 import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class CertificateCredential implements org.apache.thrift.TBase<CertificateCredential, CertificateCredential._Fields>, java.io.Serializable, Cloneable, Comparable<CertificateCredential> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CertificateCredential");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
index f963726..8b1b3fa 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
@@ -22,35 +22,17 @@
  */
 package org.apache.airavata.credential.store.datamodel;
 
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
 import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class CommunityUser implements org.apache.thrift.TBase<CommunityUser, CommunityUser._Fields>, java.io.Serializable, Cloneable, Comparable<CommunityUser> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CommunityUser");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
index 6710c96..4eab7f4 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
@@ -22,35 +22,18 @@
  */
 package org.apache.airavata.credential.store.datamodel;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
 import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class PasswordCredential implements org.apache.thrift.TBase<PasswordCredential, PasswordCredential._Fields>, java.io.Serializable, Cloneable, Comparable<PasswordCredential> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PasswordCredential");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
index b7ba8b4..0c3fee1 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
@@ -22,35 +22,18 @@
  */
 package org.apache.airavata.credential.store.datamodel;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
 import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSHCredential._Fields>, java.io.Serializable, Cloneable, Comparable<SSHCredential> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHCredential");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java
index 624fc0b..85b1a6a 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredentialSummary.java
@@ -22,35 +22,18 @@
  */
 package org.apache.airavata.credential.store.datamodel;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
 import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredentialSummary, SSHCredentialSummary._Fields>, java.io.Serializable, Cloneable, Comparable<SSHCredentialSummary> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHCredentialSummary");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
index b55c84e..9d9bb50 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
@@ -50,7 +50,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
 public class CredentialStoreException extends TException implements org.apache.thrift.TBase<CredentialStoreException, CredentialStoreException._Fields>, java.io.Serializable, Cloneable, Comparable<CredentialStoreException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CredentialStoreException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac769369/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
index 915804f..36e7980 100644
--- a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
+++ b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
@@ -65,6 +65,8 @@ service CredentialStoreService {
 
   list<credential_store_data_models.SSHCredentialSummary> getAllGatewaySSHCredentialSummary (1: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException);
 
+  list<credential_store_data_models.SSHCredentialSummary> getAllSSHCredentialSummaryForUserInGateway (1: required string gatewayId, 2: required string userId) throws (1:credential_store_errors.CredentialStoreException csException);
+
   map<string,string> getAllPWDCredentialsForGateway (1: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException);
 
   bool deleteSSHCredential(1: required string tokenId, 2: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException);


[45/51] [abbrv] airavata git commit: adding initial how to use documents

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
index 7605f82..25ab01a 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
@@ -42,16 +42,16 @@ public class SharingRegistryService {
     /**
      * <p>API method to create a new domain</p>
      * 
-     * @param domainId
+     * @param domain
      */
-    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to update a domain</p>
      * 
-     * @param domainId
+     * @param domain
      */
-    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      * <p>API method to delete domain</p>
@@ -387,9 +387,9 @@ public class SharingRegistryService {
 
   public interface AsyncIface {
 
-    public void createDomain(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    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 domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void deleteDomain(String domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -495,16 +495,16 @@ public class SharingRegistryService {
       super(iprot, oprot);
     }
 
-    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_createDomain(domainId);
+      send_createDomain(domain);
       return recv_createDomain();
     }
 
-    public void send_createDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.thrift.TException
+    public void send_createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.thrift.TException
     {
       createDomain_args args = new createDomain_args();
-      args.setDomainId(domainId);
+      args.setDomain(domain);
       sendBase("createDomain", args);
     }
 
@@ -521,16 +521,16 @@ public class SharingRegistryService {
       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 domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_updateDomain(domainId);
+      send_updateDomain(domain);
       return recv_updateDomain();
     }
 
-    public void send_updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.thrift.TException
+    public void send_updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.thrift.TException
     {
       updateDomain_args args = new updateDomain_args();
-      args.setDomainId(domainId);
+      args.setDomain(domain);
       sendBase("updateDomain", args);
     }
 
@@ -1668,24 +1668,24 @@ public class SharingRegistryService {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void createDomain(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    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(domainId, resultHandler, this, ___protocolFactory, ___transport);
+      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 domainId;
-      public createDomain_call(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      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.domainId = domainId;
+        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.setDomainId(domainId);
+        args.setDomain(domain);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -1700,24 +1700,24 @@ public class SharingRegistryService {
       }
     }
 
-    public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void updateDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      updateDomain_call method_call = new updateDomain_call(domainId, resultHandler, this, ___protocolFactory, ___transport);
+      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 domainId;
-      public updateDomain_call(org.apache.airavata.sharing.registry.models.Domain domainId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      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.domainId = domainId;
+        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.setDomainId(domainId);
+        args.setDomain(domain);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -3239,7 +3239,7 @@ public class SharingRegistryService {
       public createDomain_result getResult(I iface, createDomain_args args) throws org.apache.thrift.TException {
         createDomain_result result = new createDomain_result();
         try {
-          result.success = iface.createDomain(args.domainId);
+          result.success = iface.createDomain(args.domain);
         } catch (org.apache.airavata.sharing.registry.models.SharingRegistryException sre) {
           result.sre = sre;
         }
@@ -3263,7 +3263,7 @@ public class SharingRegistryService {
       public updateDomain_result getResult(I iface, updateDomain_args args) throws org.apache.thrift.TException {
         updateDomain_result result = new updateDomain_result();
         try {
-          result.success = iface.updateDomain(args.domainId);
+          result.success = iface.updateDomain(args.domain);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.sharing.registry.models.SharingRegistryException sre) {
           result.sre = sre;
@@ -4384,7 +4384,7 @@ public class SharingRegistryService {
       }
 
       public void start(I iface, createDomain_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.createDomain(args.domainId,resultHandler);
+        iface.createDomain(args.domain,resultHandler);
       }
     }
 
@@ -4442,7 +4442,7 @@ public class SharingRegistryService {
       }
 
       public void start(I iface, updateDomain_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateDomain(args.domainId,resultHandler);
+        iface.updateDomain(args.domain,resultHandler);
       }
     }
 
@@ -6802,7 +6802,7 @@ public class SharingRegistryService {
   public static class createDomain_args implements org.apache.thrift.TBase<createDomain_args, createDomain_args._Fields>, java.io.Serializable, Cloneable, Comparable<createDomain_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDomain_args");
 
-    private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRUCT, (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.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -6810,11 +6810,11 @@ public class SharingRegistryService {
       schemes.put(TupleScheme.class, new createDomain_argsTupleSchemeFactory());
     }
 
-    public org.apache.airavata.sharing.registry.models.Domain domainId; // required
+    public org.apache.airavata.sharing.registry.models.Domain domain; // 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 {
-      DOMAIN_ID((short)1, "domainId");
+      DOMAIN((short)1, "domain");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -6829,8 +6829,8 @@ public class SharingRegistryService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // DOMAIN_ID
-            return DOMAIN_ID;
+          case 1: // DOMAIN
+            return DOMAIN;
           default:
             return null;
         }
@@ -6874,7 +6874,7 @@ public class SharingRegistryService {
     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.REQUIRED, 
+      tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.sharing.registry.models.Domain.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDomain_args.class, metaDataMap);
@@ -6884,18 +6884,18 @@ public class SharingRegistryService {
     }
 
     public createDomain_args(
-      org.apache.airavata.sharing.registry.models.Domain domainId)
+      org.apache.airavata.sharing.registry.models.Domain domain)
     {
       this();
-      this.domainId = domainId;
+      this.domain = domain;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
     public createDomain_args(createDomain_args other) {
-      if (other.isSetDomainId()) {
-        this.domainId = new org.apache.airavata.sharing.registry.models.Domain(other.domainId);
+      if (other.isSetDomain()) {
+        this.domain = new org.apache.airavata.sharing.registry.models.Domain(other.domain);
       }
     }
 
@@ -6905,40 +6905,40 @@ public class SharingRegistryService {
 
     @Override
     public void clear() {
-      this.domainId = null;
+      this.domain = null;
     }
 
-    public org.apache.airavata.sharing.registry.models.Domain getDomainId() {
-      return this.domainId;
+    public org.apache.airavata.sharing.registry.models.Domain getDomain() {
+      return this.domain;
     }
 
-    public createDomain_args setDomainId(org.apache.airavata.sharing.registry.models.Domain domainId) {
-      this.domainId = domainId;
+    public createDomain_args setDomain(org.apache.airavata.sharing.registry.models.Domain domain) {
+      this.domain = domain;
       return this;
     }
 
-    public void unsetDomainId() {
-      this.domainId = null;
+    public void unsetDomain() {
+      this.domain = null;
     }
 
-    /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
-    public boolean isSetDomainId() {
-      return this.domainId != 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 setDomainIdIsSet(boolean value) {
+    public void setDomainIsSet(boolean value) {
       if (!value) {
-        this.domainId = null;
+        this.domain = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case DOMAIN_ID:
+      case DOMAIN:
         if (value == null) {
-          unsetDomainId();
+          unsetDomain();
         } else {
-          setDomainId((org.apache.airavata.sharing.registry.models.Domain)value);
+          setDomain((org.apache.airavata.sharing.registry.models.Domain)value);
         }
         break;
 
@@ -6947,8 +6947,8 @@ public class SharingRegistryService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case DOMAIN_ID:
-        return getDomainId();
+      case DOMAIN:
+        return getDomain();
 
       }
       throw new IllegalStateException();
@@ -6961,8 +6961,8 @@ public class SharingRegistryService {
       }
 
       switch (field) {
-      case DOMAIN_ID:
-        return isSetDomainId();
+      case DOMAIN:
+        return isSetDomain();
       }
       throw new IllegalStateException();
     }
@@ -6980,12 +6980,12 @@ public class SharingRegistryService {
       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))
+      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.domainId.equals(that.domainId))
+        if (!this.domain.equals(that.domain))
           return false;
       }
 
@@ -6996,10 +6996,10 @@ public class SharingRegistryService {
     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_domain = true && (isSetDomain());
+      list.add(present_domain);
+      if (present_domain)
+        list.add(domain);
 
       return list.hashCode();
     }
@@ -7012,12 +7012,12 @@ public class SharingRegistryService {
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+      lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetDomainId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+      if (isSetDomain()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain, other.domain);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -7042,11 +7042,11 @@ public class SharingRegistryService {
       StringBuilder sb = new StringBuilder("createDomain_args(");
       boolean first = true;
 
-      sb.append("domainId:");
-      if (this.domainId == null) {
+      sb.append("domain:");
+      if (this.domain == null) {
         sb.append("null");
       } else {
-        sb.append(this.domainId);
+        sb.append(this.domain);
       }
       first = false;
       sb.append(")");
@@ -7055,12 +7055,12 @@ public class SharingRegistryService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (domainId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainId' was not present! Struct: " + toString());
+      if (domain == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domain' was not present! Struct: " + toString());
       }
       // check for sub-struct validity
-      if (domainId != null) {
-        domainId.validate();
+      if (domain != null) {
+        domain.validate();
       }
     }
 
@@ -7098,11 +7098,11 @@ public class SharingRegistryService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // DOMAIN_ID
+            case 1: // DOMAIN
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.domainId = new org.apache.airavata.sharing.registry.models.Domain();
-                struct.domainId.read(iprot);
-                struct.setDomainIdIsSet(true);
+                struct.domain = new org.apache.airavata.sharing.registry.models.Domain();
+                struct.domain.read(iprot);
+                struct.setDomainIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -7122,9 +7122,9 @@ public class SharingRegistryService {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.domainId != null) {
-          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
-          struct.domainId.write(oprot);
+        if (struct.domain != null) {
+          oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
+          struct.domain.write(oprot);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -7144,15 +7144,15 @@ public class SharingRegistryService {
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, createDomain_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        struct.domainId.write(oprot);
+        struct.domain.write(oprot);
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, createDomain_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.domainId = new org.apache.airavata.sharing.registry.models.Domain();
-        struct.domainId.read(iprot);
-        struct.setDomainIdIsSet(true);
+        struct.domain = new org.apache.airavata.sharing.registry.models.Domain();
+        struct.domain.read(iprot);
+        struct.setDomainIsSet(true);
       }
     }
 
@@ -7629,7 +7629,7 @@ public class SharingRegistryService {
   public static class updateDomain_args implements org.apache.thrift.TBase<updateDomain_args, updateDomain_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateDomain_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateDomain_args");
 
-    private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRUCT, (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.STRUCT, (short)1);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -7637,11 +7637,11 @@ public class SharingRegistryService {
       schemes.put(TupleScheme.class, new updateDomain_argsTupleSchemeFactory());
     }
 
-    public org.apache.airavata.sharing.registry.models.Domain domainId; // required
+    public org.apache.airavata.sharing.registry.models.Domain domain; // 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 {
-      DOMAIN_ID((short)1, "domainId");
+      DOMAIN((short)1, "domain");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -7656,8 +7656,8 @@ public class SharingRegistryService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // DOMAIN_ID
-            return DOMAIN_ID;
+          case 1: // DOMAIN
+            return DOMAIN;
           default:
             return null;
         }
@@ -7701,7 +7701,7 @@ public class SharingRegistryService {
     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.REQUIRED, 
+      tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.sharing.registry.models.Domain.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateDomain_args.class, metaDataMap);
@@ -7711,18 +7711,18 @@ public class SharingRegistryService {
     }
 
     public updateDomain_args(
-      org.apache.airavata.sharing.registry.models.Domain domainId)
+      org.apache.airavata.sharing.registry.models.Domain domain)
     {
       this();
-      this.domainId = domainId;
+      this.domain = domain;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
     public updateDomain_args(updateDomain_args other) {
-      if (other.isSetDomainId()) {
-        this.domainId = new org.apache.airavata.sharing.registry.models.Domain(other.domainId);
+      if (other.isSetDomain()) {
+        this.domain = new org.apache.airavata.sharing.registry.models.Domain(other.domain);
       }
     }
 
@@ -7732,40 +7732,40 @@ public class SharingRegistryService {
 
     @Override
     public void clear() {
-      this.domainId = null;
+      this.domain = null;
     }
 
-    public org.apache.airavata.sharing.registry.models.Domain getDomainId() {
-      return this.domainId;
+    public org.apache.airavata.sharing.registry.models.Domain getDomain() {
+      return this.domain;
     }
 
-    public updateDomain_args setDomainId(org.apache.airavata.sharing.registry.models.Domain domainId) {
-      this.domainId = domainId;
+    public updateDomain_args setDomain(org.apache.airavata.sharing.registry.models.Domain domain) {
+      this.domain = domain;
       return this;
     }
 
-    public void unsetDomainId() {
-      this.domainId = null;
+    public void unsetDomain() {
+      this.domain = null;
     }
 
-    /** Returns true if field domainId is set (has been assigned a value) and false otherwise */
-    public boolean isSetDomainId() {
-      return this.domainId != 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 setDomainIdIsSet(boolean value) {
+    public void setDomainIsSet(boolean value) {
       if (!value) {
-        this.domainId = null;
+        this.domain = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case DOMAIN_ID:
+      case DOMAIN:
         if (value == null) {
-          unsetDomainId();
+          unsetDomain();
         } else {
-          setDomainId((org.apache.airavata.sharing.registry.models.Domain)value);
+          setDomain((org.apache.airavata.sharing.registry.models.Domain)value);
         }
         break;
 
@@ -7774,8 +7774,8 @@ public class SharingRegistryService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case DOMAIN_ID:
-        return getDomainId();
+      case DOMAIN:
+        return getDomain();
 
       }
       throw new IllegalStateException();
@@ -7788,8 +7788,8 @@ public class SharingRegistryService {
       }
 
       switch (field) {
-      case DOMAIN_ID:
-        return isSetDomainId();
+      case DOMAIN:
+        return isSetDomain();
       }
       throw new IllegalStateException();
     }
@@ -7807,12 +7807,12 @@ public class SharingRegistryService {
       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))
+      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.domainId.equals(that.domainId))
+        if (!this.domain.equals(that.domain))
           return false;
       }
 
@@ -7823,10 +7823,10 @@ public class SharingRegistryService {
     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_domain = true && (isSetDomain());
+      list.add(present_domain);
+      if (present_domain)
+        list.add(domain);
 
       return list.hashCode();
     }
@@ -7839,12 +7839,12 @@ public class SharingRegistryService {
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetDomainId()).compareTo(other.isSetDomainId());
+      lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetDomainId()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainId, other.domainId);
+      if (isSetDomain()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain, other.domain);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -7869,11 +7869,11 @@ public class SharingRegistryService {
       StringBuilder sb = new StringBuilder("updateDomain_args(");
       boolean first = true;
 
-      sb.append("domainId:");
-      if (this.domainId == null) {
+      sb.append("domain:");
+      if (this.domain == null) {
         sb.append("null");
       } else {
-        sb.append(this.domainId);
+        sb.append(this.domain);
       }
       first = false;
       sb.append(")");
@@ -7882,12 +7882,12 @@ public class SharingRegistryService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
-      if (domainId == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainId' was not present! Struct: " + toString());
+      if (domain == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domain' was not present! Struct: " + toString());
       }
       // check for sub-struct validity
-      if (domainId != null) {
-        domainId.validate();
+      if (domain != null) {
+        domain.validate();
       }
     }
 
@@ -7925,11 +7925,11 @@ public class SharingRegistryService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // DOMAIN_ID
+            case 1: // DOMAIN
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.domainId = new org.apache.airavata.sharing.registry.models.Domain();
-                struct.domainId.read(iprot);
-                struct.setDomainIdIsSet(true);
+                struct.domain = new org.apache.airavata.sharing.registry.models.Domain();
+                struct.domain.read(iprot);
+                struct.setDomainIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -7949,9 +7949,9 @@ public class SharingRegistryService {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.domainId != null) {
-          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
-          struct.domainId.write(oprot);
+        if (struct.domain != null) {
+          oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
+          struct.domain.write(oprot);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -7971,15 +7971,15 @@ public class SharingRegistryService {
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, updateDomain_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
-        struct.domainId.write(oprot);
+        struct.domain.write(oprot);
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, updateDomain_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        struct.domainId = new org.apache.airavata.sharing.registry.models.Domain();
-        struct.domainId.read(iprot);
-        struct.setDomainIdIsSet(true);
+        struct.domain = new org.apache.airavata.sharing.registry.models.Domain();
+        struct.domain.read(iprot);
+        struct.setDomainIsSet(true);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/sharing-service-docs/api-docs/index.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/api-docs/index.html b/modules/sharing-registry/sharing-service-docs/api-docs/index.html
new file mode 100644
index 0000000..6663a9d
--- /dev/null
+++ b/modules/sharing-registry/sharing-service-docs/api-docs/index.html
@@ -0,0 +1,79 @@
+<html><head>
+<link href="style.css" rel="stylesheet" type="text/css"/>
+<title>All Thrift declarations</title></head><body>
+<div class="container-fluid">
+<h1>All Thrift declarations</h1>
+<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
+<tr>
+<td>sharing_cpi</td><td><a href="sharing_cpi.html#Svc_SharingRegistryService">SharingRegistryService</a><br/>
+<ul>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_addChildGroupsToParentGroup">addChildGroupsToParentGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_addUsersToGroup">addUsersToGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createDomain">createDomain</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createEntityType">createEntityType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createGroup">createGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createPermissionType">createPermissionType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteDomain">deleteDomain</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteEntity">deleteEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteEntityType">deleteEntityType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteGroup">deleteGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deletePermissionType">deletePermissionType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteUser">deleteUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getDomain">getDomain</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getDomains">getDomains</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntity">getEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntityType">getEntityType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntityTypes">getEntityTypes</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroup">getGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroupMembersOfTypeGroup">getGroupMembersOfTypeGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroupMembersOfTypeUser">getGroupMembersOfTypeUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroups">getGroups</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getListOfSharedGroups">getListOfSharedGroups</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getListOfSharedUsers">getListOfSharedUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getPermissionType">getPermissionType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getPermissionTypes">getPermissionTypes</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getUser">getUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getUsers">getUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_registerEntity">registerEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_registerUser">registerUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_removeChildGroupFromParentGroup">removeChildGroupFromParentGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_removeUsersFromGroup">removeUsersFromGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_revokeEntitySharingFromGroups">revokeEntitySharingFromGroups</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_revokeEntitySharingFromUsers">revokeEntitySharingFromUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_searchEntities">searchEntities</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_shareEntityWithGroups">shareEntityWithGroups</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_shareEntityWithUsers">shareEntityWithUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateDomain">updateDomain</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateEntity">updateEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateEntityType">updateEntityType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateGroup">updateGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updatePermissionType">updatePermissionType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updatedUser">updatedUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_userHasAccess">userHasAccess</a></li>
+</ul>
+</td>
+<td></td>
+<td></code></td>
+</tr><tr>
+<td>sharing_models</td><td></td>
+<td><a href="sharing_models.html#Struct_Domain">Domain</a><br/>
+<a href="sharing_models.html#Struct_Entity">Entity</a><br/>
+<a href="sharing_models.html#Enum_EntitySearchField">EntitySearchField</a><br/>
+<a href="sharing_models.html#Struct_EntityType">EntityType</a><br/>
+<a href="sharing_models.html#Enum_GroupCardinality">GroupCardinality</a><br/>
+<a href="sharing_models.html#Enum_GroupChildType">GroupChildType</a><br/>
+<a href="sharing_models.html#Struct_GroupMembership">GroupMembership</a><br/>
+<a href="sharing_models.html#Enum_GroupType">GroupType</a><br/>
+<a href="sharing_models.html#Struct_PermissionType">PermissionType</a><br/>
+<a href="sharing_models.html#Enum_SearchCondition">SearchCondition</a><br/>
+<a href="sharing_models.html#Struct_SearchCriteria">SearchCriteria</a><br/>
+<a href="sharing_models.html#Struct_Sharing">Sharing</a><br/>
+<a href="sharing_models.html#Struct_SharingRegistryException">SharingRegistryException</a><br/>
+<a href="sharing_models.html#Enum_SharingType">SharingType</a><br/>
+<a href="sharing_models.html#Struct_User">User</a><br/>
+<a href="sharing_models.html#Struct_UserGroup">UserGroup</a><br/>
+</td>
+<td><code><a href="sharing_models.html#Const_DO_NOT_SET_AT_CLIENTS_ID">DO_NOT_SET_AT_CLIENTS_ID</a></code><br/>
+</code></td>
+</tr></table>
+</div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html
new file mode 100644
index 0000000..9b6253d
--- /dev/null
+++ b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html
@@ -0,0 +1,278 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<link href="style.css" rel="stylesheet" type="text/css"/>
+<title>Thrift module: sharing_cpi</title></head><body>
+<div class="container-fluid">
+<h1>Thrift module: sharing_cpi</h1>
+<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
+<tr>
+<td>sharing_cpi</td><td><a href="#Svc_SharingRegistryService">SharingRegistryService</a><br/>
+<ul>
+<li><a href="#Fn_SharingRegistryService_addChildGroupsToParentGroup">addChildGroupsToParentGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_addUsersToGroup">addUsersToGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_createDomain">createDomain</a></li>
+<li><a href="#Fn_SharingRegistryService_createEntityType">createEntityType</a></li>
+<li><a href="#Fn_SharingRegistryService_createGroup">createGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_createPermissionType">createPermissionType</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteDomain">deleteDomain</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteEntity">deleteEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteEntityType">deleteEntityType</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteGroup">deleteGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_deletePermissionType">deletePermissionType</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteUser">deleteUser</a></li>
+<li><a href="#Fn_SharingRegistryService_getDomain">getDomain</a></li>
+<li><a href="#Fn_SharingRegistryService_getDomains">getDomains</a></li>
+<li><a href="#Fn_SharingRegistryService_getEntity">getEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_getEntityType">getEntityType</a></li>
+<li><a href="#Fn_SharingRegistryService_getEntityTypes">getEntityTypes</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroup">getGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroupMembersOfTypeGroup">getGroupMembersOfTypeGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroupMembersOfTypeUser">getGroupMembersOfTypeUser</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroups">getGroups</a></li>
+<li><a href="#Fn_SharingRegistryService_getListOfSharedGroups">getListOfSharedGroups</a></li>
+<li><a href="#Fn_SharingRegistryService_getListOfSharedUsers">getListOfSharedUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_getPermissionType">getPermissionType</a></li>
+<li><a href="#Fn_SharingRegistryService_getPermissionTypes">getPermissionTypes</a></li>
+<li><a href="#Fn_SharingRegistryService_getUser">getUser</a></li>
+<li><a href="#Fn_SharingRegistryService_getUsers">getUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_registerEntity">registerEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_registerUser">registerUser</a></li>
+<li><a href="#Fn_SharingRegistryService_removeChildGroupFromParentGroup">removeChildGroupFromParentGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_removeUsersFromGroup">removeUsersFromGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_revokeEntitySharingFromGroups">revokeEntitySharingFromGroups</a></li>
+<li><a href="#Fn_SharingRegistryService_revokeEntitySharingFromUsers">revokeEntitySharingFromUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_searchEntities">searchEntities</a></li>
+<li><a href="#Fn_SharingRegistryService_shareEntityWithGroups">shareEntityWithGroups</a></li>
+<li><a href="#Fn_SharingRegistryService_shareEntityWithUsers">shareEntityWithUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_updateDomain">updateDomain</a></li>
+<li><a href="#Fn_SharingRegistryService_updateEntity">updateEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_updateEntityType">updateEntityType</a></li>
+<li><a href="#Fn_SharingRegistryService_updateGroup">updateGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_updatePermissionType">updatePermissionType</a></li>
+<li><a href="#Fn_SharingRegistryService_updatedUser">updatedUser</a></li>
+<li><a href="#Fn_SharingRegistryService_userHasAccess">userHasAccess</a></li>
+</ul>
+</td>
+<td></td>
+<td></code></td>
+</tr></table>
+<hr/><h2 id="Services">Services</h2>
+<h3 id="Svc_SharingRegistryService">Service: SharingRegistryService</h3>
+<div class="definition"><h4 id="Fn_SharingRegistryService_createDomain">Function: SharingRegistryService.createDomain</h4>
+<pre><code>string</code> createDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domain)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to create a new domain</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateDomain">Function: SharingRegistryService.updateDomain</h4>
+<pre><code>bool</code> updateDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domain)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to update a domain</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteDomain">Function: SharingRegistryService.deleteDomain</h4>
+<pre><code>bool</code> deleteDomain(<code>string</code> domainId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to delete domain</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomain">Function: SharingRegistryService.getDomain</h4>
+<pre><code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> getDomain(<code>string</code> domainId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to retrieve a domain</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomains">Function: SharingRegistryService.getDomains</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code>&gt;</code> getDomains(<code>i32</code> offset,
+                                       <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get all domain.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_registerUser">Function: SharingRegistryService.registerUser</h4>
+<pre><code>string</code> registerUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to register a user in the system</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updatedUser">Function: SharingRegistryService.updatedUser</h4>
+<pre><code>bool</code> updatedUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to update existing user</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteUser">Function: SharingRegistryService.deleteUser</h4>
+<pre><code>bool</code> deleteUser(<code>string</code> userId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to delete user</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUser">Function: SharingRegistryService.getUser</h4>
+<pre><code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> getUser(<code>string</code> userId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get a user</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUsers">Function: SharingRegistryService.getUsers</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getUsers(<code>string</code> domainId,
+                                   <code>i32</code> offset,
+                                   <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get a list of users in a specific domain Users will be reverse sorted based on the created time.</p>
+<li>domainId : Domain id</li>
+<li>offset : Starting result number</li>
+<li>limit : Number of max results to be sent</li>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createGroup">Function: SharingRegistryService.createGroup</h4>
+<pre><code>string</code> createGroup(<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> group)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to create a new group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateGroup">Function: SharingRegistryService.updateGroup</h4>
+<pre><code>bool</code> updateGroup(<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> group)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to update a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteGroup">Function: SharingRegistryService.deleteGroup</h4>
+<pre><code>bool</code> deleteGroup(<code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to delete a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroup">Function: SharingRegistryService.getGroup</h4>
+<pre><code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> getGroup(<code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroups">Function: SharingRegistryService.getGroups</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroups(<code>string</code> domainId,
+                                         <code>i32</code> offset,
+                                         <code>i32</code> limit)
+</pre><p>API method to get groups in a domainId. Results are reverse sorted based on created time.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_addUsersToGroup">Function: SharingRegistryService.addUsersToGroup</h4>
+<pre><code>bool</code> addUsersToGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
+                     <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to add list of users to a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeUsersFromGroup">Function: SharingRegistryService.removeUsersFromGroup</h4>
+<pre><code>bool</code> removeUsersFromGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
+                          <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to remove users from a group</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembersOfTypeUser">Function: SharingRegistryService.getGroupMembersOfTypeUser</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getGroupMembersOfTypeUser(<code>string</code> groupId,
+                                                    <code>i32</code> offset,
+                                                    <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get list of child users in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembersOfTypeGroup">Function: SharingRegistryService.getGroupMembersOfTypeGroup</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroupMembersOfTypeGroup(<code>string</code> groupId,
+                                                          <code>i32</code> offset,
+                                                          <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get list of child groups in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_addChildGroupsToParentGroup">Function: SharingRegistryService.addChildGroupsToParentGroup</h4>
+<pre><code>bool</code> addChildGroupsToParentGroup(<code>list&lt;<code>string</code>&gt;</code> childIds,
+                                 <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to add a child group to a parent group.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeChildGroupFromParentGroup">Function: SharingRegistryService.removeChildGroupFromParentGroup</h4>
+<pre><code>bool</code> removeChildGroupFromParentGroup(<code>string</code> childId,
+                                     <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to remove a child group from parent group.</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createEntityType">Function: SharingRegistryService.createEntityType</h4>
+<pre><code>string</code> createEntityType(<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> entityType)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to create a new entity type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateEntityType">Function: SharingRegistryService.updateEntityType</h4>
+<pre><code>bool</code> updateEntityType(<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> entityType)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to update entity type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntityType">Function: SharingRegistryService.deleteEntityType</h4>
+<pre><code>bool</code> deleteEntityType(<code>string</code> entityTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to delete entity type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityType">Function: SharingRegistryService.getEntityType</h4>
+<pre><code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> getEntityType(<code>string</code> entityTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get an entity type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityTypes">Function: SharingRegistryService.getEntityTypes</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code>&gt;</code> getEntityTypes(<code>string</code> domainId,
+                                               <code>i32</code> offset,
+                                               <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get entity types in a domainId. Results are reverse time sorted based on creation time</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_registerEntity">Function: SharingRegistryService.registerEntity</h4>
+<pre><code>string</code> registerEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to register new entity</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateEntity">Function: SharingRegistryService.updateEntity</h4>
+<pre><code>bool</code> updateEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to update entity</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntity">Function: SharingRegistryService.deleteEntity</h4>
+<pre><code>bool</code> deleteEntity(<code>string</code> entityId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to delete entity</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntity">Function: SharingRegistryService.getEntity</h4>
+<pre><code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> getEntity(<code>string</code> entityId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get entity</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_searchEntities">Function: SharingRegistryService.searchEntities</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code>&gt;</code> searchEntities(<code>string</code> userId,
+                                           <code>string</code> entityTypeId,
+                                           <code>list&lt;<code><a href="sharing_models.html#Struct_SearchCriteria">sharing_models.SearchCriteria</a></code>&gt;</code> filters,
+                                           <code>i32</code> offset,
+                                           <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to search entities</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedUsers">Function: SharingRegistryService.getListOfSharedUsers</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getListOfSharedUsers(<code>string</code> entityId,
+                                               <code>string</code> permissionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get a list of shared users given the entity id</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedGroups">Function: SharingRegistryService.getListOfSharedGroups</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getListOfSharedGroups(<code>string</code> entityId,
+                                                     <code>string</code> permissionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get a list of shared groups given the entity id</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createPermissionType">Function: SharingRegistryService.createPermissionType</h4>
+<pre><code>string</code> createPermissionType(<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> permissionType)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to create permission type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updatePermissionType">Function: SharingRegistryService.updatePermissionType</h4>
+<pre><code>bool</code> updatePermissionType(<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> permissionType)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to update permission type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deletePermissionType">Function: SharingRegistryService.deletePermissionType</h4>
+<pre><code>bool</code> deletePermissionType(<code>string</code> entityTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to delete permission type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionType">Function: SharingRegistryService.getPermissionType</h4>
+<pre><code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> getPermissionType(<code>string</code> permissionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get permission type</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionTypes">Function: SharingRegistryService.getPermissionTypes</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code>&gt;</code> getPermissionTypes(<code>string</code> domainId,
+                                                       <code>i32</code> offset,
+                                                       <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to get list of permission types in a given domainId. Results are reverse time sorted based on creation time</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithUsers">Function: SharingRegistryService.shareEntityWithUsers</h4>
+<pre><code>bool</code> shareEntityWithUsers(<code>string</code> domainId,
+                          <code>string</code> entityId,
+                          <code>list&lt;<code>string</code>&gt;</code> userList,
+                          <code>string</code> perssionTypeId,
+                          <code>bool</code> cascadePermission)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to share an entity with users</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromUsers">Function: SharingRegistryService.revokeEntitySharingFromUsers</h4>
+<pre><code>bool</code> revokeEntitySharingFromUsers(<code>string</code> domainId,
+                                  <code>string</code> entityId,
+                                  <code>list&lt;<code>string</code>&gt;</code> userList,
+                                  <code>string</code> perssionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to revoke sharing from a list of users</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithGroups">Function: SharingRegistryService.shareEntityWithGroups</h4>
+<pre><code>bool</code> shareEntityWithGroups(<code>string</code> domainId,
+                           <code>string</code> entityId,
+                           <code>list&lt;<code>string</code>&gt;</code> groupList,
+                           <code>string</code> perssionTypeId,
+                           <code>bool</code> cascadePermission)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to share an entity with list of groups</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromGroups">Function: SharingRegistryService.revokeEntitySharingFromGroups</h4>
+<pre><code>bool</code> revokeEntitySharingFromGroups(<code>string</code> domainId,
+                                   <code>string</code> entityId,
+                                   <code>list&lt;<code>string</code>&gt;</code> groupList,
+                                   <code>string</code> perssionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to revoke sharing from list of users</p>
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_userHasAccess">Function: SharingRegistryService.userHasAccess</h4>
+<pre><code>bool</code> userHasAccess(<code>string</code> domainId,
+                   <code>string</code> userId,
+                   <code>string</code> entityId,
+                   <code>string</code> permissionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre><p>API method to check whether a user has access to a specific entity</p>
+<br/></div></div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
new file mode 100644
index 0000000..1d4dff8
--- /dev/null
+++ b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
@@ -0,0 +1,273 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<link href="style.css" rel="stylesheet" type="text/css"/>
+<title>Thrift module: sharing_models</title></head><body>
+<div class="container-fluid">
+<h1>Thrift module: sharing_models</h1>
+<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
+<tr>
+<td>sharing_models</td><td></td>
+<td><a href="#Struct_Domain">Domain</a><br/>
+<a href="#Struct_Entity">Entity</a><br/>
+<a href="#Enum_EntitySearchField">EntitySearchField</a><br/>
+<a href="#Struct_EntityType">EntityType</a><br/>
+<a href="#Enum_GroupCardinality">GroupCardinality</a><br/>
+<a href="#Enum_GroupChildType">GroupChildType</a><br/>
+<a href="#Struct_GroupMembership">GroupMembership</a><br/>
+<a href="#Enum_GroupType">GroupType</a><br/>
+<a href="#Struct_PermissionType">PermissionType</a><br/>
+<a href="#Enum_SearchCondition">SearchCondition</a><br/>
+<a href="#Struct_SearchCriteria">SearchCriteria</a><br/>
+<a href="#Struct_Sharing">Sharing</a><br/>
+<a href="#Struct_SharingRegistryException">SharingRegistryException</a><br/>
+<a href="#Enum_SharingType">SharingType</a><br/>
+<a href="#Struct_User">User</a><br/>
+<a href="#Struct_UserGroup">UserGroup</a><br/>
+</td>
+<td><code><a href="#Const_DO_NOT_SET_AT_CLIENTS_ID">DO_NOT_SET_AT_CLIENTS_ID</a></code><br/>
+</code></td>
+</tr></table>
+<hr/><h2 id="Constants">Constants</h2>
+<table class="table-bordered table-striped table-condensed"><thead><th>Constant</th><th>Type</th><th>Value</th></thead>
+<tr id="Const_DO_NOT_SET_AT_CLIENTS_ID"><td><code>DO_NOT_SET_AT_CLIENTS_ID</code></td><td><code>string</code></td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr></table><hr/><h2 id="Enumerations">Enumerations</h2>
+<div class="definition"><h3 id="Enum_GroupCardinality">Enumeration: GroupCardinality</h3>
+<p>This is an system internal enum used to define single user groups and multi users groups. Every user is also
+considered as a group in it's own right for implementation ease</p>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>SINGLE_USER</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>MULTI_USER</code></td><td><code>1</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_GroupType">Enumeration: GroupType</h3>
+<p>Group types can be either user level or domain level groups.</p>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>DOMAIN_LEVEL_GROUP</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>USER_LEVEL_GROUP</code></td><td><code>1</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_GroupChildType">Enumeration: GroupChildType</h3>
+<p>System internal data type to match group child types</p>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>USER</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>GROUP</code></td><td><code>1</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_EntitySearchField">Enumeration: EntitySearchField</h3>
+<p>This list of fields that can be used to search entities</p>
+<li>NAME : Name of the entity</li>
+<li>DESCRIPTION : Description of the entity</li>
+<li>FULL_TEXT : Full text field of the entity</li>
+<li>PARENT_ENTITY_ID : Parent entity id of the entity</li>
+<li>CREATED_TIME : Created time of the entity</li>
+<li>UPDATED_TIME : Updated time of the entity</li>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>NAME</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>DESCRIPTION</code></td><td><code>1</code></td><td>
+</td></tr>
+<tr><td><code>FULL_TEXT</code></td><td><code>2</code></td><td>
+</td></tr>
+<tr><td><code>PRRENT_ENTITY_ID</code></td><td><code>3</code></td><td>
+</td></tr>
+<tr><td><code>CREATED_TIME</code></td><td><code>4</code></td><td>
+</td></tr>
+<tr><td><code>UPDATED_TIME</code></td><td><code>5</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_SearchCondition">Enumeration: SearchCondition</h3>
+<p>Different search operators that can be used with the entity search fields</p>
+<li>EQUAL : Simply matches for equality. Applicable for name, and parent entity id</li>
+<li>LIKE : Check for the condition %$FIELD% condition. Applicable for name, and description</li>
+<li>FULL_TEXT : Does a full text search. Only applicable for the FULL_TEXT field.</li>
+<li>GTE : Greater than or equal. Only applicable for created time and updated time.</li>
+<li>LTE : Less than or equal. Only applicable for created time and updated time.</li>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>EQUAL</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>LIKE</code></td><td><code>1</code></td><td>
+</td></tr>
+<tr><td><code>FULL_TEXT</code></td><td><code>2</code></td><td>
+</td></tr>
+<tr><td><code>GTE</code></td><td><code>3</code></td><td>
+</td></tr>
+<tr><td><code>LTE</code></td><td><code>4</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_SharingType">Enumeration: SharingType</h3>
+<p>This is an internal enum type for managing sharings</p>
+
+<br/><br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>DIRECT_NON_CASCADING</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>DIRECT_CASCADING</code></td><td><code>1</code></td><td>
+</td></tr>
+<tr><td><code>INDIRECT_CASCADING</code></td><td><code>2</code></td><td>
+</td></tr>
+</table></div>
+<hr/><h2 id="Structs">Data structures</h2>
+<div class="definition"><h3 id="Struct_Domain">Struct: Domain</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>Domain is the entity that enables multi-tenency in this componenet. Every tenant will be
+operating separately it's own silo which is identified by the domain id. In the current implementation domain id
+will be same as the domain name</p>
+<li>domainId : Will be generated by the server based on the domain name</li>
+<li><b>name</b> : A single word name that identifies the domain e.g seagrid, ultrascan</li>
+<li>description : A short description for the domain</li>
+<li>createdTime : Will be set by the system</li>
+<li>updatedTime : Will be set by the system</li>
+
+<br/></div><div class="definition"><h3 id="Struct_User">Struct: User</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>userId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>userName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>firstName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>lastName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>email</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>icon</td><td><code>binary</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>User is the model used to register a user in the system. Minimal user information will be required to provide
+regarding the user.</p>
+<li><b>userId</b> : Client provided user id. (The id is not system generated and it is a must to provide this id)</li>
+<li><b>domainId</b> : Domain id for that user</li>
+<li><b>userName</b> : User name for the user</li>
+<li><b>firstName</b> : First name of the user</li>
+<li><b>lastName</b> : Last name of the user</li>
+<li><b>email</b> : Email address of the user</li>
+<li>icon : A binary field for storing the user icon</li>
+<li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+<li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+
+<br/></div><div class="definition"><h3 id="Struct_UserGroup">Struct: UserGroup</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>groupType</td><td><code><a href="#Enum_GroupType">GroupType</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>groupCardinality</td><td><code><a href="#Enum_GroupCardinality">GroupCardinality</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>User group is a collection of users.</p>
+ <li>groupId : System generated grouo id. In the current implementation this is of the form domainId:name</li>
+ <li><b>domainId</b> : Domain id for this user group</li>
+ <li><b>name</b> : Name for the user group. should be one word</li>
+ <li>description : Short description for the group.</li>
+ <li><b>ownerId</b> : Owner id of this group.</li>
+ <li><b>groupType</b> : Group type (DOMAIN_LEVEL_GROUP, USER_LEVEL_GROUP)</li>
+ <li><b>groupCardinality</b> : Group cardinality (SINGLE_USER, MULTI_USER)</li>
+ <li>createdTime : Will be set by the system</li>
+ <li>updatedTime : Will be set by the system</li>
+ 
+<br/></div><div class="definition"><h3 id="Struct_GroupMembership">Struct: GroupMembership</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>parentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>2</td><td>childId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>childType</td><td><code><a href="#Enum_GroupChildType">GroupChildType</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>System internal data type to map group memberships</p>
+
+<br/></div><div class="definition"><h3 id="Struct_EntityType">Struct: EntityType</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>client defined entity types</p>
+<li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
+<li><b>domainId</b> : Domain id of the domain.</li>
+<li><b>name</b> : Name for the entity type. Should be a single word.</li>
+<li>description : Short description for the entity type.</li>
+<li>createdTime : Will be set by the system</li>
+<li>updatedTime : Will be set by the system</li>
+
+<br/></div><div class="definition"><h3 id="Struct_SearchCriteria">Struct: SearchCriteria</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>searchField</td><td><code><a href="#Enum_EntitySearchField">EntitySearchField</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>2</td><td>value</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>searchCondition</td><td><code><a href="#Enum_SearchCondition">SearchCondition</a></code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>Container object for search criteria</p>
+<li><b>searchField</b> : Entity search field</li>
+<li><b>value</b> : Search value</li>
+<li><b>searchCondition</b> : EQUAL, LIKE etc..</li>
+
+<br/></div><div class="definition"><h3 id="Struct_Entity">Struct: Entity</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>parentEntityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>metadata</td><td><code>map&lt;<code>string</code>, <code>string</code>&gt;</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>9</td><td>fullText</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>10</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>11</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>Entity object which is used to register an entity in the system.</p>
+<li><b>entityId</b> : Client id provided by the client</li>
+<li><b>domainId</b> : Domain id</li>
+<li><b>entityTypeId</b> : Entity type id</li>
+<li><b>ownerId</b> : Owner id</li>
+<li>parentEntityId : Parent entity id</li>
+<li><b>name</b> : Name</li>
+<li>description : Short description for the entity</li>
+<li>metadata : Map of optional metadata</li>
+<li>fullText : A string which will be considered for full text search</li>
+<li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+<li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+
+<br/></div><div class="definition"><h3 id="Struct_PermissionType">Struct: PermissionType</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>Object for creating client defined permission type</p>
+<li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
+<li><b>domainId</b> : Domain id</li>
+<li><b>name</b> : Single word name for the permission</li>
+<li>description : Short description for the permission type</li>
+<li>createdTime : Will be set by the system</li>
+<li>updatedTime : Will be set by the system</li>
+
+<br/></div><div class="definition"><h3 id="Struct_Sharing">Struct: Sharing</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>2</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>sharingType</td><td><code><a href="#Enum_SharingType">SharingType</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>inheritedParentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/><p>This is an internal enum type for managing sharings</p>
+
+<br/></div><div class="definition"><h3 id="Struct_SharingRegistryException">Exception: SharingRegistryException</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>message</td><td><code>string</code></td><td></td><td>required</td><td></td></tr>
+</table><br/><p>Exception model used in the sharing registry service</p>
+
+<br/></div></div></body></html>


[35/51] [abbrv] airavata git commit: fixing logging issue

Posted by sc...@apache.org.
fixing logging issue


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

Branch: refs/heads/airavata-gov-registry
Commit: eb62af94250c690c933b2f8d15fe620de23aa36f
Parents: 6efb535
Author: scnakandala <su...@gmail.com>
Authored: Thu Oct 13 19:03:38 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Oct 13 19:03:38 2016 -0400

----------------------------------------------------------------------
 .../src/main/assembly/bin-assembly.xml          |  1 +
 .../src/main/resources/bin/sharing-registry.sh  |  8 +-
 .../sharing/registry/server/ServerMain.java     | 98 ++++++++++++++++++++
 .../registry/server/SharingRegistryServer.java  |  8 --
 4 files changed, 103 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/eb62af94/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml b/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml
index b8fdfd4..cef9a11 100644
--- a/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml
@@ -43,6 +43,7 @@
             <outputDirectory>bin</outputDirectory>
             <includes>
                 <include>airavata-server.properties</include>
+                <include>log4j.properties</include>
             </includes>
         </fileSet>
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb62af94/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
index 44aef1f..02be943 100644
--- a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
@@ -62,10 +62,10 @@ done
 
 if $STOP;
 then
-	for f in `find . -name "*-start_*"`; do
+	for f in `find . -name "server_start_*"`; do
 		IFS='_' read -a f_split <<< "$f"
 		echo "Found process file : $f"
-		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		echo -n "    Sending kill signals to process ${f_split[2]}..."
 		out=`kill -9 ${f_split[1]} 2>&1`
 		if [ -z "$out" ]; then
 		    echo "done"
@@ -83,8 +83,8 @@ then
 else
 	if $IS_DAEMON_MODE ; then
 		echo "Starting Sharing Registry Server in daemon mode..."
-		nohup $JAVA_HOME/bin/java ${JAVA_OPTS} -classpath "$SHARING_REGISTRY_CLASSPATH"  org.apache.airavata.sharing.registry.server.SharingRegistryServer > ../sharing-registry.out & echo $! > "../sharing-registry-start_$!"
+		$JAVA_HOME/bin/java ${JAVA_OPTS} -classpath "$SHARING_REGISTRY_CLASSPATH"  org.apache.airavata.sharing.registry.server.ServerMain $* > /dev/null 2>&1 &
 	else
-		$JAVA_HOME/bin/java ${JAVA_OPTS} -classpath "$SHARING_REGISTRY_CLASSPATH"  org.apache.airavata.sharing.registry.server.SharingRegistryServer
+		$JAVA_HOME/bin/java ${JAVA_OPTS} -classpath "$SHARING_REGISTRY_CLASSPATH"  org.apache.airavata.sharing.registry.server.ServerMain $*
 	fi
 fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb62af94/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/ServerMain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/ServerMain.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/ServerMain.java
new file mode 100644
index 0000000..54e1722
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/ServerMain.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.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+public class ServerMain {
+    private final static Logger logger = LoggerFactory.getLogger(ServerMain.class);
+
+    private static int serverPID = -1;
+    private static final String stopFileNamePrefix = "server_stop";
+    private static final String serverStartedFileNamePrefix = "server_start";
+
+    public static void main(String[] args) {
+        try {
+            setServerStarted();
+            new SharingRegistryServer().start();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @SuppressWarnings({"resource"})
+    private static void setServerStarted() {
+        try {
+            serverPID = getPID();
+            deleteOldStopRequests();
+            File serverStartedFile = null;
+            serverStartedFile = new File(getServerStartedFileName());
+            serverStartedFile.createNewFile();
+            serverStartedFile.deleteOnExit();
+            new RandomAccessFile(serverStartedFile, "rw").getChannel().lock();
+        } catch (FileNotFoundException e) {
+            logger.error(e.getMessage(), e);
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    private static String getServerStartedFileName() {
+        return new File(new File(System.getenv("" +
+                "SHARING_REGISTRY_HOME"), "bin"), serverStartedFileNamePrefix + "_" + Integer.toString(serverPID)).toString();
+    }
+
+    private static int getPID() {
+        try {
+            java.lang.management.RuntimeMXBean runtime = java.lang.management.ManagementFactory
+                    .getRuntimeMXBean();
+            java.lang.reflect.Field jvm = runtime.getClass()
+                    .getDeclaredField("jvm");
+            jvm.setAccessible(true);
+            sun.management.VMManagement mgmt = (sun.management.VMManagement) jvm
+                    .get(runtime);
+            java.lang.reflect.Method pid_method = mgmt.getClass()
+                    .getDeclaredMethod("getProcessId");
+            pid_method.setAccessible(true);
+
+            int pid = (Integer) pid_method.invoke(mgmt);
+            return pid;
+        } catch (Exception e) {
+            return -1;
+        }
+    }
+
+    private static void deleteOldStopRequests() {
+        File[] files = new File(".").listFiles();
+        for (File file : files) {
+            if (file.getName().contains(stopFileNamePrefix)) {
+                file.delete();
+            }
+
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb62af94/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
index 23b215a..7b72227 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
@@ -108,14 +108,6 @@ public class SharingRegistryServer implements IServer {
         }
     }
 
-    public static void main(String[] args) {
-        try {
-            new SharingRegistryServer().start();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-
     @Override
     public void stop() throws Exception {
         if (server!=null && server.isServing()){


[46/51] [abbrv] airavata git commit: adding initial how to use documents

Posted by sc...@apache.org.
adding initial how to use documents


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

Branch: refs/heads/airavata-gov-registry
Commit: 61a0fc95416a658fae5164165e67bd896dc228fb
Parents: 6718761
Author: scnakandala <su...@gmail.com>
Authored: Fri Oct 14 20:03:16 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Oct 14 20:03:16 2016 -0400

----------------------------------------------------------------------
 modules/sharing-registry/api-docs/index.html    |  79 -----
 .../sharing-registry/api-docs/sharing_cpi.html  | 278 -----------------
 .../api-docs/sharing_models.html                | 273 -----------------
 modules/sharing-registry/api-docs/style.css     | 184 ------------
 .../registry/SharingRegistryServiceTest.java    |  84 ++++++
 .../service/cpi/SharingRegistryService.java     | 296 +++++++++----------
 .../sharing-service-docs/api-docs/index.html    |  79 +++++
 .../api-docs/sharing_cpi.html                   | 278 +++++++++++++++++
 .../api-docs/sharing_models.html                | 273 +++++++++++++++++
 .../sharing-service-docs/api-docs/style.css     | 184 ++++++++++++
 .../sharing-service-docs/index.html             |  93 ++++++
 .../sharing-service-docs/style.css              | 184 ++++++++++++
 .../thrift_models/sharing_cpi.thrift            |   4 +-
 .../thrift_models/thrift-gen.sh                 |   4 +-
 14 files changed, 1327 insertions(+), 966 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/api-docs/index.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/index.html b/modules/sharing-registry/api-docs/index.html
deleted file mode 100644
index 6663a9d..0000000
--- a/modules/sharing-registry/api-docs/index.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<html><head>
-<link href="style.css" rel="stylesheet" type="text/css"/>
-<title>All Thrift declarations</title></head><body>
-<div class="container-fluid">
-<h1>All Thrift declarations</h1>
-<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
-<tr>
-<td>sharing_cpi</td><td><a href="sharing_cpi.html#Svc_SharingRegistryService">SharingRegistryService</a><br/>
-<ul>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_addChildGroupsToParentGroup">addChildGroupsToParentGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_addUsersToGroup">addUsersToGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createDomain">createDomain</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createEntityType">createEntityType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createGroup">createGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createPermissionType">createPermissionType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteDomain">deleteDomain</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteEntity">deleteEntity</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteEntityType">deleteEntityType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteGroup">deleteGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deletePermissionType">deletePermissionType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteUser">deleteUser</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getDomain">getDomain</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getDomains">getDomains</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntity">getEntity</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntityType">getEntityType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntityTypes">getEntityTypes</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroup">getGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroupMembersOfTypeGroup">getGroupMembersOfTypeGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroupMembersOfTypeUser">getGroupMembersOfTypeUser</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroups">getGroups</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getListOfSharedGroups">getListOfSharedGroups</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getListOfSharedUsers">getListOfSharedUsers</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getPermissionType">getPermissionType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getPermissionTypes">getPermissionTypes</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getUser">getUser</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getUsers">getUsers</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_registerEntity">registerEntity</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_registerUser">registerUser</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_removeChildGroupFromParentGroup">removeChildGroupFromParentGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_removeUsersFromGroup">removeUsersFromGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_revokeEntitySharingFromGroups">revokeEntitySharingFromGroups</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_revokeEntitySharingFromUsers">revokeEntitySharingFromUsers</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_searchEntities">searchEntities</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_shareEntityWithGroups">shareEntityWithGroups</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_shareEntityWithUsers">shareEntityWithUsers</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateDomain">updateDomain</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateEntity">updateEntity</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateEntityType">updateEntityType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateGroup">updateGroup</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updatePermissionType">updatePermissionType</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updatedUser">updatedUser</a></li>
-<li><a href="sharing_cpi.html#Fn_SharingRegistryService_userHasAccess">userHasAccess</a></li>
-</ul>
-</td>
-<td></td>
-<td></code></td>
-</tr><tr>
-<td>sharing_models</td><td></td>
-<td><a href="sharing_models.html#Struct_Domain">Domain</a><br/>
-<a href="sharing_models.html#Struct_Entity">Entity</a><br/>
-<a href="sharing_models.html#Enum_EntitySearchField">EntitySearchField</a><br/>
-<a href="sharing_models.html#Struct_EntityType">EntityType</a><br/>
-<a href="sharing_models.html#Enum_GroupCardinality">GroupCardinality</a><br/>
-<a href="sharing_models.html#Enum_GroupChildType">GroupChildType</a><br/>
-<a href="sharing_models.html#Struct_GroupMembership">GroupMembership</a><br/>
-<a href="sharing_models.html#Enum_GroupType">GroupType</a><br/>
-<a href="sharing_models.html#Struct_PermissionType">PermissionType</a><br/>
-<a href="sharing_models.html#Enum_SearchCondition">SearchCondition</a><br/>
-<a href="sharing_models.html#Struct_SearchCriteria">SearchCriteria</a><br/>
-<a href="sharing_models.html#Struct_Sharing">Sharing</a><br/>
-<a href="sharing_models.html#Struct_SharingRegistryException">SharingRegistryException</a><br/>
-<a href="sharing_models.html#Enum_SharingType">SharingType</a><br/>
-<a href="sharing_models.html#Struct_User">User</a><br/>
-<a href="sharing_models.html#Struct_UserGroup">UserGroup</a><br/>
-</td>
-<td><code><a href="sharing_models.html#Const_DO_NOT_SET_AT_CLIENTS_ID">DO_NOT_SET_AT_CLIENTS_ID</a></code><br/>
-</code></td>
-</tr></table>
-</div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/api-docs/sharing_cpi.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/sharing_cpi.html b/modules/sharing-registry/api-docs/sharing_cpi.html
deleted file mode 100644
index 037f75e..0000000
--- a/modules/sharing-registry/api-docs/sharing_cpi.html
+++ /dev/null
@@ -1,278 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-<link href="style.css" rel="stylesheet" type="text/css"/>
-<title>Thrift module: sharing_cpi</title></head><body>
-<div class="container-fluid">
-<h1>Thrift module: sharing_cpi</h1>
-<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
-<tr>
-<td>sharing_cpi</td><td><a href="#Svc_SharingRegistryService">SharingRegistryService</a><br/>
-<ul>
-<li><a href="#Fn_SharingRegistryService_addChildGroupsToParentGroup">addChildGroupsToParentGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_addUsersToGroup">addUsersToGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_createDomain">createDomain</a></li>
-<li><a href="#Fn_SharingRegistryService_createEntityType">createEntityType</a></li>
-<li><a href="#Fn_SharingRegistryService_createGroup">createGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_createPermissionType">createPermissionType</a></li>
-<li><a href="#Fn_SharingRegistryService_deleteDomain">deleteDomain</a></li>
-<li><a href="#Fn_SharingRegistryService_deleteEntity">deleteEntity</a></li>
-<li><a href="#Fn_SharingRegistryService_deleteEntityType">deleteEntityType</a></li>
-<li><a href="#Fn_SharingRegistryService_deleteGroup">deleteGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_deletePermissionType">deletePermissionType</a></li>
-<li><a href="#Fn_SharingRegistryService_deleteUser">deleteUser</a></li>
-<li><a href="#Fn_SharingRegistryService_getDomain">getDomain</a></li>
-<li><a href="#Fn_SharingRegistryService_getDomains">getDomains</a></li>
-<li><a href="#Fn_SharingRegistryService_getEntity">getEntity</a></li>
-<li><a href="#Fn_SharingRegistryService_getEntityType">getEntityType</a></li>
-<li><a href="#Fn_SharingRegistryService_getEntityTypes">getEntityTypes</a></li>
-<li><a href="#Fn_SharingRegistryService_getGroup">getGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_getGroupMembersOfTypeGroup">getGroupMembersOfTypeGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_getGroupMembersOfTypeUser">getGroupMembersOfTypeUser</a></li>
-<li><a href="#Fn_SharingRegistryService_getGroups">getGroups</a></li>
-<li><a href="#Fn_SharingRegistryService_getListOfSharedGroups">getListOfSharedGroups</a></li>
-<li><a href="#Fn_SharingRegistryService_getListOfSharedUsers">getListOfSharedUsers</a></li>
-<li><a href="#Fn_SharingRegistryService_getPermissionType">getPermissionType</a></li>
-<li><a href="#Fn_SharingRegistryService_getPermissionTypes">getPermissionTypes</a></li>
-<li><a href="#Fn_SharingRegistryService_getUser">getUser</a></li>
-<li><a href="#Fn_SharingRegistryService_getUsers">getUsers</a></li>
-<li><a href="#Fn_SharingRegistryService_registerEntity">registerEntity</a></li>
-<li><a href="#Fn_SharingRegistryService_registerUser">registerUser</a></li>
-<li><a href="#Fn_SharingRegistryService_removeChildGroupFromParentGroup">removeChildGroupFromParentGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_removeUsersFromGroup">removeUsersFromGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_revokeEntitySharingFromGroups">revokeEntitySharingFromGroups</a></li>
-<li><a href="#Fn_SharingRegistryService_revokeEntitySharingFromUsers">revokeEntitySharingFromUsers</a></li>
-<li><a href="#Fn_SharingRegistryService_searchEntities">searchEntities</a></li>
-<li><a href="#Fn_SharingRegistryService_shareEntityWithGroups">shareEntityWithGroups</a></li>
-<li><a href="#Fn_SharingRegistryService_shareEntityWithUsers">shareEntityWithUsers</a></li>
-<li><a href="#Fn_SharingRegistryService_updateDomain">updateDomain</a></li>
-<li><a href="#Fn_SharingRegistryService_updateEntity">updateEntity</a></li>
-<li><a href="#Fn_SharingRegistryService_updateEntityType">updateEntityType</a></li>
-<li><a href="#Fn_SharingRegistryService_updateGroup">updateGroup</a></li>
-<li><a href="#Fn_SharingRegistryService_updatePermissionType">updatePermissionType</a></li>
-<li><a href="#Fn_SharingRegistryService_updatedUser">updatedUser</a></li>
-<li><a href="#Fn_SharingRegistryService_userHasAccess">userHasAccess</a></li>
-</ul>
-</td>
-<td></td>
-<td></code></td>
-</tr></table>
-<hr/><h2 id="Services">Services</h2>
-<h3 id="Svc_SharingRegistryService">Service: SharingRegistryService</h3>
-<div class="definition"><h4 id="Fn_SharingRegistryService_createDomain">Function: SharingRegistryService.createDomain</h4>
-<pre><code>string</code> createDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domainId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to create a new domain</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateDomain">Function: SharingRegistryService.updateDomain</h4>
-<pre><code>bool</code> updateDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domainId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to update a domain</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteDomain">Function: SharingRegistryService.deleteDomain</h4>
-<pre><code>bool</code> deleteDomain(<code>string</code> domainId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to delete domain</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomain">Function: SharingRegistryService.getDomain</h4>
-<pre><code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> getDomain(<code>string</code> domainId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to retrieve a domain</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomains">Function: SharingRegistryService.getDomains</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code>&gt;</code> getDomains(<code>i32</code> offset,
-                                       <code>i32</code> limit)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get all domain.</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_registerUser">Function: SharingRegistryService.registerUser</h4>
-<pre><code>string</code> registerUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to register a user in the system</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updatedUser">Function: SharingRegistryService.updatedUser</h4>
-<pre><code>bool</code> updatedUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to update existing user</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteUser">Function: SharingRegistryService.deleteUser</h4>
-<pre><code>bool</code> deleteUser(<code>string</code> userId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to delete user</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUser">Function: SharingRegistryService.getUser</h4>
-<pre><code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> getUser(<code>string</code> userId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get a user</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUsers">Function: SharingRegistryService.getUsers</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getUsers(<code>string</code> domainId,
-                                   <code>i32</code> offset,
-                                   <code>i32</code> limit)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get a list of users in a specific domain Users will be reverse sorted based on the created time.</p>
-<li>domainId : Domain id</li>
-<li>offset : Starting result number</li>
-<li>limit : Number of max results to be sent</li>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createGroup">Function: SharingRegistryService.createGroup</h4>
-<pre><code>string</code> createGroup(<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> group)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to create a new group</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateGroup">Function: SharingRegistryService.updateGroup</h4>
-<pre><code>bool</code> updateGroup(<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> group)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to update a group</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteGroup">Function: SharingRegistryService.deleteGroup</h4>
-<pre><code>bool</code> deleteGroup(<code>string</code> groupId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to delete a group</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroup">Function: SharingRegistryService.getGroup</h4>
-<pre><code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> getGroup(<code>string</code> groupId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get a group</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroups">Function: SharingRegistryService.getGroups</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroups(<code>string</code> domainId,
-                                         <code>i32</code> offset,
-                                         <code>i32</code> limit)
-</pre><p>API method to get groups in a domainId. Results are reverse sorted based on created time.</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_addUsersToGroup">Function: SharingRegistryService.addUsersToGroup</h4>
-<pre><code>bool</code> addUsersToGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
-                     <code>string</code> groupId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to add list of users to a group</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeUsersFromGroup">Function: SharingRegistryService.removeUsersFromGroup</h4>
-<pre><code>bool</code> removeUsersFromGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
-                          <code>string</code> groupId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to remove users from a group</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembersOfTypeUser">Function: SharingRegistryService.getGroupMembersOfTypeUser</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getGroupMembersOfTypeUser(<code>string</code> groupId,
-                                                    <code>i32</code> offset,
-                                                    <code>i32</code> limit)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get list of child users in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembersOfTypeGroup">Function: SharingRegistryService.getGroupMembersOfTypeGroup</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroupMembersOfTypeGroup(<code>string</code> groupId,
-                                                          <code>i32</code> offset,
-                                                          <code>i32</code> limit)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get list of child groups in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_addChildGroupsToParentGroup">Function: SharingRegistryService.addChildGroupsToParentGroup</h4>
-<pre><code>bool</code> addChildGroupsToParentGroup(<code>list&lt;<code>string</code>&gt;</code> childIds,
-                                 <code>string</code> groupId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to add a child group to a parent group.</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeChildGroupFromParentGroup">Function: SharingRegistryService.removeChildGroupFromParentGroup</h4>
-<pre><code>bool</code> removeChildGroupFromParentGroup(<code>string</code> childId,
-                                     <code>string</code> groupId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to remove a child group from parent group.</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createEntityType">Function: SharingRegistryService.createEntityType</h4>
-<pre><code>string</code> createEntityType(<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> entityType)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to create a new entity type</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateEntityType">Function: SharingRegistryService.updateEntityType</h4>
-<pre><code>bool</code> updateEntityType(<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> entityType)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to update entity type</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntityType">Function: SharingRegistryService.deleteEntityType</h4>
-<pre><code>bool</code> deleteEntityType(<code>string</code> entityTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to delete entity type</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityType">Function: SharingRegistryService.getEntityType</h4>
-<pre><code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> getEntityType(<code>string</code> entityTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get an entity type</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityTypes">Function: SharingRegistryService.getEntityTypes</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code>&gt;</code> getEntityTypes(<code>string</code> domainId,
-                                               <code>i32</code> offset,
-                                               <code>i32</code> limit)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get entity types in a domainId. Results are reverse time sorted based on creation time</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_registerEntity">Function: SharingRegistryService.registerEntity</h4>
-<pre><code>string</code> registerEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to register new entity</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateEntity">Function: SharingRegistryService.updateEntity</h4>
-<pre><code>bool</code> updateEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to update entity</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntity">Function: SharingRegistryService.deleteEntity</h4>
-<pre><code>bool</code> deleteEntity(<code>string</code> entityId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to delete entity</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntity">Function: SharingRegistryService.getEntity</h4>
-<pre><code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> getEntity(<code>string</code> entityId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get entity</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_searchEntities">Function: SharingRegistryService.searchEntities</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code>&gt;</code> searchEntities(<code>string</code> userId,
-                                           <code>string</code> entityTypeId,
-                                           <code>list&lt;<code><a href="sharing_models.html#Struct_SearchCriteria">sharing_models.SearchCriteria</a></code>&gt;</code> filters,
-                                           <code>i32</code> offset,
-                                           <code>i32</code> limit)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to search entities</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedUsers">Function: SharingRegistryService.getListOfSharedUsers</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getListOfSharedUsers(<code>string</code> entityId,
-                                               <code>string</code> permissionTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get a list of shared users given the entity id</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedGroups">Function: SharingRegistryService.getListOfSharedGroups</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getListOfSharedGroups(<code>string</code> entityId,
-                                                     <code>string</code> permissionTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get a list of shared groups given the entity id</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_createPermissionType">Function: SharingRegistryService.createPermissionType</h4>
-<pre><code>string</code> createPermissionType(<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> permissionType)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to create permission type</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updatePermissionType">Function: SharingRegistryService.updatePermissionType</h4>
-<pre><code>bool</code> updatePermissionType(<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> permissionType)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to update permission type</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deletePermissionType">Function: SharingRegistryService.deletePermissionType</h4>
-<pre><code>bool</code> deletePermissionType(<code>string</code> entityTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to delete permission type</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionType">Function: SharingRegistryService.getPermissionType</h4>
-<pre><code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> getPermissionType(<code>string</code> permissionTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get permission type</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionTypes">Function: SharingRegistryService.getPermissionTypes</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code>&gt;</code> getPermissionTypes(<code>string</code> domainId,
-                                                       <code>i32</code> offset,
-                                                       <code>i32</code> limit)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get list of permission types in a given domainId. Results are reverse time sorted based on creation time</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithUsers">Function: SharingRegistryService.shareEntityWithUsers</h4>
-<pre><code>bool</code> shareEntityWithUsers(<code>string</code> domainId,
-                          <code>string</code> entityId,
-                          <code>list&lt;<code>string</code>&gt;</code> userList,
-                          <code>string</code> perssionTypeId,
-                          <code>bool</code> cascadePermission)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to share an entity with users</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromUsers">Function: SharingRegistryService.revokeEntitySharingFromUsers</h4>
-<pre><code>bool</code> revokeEntitySharingFromUsers(<code>string</code> domainId,
-                                  <code>string</code> entityId,
-                                  <code>list&lt;<code>string</code>&gt;</code> userList,
-                                  <code>string</code> perssionTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to revoke sharing from a list of users</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithGroups">Function: SharingRegistryService.shareEntityWithGroups</h4>
-<pre><code>bool</code> shareEntityWithGroups(<code>string</code> domainId,
-                           <code>string</code> entityId,
-                           <code>list&lt;<code>string</code>&gt;</code> groupList,
-                           <code>string</code> perssionTypeId,
-                           <code>bool</code> cascadePermission)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to share an entity with list of groups</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromGroups">Function: SharingRegistryService.revokeEntitySharingFromGroups</h4>
-<pre><code>bool</code> revokeEntitySharingFromGroups(<code>string</code> domainId,
-                                   <code>string</code> entityId,
-                                   <code>list&lt;<code>string</code>&gt;</code> groupList,
-                                   <code>string</code> perssionTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to revoke sharing from list of users</p>
-<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_userHasAccess">Function: SharingRegistryService.userHasAccess</h4>
-<pre><code>bool</code> userHasAccess(<code>string</code> domainId,
-                   <code>string</code> userId,
-                   <code>string</code> entityId,
-                   <code>string</code> permissionTypeId)
-    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to check whether a user has access to a specific entity</p>
-<br/></div></div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/api-docs/sharing_models.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/sharing_models.html b/modules/sharing-registry/api-docs/sharing_models.html
deleted file mode 100644
index 1d4dff8..0000000
--- a/modules/sharing-registry/api-docs/sharing_models.html
+++ /dev/null
@@ -1,273 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-<link href="style.css" rel="stylesheet" type="text/css"/>
-<title>Thrift module: sharing_models</title></head><body>
-<div class="container-fluid">
-<h1>Thrift module: sharing_models</h1>
-<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
-<tr>
-<td>sharing_models</td><td></td>
-<td><a href="#Struct_Domain">Domain</a><br/>
-<a href="#Struct_Entity">Entity</a><br/>
-<a href="#Enum_EntitySearchField">EntitySearchField</a><br/>
-<a href="#Struct_EntityType">EntityType</a><br/>
-<a href="#Enum_GroupCardinality">GroupCardinality</a><br/>
-<a href="#Enum_GroupChildType">GroupChildType</a><br/>
-<a href="#Struct_GroupMembership">GroupMembership</a><br/>
-<a href="#Enum_GroupType">GroupType</a><br/>
-<a href="#Struct_PermissionType">PermissionType</a><br/>
-<a href="#Enum_SearchCondition">SearchCondition</a><br/>
-<a href="#Struct_SearchCriteria">SearchCriteria</a><br/>
-<a href="#Struct_Sharing">Sharing</a><br/>
-<a href="#Struct_SharingRegistryException">SharingRegistryException</a><br/>
-<a href="#Enum_SharingType">SharingType</a><br/>
-<a href="#Struct_User">User</a><br/>
-<a href="#Struct_UserGroup">UserGroup</a><br/>
-</td>
-<td><code><a href="#Const_DO_NOT_SET_AT_CLIENTS_ID">DO_NOT_SET_AT_CLIENTS_ID</a></code><br/>
-</code></td>
-</tr></table>
-<hr/><h2 id="Constants">Constants</h2>
-<table class="table-bordered table-striped table-condensed"><thead><th>Constant</th><th>Type</th><th>Value</th></thead>
-<tr id="Const_DO_NOT_SET_AT_CLIENTS_ID"><td><code>DO_NOT_SET_AT_CLIENTS_ID</code></td><td><code>string</code></td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr></table><hr/><h2 id="Enumerations">Enumerations</h2>
-<div class="definition"><h3 id="Enum_GroupCardinality">Enumeration: GroupCardinality</h3>
-<p>This is an system internal enum used to define single user groups and multi users groups. Every user is also
-considered as a group in it's own right for implementation ease</p>
-
-<br/><br/><table class="table-bordered table-striped table-condensed">
-<tr><td><code>SINGLE_USER</code></td><td><code>0</code></td><td>
-</td></tr>
-<tr><td><code>MULTI_USER</code></td><td><code>1</code></td><td>
-</td></tr>
-</table></div>
-<div class="definition"><h3 id="Enum_GroupType">Enumeration: GroupType</h3>
-<p>Group types can be either user level or domain level groups.</p>
-
-<br/><br/><table class="table-bordered table-striped table-condensed">
-<tr><td><code>DOMAIN_LEVEL_GROUP</code></td><td><code>0</code></td><td>
-</td></tr>
-<tr><td><code>USER_LEVEL_GROUP</code></td><td><code>1</code></td><td>
-</td></tr>
-</table></div>
-<div class="definition"><h3 id="Enum_GroupChildType">Enumeration: GroupChildType</h3>
-<p>System internal data type to match group child types</p>
-
-<br/><br/><table class="table-bordered table-striped table-condensed">
-<tr><td><code>USER</code></td><td><code>0</code></td><td>
-</td></tr>
-<tr><td><code>GROUP</code></td><td><code>1</code></td><td>
-</td></tr>
-</table></div>
-<div class="definition"><h3 id="Enum_EntitySearchField">Enumeration: EntitySearchField</h3>
-<p>This list of fields that can be used to search entities</p>
-<li>NAME : Name of the entity</li>
-<li>DESCRIPTION : Description of the entity</li>
-<li>FULL_TEXT : Full text field of the entity</li>
-<li>PARENT_ENTITY_ID : Parent entity id of the entity</li>
-<li>CREATED_TIME : Created time of the entity</li>
-<li>UPDATED_TIME : Updated time of the entity</li>
-
-<br/><br/><table class="table-bordered table-striped table-condensed">
-<tr><td><code>NAME</code></td><td><code>0</code></td><td>
-</td></tr>
-<tr><td><code>DESCRIPTION</code></td><td><code>1</code></td><td>
-</td></tr>
-<tr><td><code>FULL_TEXT</code></td><td><code>2</code></td><td>
-</td></tr>
-<tr><td><code>PRRENT_ENTITY_ID</code></td><td><code>3</code></td><td>
-</td></tr>
-<tr><td><code>CREATED_TIME</code></td><td><code>4</code></td><td>
-</td></tr>
-<tr><td><code>UPDATED_TIME</code></td><td><code>5</code></td><td>
-</td></tr>
-</table></div>
-<div class="definition"><h3 id="Enum_SearchCondition">Enumeration: SearchCondition</h3>
-<p>Different search operators that can be used with the entity search fields</p>
-<li>EQUAL : Simply matches for equality. Applicable for name, and parent entity id</li>
-<li>LIKE : Check for the condition %$FIELD% condition. Applicable for name, and description</li>
-<li>FULL_TEXT : Does a full text search. Only applicable for the FULL_TEXT field.</li>
-<li>GTE : Greater than or equal. Only applicable for created time and updated time.</li>
-<li>LTE : Less than or equal. Only applicable for created time and updated time.</li>
-
-<br/><br/><table class="table-bordered table-striped table-condensed">
-<tr><td><code>EQUAL</code></td><td><code>0</code></td><td>
-</td></tr>
-<tr><td><code>LIKE</code></td><td><code>1</code></td><td>
-</td></tr>
-<tr><td><code>FULL_TEXT</code></td><td><code>2</code></td><td>
-</td></tr>
-<tr><td><code>GTE</code></td><td><code>3</code></td><td>
-</td></tr>
-<tr><td><code>LTE</code></td><td><code>4</code></td><td>
-</td></tr>
-</table></div>
-<div class="definition"><h3 id="Enum_SharingType">Enumeration: SharingType</h3>
-<p>This is an internal enum type for managing sharings</p>
-
-<br/><br/><table class="table-bordered table-striped table-condensed">
-<tr><td><code>DIRECT_NON_CASCADING</code></td><td><code>0</code></td><td>
-</td></tr>
-<tr><td><code>DIRECT_CASCADING</code></td><td><code>1</code></td><td>
-</td></tr>
-<tr><td><code>INDIRECT_CASCADING</code></td><td><code>2</code></td><td>
-</td></tr>
-</table></div>
-<hr/><h2 id="Structs">Data structures</h2>
-<div class="definition"><h3 id="Struct_Domain">Struct: Domain</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
-<tr><td>2</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>Domain is the entity that enables multi-tenency in this componenet. Every tenant will be
-operating separately it's own silo which is identified by the domain id. In the current implementation domain id
-will be same as the domain name</p>
-<li>domainId : Will be generated by the server based on the domain name</li>
-<li><b>name</b> : A single word name that identifies the domain e.g seagrid, ultrascan</li>
-<li>description : A short description for the domain</li>
-<li>createdTime : Will be set by the system</li>
-<li>updatedTime : Will be set by the system</li>
-
-<br/></div><div class="definition"><h3 id="Struct_User">Struct: User</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>userId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>userName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>firstName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>lastName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>email</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>7</td><td>icon</td><td><code>binary</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>8</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>User is the model used to register a user in the system. Minimal user information will be required to provide
-regarding the user.</p>
-<li><b>userId</b> : Client provided user id. (The id is not system generated and it is a must to provide this id)</li>
-<li><b>domainId</b> : Domain id for that user</li>
-<li><b>userName</b> : User name for the user</li>
-<li><b>firstName</b> : First name of the user</li>
-<li><b>lastName</b> : Last name of the user</li>
-<li><b>email</b> : Email address of the user</li>
-<li>icon : A binary field for storing the user icon</li>
-<li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
-<li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
-
-<br/></div><div class="definition"><h3 id="Struct_UserGroup">Struct: UserGroup</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
-<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>groupType</td><td><code><a href="#Enum_GroupType">GroupType</a></code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>7</td><td>groupCardinality</td><td><code><a href="#Enum_GroupCardinality">GroupCardinality</a></code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>8</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>User group is a collection of users.</p>
- <li>groupId : System generated grouo id. In the current implementation this is of the form domainId:name</li>
- <li><b>domainId</b> : Domain id for this user group</li>
- <li><b>name</b> : Name for the user group. should be one word</li>
- <li>description : Short description for the group.</li>
- <li><b>ownerId</b> : Owner id of this group.</li>
- <li><b>groupType</b> : Group type (DOMAIN_LEVEL_GROUP, USER_LEVEL_GROUP)</li>
- <li><b>groupCardinality</b> : Group cardinality (SINGLE_USER, MULTI_USER)</li>
- <li>createdTime : Will be set by the system</li>
- <li>updatedTime : Will be set by the system</li>
- 
-<br/></div><div class="definition"><h3 id="Struct_GroupMembership">Struct: GroupMembership</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>parentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>2</td><td>childId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>childType</td><td><code><a href="#Enum_GroupChildType">GroupChildType</a></code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>System internal data type to map group memberships</p>
-
-<br/></div><div class="definition"><h3 id="Struct_EntityType">Struct: EntityType</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
-<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>client defined entity types</p>
-<li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
-<li><b>domainId</b> : Domain id of the domain.</li>
-<li><b>name</b> : Name for the entity type. Should be a single word.</li>
-<li>description : Short description for the entity type.</li>
-<li>createdTime : Will be set by the system</li>
-<li>updatedTime : Will be set by the system</li>
-
-<br/></div><div class="definition"><h3 id="Struct_SearchCriteria">Struct: SearchCriteria</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>searchField</td><td><code><a href="#Enum_EntitySearchField">EntitySearchField</a></code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>2</td><td>value</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>searchCondition</td><td><code><a href="#Enum_SearchCondition">SearchCondition</a></code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>Container object for search criteria</p>
-<li><b>searchField</b> : Entity search field</li>
-<li><b>value</b> : Search value</li>
-<li><b>searchCondition</b> : EQUAL, LIKE etc..</li>
-
-<br/></div><div class="definition"><h3 id="Struct_Entity">Struct: Entity</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>parentEntityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>7</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>8</td><td>metadata</td><td><code>map&lt;<code>string</code>, <code>string</code>&gt;</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>9</td><td>fullText</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>10</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>11</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>Entity object which is used to register an entity in the system.</p>
-<li><b>entityId</b> : Client id provided by the client</li>
-<li><b>domainId</b> : Domain id</li>
-<li><b>entityTypeId</b> : Entity type id</li>
-<li><b>ownerId</b> : Owner id</li>
-<li>parentEntityId : Parent entity id</li>
-<li><b>name</b> : Name</li>
-<li>description : Short description for the entity</li>
-<li>metadata : Map of optional metadata</li>
-<li>fullText : A string which will be considered for full text search</li>
-<li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
-<li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
-
-<br/></div><div class="definition"><h3 id="Struct_PermissionType">Struct: PermissionType</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
-<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>Object for creating client defined permission type</p>
-<li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
-<li><b>domainId</b> : Domain id</li>
-<li><b>name</b> : Single word name for the permission</li>
-<li>description : Short description for the permission type</li>
-<li>createdTime : Will be set by the system</li>
-<li>updatedTime : Will be set by the system</li>
-
-<br/></div><div class="definition"><h3 id="Struct_Sharing">Struct: Sharing</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>2</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>sharingType</td><td><code><a href="#Enum_SharingType">SharingType</a></code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>inheritedParentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>7</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-</table><br/><p>This is an internal enum type for managing sharings</p>
-
-<br/></div><div class="definition"><h3 id="Struct_SharingRegistryException">Exception: SharingRegistryException</h3>
-<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>message</td><td><code>string</code></td><td></td><td>required</td><td></td></tr>
-</table><br/><p>Exception model used in the sharing registry service</p>
-
-<br/></div></div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/api-docs/style.css
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/style.css b/modules/sharing-registry/api-docs/style.css
deleted file mode 100644
index 34fd9d7..0000000
--- a/modules/sharing-registry/api-docs/style.css
+++ /dev/null
@@ -1,184 +0,0 @@
-/*!
- * Bootstrap v2.0.3
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
-.clearfix:after{clear:both;}
-.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
-.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
-article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
-audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
-audio:not([controls]){display:none;}
-html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
-a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
-a:hover,a:active{outline:0;}
-sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
-sup{top:-0.5em;}
-sub{bottom:-0.25em;}
-img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
-button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
-button,input{*overflow:visible;line-height:normal;}
-button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
-button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
-input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
-input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
-textarea{overflow:auto;vertical-align:top;}
-body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
-a{color:#0088cc;text-decoration:none;}
-a:hover{color:#005580;text-decoration:underline;}
-.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
-.row:after{clear:both;}
-[class*="span"]{float:left;margin-left:20px;}
-.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
-.span12{width:940px;}
-.span11{width:860px;}
-.span10{width:780px;}
-.span9{width:700px;}
-.span8{width:620px;}
-.span7{width:540px;}
-.span6{width:460px;}
-.span5{width:380px;}
-.span4{width:300px;}
-.span3{width:220px;}
-.span2{width:140px;}
-.span1{width:60px;}
-.offset12{margin-left:980px;}
-.offset11{margin-left:900px;}
-.offset10{margin-left:820px;}
-.offset9{margin-left:740px;}
-.offset8{margin-left:660px;}
-.offset7{margin-left:580px;}
-.offset6{margin-left:500px;}
-.offset5{margin-left:420px;}
-.offset4{margin-left:340px;}
-.offset3{margin-left:260px;}
-.offset2{margin-left:180px;}
-.offset1{margin-left:100px;}
-.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
-.row-fluid:after{clear:both;}
-.row-fluid [class*="span"]{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574%;*margin-left:2.0744680846382977%;}
-.row-fluid [class*="span"]:first-child{margin-left:0;}
-.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%;}
-.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%;}
-.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%;}
-.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%;}
-.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%;}
-.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%;}
-.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%;}
-.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%;}
-.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%;}
-.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%;}
-.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%;}
-.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%;}
-.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
-.container:after{clear:both;}
-.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
-.container-fluid:after{clear:both;}
-p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
-.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
-h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
-h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
-h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
-h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;}
-h4,h5,h6{line-height:18px;}
-h4{font-size:14px;}h4 small{font-size:12px;}
-h5{font-size:12px;}
-h6{font-size:11px;color:#999999;text-transform:uppercase;}
-.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
-.page-header h1{line-height:1;}
-ul,ol{padding:0;margin:0 0 9px 25px;}
-ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
-ul{list-style:disc;}
-ol{list-style:decimal;}
-li{line-height:18px;}
-ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
-dl{margin-bottom:18px;}
-dt,dd{line-height:18px;}
-dt{font-weight:bold;line-height:17px;}
-dd{margin-left:9px;}
-.dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
-.dl-horizontal dd{margin-left:130px;}
-hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
-strong{font-weight:bold;}
-em{font-style:italic;}
-.muted{color:#999999;}
-abbr[title]{cursor:help;border-bottom:1px dotted #ddd;}
-abbr.initialism{font-size:90%;text-transform:uppercase;}
-blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
-blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
-blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
-q:before,q:after,blockquote:before,blockquote:after{content:"";}
-address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;}
-small{font-size:100%;}
-cite{font-style:normal;}
-code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
-pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;}
-pre code{padding:0;color:inherit;background-color:transparent;border:0;}
-.pre-scrollable{max-height:340px;overflow-y:scroll;}
-.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
-.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
-a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
-.label-important,.badge-important{background-color:#b94a48;}
-.label-important[href],.badge-important[href]{background-color:#953b39;}
-.label-warning,.badge-warning{background-color:#f89406;}
-.label-warning[href],.badge-warning[href]{background-color:#c67605;}
-.label-success,.badge-success{background-color:#468847;}
-.label-success[href],.badge-success[href]{background-color:#356635;}
-.label-info,.badge-info{background-color:#3a87ad;}
-.label-info[href],.badge-info[href]{background-color:#2d6987;}
-.label-inverse,.badge-inverse{background-color:#333333;}
-.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
-table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
-.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
-.table th{font-weight:bold;}
-.table thead th{vertical-align:bottom;}
-.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
-.table tbody+tbody{border-top:2px solid #dddddd;}
-.table-condensed th,.table-condensed td{padding:4px 5px;}
-.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
-.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
-.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;}
-.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
-.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
-.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
-.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
-.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
-table .span1{float:none;width:44px;margin-left:0;}
-table .span2{float:none;width:124px;margin-left:0;}
-table .span3{float:none;width:204px;margin-left:0;}
-table .span4{float:none;width:284px;margin-left:0;}
-table .span5{float:none;width:364px;margin-left:0;}
-table .span6{float:none;width:444px;margin-left:0;}
-table .span7{float:none;width:524px;margin-left:0;}
-table .span8{float:none;width:604px;margin-left:0;}
-table .span9{float:none;width:684px;margin-left:0;}
-table .span10{float:none;width:764px;margin-left:0;}
-table .span11{float:none;width:844px;margin-left:0;}
-table .span12{float:none;width:924px;margin-left:0;}
-table .span13{float:none;width:1004px;margin-left:0;}
-table .span14{float:none;width:1084px;margin-left:0;}
-table .span15{float:none;width:1164px;margin-left:0;}
-table .span16{float:none;width:1244px;margin-left:0;}
-table .span17{float:none;width:1324px;margin-left:0;}
-table .span18{float:none;width:1404px;margin-left:0;}
-table .span19{float:none;width:1484px;margin-left:0;}
-table .span20{float:none;width:1564px;margin-left:0;}
-table .span21{float:none;width:1644px;margin-left:0;}
-table .span22{float:none;width:1724px;margin-left:0;}
-table .span23{float:none;width:1804px;margin-left:0;}
-table .span24{float:none;width:1884px;margin-left:0;}
-/* Auto-generated CSS for generated Thrift docs */
-h3, h4 { margin-bottom: 6px; }
-div.definition { border: 1px solid #CCC; margin-bottom: 10px; padding: 10px; }
-div.extends { margin: -0.5em 0 1em 5em }
-td { vertical-align: top; }
-table { empty-cells: show; }
-code { line-height: 20px; }
-.table-bordered th, .table-bordered td { border-bottom: 1px solid #DDDDDD; }

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServiceTest.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServiceTest.java b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServiceTest.java
new file mode 100644
index 0000000..3357eb5
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServiceTest.java
@@ -0,0 +1,84 @@
+/*
+ *
+ * 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;
+
+import org.apache.airavata.sharing.registry.models.Domain;
+import org.apache.airavata.sharing.registry.models.User;
+import org.apache.airavata.sharing.registry.service.cpi.SharingRegistryService;
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SharingRegistryServiceTest {
+    private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServiceTest.class);
+
+
+    @Test
+    @Ignore("Test is only for demonstration purposes")
+    public void test() throws TException {
+        String serverHost = "gw56.iu.xsede.org";
+        int serverPort = 7878;
+
+        TTransport transport = new TSocket(serverHost, serverPort);
+        transport.open();
+        TProtocol protocol = new TBinaryProtocol(transport);
+        SharingRegistryService.Client sharingServiceClient = new SharingRegistryService.Client(protocol);
+
+        Domain domain = new Domain();
+        //has to be one word
+        domain.setName("test-domain"+System.currentTimeMillis());
+        //optional
+        domain.setDescription("test domain description");
+
+        String domainId = sharingServiceClient.createDomain(domain);
+
+        User user = new User();
+        String userName = "test-user";
+        String userId1 =  userName + "@" + domainId;
+        //required
+        user.setUserId(userId1);
+        //required
+        user.setUserName(userName);
+        //required
+        user.setDomainId(domainId);
+        //required
+        user.setFirstName("John");
+        //required
+        user.setLastName("Doe");
+        //required
+        user.setEmail("john.doe@abc.com");
+        //optional - this should be bytes of the users image icon
+        byte[] icon = new byte[10];
+        user.setIcon(icon);
+
+        //can be manually set. otherwise will be set to the current time by the system
+        user.setCreatedTime(System.currentTimeMillis());
+        user.setUpdatedTime(System.currentTimeMillis());
+
+        sharingServiceClient.registerUser(user);
+    }
+}
\ No newline at end of file


[29/51] [abbrv] airavata git commit: implementing sharing server

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
new file mode 100644
index 0000000..b9840f6
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
@@ -0,0 +1,45160 @@
+/**
+ * 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)")
+public class SharingRegistryService {
+
+  public interface Iface {
+
+    /**
+     *  * Domain Operations
+     * *
+     * 
+     * @param domain
+     */
+    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean deleteDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    /**
+     *  * User Operations
+     * *
+     * 
+     * @param user
+     */
+    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean deleteUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    /**
+     *  * Group Operations
+     * *
+     * 
+     * @param group
+     */
+    public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean deleteGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
+
+    public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean addChildGroupToParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    /**
+     *  * EntityType Operations
+     * *
+     * 
+     * @param entityType
+     */
+    public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    /**
+     *  * Entity Operations
+     * *
+     * 
+     * @param entity
+     */
+    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean deleteEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    /**
+     *  * Permission Operations
+     * *
+     * 
+     * @param permissionType
+     */
+    public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    /**
+     *  * Sharing Entity with Users and Groups
+     * *
+     * 
+     * @param entityId
+     * @param userList
+     * @param perssionTypeId
+     * @param cascadePermission
+     */
+    public boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+
+  }
+
+  public interface AsyncIface {
+
+    public void createDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void 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 createUser(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, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addChildGroupToParentGroup(String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void removeChildGroupFromParentGroup(String childId, 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 createEntity(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 userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getListOfSharedUsers(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getListOfSharedGroups(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void deletePermissionType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getPermissionType(String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void userHasAccess(String domainId, String userId, String entityId, String permissionTypeId, 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 String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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 String recv_createDomain() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      getDomains_result result = new getDomains_result();
+      receiveBase(result, "getDomains");
+      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, "getDomains failed: unknown result");
+    }
+
+    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_createUser(user);
+      return recv_createUser();
+    }
+
+    public void send_createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.thrift.TException
+    {
+      createUser_args args = new createUser_args();
+      args.setUser(user);
+      sendBase("createUser", args);
+    }
+
+    public String recv_createUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      createUser_result result = new createUser_result();
+      receiveBase(result, "createUser");
+      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, "createUser failed: unknown result");
+    }
+
+    public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      getUsers_result result = new getUsers_result();
+      receiveBase(result, "getUsers");
+      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, "getUsers failed: unknown result");
+    }
+
+    public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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 String recv_createGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_getGroupMembers(groupId, offset, limit);
+      return recv_getGroupMembers();
+    }
+
+    public void send_getGroupMembers(String groupId, int offset, int limit) throws org.apache.thrift.TException
+    {
+      getGroupMembers_args args = new getGroupMembers_args();
+      args.setGroupId(groupId);
+      args.setOffset(offset);
+      args.setLimit(limit);
+      sendBase("getGroupMembers", args);
+    }
+
+    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> recv_getGroupMembers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      getGroupMembers_result result = new getGroupMembers_result();
+      receiveBase(result, "getGroupMembers");
+      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, "getGroupMembers failed: unknown result");
+    }
+
+    public boolean addChildGroupToParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_addChildGroupToParentGroup(childId, groupId);
+      return recv_addChildGroupToParentGroup();
+    }
+
+    public void send_addChildGroupToParentGroup(String childId, String groupId) throws org.apache.thrift.TException
+    {
+      addChildGroupToParentGroup_args args = new addChildGroupToParentGroup_args();
+      args.setChildId(childId);
+      args.setGroupId(groupId);
+      sendBase("addChildGroupToParentGroup", args);
+    }
+
+    public boolean recv_addChildGroupToParentGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      addChildGroupToParentGroup_result result = new addChildGroupToParentGroup_result();
+      receiveBase(result, "addChildGroupToParentGroup");
+      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, "addChildGroupToParentGroup failed: unknown result");
+    }
+
+    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_removeChildGroupFromParentGroup(childId, groupId);
+      return recv_removeChildGroupFromParentGroup();
+    }
+
+    public void send_removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.thrift.TException
+    {
+      removeChildGroupFromParentGroup_args args = new removeChildGroupFromParentGroup_args();
+      args.setChildId(childId);
+      args.setGroupId(groupId);
+      sendBase("removeChildGroupFromParentGroup", args);
+    }
+
+    public boolean recv_removeChildGroupFromParentGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      removeChildGroupFromParentGroup_result result = new removeChildGroupFromParentGroup_result();
+      receiveBase(result, "removeChildGroupFromParentGroup");
+      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, "removeChildGroupFromParentGroup failed: unknown result");
+    }
+
+    public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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 String recv_createEntityType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      getEntityTypes_result result = new getEntityTypes_result();
+      receiveBase(result, "getEntityTypes");
+      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, "getEntityTypes failed: unknown result");
+    }
+
+    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_createEntity(entity);
+      return recv_createEntity();
+    }
+
+    public void send_createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.thrift.TException
+    {
+      createEntity_args args = new createEntity_args();
+      args.setEntity(entity);
+      sendBase("createEntity", args);
+    }
+
+    public String recv_createEntity() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      createEntity_result result = new createEntity_result();
+      receiveBase(result, "createEntity");
+      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, "createEntity failed: unknown result");
+    }
+
+    public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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 userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_searchEntities(userId, entityTypeId, filters, offset, limit);
+      return recv_searchEntities();
+    }
+
+    public void send_searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.thrift.TException
+    {
+      searchEntities_args args = new searchEntities_args();
+      args.setUserId(userId);
+      args.setEntityTypeId(entityTypeId);
+      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.SharingRegistryException, 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 List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_getListOfSharedUsers(entityId, permissionTypeId);
+      return recv_getListOfSharedUsers();
+    }
+
+    public void send_getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.thrift.TException
+    {
+      getListOfSharedUsers_args args = new getListOfSharedUsers_args();
+      args.setEntityId(entityId);
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("getListOfSharedUsers", args);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.User> recv_getListOfSharedUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      getListOfSharedUsers_result result = new getListOfSharedUsers_result();
+      receiveBase(result, "getListOfSharedUsers");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.gre != null) {
+        throw result.gre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedUsers failed: unknown result");
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_getListOfSharedGroups(entityId, permissionTypeId);
+      return recv_getListOfSharedGroups();
+    }
+
+    public void send_getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.thrift.TException
+    {
+      getListOfSharedGroups_args args = new getListOfSharedGroups_args();
+      args.setEntityId(entityId);
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("getListOfSharedGroups", args);
+    }
+
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> recv_getListOfSharedGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      getListOfSharedGroups_result result = new getListOfSharedGroups_result();
+      receiveBase(result, "getListOfSharedGroups");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.gre != null) {
+        throw result.gre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedGroups failed: unknown result");
+    }
+
+    public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_createPermissionType(permissionType);
+      return recv_createPermissionType();
+    }
+
+    public void send_createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.thrift.TException
+    {
+      createPermissionType_args args = new createPermissionType_args();
+      args.setPermissionType(permissionType);
+      sendBase("createPermissionType", args);
+    }
+
+    public String recv_createPermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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 permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_updatePermissionType(permissionType);
+      return recv_updatePermissionType();
+    }
+
+    public void send_updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.thrift.TException
+    {
+      updatePermissionType_args args = new updatePermissionType_args();
+      args.setPermissionType(permissionType);
+      sendBase("updatePermissionType", args);
+    }
+
+    public boolean recv_updatePermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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 permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_getPermissionType(permissionTypeId);
+      return recv_getPermissionType();
+    }
+
+    public void send_getPermissionType(String permissionTypeId) throws org.apache.thrift.TException
+    {
+      getPermissionType_args args = new getPermissionType_args();
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("getPermissionType", args);
+    }
+
+    public org.apache.airavata.sharing.registry.models.PermissionType recv_getPermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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 boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_shareEntityWithUsers(entityId, userList, perssionTypeId, cascadePermission);
+      return recv_shareEntityWithUsers();
+    }
+
+    public void send_shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.thrift.TException
+    {
+      shareEntityWithUsers_args args = new shareEntityWithUsers_args();
+      args.setEntityId(entityId);
+      args.setUserList(userList);
+      args.setPerssionTypeId(perssionTypeId);
+      args.setCascadePermission(cascadePermission);
+      sendBase("shareEntityWithUsers", args);
+    }
+
+    public boolean recv_shareEntityWithUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      shareEntityWithUsers_result result = new shareEntityWithUsers_result();
+      receiveBase(result, "shareEntityWithUsers");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.gre != null) {
+        throw result.gre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithUsers failed: unknown result");
+    }
+
+    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_revokeEntitySharingFromUsers(entityId, userList, perssionTypeId);
+      return recv_revokeEntitySharingFromUsers();
+    }
+
+    public void send_revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.thrift.TException
+    {
+      revokeEntitySharingFromUsers_args args = new revokeEntitySharingFromUsers_args();
+      args.setEntityId(entityId);
+      args.setUserList(userList);
+      args.setPerssionTypeId(perssionTypeId);
+      sendBase("revokeEntitySharingFromUsers", args);
+    }
+
+    public boolean recv_revokeEntitySharingFromUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
+      receiveBase(result, "revokeEntitySharingFromUsers");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.gre != null) {
+        throw result.gre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromUsers failed: unknown result");
+    }
+
+    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_shareEntityWithGroups(entityId, groupList, perssionTypeId, cascadePermission);
+      return recv_shareEntityWithGroups();
+    }
+
+    public void send_shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.thrift.TException
+    {
+      shareEntityWithGroups_args args = new shareEntityWithGroups_args();
+      args.setEntityId(entityId);
+      args.setGroupList(groupList);
+      args.setPerssionTypeId(perssionTypeId);
+      args.setCascadePermission(cascadePermission);
+      sendBase("shareEntityWithGroups", args);
+    }
+
+    public boolean recv_shareEntityWithGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      shareEntityWithGroups_result result = new shareEntityWithGroups_result();
+      receiveBase(result, "shareEntityWithGroups");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.gre != null) {
+        throw result.gre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithGroups failed: unknown result");
+    }
+
+    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_revokeEntitySharingFromGroups(entityId, groupList, perssionTypeId);
+      return recv_revokeEntitySharingFromGroups();
+    }
+
+    public void send_revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.thrift.TException
+    {
+      revokeEntitySharingFromGroups_args args = new revokeEntitySharingFromGroups_args();
+      args.setEntityId(entityId);
+      args.setGroupList(groupList);
+      args.setPerssionTypeId(perssionTypeId);
+      sendBase("revokeEntitySharingFromGroups", args);
+    }
+
+    public boolean recv_revokeEntitySharingFromGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
+      receiveBase(result, "revokeEntitySharingFromGroups");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.gre != null) {
+        throw result.gre;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromGroups failed: unknown result");
+    }
+
+    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      send_userHasAccess(domainId, userId, entityId, permissionTypeId);
+      return recv_userHasAccess();
+    }
+
+    public void send_userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.thrift.TException
+    {
+      userHasAccess_args args = new userHasAccess_args();
+      args.setDomainId(domainId);
+      args.setUserId(userId);
+      args.setEntityId(entityId);
+      args.setPermissionTypeId(permissionTypeId);
+      sendBase("userHasAccess", args);
+    }
+
+    public boolean recv_userHasAccess() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    {
+      userHasAccess_result result = new userHasAccess_result();
+      receiveBase(result, "userHasAccess");
+      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, "userHasAccess 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 String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_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.SharingRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_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.SharingRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_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.SharingRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_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.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getDomains();
+      }
+    }
+
+    public void createUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      createUser_call method_call = new createUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class createUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.sharing.registry.models.User user;
+      public createUser_call(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.user = user;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        createUser_args args = new createUser_args();
+        args.setUser(user);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_createUser();
+      }
+    }
+
+    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.SharingRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_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.SharingRegistryException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_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 = n

<TRUNCATED>

[12/51] [abbrv] airavata git commit: Adding Airavata Api level changes associated with last commit

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e59d800/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index 0b12271..a600dce 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
@@ -316,6 +316,29 @@ public class Airavata {
      */
     public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
+    /**
+     * 
+     * Get all Public Key summaries for user in a Gateway
+     * 
+     * @param CredStoreToken
+     *    Credential Store Token which you want to find the Public Key for.
+     * 
+     * @param gatewayId
+     *    This is the unique identifier of your gateway where the token and public key was generated from.
+     * 
+     * @param userId
+     *    This is the unique identifier of user whose public keys are to be fetched.
+     * 
+     * @return CredentialSummary
+     * 
+     * 
+     * 
+     * @param authzToken
+     * @param gatewayId
+     * @param userId
+     */
+    public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
     public Map<String,String> getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
     /**
@@ -2913,6 +2936,8 @@ public class Airavata {
 
     public void getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void deleteSSHPubKey(org.apache.airavata.model.security.AuthzToken authzToken, String airavataCredStoreToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -3904,6 +3929,40 @@ public class Airavata {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGatewaySSHPubKeysSummary failed: unknown result");
     }
 
+    public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getAllSSHPubKeysSummaryForUserInGateway(authzToken, gatewayId, userId);
+      return recv_getAllSSHPubKeysSummaryForUserInGateway();
+    }
+
+    public void send_getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId) throws org.apache.thrift.TException
+    {
+      getAllSSHPubKeysSummaryForUserInGateway_args args = new getAllSSHPubKeysSummaryForUserInGateway_args();
+      args.setAuthzToken(authzToken);
+      args.setGatewayId(gatewayId);
+      args.setUserId(userId);
+      sendBase("getAllSSHPubKeysSummaryForUserInGateway", args);
+    }
+
+    public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> recv_getAllSSHPubKeysSummaryForUserInGateway() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getAllSSHPubKeysSummaryForUserInGateway_result result = new getAllSSHPubKeysSummaryForUserInGateway_result();
+      receiveBase(result, "getAllSSHPubKeysSummaryForUserInGateway");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSSHPubKeysSummaryForUserInGateway failed: unknown result");
+    }
+
     public Map<String,String> getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
       send_getAllGatewayPWDCredentials(authzToken, gatewayId);
@@ -9986,6 +10045,44 @@ public class Airavata {
       }
     }
 
+    public void getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getAllSSHPubKeysSummaryForUserInGateway_call method_call = new getAllSSHPubKeysSummaryForUserInGateway_call(authzToken, gatewayId, userId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getAllSSHPubKeysSummaryForUserInGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.security.AuthzToken authzToken;
+      private String gatewayId;
+      private String userId;
+      public getAllSSHPubKeysSummaryForUserInGateway_call(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, 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.authzToken = authzToken;
+        this.gatewayId = gatewayId;
+        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("getAllSSHPubKeysSummaryForUserInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getAllSSHPubKeysSummaryForUserInGateway_args args = new getAllSSHPubKeysSummaryForUserInGateway_args();
+        args.setAuthzToken(authzToken);
+        args.setGatewayId(gatewayId);
+        args.setUserId(userId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, 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_getAllSSHPubKeysSummaryForUserInGateway();
+      }
+    }
+
     public void getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       getAllGatewayPWDCredentials_call method_call = new getAllGatewayPWDCredentials_call(authzToken, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
@@ -15494,6 +15591,7 @@ public class Airavata {
       processMap.put("getSSHPubKey", new getSSHPubKey());
       processMap.put("getAllGatewaySSHPubKeys", new getAllGatewaySSHPubKeys());
       processMap.put("getAllGatewaySSHPubKeysSummary", new getAllGatewaySSHPubKeysSummary());
+      processMap.put("getAllSSHPubKeysSummaryForUserInGateway", new getAllSSHPubKeysSummaryForUserInGateway());
       processMap.put("getAllGatewayPWDCredentials", new getAllGatewayPWDCredentials());
       processMap.put("deleteSSHPubKey", new deleteSSHPubKey());
       processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -16209,6 +16307,34 @@ public class Airavata {
       }
     }
 
+    public static class getAllSSHPubKeysSummaryForUserInGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllSSHPubKeysSummaryForUserInGateway_args> {
+      public getAllSSHPubKeysSummaryForUserInGateway() {
+        super("getAllSSHPubKeysSummaryForUserInGateway");
+      }
+
+      public getAllSSHPubKeysSummaryForUserInGateway_args getEmptyArgsInstance() {
+        return new getAllSSHPubKeysSummaryForUserInGateway_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getAllSSHPubKeysSummaryForUserInGateway_result getResult(I iface, getAllSSHPubKeysSummaryForUserInGateway_args args) throws org.apache.thrift.TException {
+        getAllSSHPubKeysSummaryForUserInGateway_result result = new getAllSSHPubKeysSummaryForUserInGateway_result();
+        try {
+          result.success = iface.getAllSSHPubKeysSummaryForUserInGateway(args.authzToken, args.gatewayId, args.userId);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        }
+        return result;
+      }
+    }
+
     public static class getAllGatewayPWDCredentials<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllGatewayPWDCredentials_args> {
       public getAllGatewayPWDCredentials() {
         super("getAllGatewayPWDCredentials");
@@ -20689,6 +20815,7 @@ public class Airavata {
       processMap.put("getSSHPubKey", new getSSHPubKey());
       processMap.put("getAllGatewaySSHPubKeys", new getAllGatewaySSHPubKeys());
       processMap.put("getAllGatewaySSHPubKeysSummary", new getAllGatewaySSHPubKeysSummary());
+      processMap.put("getAllSSHPubKeysSummaryForUserInGateway", new getAllSSHPubKeysSummaryForUserInGateway());
       processMap.put("getAllGatewayPWDCredentials", new getAllGatewayPWDCredentials());
       processMap.put("deleteSSHPubKey", new deleteSSHPubKey());
       processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -22187,6 +22314,73 @@ public class Airavata {
       }
     }
 
+    public static class getAllSSHPubKeysSummaryForUserInGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllSSHPubKeysSummaryForUserInGateway_args, List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>> {
+      public getAllSSHPubKeysSummaryForUserInGateway() {
+        super("getAllSSHPubKeysSummaryForUserInGateway");
+      }
+
+      public getAllSSHPubKeysSummaryForUserInGateway_args getEmptyArgsInstance() {
+        return new getAllSSHPubKeysSummaryForUserInGateway_args();
+      }
+
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> o) {
+            getAllSSHPubKeysSummaryForUserInGateway_result result = new getAllSSHPubKeysSummaryForUserInGateway_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getAllSSHPubKeysSummaryForUserInGateway_result result = new getAllSSHPubKeysSummaryForUserInGateway_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getAllSSHPubKeysSummaryForUserInGateway_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>> resultHandler) throws TException {
+        iface.getAllSSHPubKeysSummaryForUserInGateway(args.authzToken, args.gatewayId, args.userId,resultHandler);
+      }
+    }
+
     public static class getAllGatewayPWDCredentials<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayPWDCredentials_args, Map<String,String>> {
       public getAllGatewayPWDCredentials() {
         super("getAllGatewayPWDCredentials");
@@ -57079,25 +57273,28 @@ public class Airavata {
 
   }
 
-  public static class getAllGatewayPWDCredentials_args implements org.apache.thrift.TBase<getAllGatewayPWDCredentials_args, getAllGatewayPWDCredentials_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllGatewayPWDCredentials_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewayPWDCredentials_args");
+  public static class getAllSSHPubKeysSummaryForUserInGateway_args implements org.apache.thrift.TBase<getAllSSHPubKeysSummaryForUserInGateway_args, getAllSSHPubKeysSummaryForUserInGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllSSHPubKeysSummaryForUserInGateway_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHPubKeysSummaryForUserInGateway_args");
 
     private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2);
+    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)3);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new getAllGatewayPWDCredentials_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new getAllGatewayPWDCredentials_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new getAllSSHPubKeysSummaryForUserInGateway_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllSSHPubKeysSummaryForUserInGateway_argsTupleSchemeFactory());
     }
 
     public org.apache.airavata.model.security.AuthzToken authzToken; // required
     public String gatewayId; // required
+    public String userId; // 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 {
       AUTHZ_TOKEN((short)1, "authzToken"),
-      GATEWAY_ID((short)2, "gatewayId");
+      GATEWAY_ID((short)2, "gatewayId"),
+      USER_ID((short)3, "userId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -57116,6 +57313,8 @@ public class Airavata {
             return AUTHZ_TOKEN;
           case 2: // GATEWAY_ID
             return GATEWAY_ID;
+          case 3: // USER_ID
+            return USER_ID;
           default:
             return null;
         }
@@ -57163,49 +57362,57 @@ public class Airavata {
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
       tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", 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(getAllGatewayPWDCredentials_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHPubKeysSummaryForUserInGateway_args.class, metaDataMap);
     }
 
-    public getAllGatewayPWDCredentials_args() {
+    public getAllSSHPubKeysSummaryForUserInGateway_args() {
     }
 
-    public getAllGatewayPWDCredentials_args(
+    public getAllSSHPubKeysSummaryForUserInGateway_args(
       org.apache.airavata.model.security.AuthzToken authzToken,
-      String gatewayId)
+      String gatewayId,
+      String userId)
     {
       this();
       this.authzToken = authzToken;
       this.gatewayId = gatewayId;
+      this.userId = userId;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public getAllGatewayPWDCredentials_args(getAllGatewayPWDCredentials_args other) {
+    public getAllSSHPubKeysSummaryForUserInGateway_args(getAllSSHPubKeysSummaryForUserInGateway_args other) {
       if (other.isSetAuthzToken()) {
         this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
       }
       if (other.isSetGatewayId()) {
         this.gatewayId = other.gatewayId;
       }
+      if (other.isSetUserId()) {
+        this.userId = other.userId;
+      }
     }
 
-    public getAllGatewayPWDCredentials_args deepCopy() {
-      return new getAllGatewayPWDCredentials_args(this);
+    public getAllSSHPubKeysSummaryForUserInGateway_args deepCopy() {
+      return new getAllSSHPubKeysSummaryForUserInGateway_args(this);
     }
 
     @Override
     public void clear() {
       this.authzToken = null;
       this.gatewayId = null;
+      this.userId = null;
     }
 
     public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
       return this.authzToken;
     }
 
-    public getAllGatewayPWDCredentials_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public getAllSSHPubKeysSummaryForUserInGateway_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -57229,7 +57436,7 @@ public class Airavata {
       return this.gatewayId;
     }
 
-    public getAllGatewayPWDCredentials_args setGatewayId(String gatewayId) {
+    public getAllSSHPubKeysSummaryForUserInGateway_args setGatewayId(String gatewayId) {
       this.gatewayId = gatewayId;
       return this;
     }
@@ -57249,6 +57456,30 @@ public class Airavata {
       }
     }
 
+    public String getUserId() {
+      return this.userId;
+    }
+
+    public getAllSSHPubKeysSummaryForUserInGateway_args 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 void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case AUTHZ_TOKEN:
@@ -57267,6 +57498,14 @@ public class Airavata {
         }
         break;
 
+      case USER_ID:
+        if (value == null) {
+          unsetUserId();
+        } else {
+          setUserId((String)value);
+        }
+        break;
+
       }
     }
 
@@ -57278,6 +57517,9 @@ public class Airavata {
       case GATEWAY_ID:
         return getGatewayId();
 
+      case USER_ID:
+        return getUserId();
+
       }
       throw new IllegalStateException();
     }
@@ -57293,6 +57535,8 @@ public class Airavata {
         return isSetAuthzToken();
       case GATEWAY_ID:
         return isSetGatewayId();
+      case USER_ID:
+        return isSetUserId();
       }
       throw new IllegalStateException();
     }
@@ -57301,12 +57545,12 @@ public class Airavata {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof getAllGatewayPWDCredentials_args)
-        return this.equals((getAllGatewayPWDCredentials_args)that);
+      if (that instanceof getAllSSHPubKeysSummaryForUserInGateway_args)
+        return this.equals((getAllSSHPubKeysSummaryForUserInGateway_args)that);
       return false;
     }
 
-    public boolean equals(getAllGatewayPWDCredentials_args that) {
+    public boolean equals(getAllSSHPubKeysSummaryForUserInGateway_args that) {
       if (that == null)
         return false;
 
@@ -57328,6 +57572,15 @@ public class Airavata {
           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;
+      }
+
       return true;
     }
 
@@ -57345,11 +57598,16 @@ public class Airavata {
       if (present_gatewayId)
         list.add(gatewayId);
 
+      boolean present_userId = true && (isSetUserId());
+      list.add(present_userId);
+      if (present_userId)
+        list.add(userId);
+
       return list.hashCode();
     }
 
     @Override
-    public int compareTo(getAllGatewayPWDCredentials_args other) {
+    public int compareTo(getAllSSHPubKeysSummaryForUserInGateway_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -57376,6 +57634,16 @@ public class Airavata {
           return lastComparison;
         }
       }
+      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;
+        }
+      }
       return 0;
     }
 
@@ -57393,7 +57661,7 @@ public class Airavata {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("getAllGatewayPWDCredentials_args(");
+      StringBuilder sb = new StringBuilder("getAllSSHPubKeysSummaryForUserInGateway_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -57411,6 +57679,14 @@ public class Airavata {
         sb.append(this.gatewayId);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("userId:");
+      if (this.userId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.userId);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -57423,6 +57699,9 @@ public class Airavata {
       if (gatewayId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
       }
+      if (userId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'userId' was not present! Struct: " + toString());
+      }
       // check for sub-struct validity
       if (authzToken != null) {
         authzToken.validate();
@@ -57445,15 +57724,15 @@ public class Airavata {
       }
     }
 
-    private static class getAllGatewayPWDCredentials_argsStandardSchemeFactory implements SchemeFactory {
-      public getAllGatewayPWDCredentials_argsStandardScheme getScheme() {
-        return new getAllGatewayPWDCredentials_argsStandardScheme();
+    private static class getAllSSHPubKeysSummaryForUserInGateway_argsStandardSchemeFactory implements SchemeFactory {
+      public getAllSSHPubKeysSummaryForUserInGateway_argsStandardScheme getScheme() {
+        return new getAllSSHPubKeysSummaryForUserInGateway_argsStandardScheme();
       }
     }
 
-    private static class getAllGatewayPWDCredentials_argsStandardScheme extends StandardScheme<getAllGatewayPWDCredentials_args> {
+    private static class getAllSSHPubKeysSummaryForUserInGateway_argsStandardScheme extends StandardScheme<getAllSSHPubKeysSummaryForUserInGateway_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewayPWDCredentials_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -57480,6 +57759,14 @@ public class Airavata {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 3: // 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;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -57491,7 +57778,7 @@ public class Airavata {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewayPWDCredentials_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHPubKeysSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -57505,55 +57792,63 @@ public class Airavata {
           oprot.writeString(struct.gatewayId);
           oprot.writeFieldEnd();
         }
+        if (struct.userId != null) {
+          oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+          oprot.writeString(struct.userId);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
 
     }
 
-    private static class getAllGatewayPWDCredentials_argsTupleSchemeFactory implements SchemeFactory {
-      public getAllGatewayPWDCredentials_argsTupleScheme getScheme() {
-        return new getAllGatewayPWDCredentials_argsTupleScheme();
+    private static class getAllSSHPubKeysSummaryForUserInGateway_argsTupleSchemeFactory implements SchemeFactory {
+      public getAllSSHPubKeysSummaryForUserInGateway_argsTupleScheme getScheme() {
+        return new getAllSSHPubKeysSummaryForUserInGateway_argsTupleScheme();
       }
     }
 
-    private static class getAllGatewayPWDCredentials_argsTupleScheme extends TupleScheme<getAllGatewayPWDCredentials_args> {
+    private static class getAllSSHPubKeysSummaryForUserInGateway_argsTupleScheme extends TupleScheme<getAllSSHPubKeysSummaryForUserInGateway_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewayPWDCredentials_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         struct.authzToken.write(oprot);
         oprot.writeString(struct.gatewayId);
+        oprot.writeString(struct.userId);
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewayPWDCredentials_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
         struct.authzToken.read(iprot);
         struct.setAuthzTokenIsSet(true);
         struct.gatewayId = iprot.readString();
         struct.setGatewayIdIsSet(true);
+        struct.userId = iprot.readString();
+        struct.setUserIdIsSet(true);
       }
     }
 
   }
 
-  public static class getAllGatewayPWDCredentials_result implements org.apache.thrift.TBase<getAllGatewayPWDCredentials_result, getAllGatewayPWDCredentials_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllGatewayPWDCredentials_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewayPWDCredentials_result");
+  public static class getAllSSHPubKeysSummaryForUserInGateway_result implements org.apache.thrift.TBase<getAllSSHPubKeysSummaryForUserInGateway_result, getAllSSHPubKeysSummaryForUserInGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllSSHPubKeysSummaryForUserInGateway_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHPubKeysSummaryForUserInGateway_result");
 
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
     private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2);
     private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new getAllGatewayPWDCredentials_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new getAllGatewayPWDCredentials_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new getAllSSHPubKeysSummaryForUserInGateway_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllSSHPubKeysSummaryForUserInGateway_resultTupleSchemeFactory());
     }
 
-    public Map<String,String> success; // required
+    public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> success; // required
     public org.apache.airavata.model.error.InvalidRequestException ire; // required
     public org.apache.airavata.model.error.AiravataClientException ace; // required
     public org.apache.airavata.model.error.AiravataSystemException ase; // required
@@ -57630,9 +57925,8 @@ public class Airavata {
     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.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))));
+          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.model.appcatalog.credentialsummary.CredentialSummary.class))));
       tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
@@ -57640,14 +57934,14 @@ public class Airavata {
       tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllGatewayPWDCredentials_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHPubKeysSummaryForUserInGateway_result.class, metaDataMap);
     }
 
-    public getAllGatewayPWDCredentials_result() {
+    public getAllSSHPubKeysSummaryForUserInGateway_result() {
     }
 
-    public getAllGatewayPWDCredentials_result(
-      Map<String,String> success,
+    public getAllSSHPubKeysSummaryForUserInGateway_result(
+      List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> success,
       org.apache.airavata.model.error.InvalidRequestException ire,
       org.apache.airavata.model.error.AiravataClientException ace,
       org.apache.airavata.model.error.AiravataSystemException ase)
@@ -57662,9 +57956,12 @@ public class Airavata {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public getAllGatewayPWDCredentials_result(getAllGatewayPWDCredentials_result other) {
+    public getAllSSHPubKeysSummaryForUserInGateway_result(getAllSSHPubKeysSummaryForUserInGateway_result other) {
       if (other.isSetSuccess()) {
-        Map<String,String> __this__success = new HashMap<String,String>(other.success);
+        List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> __this__success = new ArrayList<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>(other.success.size());
+        for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary other_element : other.success) {
+          __this__success.add(new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary(other_element));
+        }
         this.success = __this__success;
       }
       if (other.isSetIre()) {
@@ -57678,8 +57975,8 @@ public class Airavata {
       }
     }
 
-    public getAllGatewayPWDCredentials_result deepCopy() {
-      return new getAllGatewayPWDCredentials_result(this);
+    public getAllSSHPubKeysSummaryForUserInGateway_result deepCopy() {
+      return new getAllSSHPubKeysSummaryForUserInGateway_result(this);
     }
 
     @Override
@@ -57694,18 +57991,22 @@ public class Airavata {
       return (this.success == null) ? 0 : this.success.size();
     }
 
-    public void putToSuccess(String key, String val) {
+    public java.util.Iterator<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary elem) {
       if (this.success == null) {
-        this.success = new HashMap<String,String>();
+        this.success = new ArrayList<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>();
       }
-      this.success.put(key, val);
+      this.success.add(elem);
     }
 
-    public Map<String,String> getSuccess() {
+    public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> getSuccess() {
       return this.success;
     }
 
-    public getAllGatewayPWDCredentials_result setSuccess(Map<String,String> success) {
+    public getAllSSHPubKeysSummaryForUserInGateway_result setSuccess(List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> success) {
       this.success = success;
       return this;
     }
@@ -57729,7 +58030,7 @@ public class Airavata {
       return this.ire;
     }
 
-    public getAllGatewayPWDCredentials_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+    public getAllSSHPubKeysSummaryForUserInGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
       this.ire = ire;
       return this;
     }
@@ -57753,7 +58054,7 @@ public class Airavata {
       return this.ace;
     }
 
-    public getAllGatewayPWDCredentials_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+    public getAllSSHPubKeysSummaryForUserInGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
       this.ace = ace;
       return this;
     }
@@ -57777,7 +58078,7 @@ public class Airavata {
       return this.ase;
     }
 
-    public getAllGatewayPWDCredentials_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+    public getAllSSHPubKeysSummaryForUserInGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
       this.ase = ase;
       return this;
     }
@@ -57803,7 +58104,7 @@ public class Airavata {
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((Map<String,String>)value);
+          setSuccess((List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>)value);
         }
         break;
 
@@ -57875,12 +58176,12 @@ public class Airavata {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof getAllGatewayPWDCredentials_result)
-        return this.equals((getAllGatewayPWDCredentials_result)that);
+      if (that instanceof getAllSSHPubKeysSummaryForUserInGateway_result)
+        return this.equals((getAllSSHPubKeysSummaryForUserInGateway_result)that);
       return false;
     }
 
-    public boolean equals(getAllGatewayPWDCredentials_result that) {
+    public boolean equals(getAllSSHPubKeysSummaryForUserInGateway_result that) {
       if (that == null)
         return false;
 
@@ -57951,7 +58252,7 @@ public class Airavata {
     }
 
     @Override
-    public int compareTo(getAllGatewayPWDCredentials_result other) {
+    public int compareTo(getAllSSHPubKeysSummaryForUserInGateway_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -58015,7 +58316,7 @@ public class Airavata {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("getAllGatewayPWDCredentials_result(");
+      StringBuilder sb = new StringBuilder("getAllSSHPubKeysSummaryForUserInGateway_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -58074,15 +58375,15 @@ public class Airavata {
       }
     }
 
-    private static class getAllGatewayPWDCredentials_resultStandardSchemeFactory implements SchemeFactory {
-      public getAllGatewayPWDCredentials_resultStandardScheme getScheme() {
-        return new getAllGatewayPWDCredentials_resultStandardScheme();
+    private static class getAllSSHPubKeysSummaryForUserInGateway_resultStandardSchemeFactory implements SchemeFactory {
+      public getAllSSHPubKeysSummaryForUserInGateway_resultStandardScheme getScheme() {
+        return new getAllSSHPubKeysSummaryForUserInGateway_resultStandardScheme();
       }
     }
 
-    private static class getAllGatewayPWDCredentials_resultStandardScheme extends StandardScheme<getAllGatewayPWDCredentials_result> {
+    private static class getAllSSHPubKeysSummaryForUserInGateway_resultStandardScheme extends StandardScheme<getAllSSHPubKeysSummaryForUserInGateway_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewayPWDCredentials_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -58093,19 +58394,18 @@ public class Airavata {
           }
           switch (schemeField.id) {
             case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TMap _map42 = iprot.readMapBegin();
-                  struct.success = new HashMap<String,String>(2*_map42.size);
-                  String _key43;
-                  String _val44;
-                  for (int _i45 = 0; _i45 < _map42.size; ++_i45)
+                  org.apache.thrift.protocol.TList _list42 = iprot.readListBegin();
+                  struct.success = new ArrayList<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>(_list42.size);
+                  org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _elem43;
+                  for (int _i44 = 0; _i44 < _list42.size; ++_i44)
                   {
-                    _key43 = iprot.readString();
-                    _val44 = iprot.readString();
-                    struct.success.put(_key43, _val44);
+                    _elem43 = new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary();
+                    _elem43.read(iprot);
+                    struct.success.add(_elem43);
                   }
-                  iprot.readMapEnd();
+                  iprot.readListEnd();
                 }
                 struct.setSuccessIsSet(true);
               } else { 
@@ -58150,20 +58450,19 @@ public class Airavata {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewayPWDCredentials_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHPubKeysSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
         if (struct.success != null) {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
-            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
-            for (Map.Entry<String, String> _iter46 : struct.success.entrySet())
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+            for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _iter45 : struct.success)
             {
-              oprot.writeString(_iter46.getKey());
-              oprot.writeString(_iter46.getValue());
+              _iter45.write(oprot);
             }
-            oprot.writeMapEnd();
+            oprot.writeListEnd();
           }
           oprot.writeFieldEnd();
         }
@@ -58188,16 +58487,16 @@ public class Airavata {
 
     }
 
-    private static class getAllGatewayPWDCredentials_resultTupleSchemeFactory implements SchemeFactory {
-      public getAllGatewayPWDCredentials_resultTupleScheme getScheme() {
-        return new getAllGatewayPWDCredentials_resultTupleScheme();
+    private static class getAllSSHPubKeysSummaryForUserInGateway_resultTupleSchemeFactory implements SchemeFactory {
+      public getAllSSHPubKeysSummaryForUserInGateway_resultTupleScheme getScheme() {
+        return new getAllSSHPubKeysSummaryForUserInGateway_resultTupleScheme();
       }
     }
 
-    private static class getAllGatewayPWDCredentials_resultTupleScheme extends TupleScheme<getAllGatewayPWDCredentials_result> {
+    private static class getAllSSHPubKeysSummaryForUserInGateway_resultTupleScheme extends TupleScheme<getAllSSHPubKeysSummaryForUserInGateway_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewayPWDCredentials_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -58216,10 +58515,9 @@ public class Airavata {
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (Map.Entry<String, String> _iter47 : struct.success.entrySet())
+            for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _iter46 : struct.success)
             {
-              oprot.writeString(_iter47.getKey());
-              oprot.writeString(_iter47.getValue());
+              _iter46.write(oprot);
             }
           }
         }
@@ -58235,20 +58533,19 @@ public class Airavata {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewayPWDCredentials_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TMap _map48 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-            struct.success = new HashMap<String,String>(2*_map48.size);
-            String _key49;
-            String _val50;
-            for (int _i51 = 0; _i51 < _map48.size; ++_i51)
+            org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>(_list47.size);
+            org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _elem48;
+            for (int _i49 = 0; _i49 < _list47.size; ++_i49)
             {
-              _key49 = iprot.readString();
-              _val50 = iprot.readString();
-              struct.success.put(_key49, _val50);
+              _elem48 = new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary();
+              _elem48.read(iprot);
+              struct.success.add(_elem48);
             }
           }
           struct.setSuccessIsSet(true);
@@ -58273,28 +58570,25 @@ public class Airavata {
 
   }
 
-  public static class deleteSSHPubKey_args implements org.apache.thrift.TBase<deleteSSHPubKey_args, deleteSSHPubKey_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSSHPubKey_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSSHPubKey_args");
+  public static class getAllGatewayPWDCredentials_args implements org.apache.thrift.TBase<getAllGatewayPWDCredentials_args, getAllGatewayPWDCredentials_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllGatewayPWDCredentials_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewayPWDCredentials_args");
 
     private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-    private static final org.apache.thrift.protocol.TField AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataCredStoreToken", org.apache.thrift.protocol.TType.STRING, (short)2);
-    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new deleteSSHPubKey_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new deleteSSHPubKey_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new getAllGatewayPWDCredentials_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllGatewayPWDCredentials_argsTupleSchemeFactory());
     }
 
     public org.apache.airavata.model.security.AuthzToken authzToken; // required
-    public String airavataCredStoreToken; // required
     public String gatewayId; // 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 {
       AUTHZ_TOKEN((short)1, "authzToken"),
-      AIRAVATA_CRED_STORE_TOKEN((short)2, "airavataCredStoreToken"),
-      GATEWAY_ID((short)3, "gatewayId");
+      GATEWAY_ID((short)2, "gatewayId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -58311,9 +58605,7 @@ public class Airavata {
         switch(fieldId) {
           case 1: // AUTHZ_TOKEN
             return AUTHZ_TOKEN;
-          case 2: // AIRAVATA_CRED_STORE_TOKEN
-            return AIRAVATA_CRED_STORE_TOKEN;
-          case 3: // GATEWAY_ID
+          case 2: // GATEWAY_ID
             return GATEWAY_ID;
           default:
             return null;
@@ -58360,51 +58652,43 @@ public class Airavata {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
-      tmpMap.put(_Fields.AIRAVATA_CRED_STORE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("airavataCredStoreToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", 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(deleteSSHPubKey_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllGatewayPWDCredentials_args.class, metaDataMap);
     }
 
-    public deleteSSHPubKey_args() {
+    public getAllGatewayPWDCredentials_args() {
     }
 
-    public deleteSSHPubKey_args(
+    public getAllGatewayPWDCredentials_args(
       org.apache.airavata.model.security.AuthzToken authzToken,
-      String airavataCredStoreToken,
       String gatewayId)
     {
       this();
       this.authzToken = authzToken;
-      this.airavataCredStoreToken = airavataCredStoreToken;
       this.gatewayId = gatewayId;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public deleteSSHPubKey_args(deleteSSHPubKey_args other) {
+    public getAllGatewayPWDCredentials_args(getAllGatewayPWDCredentials_args other) {
       if (other.isSetAuthzToken()) {
         this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
       }
-      if (other.isSetAiravataCredStoreToken()) {
-        this.airavataCredStoreToken = other.airavataCredStoreToken;
-      }
       if (other.isSetGatewayId()) {
         this.gatewayId = other.gatewayId;
       }
     }
 
-    public deleteSSHPubKey_args deepCopy() {
-      return new deleteSSHPubKey_args(this);
+    public getAllGatewayPWDCredentials_args deepCopy() {
+      return new getAllGatewayPWDCredentials_args(this);
     }
 
     @Override
     public void clear() {
       this.authzToken = null;
-      this.airavataCredStoreToken = null;
       this.gatewayId = null;
     }
 
@@ -58412,7 +58696,7 @@ public class Airavata {
       return this.authzToken;
     }
 
-    public deleteSSHPubKey_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public getAllGatewayPWDCredentials_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -58432,35 +58716,11 @@ public class Airavata {
       }
     }
 
-    public String getAiravataCredStoreToken() {
-      return this.airavataCredStoreToken;
-    }
-
-    public deleteSSHPubKey_args setAiravataCredStoreToken(String airavataCredStoreToken) {
-      this.airavataCredStoreToken = airavataCredStoreToken;
-      return this;
-    }
-
-    public void unsetAiravataCredStoreToken() {
-      this.airavataCredStoreToken = null;
-    }
-
-    /** Returns true if field airavataCredStoreToken is set (has been assigned a value) and false otherwise */
-    public boolean isSetAiravataCredStoreToken() {
-      return this.airavataCredStoreToken != null;
-    }
-
-    public void setAiravataCredStoreTokenIsSet(boolean value) {
-      if (!value) {
-        this.airavataCredStoreToken = null;
-      }
-    }
-
     public String getGatewayId() {
       return this.gatewayId;
     }
 
-    public deleteSSHPubKey_args setGatewayId(String gatewayId) {
+    public getAllGatewayPWDCredentials_args setGatewayId(String gatewayId) {
       this.gatewayId = gatewayId;
       return this;
     }
@@ -58490,14 +58750,6 @@ public class Airavata {
         }
         break;
 
-      case AIRAVATA_CRED_STORE_TOKEN:
-        if (value == null) {
-          unsetAiravataCredStoreToken();
-        } else {
-          setAiravataCredStoreToken((String)value);
-        }
-        break;
-
       case GATEWAY_ID:
         if (value == null) {
           unsetGatewayId();
@@ -58514,9 +58766,6 @@ public class Airavata {
       case AUTHZ_TOKEN:
         return getAuthzToken();
 
-      case AIRAVATA_CRED_STORE_TOKEN:
-        return getAiravataCredStoreToken();
-
       case GATEWAY_ID:
         return getGatewayId();
 
@@ -58533,8 +58782,6 @@ public class Airavata {
       switch (field) {
       case AUTHZ_TOKEN:
         return isSetAuthzToken();
-      case AIRAVATA_CRED_STORE_TOKEN:
-        return isSetAiravataCredStoreToken();
       case GATEWAY_ID:
         return isSetGatewayId();
       }
@@ -58545,12 +58792,12 @@ public class Airavata {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof deleteSSHPubKey_args)
-        return this.equals((deleteSSHPubKey_args)that);
+      if (that instanceof getAllGatewayPWDCredentials_args)
+        return this.equals((getAllGatewayPWDCredentials_args)that);
       return false;
     }
 
-    public boolean equals(deleteSSHPubKey_args that) {
+    public boolean equals(getAllGatewayPWDCredentials_args that) {
       if (that == null)
         return false;
 
@@ -58563,15 +58810,6 @@ public class Airavata {
           return false;
       }
 
-      boolean this_present_airavataCredStoreToken = true && this.isSetAiravataCredStoreToken();
-      boolean that_present_airavataCredStoreToken = true && that.isSetAiravataCredStoreToken();
-      if (this_present_airavataCredStoreToken || that_present_airavataCredStoreToken) {
-        if (!(this_present_airavataCredStoreToken && that_present_airavataCredStoreToken))
-          return false;
-        if (!this.airavataCredStoreToken.equals(that.airavataCredStoreToken))
-          return false;
-      }
-
       boolean this_present_gatewayId = true && this.isSetGatewayId();
       boolean that_present_gatewayId = true && that.isSetGatewayId();
       if (this_present_gatewayId || that_present_gatewayId) {
@@ -58593,11 +58831,6 @@ public class Airavata {
       if (present_authzToken)
         list.add(authzToken);
 
-      boolean present_airavataCredStoreToken = true && (isSetAiravataCredStoreToken());
-      list.add(present_airavataCredStoreToken);
-      if (present_airavataCredStoreToken)
-        list.add(airavataCredStoreToken);
-
       boolean present_gatewayId = true && (isSetGatewayId());
       list.add(present_gatewayId);
       if (present_gatewayId)
@@ -58607,7 +58840,7 @@ public class Airavata {
     }
 
     @Override
-    public int compareTo(deleteSSHPubKey_args other) {
+    public int compareTo(getAllGatewayPWDCredentials_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -58624,16 +58857,6 @@ public class Airavata {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetAiravataCredStoreToken()).compareTo(other.isSetAiravataCredStoreToken());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetAiravataCredStoreToken()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataCredStoreToken, other.airavataCredStoreToken);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
       lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
       if (lastComparison != 0) {
         return lastComparison;
@@ -58661,7 +58884,7 @@ public class Airavata {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("deleteSSHPubKey_args(");
+      StringBuilder sb = new StringBuilder("getAllGatewayPWDCredentials_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -58672,14 +58895,6 @@ public class Airavata {
       }
       first = false;
       if (!first) sb.append(", ");
-      sb.append("airavataCredStoreToken:");
-      if (this.airavataCredStoreToken == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.airavataCredStoreToken);
-      }
-      first = false;
-      if (!first) sb.append(", ");
       sb.append("gatewayId:");
       if (this.gatewayId == null) {
         sb.append("null");
@@ -58696,9 +58911,6 @@ public class Airavata {
       if (authzToken == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
       }
-      if (airavataCredStoreToken == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataCredStoreToken' was not present! Struct: " + toString());
-      }
       if (gatewayId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
       }
@@ -58724,15 +58936,15 @@ public class Airavata {
       }
     }
 
-    private static class deleteSSHPubKey_argsStandardSchemeFactory implements SchemeFactory {
-      public deleteSSHPubKey_argsStandardScheme getScheme() {
-        return new deleteSSHPubKey_argsStandardScheme();
+    private static class getAllGatewayPWDCredentials_argsStandardSchemeFactory implements SchemeFactory {
+      public getAllGatewayPWDCredentials_argsStandardScheme getScheme() {
+        return new getAllGatewayPWDCredentials_argsStandardScheme();
       }
     }
 
-    private static class deleteSSHPubKey_argsStandardScheme extends StandardScheme<deleteSSHPubKey_args> {
+    private static class getAllGatewayPWDCredentials_argsStandardScheme extends StandardScheme<getAllGatewayPWDCredentials_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSSHPubKey_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewayPWDCredentials_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -58751,15 +58963,7 @@ public class Airavata {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // AIRAVATA_CRED_STORE_TOKEN
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.airavataCredStoreToken = iprot.readString();
-                struct.setAiravataCredStoreTokenIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            case 3: // GATEWAY_ID
+            case 2: // GATEWAY_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.gatewayId = iprot.readString();
                 struct.setGatewayIdIsSet(true);
@@ -58778,7 +58982,7 @@ public class Airavata {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, deleteSSHPubKey_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewayPWDCredentials_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -58787,11 +58991,6 @@ public class Airavata {
           struct.authzToken.write(oprot);
           oprot.writeFieldEnd();
         }
-        if (struct.airavataCredStoreToken != null) {
-          oprot.writeFieldBegin(AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC);
-          oprot.writeString(struct.airavataCredStoreToken);
-          oprot.writeFieldEnd();
-        }
         if (struct.gatewayId != null) {
           oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
           oprot.writeString(struct.gatewayId);
@@ -58803,30 +59002,27 @@ public class Airavata {
 
     }
 
-    private static class deleteSSHPubKey_argsTupleSchemeFactory implements SchemeFactory {
-      public deleteSSHPubKey_argsTupleScheme getScheme() {
-        return new deleteSSHPubKey_argsTupleScheme();
+    private static class getAllGatewayPWDCredentials_argsTupleSchemeFactory implements SchemeFactory {
+      public getAllGatewayPWDCredentials_argsTupleScheme getScheme() {
+        return new getAllGatewayPWDCredentials_argsTupleScheme();
       }
     }
 
-    private static class deleteSSHPubKey_argsTupleScheme extends TupleScheme<deleteSSHPubKey_args> {
+    private static class getAllGatewayPWDCredentials_argsTupleScheme extends TupleScheme<getAllGatewayPWDCredentials_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, deleteSSHPubKey_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewayPWDCredentials_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         struct.authzToken.write(oprot);
-        oprot.writeString(struct.airavataCredStoreToken);
         oprot.writeString(struct.gatewayId);
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, deleteSSHPubKey_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewayPWDCredentials_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
         struct.authzToken.read(iprot);
         struct.setAuthzTokenIsSet(true);
-        struct.airavataCredStoreToken = iprot.readString();
-        struct.setAiravataCredStoreTokenIsSet(true);
         struct.gatewayId = iprot.readString();
         struct.setGatewayIdIsSet(true);
       }
@@ -58834,21 +59030,21 @@ public class Airavata {
 
   }
 
-  public static class deleteSSHPubKey_result implements org.apache.thrift.TBase<deleteSSHPubKey_result, deleteSSHPubKey_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSSHPubKey_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSSHPubKey_result");
+  public static class getAllGatewayPWDCredentials_result implements org.apache.thrift.TBase<getAllGatewayPWDCredentials_result, getAllGatewayPWDCredentials_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllGatewayPWDCredentials_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewayPWDCredentials_result");
 
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
     private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2);
     private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new deleteSSHPubKey_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new deleteSSHPubKey_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new getAllGatewayPWDCredentials_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getAllGatewayPWDCredentials_resultTupleSchemeFactory());
     }
 
-    public boolean success; // required
+    public Map<String,String> success; // required
     public org.apache.airavata.model.error.InvalidRequestException ire; // required
     public org.apache.airavata.model.error.AiravataClientException ace; // required
     public org.apache.airavata.model.error.AiravataSystemException ase; // required
@@ -58921,13 +59117,13 @@ public class Airavata {
     }
 
     // isset id assignments
-    private static final int __SUCCESS_ISSET_ID = 0;
-    private byte __isset_bitfield = 0;
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+          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.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
@@ -58935,21 +59131,20 @@ public class Airavata {
       tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSSHPubKey_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllGatewayPWDCredentials_result.class, metaDataMap);
     }
 
-    public deleteSSHPubKey_result() {
+    public getAllGatewayPWDCredentials_result() {
     }
 
-    public deleteSSHPubKey_result(
-      boolean success,
+    public getAllGatewayPWDCredentials_result(
+      Map<String,String> success,
       org.apache.airavata.model.error.InvalidRequestException ire,
       org.apache.airavata.model.error.AiravataClientException ace,
       org.apache.airavata.model.error.AiravataSystemException ase)
     {
       this();
       this.success = success;
-      setSuccessIsSet(true);
       this.ire = ire;
       this.ace = ace;
       this.ase = ase;
@@ -58958,9 +59153,11 @@ public class Airavata {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public deleteSSHPubKey_result(deleteSSHPubKey_result other) {
-      __isset_bitfield = other.__isset_bitfield;
-      this.success = other.success;
+    public getAllGatewayPWDCredentials_result(getAllGatewayPWDCredentials_result other) {
+      if (other.isSetSuccess()) {
+        Map<String,String> __this__success = new HashMap<String,String>(other.success);
+        this.success = __this__success;
+      }
       if (other.isSetIre()) {
         this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
       }
@@ -58972,47 +59169,58 @@ public class Airavata {
       }
     }
 
-    public deleteSSHPubKey_result deepCopy() {
-      return new deleteSSHPubKey_result(this);
+    public getAllGatewayPWDCredentials_result deepCopy() {
+      return new getAllGatewayPWDCredentials_result(this);
     }
 
     @Override
     public void clear() {
-      setSuccessIsSet(false);
-      this.success = false;
+      this.success = null;
       this.ire = null;
       this.ace = null;
       this.ase = null;
     }
 
-    public boolean isSuccess() {
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public void putToSuccess(String key, String val) {
+      if (this.success == null) {
+        this.success = new HashMap<String,String>();
+      }
+      this.success.put(key, val);
+    }
+
+    public Map<String,String> getSuccess() {
       return this.success;
     }
 
-    public deleteSSHPubKey_result setSuccess(boolean success) {
+    public getAllGatewayPWDCredentials_result setSuccess(Map<String,String> success) {
       this.success = success;
-      setSuccessIsSet(true);
       return this;
     }
 
     public void unsetSuccess() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+      this.success = null;
     }
 
     /** Returns true if field success is set (has been assigned a value) and false otherwise */
     public boolean isSetSuccess() {
-      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+      return this.success != null;
     }
 
     public void setSuccessIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+      if (!value) {
+        this.success = null;
+      }
     }
 
     public org.apache.airavata.model.error.InvalidRequestException getIre() {
       return this.ire;
     }
 
-    public deleteSSHPubKey_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+    public getAllGatewayPWDCredentials_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
       this.ire = ire;
       return this;
     }
@@ -59036,7 +59244,7 @@ public class Airavata {
       return this.ace;
     }
 
-    public deleteSSHPubKey_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+    public getAllGatewayPWDCredentials_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
       this.ace = ace;
       return this;
     }
@@ -59060,7 +59268,7 @@ public class Airavata {
       return this.ase;
     }
 
-    public deleteSSHPubKey_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+    public getAllGatewayPWDCredentials_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
       this.ase = ase;
       return this;
     }
@@ -59086,7 +59294,7 @@ public class Airavata {
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((Boolean)value);
+          setSuccess((Map<String,String>)value);
         }
         break;
 
@@ -59120,7 +59328,7 @@ public class Airavata {
     public Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
-        return isSuccess();
+        return getSuccess();
 
       case IRE:
         return getIre();
@@ -59158,21 +59366,21 @@ public class Airavata {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof deleteSSHPubKey_result)
-        return this.equals((deleteSSHPubKey_result)that);
+      if (that instanceof getAllGatewayPWDCredentials_result)
+        return this.equals((getAllGatewayPWDCredentials_result)that);
       return false;
     }
 
-    public boolean equals(deleteSSHPubKey_result that) {
+    public boolean equals(getAllGatewayPWDCredentials_result that) {
       if (that == null)
         return false;
 
-      boolean this_present_success = true;
-      boolean that_present_success = true;
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
       if (this_present_success || that_present_success) {
         if (!(this_present_success && that_present_success))
           return false;
-        if (this.success != that.success)
+        if (!this.success.equals(that.success))
           return false;
       }
 
@@ -59210,7 +59418,7 @@ public class Airavata {
     public int hashCode() {
       List<Object> list = new ArrayList<Object>();
 
-      boolean present_success = true;
+      boolean present_success = true && (isSetSuccess());
       list.add(present_success);
       if (present_success)
         list.add(success);
@@ -59234,7 +59442,7 @@ public class Airavata {
     }
 
     @Override
-    public int compareTo(deleteSSHPubKey_result other) {
+    public int compareTo(getAllGatewayPWDCredentials_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -59298,11 +59506,15 @@ public class Airavata {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("deleteSSHPubKey_result(");
+      StringBuilder sb = new StringBuilder("getAllGatewayPWDCredentials_result(");
       boolean first = true;
 
       sb.append("success:");
-      sb.append(this.success);
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
       first = false;
       if (!first) sb.append(", ");
       sb.append("ire:");
@@ -59347,23 +59559,21 @@ public class Airavata {
 
     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 deleteSSHPubKey_resultStandardSchemeFactory implements SchemeFactory {
-      public deleteSSHPubKey_resultStandardScheme getScheme() {
-        return new deleteSSHPubKey_resultStandardScheme();
+    private static class getAllGatewayPWDCredentials_resultStandardSchemeFactory implements SchemeFactory {
+      public getAllGatewayPWDCredentials_resultStandardScheme getScheme() {
+        return new getAllGatewayPWDCredentials_resultStandardScheme();
       }
     }
 
-    private static class deleteSSHPubKey_resultStandardScheme extends StandardScheme<deleteSSHPubKey_result> {
+    private static class getAllGatewayPWDCredentials_resultStandardScheme extends StandardScheme<getAllGatewayPWDCredentials_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSSHPubKey_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewayPWDCredentials_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -59374,8 +59584,20 @@ public class Airavata {
           }
           switch (schemeField.id) {
             case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
-                struct.success = iprot.readBool();
+              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+                {
+                  org.apache.thrift.protocol.TMap _map50 = iprot.readMapBegin();
+                  struct.success = new HashMap<String,String>(2*_map50.size);
+                  String _key51;
+                  String _val52;
+                  for (int _i53 = 0; _i53 < _map50.size; ++_i53)
+                  {
+                    _key51 = iprot.readString();
+                    _val52 = iprot.readString();
+                    struct.success.put(_key51, _val52);
+                  }
+                  iprot.readMapEnd();
+                }
                 struct.setSuccessIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -59419,13 +59641,21 @@ public class Airavata {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, deleteSSHPubKey_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewayPWDCredentials_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.isSetSuccess()) {
+        if (struct.success != null) {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-          oprot.writeBool(struct.success);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
+            for (Map.Entry<String, String> _iter54 : struct.success.entrySet())
+            {
+              oprot.writeString(_iter54.getKey());
+              oprot.writeString(_iter54.getValue());
+            }
+            oprot.writeMapEnd();
+          }
           oprot.writeFieldEnd();
         }
         if (struct.ire != null) {
@@ -59449,16 +59679,16 @@ public class Airavata {
 
     }
 
-    private static class deleteSSHPubKey_resultTupleSchemeFactory implements SchemeFactory {
-      public deleteSSHPubKey_resultTupleScheme getScheme() {
-        return new deleteSSHPubKey_resultTupleScheme();
+    private static class getAllGatewayPWDCredentials_resultTupleSchemeFactory implements SchemeFactory {
+      public getAllGatewayPWDCredentials_resultTupleScheme getScheme() {
+        return new getAllGatewayPWDCredentials_resultTupleScheme();
       }
     }
 
-    private static class deleteSSHPubKey_resultTupleScheme extends TupleScheme<deleteSSHPubKey_result> {
+    private static class getAllGatewayPWDCredentials_resultTupleScheme extends TupleScheme<getAllGatewayPWDCredentials_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, deleteSSHPubKey_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewayPWDCredentials_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -59475,7 +59705,14 @@ public class Airavata {
         }
         oprot.writeBitSet(optionals, 4);
         if (struct.isSetSuccess()) {
-          oprot.writeBool(struct.success);
+          {
+            oprot.writeI32(struct.success.size());
+            for (Map.Entry<String, String> _iter55 : struct.success.entrySet())
+            {
+              oprot.writeString(_iter55.getKey());
+              oprot.writeString(_iter55.getValue());
+            }
+          }
         }
         if (struct.isSetIre()) {
           struct.ire.write(oprot);
@@ -59489,11 +59726,22 @@ public class Airavata {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, deleteSSHPubKey_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewayPWDCredentials_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
-          struct.success = iprot.readBool();
+          {
+            org.apache.thrift.protocol.TMap _map56 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.success = new HashMap<String,String>(2*_map56.size);
+            String _key57;
+            String _val58;
+            for (int _i59 = 0; _i59 < _map56.size; ++_i59)
+            {
+              _key57 = iprot.readString();
+              _val58 = iprot.readString();
+              struct.success.put(_key57, _val58);
+            }
+          }
           struct.setSuccessIsSet(true);
         }
         if (incoming.get(1)) {
@@ -59516,8 +59764,8 @@ public class Airavata {
 
   }
 
-  public static class deletePWDCredential_args implements org.apache.thrift.TBase<deletePWDCredential_args, deletePWDCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<deletePWDCredential_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePWDCredential_args");
+  public static class deleteSSHPubKey_args implements org.apache.thrift.TBase<deleteSSHPubKey_args, deleteSSHPubKey_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSSHPubKey_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSSHPubKey_args");
 
     private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataCredStoreToken", org.apache.thrift.protocol.TType.STRING, (short)2);
@@ -59525,8 +59773,8 @@ public class Airavata {
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new deletePWDCredential_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new deletePWDCredential_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new deleteSSHPubKey_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new deleteSSHPubKey_argsTupleSchemeFactory());
     }
 
     public org.apache.airavata.model.security.AuthzToken authzToken; // required
@@ -59608,13 +59856,13 @@ public class Airavata {
       tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);

<TRUNCATED>

[51/51] [abbrv] airavata git commit: fixing id issues

Posted by sc...@apache.org.
fixing id issues


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

Branch: refs/heads/airavata-gov-registry
Commit: b6e07d7ba9e0e8d0612f5233e7dbe212d762d608
Parents: 61a0fc9
Author: scnakandala <su...@gmail.com>
Authored: Sun Oct 16 18:23:19 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Sun Oct 16 18:23:19 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |   15 +-
 .../registry/db/entities/EntityEntity.java      |   28 +-
 .../sharing/registry/db/entities/EntityPK.java  |   76 +
 .../registry/db/entities/EntityTypeEntity.java  |    3 +-
 .../registry/db/entities/EntityTypePK.java      |   76 +
 .../db/entities/GroupMembershipEntity.java      |   13 +-
 .../db/entities/GroupMembershipEntityPK.java    |   74 -
 .../registry/db/entities/GroupMembershipPK.java |   88 +
 .../db/entities/PermissionTypeEntity.java       |    3 +-
 .../registry/db/entities/PermissionTypePK.java  |   76 +
 .../registry/db/entities/SharingEntity.java     |   13 +-
 .../registry/db/entities/SharingEntityPK.java   |   99 -
 .../sharing/registry/db/entities/SharingPK.java |  114 +
 .../registry/db/entities/SharingUserEntity.java |  157 -
 .../registry/db/entities/UserEntity.java        |  158 +
 .../registry/db/entities/UserGroupEntity.java   |    3 +-
 .../registry/db/entities/UserGroupPK.java       |   75 +
 .../sharing/registry/db/entities/UserPK.java    |   75 +
 .../db/repositories/EntityRepository.java       |    7 +-
 .../db/repositories/EntityTypeRepository.java   |    3 +-
 .../repositories/GroupMembershipRepository.java |   46 +-
 .../repositories/PermissionTypeRepository.java  |    3 +-
 .../db/repositories/SharingRepository.java      |   15 +-
 .../db/repositories/UserGroupRepository.java    |    7 +-
 .../db/repositories/UserRepository.java         |   13 +-
 .../sharing/registry/db/utils/DBConstants.java  |   65 +-
 .../server/SharingRegistryServerHandler.java    |  234 +-
 .../src/main/resources/META-INF/persistence.xml |    2 +-
 .../main/resources/sharing-registry-derby.sql   |   45 +-
 .../main/resources/sharing-registry-mysql.sql   |   51 +-
 .../SharingRegistryServerHandlerTest.java       |   30 +-
 .../sharing/registry/models/Domain.java         |    2 +-
 .../sharing/registry/models/Entity.java         |  176 +-
 .../sharing/registry/models/EntityType.java     |    9 +-
 .../registry/models/GroupMembership.java        |  149 +-
 .../sharing/registry/models/PermissionType.java |    9 +-
 .../sharing/registry/models/SearchCriteria.java |    2 +-
 .../sharing/registry/models/Sharing.java        |  149 +-
 .../models/SharingRegistryException.java        |    2 +-
 .../airavata/sharing/registry/models/User.java  |    4 +-
 .../sharing/registry/models/UserGroup.java      |    9 +-
 .../service/cpi/SharingRegistryService.java     | 2779 +++++++++++++++---
 .../api-docs/sharing_cpi.html                   |   57 +-
 .../api-docs/sharing_models.html                |   34 +-
 .../sharing-service-docs/index.html             |    3 +-
 .../thrift_models/sharing_cpi.thrift            |   38 +-
 .../thrift_models/sharing_models.thrift         |   38 +-
 47 files changed, 3909 insertions(+), 1218 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/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 7690ca2..36770ea 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
@@ -814,7 +814,8 @@ public class AiravataServerHandler implements Airavata.Iface {
             if (ServerSettings.isEnableSharing()){
                 // user projects + user accessible projects
                 List<String> accessibleProjectIds = new ArrayList<>();
-                sharingRegistryServerHandler.searchEntities(userName+"@"+gatewayId , gatewayId+":PROJECT",
+                sharingRegistryServerHandler.searchEntities(authzToken.getClaimsMap().get(Constants.GATEWAY_ID),
+                        userName+"@"+gatewayId , gatewayId+":PROJECT",
                         new ArrayList<>(), offset, limit).stream().forEach(p->accessibleProjectIds.add(p.entityId));
                 return getRegistryServiceClient().searchProjects(gatewayId, userName, accessibleProjectIds, new HashMap<>(), limit, offset);
             }else{
@@ -859,7 +860,8 @@ public class AiravataServerHandler implements Airavata.Iface {
             List<String> accessibleProjIds  = new ArrayList<>();
 
             if(ServerSettings.isEnableSharing())
-                sharingRegistryServerHandler.searchEntities(userName+"@"+gatewayId, gatewayId+":PROJECT",
+                sharingRegistryServerHandler.searchEntities(authzToken.getClaimsMap().get(Constants.GATEWAY_ID),
+                        userName+"@"+gatewayId, gatewayId+":PROJECT",
                         new ArrayList<>(), 0, -1).stream().forEach(e->accessibleProjIds.add(e.entityId));
 
             return getRegistryServiceClient().searchProjects(gatewayId, userName, accessibleProjIds, filters, limit, offset);
@@ -896,7 +898,8 @@ public class AiravataServerHandler implements Airavata.Iface {
         try {
             List<String> accessibleExpIds = new ArrayList<>();
             if(ServerSettings.isEnableSharing())
-                sharingRegistryServerHandler.searchEntities(userName+"@"+gatewayId, gatewayId+":EXPERIMENT",
+                sharingRegistryServerHandler.searchEntities(authzToken.getClaimsMap().get(Constants.GATEWAY_ID),
+                        userName+"@"+gatewayId, gatewayId+":EXPERIMENT",
                         new ArrayList<>(), 0, -1).forEach(e->accessibleExpIds.add(e.entityId));
             return getRegistryServiceClient().searchExperiments(gatewayId, userName, accessibleExpIds, filters, limit, offset);
         }catch (Exception e) {
@@ -3873,10 +3876,12 @@ public class AiravataServerHandler implements Airavata.Iface {
         try {
             List<String> accessibleUsers = new ArrayList<>();
             if(permissionType.equals(ResourcePermissionType.WRITE))
-                sharingRegistryServerHandler.getListOfSharedUsers(resourceId, authzToken.getClaimsMap().get(Constants.GATEWAY_ID)
+                sharingRegistryServerHandler.getListOfSharedUsers(authzToken.getClaimsMap().get(Constants.GATEWAY_ID),
+                        resourceId, authzToken.getClaimsMap().get(Constants.GATEWAY_ID)
                         + ":WRITE").stream().forEach(u->accessibleUsers.add(u.userId));
             else if(permissionType.equals(ResourcePermissionType.READ))
-                sharingRegistryServerHandler.getListOfSharedUsers(resourceId, authzToken.getClaimsMap().get(Constants.GATEWAY_ID)
+                sharingRegistryServerHandler.getListOfSharedUsers(authzToken.getClaimsMap().get(Constants.GATEWAY_ID),
+                        resourceId, authzToken.getClaimsMap().get(Constants.GATEWAY_ID)
                         + ":READ").stream().forEach(u->accessibleUsers.add(u.userId));
             return accessibleUsers;
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
index de8abf4..7ee8225 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
@@ -24,10 +24,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.persistence.*;
-import java.util.Map;
+import java.nio.ByteBuffer;
 
 @Entity
 @Table(name = "ENTITY", schema = "")
+@IdClass(EntityPK.class)
 public class EntityEntity {
     private final static Logger logger = LoggerFactory.getLogger(EntityEntity.class);
     private String entityId;
@@ -37,7 +38,7 @@ public class EntityEntity {
     private String parentEntityId;
     private String name;
     private String description;
-    private Map<String, String> metadata;
+    private ByteBuffer binaryData;
     private String fullText;
     private Long createdTime;
     private Long updatedTime;
@@ -52,7 +53,7 @@ public class EntityEntity {
         this.entityId = entityId;
     }
 
-    @Basic
+    @Id
     @Column(name = "DOMAIN_ID")
     public String getDomainId() {
         return domainId;
@@ -112,19 +113,14 @@ public class EntityEntity {
         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;
+    @Lob
+    @Column(name="BINARY_DATA")
+    public ByteBuffer getBinaryData() {
+        return binaryData;
     }
 
-    public void setMetadata(Map<String, String> metadata) {
-        this.metadata = metadata;
+    public void setBinaryData(ByteBuffer binaryData) {
+        this.binaryData = binaryData;
     }
 
     @Lob
@@ -169,7 +165,7 @@ public class EntityEntity {
         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 (binaryData.equals(that.binaryData)) 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;
@@ -183,7 +179,7 @@ public class EntityEntity {
         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 + (binaryData != null ? binaryData.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);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityPK.java
new file mode 100644
index 0000000..44bd33c
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityPK.java
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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 EntityPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(EntityPK.class);
+    private String entityId;
+    private String domainId;
+
+
+    @Column(name = "ENTITY_ID")
+    @Id
+    public String getEntityId() {
+        return entityId;
+    }
+
+    public void setEntityId(String entityId) {
+        this.entityId = entityId;
+    }
+
+    @Column(name = "DOMAIN_ID")
+    @Id
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        EntityPK that = (EntityPK) o;
+
+        if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != null)
+            return false;
+        if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = domainId != null ? domainId.hashCode() : 0;
+        result = 31 * result + (entityId != null ? entityId.hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
index 0b789ed..1b531cc 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
@@ -27,6 +27,7 @@ import javax.persistence.*;
 
 @Entity
 @Table(name = "ENTITY_TYPE", schema = "")
+@IdClass(EntityTypePK.class)
 public class EntityTypeEntity {
     private final static Logger logger = LoggerFactory.getLogger(EntityTypeEntity.class);
     private String entityTypeId;
@@ -46,7 +47,7 @@ public class EntityTypeEntity {
         this.entityTypeId = entityTypeId;
     }
 
-    @Basic
+    @Id
     @Column(name = "DOMAIN_ID")
     public String getDomainId() {
         return domainId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypePK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypePK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypePK.java
new file mode 100644
index 0000000..03f5ba2
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypePK.java
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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 EntityTypePK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(EntityTypePK.class);
+    private String entityTypeId;
+    private String domainId;
+
+
+    @Column(name = "ENTITY_TYPE_ID")
+    @Id
+    public String getEntityTypeId() {
+        return entityTypeId;
+    }
+
+    public void setEntityTypeId(String entityTypeId) {
+        this.entityTypeId = entityTypeId;
+    }
+
+    @Column(name = "DOMAIN_ID")
+    @Id
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        EntityTypePK that = (EntityTypePK) 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;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = entityTypeId != null ? entityTypeId.hashCode() : 0;
+        result = 31 * result + (domainId != null ? domainId.hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
index c62a52d..1e7710b 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
@@ -27,12 +27,13 @@ import javax.persistence.*;
 
 @Entity
 @Table(name = "GROUP_MEMBERSHIP", schema = "")
-@IdClass(GroupMembershipEntityPK.class)
+@IdClass(GroupMembershipPK.class)
 public class GroupMembershipEntity {
     private final static Logger logger = LoggerFactory.getLogger(GroupMembershipEntity.class);
     private String parentId;
     private String childId;
     private String childType;
+    private String domainId;
     private Long createdTime;
     private Long updatedTime;
 
@@ -56,6 +57,16 @@ public class GroupMembershipEntity {
         this.childId = childId;
     }
 
+    @Id
+    @Column(name = "DOMAIN_ID")
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
     @Basic
     @Column(name = "CHILD_TYPE")
     public String getChildType() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
deleted file mode 100644
index be3b1f9..0000000
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/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.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/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipPK.java
new file mode 100644
index 0000000..d123021
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipPK.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.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 GroupMembershipPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(GroupMembershipPK.class);
+    private String parentId;
+    private String childId;
+    private String domainId;
+
+    @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;
+    }
+
+    @Column(name = "DOMAIN_ID")
+    @Id
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        GroupMembershipPK that = (GroupMembershipPK) 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 (domainId != null ? !domainId.equals(that.domainId) : that.domainId != 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 + (domainId != null ? domainId.hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
index c145cbe..a5eddae 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
@@ -27,6 +27,7 @@ import javax.persistence.*;
 
 @Entity
 @Table(name = "PERMISSION_TYPE", schema = "")
+@IdClass(PermissionTypePK.class)
 public class PermissionTypeEntity {
     private final static Logger logger = LoggerFactory.getLogger(PermissionTypeEntity.class);
     private String permissionTypeId;
@@ -46,7 +47,7 @@ public class PermissionTypeEntity {
         this.permissionTypeId = permissionTypeId;
     }
 
-    @Basic
+    @Id
     @Column(name = "DOMAIN_ID")
     public String getDomainId() {
         return domainId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypePK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypePK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypePK.java
new file mode 100644
index 0000000..4a5bec2
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypePK.java
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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 PermissionTypePK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(PermissionTypePK.class);
+    private String permissionTypeId;
+    private String domainId;
+
+
+    @Column(name = "PERMISSION_TYPE_ID")
+    @Id
+    public String getPermissionTypeId() {
+        return permissionTypeId;
+    }
+
+    public void setPermissionTypeId(String permissionTypeId) {
+        this.permissionTypeId = permissionTypeId;
+    }
+
+    @Column(name = "DOMAIN_ID")
+    @Id
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        PermissionTypePK that = (PermissionTypePK) 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;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = permissionTypeId != null ? permissionTypeId.hashCode() : 0;
+        result = 31 * result + (domainId != null ? domainId.hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
index b4b74b0..50dadab 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
@@ -27,12 +27,13 @@ import javax.persistence.*;
 
 @Entity
 @Table(name = "SHARING", schema = "")
-@IdClass(SharingEntityPK.class)
+@IdClass(SharingPK.class)
 public class SharingEntity {
     private final static Logger logger = LoggerFactory.getLogger(SharingEntity.class);
     private String permissionTypeId;
     private String entityId;
     private String groupId;
+    private String domainId;
     private String sharingType;
     private String inheritedParentId;
     private Long createdTime;
@@ -79,6 +80,16 @@ public class SharingEntity {
         this.inheritedParentId = inheritedParentId;
     }
 
+    @Id
+    @Column(name = "DOMAIN_ID")
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
     @Basic
     @Column(name = "SHARING_TYPE")
     public String getSharingType() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
deleted file mode 100644
index da77a87..0000000
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
+++ /dev/null
@@ -1,99 +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.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 SharingEntityPK implements Serializable {
-    private final static Logger logger = LoggerFactory.getLogger(SharingEntityPK.class);
-    private String permissionTypeId;
-    private String entityId;
-    private String groupId;
-    private String inheritedParentId;
-
-    @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;
-    }
-
-    @Column(name = "INHERITED_PARENT_ID")
-    @Id
-    public String getInheritedParentId() {
-        return inheritedParentId;
-    }
-
-    public void setInheritedParentId(String inheritedParentId) {
-        this.inheritedParentId = inheritedParentId;
-    }
-
-    @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/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingPK.java
new file mode 100644
index 0000000..c046fb1
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingPK.java
@@ -0,0 +1,114 @@
+/*
+ *
+ * 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 SharingPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(SharingPK.class);
+    private String permissionTypeId;
+    private String entityId;
+    private String groupId;
+    private String inheritedParentId;
+    private String domainId;
+
+    @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;
+    }
+
+    @Column(name = "INHERITED_PARENT_ID")
+    @Id
+    public String getInheritedParentId() {
+        return inheritedParentId;
+    }
+
+    public void setInheritedParentId(String inheritedParentId) {
+        this.inheritedParentId = inheritedParentId;
+    }
+
+    @Column(name = "DOMAIN_ID")
+    @Id
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        SharingPK that = (SharingPK) 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 (inheritedParentId != null ? !inheritedParentId.equals(that.inheritedParentId) : that.inheritedParentId != null) return false;
+        if (domainId != null ? !domainId.equals(that.domainId) : that.domainId != 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);
+        result = 31 * result + (inheritedParentId != null ? inheritedParentId.hashCode() : 0);
+        result = 31 * result + (domainId != null ? domainId.hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
deleted file mode 100644
index 1482ce9..0000000
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
+++ /dev/null
@@ -1,157 +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.sharing.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.nio.ByteBuffer;
-
-@Entity
-@Table(name = "SHARING_USER", schema = "")
-public class SharingUserEntity {
-    private final static Logger logger = LoggerFactory.getLogger(SharingUserEntity.class);
-    private String userId;
-    private String domainId;
-    private String userName;
-    private String firstName;
-    private String lastName;
-    private String email;
-    private ByteBuffer icon;
-    private Long createdTime;
-    private Long updatedTime;
-
-    @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 = "FIRST_NAME")
-    public String getFirstName() {
-        return firstName;
-    }
-
-    public void setFirstName(String firstName) {
-        this.firstName = firstName;
-    }
-
-    @Basic
-    @Column(name = "LAST_NAME")
-    public String getLastName() {
-        return lastName;
-    }
-
-    public void setLastName(String lastName) {
-        this.lastName = lastName;
-    }
-
-    @Basic
-    @Column(name = "EMAIL")
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-
-    @Lob
-    @Column(name = "ICON")
-    public ByteBuffer getIcon() {
-        return icon;
-    }
-
-    public void setIcon(ByteBuffer icon) {
-        this.icon = icon;
-    }
-
-    @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;
-
-        SharingUserEntity that = (SharingUserEntity) 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;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserEntity.java
new file mode 100644
index 0000000..05cbd19
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserEntity.java
@@ -0,0 +1,158 @@
+/*
+ *
+ * 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.nio.ByteBuffer;
+
+@Entity
+@Table(name = "SHARING_USER", schema = "") // USER is a reserved term in derby
+@IdClass(UserPK.class)
+public class UserEntity {
+    private final static Logger logger = LoggerFactory.getLogger(UserEntity.class);
+    private String userId;
+    private String domainId;
+    private String userName;
+    private String firstName;
+    private String lastName;
+    private String email;
+    private ByteBuffer icon;
+    private Long createdTime;
+    private Long updatedTime;
+
+    @Id
+    @Column(name = "USER_ID")
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        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() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    @Basic
+    @Column(name = "FIRST_NAME")
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    @Basic
+    @Column(name = "LAST_NAME")
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    @Basic
+    @Column(name = "EMAIL")
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    @Lob
+    @Column(name = "ICON")
+    public ByteBuffer getIcon() {
+        return icon;
+    }
+
+    public void setIcon(ByteBuffer icon) {
+        this.icon = icon;
+    }
+
+    @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;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
index 09fd8d8..d212d8d 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
@@ -27,6 +27,7 @@ import javax.persistence.*;
 
 @Entity
 @Table(name = "USER_GROUP", schema = "")
+@IdClass(UserGroupPK.class)
 public class UserGroupEntity {
     private final static Logger logger = LoggerFactory.getLogger(UserGroupEntity.class);
     private String groupId;
@@ -49,7 +50,7 @@ public class UserGroupEntity {
         this.groupId = groupId;
     }
 
-    @Basic
+    @Id
     @Column(name = "DOMAIN_ID")
     public String getDomainId() {
         return domainId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupPK.java
new file mode 100644
index 0000000..42ae5da
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupPK.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * 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 UserGroupPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(UserGroupPK.class);
+    private String groupId;
+    private String domainId;
+
+    @Column(name = "GROUP_ID")
+    @Id
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    @Column(name = "DOMAIN_ID")
+    @Id
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        UserGroupPK that = (UserGroupPK) 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;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = groupId != null ? groupId.hashCode() : 0;
+        result = 31 * result + (domainId != null ? domainId.hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserPK.java
new file mode 100644
index 0000000..eb39f69
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserPK.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * 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 UserPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(UserPK.class);
+    private String userId;
+    private String domainId;
+
+    @Column(name = "USER_ID")
+    @Id
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    @Column(name = "DOMAIN_ID")
+    @Id
+    public String getDomainId() {
+        return domainId;
+    }
+
+    public void setDomainId(String domainId) {
+        this.domainId = domainId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        UserPK that = (UserPK) 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;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = userId != null ? userId.hashCode() : 0;
+        result = 31 * result + (domainId != null ? domainId.hashCode() : 0);
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
index b7137d2..a762f00 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.sharing.registry.db.repositories;
 
 import org.apache.airavata.sharing.registry.db.entities.EntityEntity;
+import org.apache.airavata.sharing.registry.db.entities.EntityPK;
 import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
 import org.apache.airavata.sharing.registry.db.utils.DBConstants;
 import org.apache.airavata.sharing.registry.models.*;
@@ -30,7 +31,7 @@ import org.slf4j.LoggerFactory;
 import java.util.HashMap;
 import java.util.List;
 
-public class EntityRepository extends AbstractRepository<Entity, EntityEntity, String> {
+public class EntityRepository extends AbstractRepository<Entity, EntityEntity, EntityPK> {
     private final static Logger logger = LoggerFactory.getLogger(EntityRepository.class);
 
     public EntityRepository() {
@@ -43,7 +44,7 @@ public class EntityRepository extends AbstractRepository<Entity, EntityEntity, S
         return select(filters, 0, -1);
     }
 
-    public List<Entity> searchEntities(List<String> groupIds, String entityTypeId, List<SearchCriteria> filters,
+    public List<Entity> searchEntities(String domainId, List<String> groupIds, String entityTypeId, List<SearchCriteria> filters,
                                        int offset, int limit) throws SharingRegistryException {
         String groupIdString = "'";
         for(String groupId : groupIds)
@@ -52,6 +53,8 @@ public class EntityRepository extends AbstractRepository<Entity, EntityEntity, S
 
         String query = "SELECT E FROM " + EntityEntity.class.getSimpleName() + " E, " + SharingEntity.class.getSimpleName() + " S WHERE " +
                 "E." + DBConstants.EntityTable.ENTITY_ID + " = S." + DBConstants.SharingTable.ENTITY_ID + " AND " +
+                "E." + DBConstants.EntityTable.DOMAIN_ID + " = S." + DBConstants.SharingTable.DOMAIN_ID + " AND " +
+                "E." + DBConstants.EntityTable.DOMAIN_ID + " = '" + domainId + "' AND " +
                 "S." + DBConstants.SharingTable.GROUP_ID + " IN(" + groupIdString + ") AND E." + DBConstants.EntityTable.ENTITY_TYPE_ID + "='" +
                 entityTypeId + "' AND ";
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
index ed2a7e9..df22e36 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
@@ -21,11 +21,12 @@
 package org.apache.airavata.sharing.registry.db.repositories;
 
 import org.apache.airavata.sharing.registry.db.entities.EntityTypeEntity;
+import org.apache.airavata.sharing.registry.db.entities.EntityTypePK;
 import org.apache.airavata.sharing.registry.models.EntityType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class EntityTypeRepository extends AbstractRepository<EntityType, EntityTypeEntity, String> {
+public class EntityTypeRepository extends AbstractRepository<EntityType, EntityTypeEntity, EntityTypePK> {
     private final static Logger logger = LoggerFactory.getLogger(EntityTypeRepository.class);
 
     public EntityTypeRepository() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
index 87d5d4c..ccf27cb 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
@@ -21,39 +21,37 @@
 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.SharingUserEntity;
+import org.apache.airavata.sharing.registry.db.entities.GroupMembershipPK;
+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 class GroupMembershipRepository extends AbstractRepository<GroupMembership, GroupMembershipEntity, GroupMembershipPK> {
 
     public GroupMembershipRepository() {
         super(GroupMembership.class, GroupMembershipEntity.class);
     }
 
-    public List<GroupMembership> getChildMembershipsOfGroup(String parentId) throws SharingRegistryException {
-        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 SharingRegistryException {
-        String queryString = "SELECT U FROM " + SharingUserEntity.class.getSimpleName() + " U, " + GroupMembershipEntity.class.getSimpleName()
+    public List<User> getAllChildUsers(String domainId, String groupId) throws SharingRegistryException {
+        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
+                "GM." + DBConstants.GroupMembershipTable.DOMAIN_ID + " = U." + DBConstants.UserTable.DOMAIN_ID + " AND " +
+                "GM." + DBConstants.GroupMembershipTable.DOMAIN_ID + "='" + domainId + "' 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 SharingRegistryException {
+    public List<UserGroup> getAllChildGroups(String domainId, String groupId) throws SharingRegistryException {
         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.DOMAIN_ID + " = G." + DBConstants.UserGroupTable.DOMAIN_ID + " AND " +
+                "GM." + DBConstants.GroupMembershipTable.DOMAIN_ID+"='"+domainId + "' AND "+
                 "GM." + DBConstants.GroupMembershipTable.PARENT_ID+"='"+groupId + "' AND GM." + DBConstants.GroupMembershipTable.CHILD_TYPE
                 + "='" + GroupChildType.GROUP.toString() + "'";
         UserGroupRepository userGroupRepository = new UserGroupRepository();
@@ -61,10 +59,11 @@ public class GroupMembershipRepository extends AbstractRepository<GroupMembershi
         return groups;
     }
 
-    public List<GroupMembership> getAllParentMembershipsForChild(String childId) throws SharingRegistryException {
+    public List<GroupMembership> getAllParentMembershipsForChild(String domainId, String childId) throws SharingRegistryException {
         List<GroupMembership> finalParentGroups = new ArrayList<>();
         Map<String, String> filters = new HashMap<>();
         filters.put(DBConstants.GroupMembershipTable.CHILD_ID, childId);
+        filters.put(DBConstants.GroupMembershipTable.DOMAIN_ID, domainId);
         LinkedList<GroupMembership> temp = new LinkedList<>();
         select(filters, 0, -1).stream().forEach(m -> temp.addLast(m));
         while (temp.size() > 0){
@@ -76,23 +75,4 @@ public class GroupMembershipRepository extends AbstractRepository<GroupMembershi
         }
         return finalParentGroups;
     }
-
-    public List<UserGroup> getAllParentGroupsForChild(String childId) throws SharingRegistryException {
-        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/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
index ac092f1..62a725e 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.sharing.registry.db.repositories;
 
 import org.apache.airavata.sharing.registry.db.entities.PermissionTypeEntity;
+import org.apache.airavata.sharing.registry.db.entities.PermissionTypePK;
 import org.apache.airavata.sharing.registry.db.utils.DBConstants;
 import org.apache.airavata.sharing.registry.models.SharingRegistryException;
 import org.apache.airavata.sharing.registry.models.PermissionType;
@@ -31,7 +32,7 @@ import org.slf4j.LoggerFactory;
 import java.util.HashMap;
 import java.util.List;
 
-public class PermissionTypeRepository extends AbstractRepository<PermissionType, PermissionTypeEntity, String> {
+public class PermissionTypeRepository extends AbstractRepository<PermissionType, PermissionTypeEntity, PermissionTypePK> {
     private final static Logger logger = LoggerFactory.getLogger(PermissionTypeRepository.class);
 
     public PermissionTypeRepository() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
index 9c30fa4..1237808 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
@@ -21,7 +21,7 @@
 package org.apache.airavata.sharing.registry.db.repositories;
 
 import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
-import org.apache.airavata.sharing.registry.db.entities.SharingEntityPK;
+import org.apache.airavata.sharing.registry.db.entities.SharingPK;
 import org.apache.airavata.sharing.registry.db.utils.DBConstants;
 import org.apache.airavata.sharing.registry.models.Sharing;
 import org.apache.airavata.sharing.registry.models.SharingRegistryException;
@@ -32,15 +32,16 @@ import org.slf4j.LoggerFactory;
 import java.util.HashMap;
 import java.util.List;
 
-public class SharingRepository extends AbstractRepository<Sharing, SharingEntity, SharingEntityPK> {
+public class SharingRepository extends AbstractRepository<Sharing, SharingEntity, SharingPK> {
     private final static Logger logger = LoggerFactory.getLogger(SharingRepository.class);
 
     public SharingRepository() {
         super(Sharing.class, SharingEntity.class);
     }
 
-    public List<Sharing> getIndirectSharedChildren(String parentId, String permissionTypeId) throws SharingRegistryException {
+    public List<Sharing> getIndirectSharedChildren(String domainId, String parentId, String permissionTypeId) throws SharingRegistryException {
         HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.SharingTable.DOMAIN_ID, domainId);
         filters.put(DBConstants.SharingTable.INHERITED_PARENT_ID, parentId);
         filters.put(DBConstants.SharingTable.SHARING_TYPE, SharingType.INDIRECT_CASCADING.toString());
         filters.put(DBConstants.SharingTable.PERMISSION_TYPE_ID, permissionTypeId);
@@ -48,11 +49,10 @@ public class SharingRepository extends AbstractRepository<Sharing, SharingEntity
         return select(filters, 0, -1);
     }
 
-    public List<Sharing> getCascadingPermissionsForEntity(String entityId) throws SharingRegistryException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.SharingTable.ENTITY_ID, entityId);
+    public List<Sharing> getCascadingPermissionsForEntity(String domainId, String entityId) throws SharingRegistryException {
         String query = "SELECT p from " + SharingEntity.class.getSimpleName() + " as p";
         query += " WHERE ";
+        query += "p." + DBConstants.SharingTable.DOMAIN_ID + " = '" + domainId + "' AND ";
         query += "p." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
         query += "p." + DBConstants.SharingTable.SHARING_TYPE + " IN('" + SharingType.DIRECT_CASCADING.toString()
                 + "', '" + SharingType.INDIRECT_CASCADING + "') ";
@@ -60,9 +60,10 @@ public class SharingRepository extends AbstractRepository<Sharing, SharingEntity
         return select(query, 0, -1);
     }
 
-    public boolean hasAccess(String entityId, List<String> groupIds, List<String> permissionTypeIds) throws SharingRegistryException {
+    public boolean hasAccess(String domainId, String entityId, List<String> groupIds, List<String> permissionTypeIds) throws SharingRegistryException {
         String query = "SELECT p from " + SharingEntity.class.getSimpleName() + " as p";
         query += " WHERE ";
+        query += "p." + DBConstants.SharingTable.DOMAIN_ID + " = '" + domainId + "' AND ";
         query += "p." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
         String permissionTypeIdString = "'";
         for(String permissionId : permissionTypeIds)

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
index 1ed1f06..c86bb22 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
@@ -22,6 +22,7 @@ package org.apache.airavata.sharing.registry.db.repositories;
 
 import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
 import org.apache.airavata.sharing.registry.db.entities.UserGroupEntity;
+import org.apache.airavata.sharing.registry.db.entities.UserGroupPK;
 import org.apache.airavata.sharing.registry.db.utils.DBConstants;
 import org.apache.airavata.sharing.registry.models.GroupCardinality;
 import org.apache.airavata.sharing.registry.models.SharingRegistryException;
@@ -31,17 +32,19 @@ import org.slf4j.LoggerFactory;
 
 import java.util.List;
 
-public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroupEntity, String> {
+public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroupEntity, UserGroupPK> {
     private final static Logger logger = LoggerFactory.getLogger(UserGroupRepository.class);
 
     public UserGroupRepository() {
         super(UserGroup.class, UserGroupEntity.class);
     }
 
-    public List<UserGroup> getAccessibleGroups(String entityId, String permissionTypeId) throws SharingRegistryException {
+    public List<UserGroup> getAccessibleGroups(String domainId, String entityId, String permissionTypeId) throws SharingRegistryException {
         String query = "SELECT g from " + UserGroupEntity.class.getSimpleName() + " g, " + SharingEntity.class.getSimpleName() + " s";
         query += " WHERE ";
         query += "g." + DBConstants.UserGroupTable.GROUP_ID + " = s." + DBConstants.SharingTable.GROUP_ID + " AND ";
+        query += "g." + DBConstants.UserGroupTable.DOMAIN_ID + " = s." + DBConstants.SharingTable.DOMAIN_ID + " AND ";
+        query += "g." + DBConstants.UserGroupTable.DOMAIN_ID + " = '" + domainId + "' AND ";
         query += "s." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
         query += "s." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " = '" + permissionTypeId + "' AND ";
         query += "g." + DBConstants.UserGroupTable.GROUP_CARDINALITY + " = '" + GroupCardinality.MULTI_USER.toString() + "'";

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
index 845c0b9..6df5d70 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
@@ -22,7 +22,8 @@ package org.apache.airavata.sharing.registry.db.repositories;
 
 
 import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
-import org.apache.airavata.sharing.registry.db.entities.SharingUserEntity;
+import org.apache.airavata.sharing.registry.db.entities.UserEntity;
+import org.apache.airavata.sharing.registry.db.entities.UserPK;
 import org.apache.airavata.sharing.registry.db.utils.DBConstants;
 import org.apache.airavata.sharing.registry.models.SharingRegistryException;
 import org.apache.airavata.sharing.registry.models.User;
@@ -31,18 +32,20 @@ import org.slf4j.LoggerFactory;
 
 import java.util.List;
 
-public class UserRepository extends AbstractRepository<User, SharingUserEntity, String> {
+public class UserRepository extends AbstractRepository<User, UserEntity, UserPK> {
     private final static Logger logger = LoggerFactory.getLogger(UserRepository.class);
 
     public UserRepository() {
-        super(User.class, SharingUserEntity.class);
+        super(User.class, UserEntity.class);
     }
 
 
-    public List<User> getAccessibleUsers(String entityId, String permissionTypeId) throws SharingRegistryException {
-        String query = "SELECT u from " + SharingUserEntity.class.getSimpleName() + " u, " + SharingEntity.class.getSimpleName() + " s";
+    public List<User> getAccessibleUsers(String domainId, String entityId, String permissionTypeId) throws SharingRegistryException {
+        String query = "SELECT u from " + UserEntity.class.getSimpleName() + " u, " + SharingEntity.class.getSimpleName() + " s";
         query += " WHERE ";
         query += "u." + DBConstants.UserTable.USER_ID + " = s." + DBConstants.SharingTable.GROUP_ID + " AND ";
+        query += "u." + DBConstants.UserTable.DOMAIN_ID + " = s." + DBConstants.SharingTable.DOMAIN_ID + " AND ";
+        query += "u." + DBConstants.UserTable.DOMAIN_ID + " = '" + domainId + "' AND ";
         query += "s." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
         query += "s." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " = '" + permissionTypeId + "'";
         query += " ORDER BY s.createdTime DESC";


[31/51] [abbrv] airavata git commit: implementing sharing server

Posted by sc...@apache.org.
implementing sharing server


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

Branch: refs/heads/airavata-gov-registry
Commit: 9101a5192a2199314b219dd67e34769902dfce44
Parents: e36c145
Author: scnakandala <su...@gmail.com>
Authored: Thu Oct 13 16:58:03 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Oct 13 16:58:03 2016 -0400

----------------------------------------------------------------------
 .../main/resources/airavata-server.properties   |     6 +
 .../sharing/registry/AiravataDataMigrator.java  |   166 -
 .../sharing/registry/ConnectionFactory.java     |    59 -
 .../migrator/airavata/AiravataDataMigrator.java |   166 +
 .../migrator/airavata/ConnectionFactory.java    |    59 +
 .../src/main/resources/bin/sharing-registry.sh  |     4 +-
 .../sharing-registry-server/pom.xml             |    13 +
 .../registry/server/SharingRegistryServer.java  |   129 +-
 .../server/SharingRegistryServerHandler.java    |     4 +-
 .../sharing-registry-stubs/pom.xml              |    22 +-
 .../sharing/registry/models/Domain.java         |    27 +-
 .../sharing/registry/models/Entity.java         |     2 +-
 .../sharing/registry/models/EntityType.java     |     2 +-
 .../registry/models/GroupMembership.java        |     2 +-
 .../sharing/registry/models/PermissionType.java |     2 +-
 .../sharing/registry/models/SearchCriteria.java |     2 +-
 .../sharing/registry/models/Sharing.java        |     2 +-
 .../models/SharingRegistryException.java        |     2 +-
 .../airavata/sharing/registry/models/User.java  |     2 +-
 .../sharing/registry/models/UserGroup.java      |     2 +-
 .../service/cpi/GovRegistryService.java         | 45160 -----------------
 .../service/cpi/SharingRegistryService.java     | 45160 +++++++++++++++++
 .../thrift_models/sharing_cpi.thrift            |     2 +-
 23 files changed, 45571 insertions(+), 45424 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 9dace79..c823d89 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -104,6 +104,12 @@ sharingcatalog.jdbc.password=airavata
 sharingcatalog.validationQuery=SELECT 1 from CONFIGURATION
 
 ###########################################################################
+#  Sharing Registry Server Configuration
+###########################################################################
+sharing.registry.server.host=localhost
+sharing.registry.server.port=7878
+
+###########################################################################
 #  User Profile MongoDB Configuration
 ###########################################################################
 userprofile.mongodb.host=localhost

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/AiravataDataMigrator.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/AiravataDataMigrator.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/AiravataDataMigrator.java
deleted file mode 100644
index 1a80683..0000000
--- a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/AiravataDataMigrator.java
+++ /dev/null
@@ -1,166 +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.sharing.registry;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.sharing.registry.models.*;
-import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
-import org.apache.thrift.TException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.HashMap;
-import java.util.Map;
-
-public class AiravataDataMigrator {
-    private final static Logger logger = LoggerFactory.getLogger(AiravataDataMigrator.class);
-
-    public static void main(String[] args) throws SQLException, ClassNotFoundException, TException, ApplicationSettingsException {
-        Connection expCatConnection = ConnectionFactory.getInstance().getExpCatConnection();
-
-        SharingRegistryServerHandler govRegistryServerHandler = new SharingRegistryServerHandler();
-
-        String query = "SELECT * FROM GATEWAY";
-        Statement statement = expCatConnection.createStatement();
-        ResultSet rs = statement.executeQuery(query);
-
-        while (rs.next()) {
-            //Creating domain entries
-            Domain domain = new Domain();
-            domain.setDomainId(rs.getString("GATEWAY_ID"));
-            if(rs.getString("GATEWAY_NAME") != null)
-                domain.setName(rs.getString("GATEWAY_NAME"));
-            else
-                domain.setName(rs.getString("GATEWAY_ID"));
-            domain.setDescription("Domain entry for " + domain.name);
-
-            govRegistryServerHandler.createDomain(domain);
-
-            //Creating Entity Types for each domain
-            EntityType entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":PROJECT");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("PROJECT");
-            entityType.setDescription("Project entity type");
-            govRegistryServerHandler.createEntityType(entityType);
-
-            entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":EXPERIMENT");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("EXPERIMENT");
-            entityType.setDescription("Experiment entity type");
-            govRegistryServerHandler.createEntityType(entityType);
-
-            entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":FILE");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("FILE");
-            entityType.setDescription("File entity type");
-            govRegistryServerHandler.createEntityType(entityType);
-
-            //Creating Permission Types for each domain
-            PermissionType permissionType = new PermissionType();
-            permissionType.setPermissionTypeId(domain.domainId+":READ");
-            permissionType.setDomainId(domain.domainId);
-            permissionType.setName("READ");
-            permissionType.setDescription("Read permission type");
-            govRegistryServerHandler.createPermissionType(permissionType);
-
-            permissionType = new PermissionType();
-            permissionType.setPermissionTypeId(domain.domainId+":WRITE");
-            permissionType.setDomainId(domain.domainId);
-            permissionType.setName("WRITE");
-            permissionType.setDescription("Write permission type");
-            govRegistryServerHandler.createPermissionType(permissionType);
-        }
-
-        //Creating user entries
-        query = "SELECT * FROM USERS";
-        statement = expCatConnection.createStatement();
-        rs = statement.executeQuery(query);
-        while(rs.next()){
-            User user = new User();
-            user.setUserId(rs.getString("AIRAVATA_INTERNAL_USER_ID"));
-            user.setDomainId(rs.getString("GATEWAY_ID"));
-            user.setUserName(rs.getString("USER_NAME"));
-
-            govRegistryServerHandler.createUser(user);
-        }
-
-        //Creating project entries
-        query = "SELECT * FROM PROJECT";
-        statement = expCatConnection.createStatement();
-        rs = statement.executeQuery(query);
-        while(rs.next()){
-            Entity entity = new Entity();
-            entity.setEntityId(rs.getString("PROJECT_ID"));
-            entity.setDomainId(rs.getString("GATEWAY_ID"));
-            entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":PROJECT");
-            entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID"));
-            entity.setName(rs.getString("PROJECT_NAME"));
-            entity.setDescription(rs.getString("DESCRIPTION"));
-            if(entity.getDescription() == null)
-                entity.setFullText(entity.getName());
-            else
-                entity.setFullText(entity.getName() + " " + entity.getDescription());
-            Map<String, String> metadata = new HashMap<>();
-            metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
-
-            govRegistryServerHandler.createEntity(entity);
-        }
-
-        //Creating experiment entries
-        query = "SELECT * FROM EXPERIMENT";
-        statement = expCatConnection.createStatement();
-        rs = statement.executeQuery(query);
-        while(rs.next()){
-            Entity entity = new Entity();
-            entity.setEntityId(rs.getString("EXPERIMENT_ID"));
-            entity.setDomainId(rs.getString("GATEWAY_ID"));
-            entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":EXPERIMENT");
-            entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID"));
-            entity.setParentEntityId(rs.getString("PROJECT_ID"));
-            entity.setName(rs.getString("EXPERIMENT_NAME"));
-            entity.setDescription(rs.getString("DESCRIPTION"));
-            if(entity.getDescription() == null)
-                entity.setFullText(entity.getName());
-            else
-                entity.setFullText(entity.getName() + " " + entity.getDescription());
-            Map<String, String> metadata = new HashMap<>();
-            metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
-            metadata.put("EXPERIMENT_TYPE", rs.getString("EXPERIMENT_TYPE"));
-            metadata.put("EXECUTION_ID", rs.getString("EXECUTION_ID"));
-            metadata.put("GATEWAY_EXECUTION_ID", rs.getString("GATEWAY_EXECUTION_ID"));
-            metadata.put("ENABLE_EMAIL_NOTIFICATION", rs.getString("ENABLE_EMAIL_NOTIFICATION"));
-            metadata.put("EMAIL_ADDRESSES", rs.getString("EMAIL_ADDRESSES"));
-            metadata.put("GATEWAY_INSTANCE_ID", rs.getString("GATEWAY_INSTANCE_ID"));
-            metadata.put("ARCHIVE", rs.getString("ARCHIVE"));
-
-            govRegistryServerHandler.createEntity(entity);
-        }
-
-        expCatConnection.close();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/ConnectionFactory.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/ConnectionFactory.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/ConnectionFactory.java
deleted file mode 100644
index 40c0e18..0000000
--- a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/ConnectionFactory.java
+++ /dev/null
@@ -1,59 +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.sharing.registry;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-
-public class ConnectionFactory {
-    private final static Logger logger = LoggerFactory.getLogger(ConnectionFactory.class);
-
-    //static reference to itself
-    private static ConnectionFactory instance;
-
-    public static final String EXPCAT_URL = "jdbc:mysql://localhost/airavata_exp_catalog";
-    public static final String EXPCAT_USER = "root";
-    public static final String EXPCAT_PASSWORD = "";
-    public static final String DRIVER_CLASS = "com.mysql.jdbc.Driver";
-
-    private static Connection expCatConnection;
-
-    //private constructor
-    private ConnectionFactory() throws ClassNotFoundException, SQLException {
-        Class.forName(DRIVER_CLASS);
-        expCatConnection = DriverManager.getConnection(EXPCAT_URL, EXPCAT_USER, EXPCAT_PASSWORD);
-    }
-
-    public static ConnectionFactory getInstance() throws SQLException, ClassNotFoundException {
-        if(instance == null)
-            instance = new ConnectionFactory();
-        return instance;
-    }
-
-    public Connection getExpCatConnection() throws SQLException {
-        return expCatConnection;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
new file mode 100644
index 0000000..a8ec19f
--- /dev/null
+++ b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/AiravataDataMigrator.java
@@ -0,0 +1,166 @@
+/*
+ *
+ * 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.migrator.airavata;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.sharing.registry.models.*;
+import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
+import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.HashMap;
+import java.util.Map;
+
+public class AiravataDataMigrator {
+    private final static Logger logger = LoggerFactory.getLogger(AiravataDataMigrator.class);
+
+    public static void main(String[] args) throws SQLException, ClassNotFoundException, TException, ApplicationSettingsException {
+        Connection expCatConnection = ConnectionFactory.getInstance().getExpCatConnection();
+
+        SharingRegistryServerHandler govRegistryServerHandler = new SharingRegistryServerHandler();
+
+        String query = "SELECT * FROM GATEWAY";
+        Statement statement = expCatConnection.createStatement();
+        ResultSet rs = statement.executeQuery(query);
+
+        while (rs.next()) {
+            //Creating domain entries
+            Domain domain = new Domain();
+            domain.setDomainId(rs.getString("GATEWAY_ID"));
+            if(rs.getString("GATEWAY_NAME") != null)
+                domain.setName(rs.getString("GATEWAY_NAME"));
+            else
+                domain.setName(rs.getString("GATEWAY_ID"));
+            domain.setDescription("Domain entry for " + domain.name);
+
+            govRegistryServerHandler.createDomain(domain);
+
+            //Creating Entity Types for each domain
+            EntityType entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":PROJECT");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("PROJECT");
+            entityType.setDescription("Project entity type");
+            govRegistryServerHandler.createEntityType(entityType);
+
+            entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":EXPERIMENT");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("EXPERIMENT");
+            entityType.setDescription("Experiment entity type");
+            govRegistryServerHandler.createEntityType(entityType);
+
+            entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":FILE");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("FILE");
+            entityType.setDescription("File entity type");
+            govRegistryServerHandler.createEntityType(entityType);
+
+            //Creating Permission Types for each domain
+            PermissionType permissionType = new PermissionType();
+            permissionType.setPermissionTypeId(domain.domainId+":READ");
+            permissionType.setDomainId(domain.domainId);
+            permissionType.setName("READ");
+            permissionType.setDescription("Read permission type");
+            govRegistryServerHandler.createPermissionType(permissionType);
+
+            permissionType = new PermissionType();
+            permissionType.setPermissionTypeId(domain.domainId+":WRITE");
+            permissionType.setDomainId(domain.domainId);
+            permissionType.setName("WRITE");
+            permissionType.setDescription("Write permission type");
+            govRegistryServerHandler.createPermissionType(permissionType);
+        }
+
+        //Creating user entries
+        query = "SELECT * FROM USERS";
+        statement = expCatConnection.createStatement();
+        rs = statement.executeQuery(query);
+        while(rs.next()){
+            User user = new User();
+            user.setUserId(rs.getString("AIRAVATA_INTERNAL_USER_ID"));
+            user.setDomainId(rs.getString("GATEWAY_ID"));
+            user.setUserName(rs.getString("USER_NAME"));
+
+            govRegistryServerHandler.createUser(user);
+        }
+
+        //Creating project entries
+        query = "SELECT * FROM PROJECT";
+        statement = expCatConnection.createStatement();
+        rs = statement.executeQuery(query);
+        while(rs.next()){
+            Entity entity = new Entity();
+            entity.setEntityId(rs.getString("PROJECT_ID"));
+            entity.setDomainId(rs.getString("GATEWAY_ID"));
+            entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":PROJECT");
+            entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID"));
+            entity.setName(rs.getString("PROJECT_NAME"));
+            entity.setDescription(rs.getString("DESCRIPTION"));
+            if(entity.getDescription() == null)
+                entity.setFullText(entity.getName());
+            else
+                entity.setFullText(entity.getName() + " " + entity.getDescription());
+            Map<String, String> metadata = new HashMap<>();
+            metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
+
+            govRegistryServerHandler.createEntity(entity);
+        }
+
+        //Creating experiment entries
+        query = "SELECT * FROM EXPERIMENT";
+        statement = expCatConnection.createStatement();
+        rs = statement.executeQuery(query);
+        while(rs.next()){
+            Entity entity = new Entity();
+            entity.setEntityId(rs.getString("EXPERIMENT_ID"));
+            entity.setDomainId(rs.getString("GATEWAY_ID"));
+            entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":EXPERIMENT");
+            entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID"));
+            entity.setParentEntityId(rs.getString("PROJECT_ID"));
+            entity.setName(rs.getString("EXPERIMENT_NAME"));
+            entity.setDescription(rs.getString("DESCRIPTION"));
+            if(entity.getDescription() == null)
+                entity.setFullText(entity.getName());
+            else
+                entity.setFullText(entity.getName() + " " + entity.getDescription());
+            Map<String, String> metadata = new HashMap<>();
+            metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
+            metadata.put("EXPERIMENT_TYPE", rs.getString("EXPERIMENT_TYPE"));
+            metadata.put("EXECUTION_ID", rs.getString("EXECUTION_ID"));
+            metadata.put("GATEWAY_EXECUTION_ID", rs.getString("GATEWAY_EXECUTION_ID"));
+            metadata.put("ENABLE_EMAIL_NOTIFICATION", rs.getString("ENABLE_EMAIL_NOTIFICATION"));
+            metadata.put("EMAIL_ADDRESSES", rs.getString("EMAIL_ADDRESSES"));
+            metadata.put("GATEWAY_INSTANCE_ID", rs.getString("GATEWAY_INSTANCE_ID"));
+            metadata.put("ARCHIVE", rs.getString("ARCHIVE"));
+
+            govRegistryServerHandler.createEntity(entity);
+        }
+
+        expCatConnection.close();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/ConnectionFactory.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/ConnectionFactory.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/ConnectionFactory.java
new file mode 100644
index 0000000..7212d84
--- /dev/null
+++ b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/migrator/airavata/ConnectionFactory.java
@@ -0,0 +1,59 @@
+/*
+ *
+ * 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.migrator.airavata;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+public class ConnectionFactory {
+    private final static Logger logger = LoggerFactory.getLogger(ConnectionFactory.class);
+
+    //static reference to itself
+    private static ConnectionFactory instance;
+
+    public static final String EXPCAT_URL = "jdbc:mysql://localhost/airavata_exp_catalog";
+    public static final String EXPCAT_USER = "root";
+    public static final String EXPCAT_PASSWORD = "";
+    public static final String DRIVER_CLASS = "com.mysql.jdbc.Driver";
+
+    private static Connection expCatConnection;
+
+    //private constructor
+    private ConnectionFactory() throws ClassNotFoundException, SQLException {
+        Class.forName(DRIVER_CLASS);
+        expCatConnection = DriverManager.getConnection(EXPCAT_URL, EXPCAT_USER, EXPCAT_PASSWORD);
+    }
+
+    public static ConnectionFactory getInstance() throws SQLException, ClassNotFoundException {
+        if(instance == null)
+            instance = new ConnectionFactory();
+        return instance;
+    }
+
+    public Connection getExpCatConnection() throws SQLException {
+        return expCatConnection;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
index 10e0619..35bf0ef 100644
--- a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
@@ -75,9 +75,9 @@ then
 	done
 else
 	if $IS_DAEMON_MODE ; then
-		echo "Starting Sharing Catalog in daemon mode..."
+		echo "Starting Sharing Registry Server in daemon mode..."
 		cd "$SHARING_REGISTRY_HOME"/lib
-		nohup $JAVA_HOME/bin/java -jar "$SHARING_REGISTRY_HOME"/lib/airavata-sharing-registry-server-0.7-SNAPSHOT.jar > ../sharing-registry.out & echo $! > "../sharing-registry-start_$!"
+		nohup $JAVA_HOME/bin/java -jar "$SHARING_REGISTRY_HOME"/lib/airavata-sharing-registry-server-0.17-SNAPSHOT.jar > ../sharing-registry.out & echo $! > "../sharing-registry-start_$!"
 		cd ..
 	else
         cd "$SHARING_REGISTRY_HOME"/lib

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/pom.xml b/modules/sharing-registry/sharing-registry-server/pom.xml
index 730469b..1498575 100644
--- a/modules/sharing-registry/sharing-registry-server/pom.xml
+++ b/modules/sharing-registry/sharing-registry-server/pom.xml
@@ -67,6 +67,19 @@
                 </configuration>
             </plugin>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.apache.airavata.sharing.registry.server.SharingRegistryServer</mainClass>
+                            <addClasspath>true</addClasspath>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.openjpa</groupId>
                 <artifactId>openjpa-maven-plugin</artifactId>
                 <version>2.2.0</version>

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
index 96fdb90..23b215a 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
@@ -20,9 +20,136 @@
 */
 package org.apache.airavata.sharing.registry.server;
 
+import org.apache.airavata.common.utils.IServer;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.sharing.registry.service.cpi.SharingRegistryService;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TServerTransport;
+import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class SharingRegistryServer {
+import java.net.InetSocketAddress;
+
+public class SharingRegistryServer implements IServer {
     private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServer.class);
+
+    public static final String SHARING_REG_SERVER_HOST = "sharing.registry.server.host";
+    public static final String SHARING_REG_SERVER_PORT = "sharing.registry.server.port";
+
+    private static final String SERVER_NAME = "Sharing Registry Server";
+    private static final String SERVER_VERSION = "1.0";
+
+    private IServer.ServerStatus status;
+    private TServer server;
+
+    public SharingRegistryServer() {
+        setStatus(IServer.ServerStatus.STOPPED);
+    }
+
+    @Override
+    public String getName() {
+        return SERVER_NAME;
+    }
+
+    @Override
+    public String getVersion() {
+        return SERVER_VERSION;
+    }
+
+    @Override
+    public void start() throws Exception {
+        try {
+            setStatus(IServer.ServerStatus.STARTING);
+            final int serverPort = Integer.parseInt(ServerSettings.getSetting(SHARING_REG_SERVER_PORT));
+            final String serverHost = ServerSettings.getSetting(SHARING_REG_SERVER_HOST);
+            SharingRegistryService.Processor processor = new SharingRegistryService.Processor(new SharingRegistryServerHandler());
+
+            TServerTransport serverTransport;
+
+            if (serverHost == null) {
+                serverTransport = new TServerSocket(serverPort);
+            } else {
+                InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);
+                serverTransport = new TServerSocket(inetSocketAddress);
+            }
+            TThreadPoolServer.Args options = new TThreadPoolServer.Args(serverTransport);
+            options.minWorkerThreads = 30;
+            server = new TThreadPoolServer(options.processor(processor));
+
+            new Thread() {
+                public void run() {
+                    server.serve();
+                    setStatus(IServer.ServerStatus.STOPPED);
+                    logger.info("Sharing Registry Server Stopped.");
+                }
+            }.start();
+            new Thread() {
+                public void run() {
+                    while (!server.isServing()) {
+                        try {
+                            Thread.sleep(500);
+                        } catch (InterruptedException e) {
+                            break;
+                        }
+                    }
+                    if (server.isServing()) {
+                        setStatus(IServer.ServerStatus.STARTED);
+                        logger.info("Starting Sharing Registry Server on Port " + serverPort);
+                        logger.info("Listening to Sharing Registry server clients ....");
+                    }
+                }
+            }.start();
+        } catch (TTransportException e) {
+            setStatus(IServer.ServerStatus.FAILED);
+            throw new Exception("Error while starting the Sharing Registry service", e);
+        }
+    }
+
+    public static void main(String[] args) {
+        try {
+            new SharingRegistryServer().start();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public void stop() throws Exception {
+        if (server!=null && server.isServing()){
+            setStatus(IServer.ServerStatus.STOPING);
+            server.stop();
+        }
+    }
+
+    @Override
+    public void restart() throws Exception {
+        stop();
+        start();
+    }
+
+    @Override
+    public void configure() throws Exception {
+
+    }
+
+    @Override
+    public IServer.ServerStatus getStatus() throws Exception {
+        return status;
+    }
+
+    private void setStatus(IServer.ServerStatus stat){
+        status=stat;
+        status.updateTime();
+    }
+
+    public TServer getServer() {
+        return server;
+    }
+
+    public void setServer(TServer server) {
+        this.server = server;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
index 7f2eb32..aa41a56 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -27,7 +27,7 @@ import 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.models.*;
-import org.apache.airavata.sharing.registry.service.cpi.GovRegistryService;
+import org.apache.airavata.sharing.registry.service.cpi.SharingRegistryService;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
 import java.lang.reflect.Field;
 import java.util.*;
 
-public class SharingRegistryServerHandler implements GovRegistryService.Iface{
+public class SharingRegistryServerHandler implements SharingRegistryService.Iface{
     private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServerHandler.class);
 
     public static String GLOBAL_PERMISSION_NAME = "OWNER";

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/pom.xml b/modules/sharing-registry/sharing-registry-stubs/pom.xml
index 56e8eb4..ce39e03 100644
--- a/modules/sharing-registry/sharing-registry-stubs/pom.xml
+++ b/modules/sharing-registry/sharing-registry-stubs/pom.xml
@@ -31,8 +31,26 @@
                     <target>1.8</target>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>com.google.code.maven-replacer-plugin</groupId>
+                <artifactId>replacer</artifactId>
+                <version>${maven.replacer.plugin.version}</version>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>replace</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <includes>
+                        <include>${basedir}/src/main/java/org/apache/airavata/**/*.java</include>
+                    </includes>
+                    <token>, date = ".*"</token>
+                    <value> </value>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
-
-
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index 238ee80..4604f02 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -6,35 +6,18 @@
  */
 package org.apache.airavata.sharing.registry.models;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
 import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class Domain implements org.apache.thrift.TBase<Domain, Domain._Fields>, java.io.Serializable, Cloneable, Comparable<Domain> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Domain");
 

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

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

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

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

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

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

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
index f076336..5ae3e73 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
@@ -18,7 +18,7 @@ import java.nio.ByteBuffer;
 import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
 

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


[41/51] [abbrv] airavata git commit: adding docs

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
index 81b8b2b..00e0068 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
@@ -34,7 +34,22 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+/**
+ * <p>Entity object which is used to register an entity in the system.</p>
+ * <li><b>entityId</b> : Client id provided by the client</li>
+ * <li><b>domainId</b> : Domain id</li>
+ * <li><b>entityTypeId</b> : Entity type id</li>
+ * <li><b>ownerId</b> : Owner id</li>
+ * <li>parentEntityId : Parent entity id</li>
+ * <li><b>name</b> : Name</li>
+ * <li>description : Short description for the entity</li>
+ * <li>metadata : Map of optional metadata</li>
+ * <li>fullText : A string which will be considered for full text search</li>
+ * <li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
+ * <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, java.io.Serializable, Cloneable, Comparable<Entity> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entity");
 
@@ -193,8 +208,6 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
   }
 
   public Entity() {
-    this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
-
   }
 
   /**
@@ -240,8 +253,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>,
 
   @Override
   public void clear() {
-    this.entityId = "DO_NOT_SET_AT_CLIENTS_ID";
-
+    this.entityId = null;
     this.domainId = null;
     this.entityTypeId = null;
     this.ownerId = null;

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
index cfce3e1..fe72364 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
@@ -34,7 +34,17 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+/**
+ * <p>client defined entity types</p>
+ * <li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
+ * <li><b>domainId</b> : Domain id of the domain.</li>
+ * <li><b>name</b> : Name for the entity type. Should be a single word.</li>
+ * <li>description : Short description for the entity type.</li>
+ * <li>createdTime : Will be set by the system</li>
+ * <li>updatedTime : Will be set by the system</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class EntityType implements org.apache.thrift.TBase<EntityType, EntityType._Fields>, java.io.Serializable, Cloneable, Comparable<EntityType> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EntityType");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
index ba7b659..9678ddb 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupChildType.java
@@ -11,6 +11,10 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
+/**
+ * <p>System internal data type to match group child types</p>
+ * 
+ */
 public enum GroupChildType implements org.apache.thrift.TEnum {
   USER(0),
   GROUP(1);

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
index 629cf26..de4d5a8 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
@@ -34,7 +34,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+/**
+ * <p>System internal data type to map group memberships</p>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class GroupMembership implements org.apache.thrift.TBase<GroupMembership, GroupMembership._Fields>, java.io.Serializable, Cloneable, Comparable<GroupMembership> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupMembership");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
index 5727f83..ee4f131 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupType.java
@@ -11,9 +11,13 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
+/**
+ * <p>Group types can be either user level or domain level groups.</p>
+ * 
+ */
 public enum GroupType implements org.apache.thrift.TEnum {
-  SINGLE_USER(0),
-  MULTI_USER(1);
+  DOMAIN_LEVEL_GROUP(0),
+  USER_LEVEL_GROUP(1);
 
   private final int value;
 
@@ -35,9 +39,9 @@ public enum GroupType implements org.apache.thrift.TEnum {
   public static GroupType findByValue(int value) { 
     switch (value) {
       case 0:
-        return SINGLE_USER;
+        return DOMAIN_LEVEL_GROUP;
       case 1:
-        return MULTI_USER;
+        return USER_LEVEL_GROUP;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
index f7e041f..103547a 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
@@ -34,7 +34,17 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+/**
+ * <p>Object for creating client defined permission type</p>
+ * <li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
+ * <li><b>domainId</b> : Domain id</li>
+ * <li><b>name</b> : Single word name for the permission</li>
+ * <li>description : Short description for the permission type</li>
+ * <li>createdTime : Will be set by the system</li>
+ * <li>updatedTime : Will be set by the system</li>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class PermissionType implements org.apache.thrift.TBase<PermissionType, PermissionType._Fields>, java.io.Serializable, Cloneable, Comparable<PermissionType> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PermissionType");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
index a111c6a..80b57e7 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
@@ -11,11 +11,21 @@ import java.util.Map;
 import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
+/**
+ * <p>Different search operators that can be used with the entity search fields</p>
+ * <li>EQUAL : Simply matches for equality. Applicable for name, and parent entity id</li>
+ * <li>LIKE : Check for the condition %$FIELD% condition. Applicable for name, and description</li>
+ * <li>FULL_TEXT : Does a full text search. Only applicable for the FULL_TEXT field.</li>
+ * <li>GTE : Greater than or equal. Only applicable for created time and updated time.</li>
+ * <li>LTE : Less than or equal. Only applicable for created time and updated time.</li>
+ * 
+ */
 public enum SearchCondition implements org.apache.thrift.TEnum {
   EQUAL(0),
   LIKE(1),
-  GTE(2),
-  LTE(3);
+  FULL_TEXT(2),
+  GTE(3),
+  LTE(4);
 
   private final int value;
 
@@ -41,8 +51,10 @@ public enum SearchCondition implements org.apache.thrift.TEnum {
       case 1:
         return LIKE;
       case 2:
-        return GTE;
+        return FULL_TEXT;
       case 3:
+        return GTE;
+      case 4:
         return LTE;
       default:
         return null;

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/87564d2b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
index 590566c..0ffa332 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
@@ -34,7 +34,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+/**
+ * <p>This is an internal enum type for managing sharings</p>
+ * 
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields>, java.io.Serializable, Cloneable, Comparable<Sharing> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Sharing");
 

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

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

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

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


[22/51] [abbrv] airavata git commit: adding separate distribution

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
new file mode 100644
index 0000000..0e58356
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-derby.sql
@@ -0,0 +1,141 @@
+/*
+ *
+ * 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) NOT NULL,
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (DOMAIN_ID)
+);
+
+CREATE TABLE SHARING_USER (
+  USER_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  USER_NAME VARCHAR(255) NOT NULL,
+  FIRST_NAME VARCHAR (255),
+  LAST_NAME VARCHAR (255),
+  ICON BLOB,
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (USER_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+);
+
+CREATE TABLE USER_GROUP (
+  GROUP_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  OWNER_ID VARCHAR(255) NOT NULL,
+  GROUP_TYPE VARCHAR(255) NOT NULL,
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (GROUP_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+);
+
+
+CREATE TABLE GROUP_MEMBERSHIP (
+  PARENT_ID VARCHAR(255) NOT NULL,
+  CHILD_ID VARCHAR(255) NOT NULL,
+  CHILD_TYPE VARCHAR(255) NOT NULL,
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (PARENT_ID, CHILD_ID),
+  FOREIGN KEY (PARENT_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (CHILD_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+);
+
+CREATE TABLE ENTITY_TYPE (
+  ENTITY_TYPE_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (ENTITY_TYPE_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+);
+
+CREATE TABLE PERMISSION_TYPE (
+  PERMISSION_TYPE_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (PERMISSION_TYPE_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+);
+
+CREATE TABLE ENTITY (
+  ENTITY_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  ENTITY_TYPE_ID VARCHAR(255) NOT NULL,
+  OWNER_ID VARCHAR(255) NOT NULL,
+  PARENT_ENTITY_ID VARCHAR(255),
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  FULL_TEXT CLOB,
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (ENTITY_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+);
+
+-- ALTER TABLE ENTITY ADD FULLTEXT FULL_TEXT_INDEX(FULL_TEXT);
+
+CREATE TABLE ENTITY_METADATA (
+  ENTITY_ID VARCHAR (255) NOT NULL,
+  META_KEY VARCHAR (255) NOT NULL,
+  META_VALUE VARCHAR (255) NOT NULL,
+  PRIMARY KEY (ENTITY_ID, META_KEY),
+  FOREIGN KEY (ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+);
+
+CREATE TABLE SHARING (
+  PERMISSION_TYPE_ID VARCHAR(255) NOT NULL,
+  ENTITY_ID VARCHAR(255) NOT NULL,
+  GROUP_ID VARCHAR(255) NOT NULL,
+  SHARING_TYPE VARCHAR(255) NOT NULL,
+  INHERITED_PARENT_ID VARCHAR(255),
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID, INHERITED_PARENT_ID),
+  FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (INHERITED_PARENT_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
+  FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION
+);
+
+CREATE TABLE CONFIGURATION
+(
+  CONFIG_KEY VARCHAR(255) NOT NULL,
+  CONFIG_VALUE VARCHAR(255) NOT NULL,
+  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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
new file mode 100644
index 0000000..78d5d78
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/resources/sharing-registry-mysql.sql
@@ -0,0 +1,141 @@
+/*
+ *
+ * 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) NOT NULL,
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (DOMAIN_ID)
+);
+
+CREATE TABLE SHARING_USER (
+  USER_ID VARCHAR(255) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  USER_NAME VARCHAR(255) NOT NULL,
+  FIRST_NAME VARCHAR (255),
+  LAST_NAME VARCHAR (255),
+  ICON BLOB,
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  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) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  OWNER_ID VARCHAR(255) NOT NULL,
+  GROUP_TYPE VARCHAR(255) NOT NULL,
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (GROUP_ID),
+  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+
+CREATE TABLE GROUP_MEMBERSHIP (
+  PARENT_ID VARCHAR(255) NOT NULL,
+  CHILD_ID VARCHAR(255) NOT NULL,
+  CHILD_TYPE VARCHAR(255) NOT NULL,
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  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) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  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) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  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) NOT NULL,
+  DOMAIN_ID VARCHAR(255) NOT NULL,
+  ENTITY_TYPE_ID VARCHAR(255) NOT NULL,
+  OWNER_ID VARCHAR(255) NOT NULL,
+  PARENT_ENTITY_ID VARCHAR(255),
+  NAME VARCHAR(255) NOT NULL,
+  DESCRIPTION VARCHAR(255),
+  FULL_TEXT TEXT,
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  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 SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+  FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+ALTER TABLE ENTITY ADD FULLTEXT FULL_TEXT_INDEX(FULL_TEXT);
+
+CREATE TABLE ENTITY_METADATA (
+  ENTITY_ID VARCHAR (255) NOT NULL,
+  META_KEY VARCHAR (255) NOT NULL,
+  META_VALUE VARCHAR (255) NOT NULL,
+  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) NOT NULL,
+  ENTITY_ID VARCHAR(255) NOT NULL,
+  GROUP_ID VARCHAR(255) NOT NULL,
+  SHARING_TYPE VARCHAR(255) NOT NULL,
+  INHERITED_PARENT_ID VARCHAR(255),
+  CREATED_TIME BIGINT NOT NULL,
+  UPDATED_TIME BIGINT NOT NULL,
+  PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID, INHERITED_PARENT_ID),
+  FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID) ON DELETE CASCADE ON UPDATE CASCADE,
+  FOREIGN KEY (INHERITED_PARENT_ID) REFERENCES ENTITY(ENTITY_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) NOT NULL,
+  CONFIG_VALUE VARCHAR(255) NOT NULL,
+  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/e36c145d/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
new file mode 100644
index 0000000..cf92856
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
@@ -0,0 +1,290 @@
+/*
+ *
+ * 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;
+
+import junit.framework.Assert;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.sharing.registry.models.*;
+import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
+import org.apache.airavata.sharing.registry.util.Initialize;
+import org.apache.thrift.TException;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+public class SharingRegistryServerHandlerTest {
+    private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServerHandlerTest.class);
+
+    @BeforeClass
+    public static void setup() throws SharingRegistryException, SQLException {
+        Initialize initialize = new Initialize("sharing-registry-derby.sql");
+        initialize.initializeDB();
+    }
+
+    @Test
+    public void test() throws TException, ApplicationSettingsException {
+        SharingRegistryServerHandler sharingRegistryServerHandler = new SharingRegistryServerHandler();
+
+        //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());
+
+        Assert.assertNotNull(sharingRegistryServerHandler.createDomain(domain));
+        Assert.assertTrue(sharingRegistryServerHandler.getDomains(0, 10).size() > 0);
+
+
+        //Creating users
+        User user1 = new User();
+        String userName1 = "test-user-1." + System.currentTimeMillis();
+        String userId1 = domainId + ":" + userName1;
+        user1.setUserId(userId1);
+        user1.setUserName(userName1);
+        user1.setDomainId(domainId);
+        user1.setCreatedTime(System.currentTimeMillis());
+        user1.setUpdatedTime(System.currentTimeMillis());
+
+        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user1));
+
+        User user2 = new User();
+        String userName2 = "test-user-2." + System.currentTimeMillis();
+        String userId2 = domainId + ":" + userName2;
+        user2.setUserId(userId2);
+        user2.setUserName(userName2);
+        user2.setDomainId(domainId);
+        user2.setCreatedTime(System.currentTimeMillis());
+        user2.setUpdatedTime(System.currentTimeMillis());
+
+        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user2));
+
+        User user3 = new User();
+        String userName3 = "test-user-3." + System.currentTimeMillis();
+        String userId3 = domainId + ":" + userName3;
+        user3.setUserId(userId3);
+        user3.setUserName(userName3);
+        user3.setDomainId(domainId);
+        user3.setCreatedTime(System.currentTimeMillis());
+        user3.setUpdatedTime(System.currentTimeMillis());
+
+        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user3));
+
+        Assert.assertTrue(sharingRegistryServerHandler.getUsers(domainId, 0, 10).size() > 0);
+
+        // Creating user groups
+        UserGroup userGroup1 = new UserGroup();
+        String groupName1 = "test-group-1." + System.currentTimeMillis();
+        String groupId1 = domainId + ":" + groupName1;
+        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());
+
+        Assert.assertNotNull(sharingRegistryServerHandler.createGroup(userGroup1));
+
+        UserGroup userGroup2 = new UserGroup();
+        String groupName2 = "test-group-2." + System.currentTimeMillis();
+        String groupId2 = domainId + ":" + groupName2;
+        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());
+
+        Assert.assertNotNull(sharingRegistryServerHandler.createGroup(userGroup2));
+
+        sharingRegistryServerHandler.addUsersToGroup(Arrays.asList(userId1), groupId1);
+        sharingRegistryServerHandler.addUsersToGroup(Arrays.asList(userId2, userId3), groupId2);
+        sharingRegistryServerHandler.addChildGroupToParentGroup(groupId2, groupId1);
+
+        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembers(groupId1, 0, 10).size() == 2);
+        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembers(groupId2, 0, 10).size() == 2);
+
+
+        //Creating permission types
+        PermissionType permissionType1 = new PermissionType();
+        String permissionName1 = "READ";
+        permissionType1.setPermissionTypeId(domainId+":"+permissionName1);
+        permissionType1.setDomainId(domainId);
+        permissionType1.setName(permissionName1);
+        permissionType1.setDescription("READ description");
+        permissionType1.setCreatedTime(System.currentTimeMillis());
+        permissionType1.setUpdatedTime(System.currentTimeMillis());
+        String permissionTypeId1 = sharingRegistryServerHandler.createPermissionType(permissionType1);
+        Assert.assertNotNull(permissionTypeId1);
+
+        PermissionType permissionType2 = new PermissionType();
+        String permissionName2 = "WRITE";
+        permissionType2.setPermissionTypeId(domainId+":"+permissionName2);
+        permissionType2.setDomainId(domainId);
+        permissionType2.setName(permissionName2);
+        permissionType2.setDescription("WRITE description");
+        permissionType2.setCreatedTime(System.currentTimeMillis());
+        permissionType2.setUpdatedTime(System.currentTimeMillis());
+        String permissionTypeId2 = sharingRegistryServerHandler.createPermissionType(permissionType2);
+        Assert.assertNotNull(permissionTypeId2);
+
+        //Creating entity types
+        EntityType entityType1 = new EntityType();
+        String entityType1Name = "Project";
+        entityType1.setEntityTypeId(domainId+":"+entityType1Name);
+        entityType1.setDomainId(domainId);
+        entityType1.setName(entityType1Name);
+        entityType1.setDescription("test entity type");
+        entityType1.setCreatedTime(System.currentTimeMillis());
+        entityType1.setUpdatedTime(System.currentTimeMillis());
+        String entityTypeId1 = sharingRegistryServerHandler.createEntityType(entityType1);
+        Assert.assertNotNull(entityTypeId1);
+
+        EntityType entityType2 = new EntityType();
+        String entityType2Name = "Experiment";
+        entityType2.setEntityTypeId(domainId+":"+entityType2Name);
+        entityType2.setDomainId(domainId);
+        entityType2.setName(entityType2Name);
+        entityType2.setDescription("test entity type");
+        entityType2.setCreatedTime(System.currentTimeMillis());
+        entityType2.setUpdatedTime(System.currentTimeMillis());
+        String entityTypeId2 = sharingRegistryServerHandler.createEntityType(entityType2);
+        Assert.assertNotNull(entityTypeId2);
+
+        EntityType entityType3 = new EntityType();
+        String entityType3Name = "FileInput";
+        entityType3.setEntityTypeId(domainId+":"+entityType3Name);
+        entityType3.setDomainId(domainId);
+        entityType3.setName(entityType3Name);
+        entityType3.setDescription("file input type");
+        entityType3.setCreatedTime(System.currentTimeMillis());
+        entityType3.setUpdatedTime(System.currentTimeMillis());
+        String entityTypeId3 = sharingRegistryServerHandler.createEntityType(entityType3);
+        Assert.assertNotNull(entityTypeId3);
+
+        //Creating Entities
+        Entity entity1 = new Entity();
+        entity1.setEntityId(domainId+":Entity1");
+        entity1.setDomainId(domainId);
+        entity1.setEntityTypeId(entityTypeId1);
+        entity1.setOwnerId(userId1);
+        entity1.setName("Project name 1");
+        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());
+
+        String entityId1 = sharingRegistryServerHandler.createEntity(entity1);
+        Assert.assertNotNull(entityId1);
+
+        Entity entity2 = new Entity();
+        entity2.setEntityId(domainId+":Entity2");
+        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());
+
+        String entityId2 = sharingRegistryServerHandler.createEntity(entity2);
+        Assert.assertNotNull(entityId2);
+
+        Entity entity3 = new Entity();
+        entity3.setEntityId(domainId+":Entity3");
+        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());
+
+        String entityId3 = sharingRegistryServerHandler.createEntity(entity3);
+        Assert.assertNotNull(entityId3);
+
+        sharingRegistryServerHandler.shareEntityWithUsers(entityId1, Arrays.asList(userId2), permissionTypeId1, true);
+        sharingRegistryServerHandler.shareEntityWithGroups(entityId3, Arrays.asList(groupId2), permissionTypeId1, true);
+
+        Entity entity4 = new Entity();
+        entity4.setEntityId(domainId+":Entity4");
+        entity4.setDomainId(domainId);
+        entity4.setEntityTypeId(entityTypeId3);
+        entity4.setOwnerId(userId3);
+        entity4.setName("Input name");
+        entity4.setDescription("Input file description");
+        entity4.setParentEntityId(entityId3);
+        metadataMap = new HashMap<>();
+        metadataMap.put("key", "val");
+        entity4.setMetadata(metadataMap);
+        entity4.setFullText("Input File");
+        entity4.setCreatedTime(System.currentTimeMillis());
+        entity4.setUpdatedTime(System.currentTimeMillis());
+
+        String entityId4 = sharingRegistryServerHandler.createEntity(entity4);
+        Assert.assertNotNull(entityId4);
+
+        Assert.assertTrue(sharingRegistryServerHandler.userHasAccess(domainId, userId3, entityId4, permissionTypeId1));
+        Assert.assertTrue(sharingRegistryServerHandler.userHasAccess(domainId, userId2, entityId4, permissionTypeId1));
+        Assert.assertTrue(sharingRegistryServerHandler.userHasAccess(domainId, userId1, entityId4, permissionTypeId1));
+        Assert.assertFalse(sharingRegistryServerHandler.userHasAccess(domainId, userId3, entityId1, permissionTypeId1));
+
+        ArrayList<SearchCriteria> filters = new ArrayList<>();
+        SearchCriteria searchCriteria = new SearchCriteria();
+        searchCriteria.setSearchCondition(SearchCondition.LIKE);
+        searchCriteria.setValue("Input");
+        searchCriteria.setSearchField(EntitySearchField.NAME);
+        filters.add(searchCriteria);
+        Assert.assertTrue(sharingRegistryServerHandler.searchEntities(userId1, entityTypeId3, filters, 0, -1).size() > 0);
+
+        Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedUsers(entityId1, permissionTypeId1));
+        Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedGroups(entityId1, permissionTypeId1));
+
+//        sharingRegistryServerHandler.revokeEntitySharingFromUsers(entityId1, Arrays.asList(userId2), permissionTypeId1);
+//        sharingRegistryServerHandler.revokeEntitySharingFromGroups(entityId3, Arrays.asList(groupId2), permissionTypeId1);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/util/Initialize.java b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/util/Initialize.java
new file mode 100644
index 0000000..4a89094
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/util/Initialize.java
@@ -0,0 +1,298 @@
+/*
+ *
+ * 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.util;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.sharing.registry.db.utils.JPAUtils;
+import org.apache.derby.drda.NetworkServerControl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.URI;
+import java.sql.*;
+import java.util.StringTokenizer;
+
+public class Initialize {
+    private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
+    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
+    public  String scriptName ;
+    private NetworkServerControl server;
+    private static final String delimiter = ";";
+    public static final String PERSISTANT_DATA = "Configuration";
+
+    public Initialize(String scriptName) {
+        this.scriptName = scriptName;
+    }
+
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+
+    private static boolean isServerStarted(NetworkServerControl server, int ntries)
+    {
+        for (int i = 1; i <= ntries; i ++)
+        {
+            try {
+                Thread.sleep(500);
+                server.ping();
+                return true;
+            }
+            catch (Exception e) {
+                if (i == ntries)
+                    return false;
+            }
+        }
+        return false;
+    }
+
+    public void initializeDB() throws SQLException{
+        String jdbcUrl = null;
+        String jdbcUser = null;
+        String jdbcPassword = null;
+        try{
+            jdbcUrl = ServerSettings.getSetting("sharingcatalog.jdbc.url");
+            jdbcUser = ServerSettings.getSetting("sharingcatalog.jdbc.user");
+            jdbcPassword = ServerSettings.getSetting("sharingcatalog.jdbc.password");
+            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read properties", e);
+        }
+        startDerbyInServerMode();
+        if(!isServerStarted(server, 20)){
+           throw new RuntimeException("Derby server cound not started within five seconds...");
+        }
+
+        Connection conn = null;
+        try {
+            Class.forName(JPAUtils.readServerProperties(JPAUtils.SHARING_REG_JDBC_DRIVER)).newInstance();
+            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
+            if (!isDatabaseStructureCreated(PERSISTANT_DATA, conn)) {
+                executeSQLScript(conn);
+                logger.info("New Database created for Registry");
+            } else {
+                logger.debug("Database already created for Registry!");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RuntimeException("Database failure", e);
+        } finally {
+            try {
+                if (conn != null){
+                    if (!conn.getAutoCommit()) {
+                        conn.commit();
+                    }
+                    conn.close();
+                }
+            } catch (SQLException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+    }
+
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+            System.out.println("Running a query to test the database tables existence.");
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private void executeSQLScript(Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+        try{
+
+        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
+        reader = new BufferedReader(new InputStreamReader(inputStream));
+        String line;
+        while ((line = reader.readLine()) != null) {
+            line = line.trim();
+            if (line.startsWith("//")) {
+                continue;
+            }
+            if (line.startsWith("--")) {
+                continue;
+            }
+            StringTokenizer st = new StringTokenizer(line);
+            if (st.hasMoreTokens()) {
+                String token = st.nextToken();
+                if ("REM".equalsIgnoreCase(token)) {
+                    continue;
+                }
+            }
+            sql.append(" ").append(line);
+
+            // SQL defines "--" as a comment to EOL
+            // and in Oracle it may contain a hint
+            // so we cannot just remove it, instead we must end it
+            if (line.indexOf("--") >= 0) {
+                sql.append("\n");
+            }
+            if ((checkStringBufferEndsWith(sql, delimiter))) {
+                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                sql.replace(0, sql.length(), "");
+            }
+        }
+        // Catch any statements not followed by ;
+        if (sql.length() > 0) {
+            executeSQL(sql.toString(), conn);
+        }
+        }catch (IOException e){
+            logger.error("Error occurred while executing SQL script for creating Airavata database", e);
+            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
+        }finally {
+            if (reader != null) {
+                reader.close();
+            }
+
+        }
+
+    }
+
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            logger.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            logger.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                logger.warn(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                logger.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    logger.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    private void startDerbyInServerMode() {
+        try {
+            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
+            String jdbcURL = JPAUtils.readServerProperties(JPAUtils.SHARING_REG_JDBC_URL);
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            server = new NetworkServerControl(InetAddress.getByName(uri.getHost()),
+                    20000,
+                    JPAUtils.readServerProperties(JPAUtils.SHARING_REG_JDBC_USER), JPAUtils.readServerProperties(JPAUtils.SHARING_REG_JDBC_USER));
+            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
+            server.start(consoleWriter);
+        } catch (IOException e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        } catch (Exception e) {
+            logger.error("Unable to start Apache derby in the server mode! Check whether " +
+                    "specified port is available");
+        }
+
+    }
+
+    public void stopDerbyServer() throws SQLException{
+        try {
+            server.shutdown();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new SQLException("Error while stopping derby server", e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/pom.xml b/modules/sharing-registry/sharing-registry-stubs/pom.xml
index eb47dc9..56e8eb4 100644
--- a/modules/sharing-registry/sharing-registry-stubs/pom.xml
+++ b/modules/sharing-registry/sharing-registry-stubs/pom.xml
@@ -16,7 +16,7 @@
         <dependency>
             <groupId>org.apache.thrift</groupId>
             <artifactId>libthrift</artifactId>
-            <version>0.9.3</version>
+            <version>${thrift.version}</version>
         </dependency>
     </dependencies>
 


[47/51] [abbrv] airavata git commit: fixing id issues

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html
index 9b6253d..ed7fb89 100644
--- a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html
+++ b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_cpi.html
@@ -91,11 +91,13 @@
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to update existing user</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteUser">Function: SharingRegistryService.deleteUser</h4>
-<pre><code>bool</code> deleteUser(<code>string</code> userId)
+<pre><code>bool</code> deleteUser(<code>string</code> domainId,
+                <code>string</code> userId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to delete user</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUser">Function: SharingRegistryService.getUser</h4>
-<pre><code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> getUser(<code>string</code> userId)
+<pre><code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> getUser(<code>string</code> domainId,
+                            <code>string</code> userId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get a user</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUsers">Function: SharingRegistryService.getUsers</h4>
@@ -116,11 +118,13 @@
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to update a group</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteGroup">Function: SharingRegistryService.deleteGroup</h4>
-<pre><code>bool</code> deleteGroup(<code>string</code> groupId)
+<pre><code>bool</code> deleteGroup(<code>string</code> domainId,
+                 <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to delete a group</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroup">Function: SharingRegistryService.getGroup</h4>
-<pre><code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> getGroup(<code>string</code> groupId)
+<pre><code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> getGroup(<code>string</code> domainId,
+                                  <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get a group</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroups">Function: SharingRegistryService.getGroups</h4>
@@ -129,34 +133,40 @@
                                          <code>i32</code> limit)
 </pre><p>API method to get groups in a domainId. Results are reverse sorted based on created time.</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_addUsersToGroup">Function: SharingRegistryService.addUsersToGroup</h4>
-<pre><code>bool</code> addUsersToGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
+<pre><code>bool</code> addUsersToGroup(<code>string</code> domainId,
+                     <code>list&lt;<code>string</code>&gt;</code> userIds,
                      <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to add list of users to a group</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeUsersFromGroup">Function: SharingRegistryService.removeUsersFromGroup</h4>
-<pre><code>bool</code> removeUsersFromGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
+<pre><code>bool</code> removeUsersFromGroup(<code>string</code> domainId,
+                          <code>list&lt;<code>string</code>&gt;</code> userIds,
                           <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to remove users from a group</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembersOfTypeUser">Function: SharingRegistryService.getGroupMembersOfTypeUser</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getGroupMembersOfTypeUser(<code>string</code> groupId,
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getGroupMembersOfTypeUser(<code>string</code> domainId,
+                                                    <code>string</code> groupId,
                                                     <code>i32</code> offset,
                                                     <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get list of child users in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembersOfTypeGroup">Function: SharingRegistryService.getGroupMembersOfTypeGroup</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroupMembersOfTypeGroup(<code>string</code> groupId,
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroupMembersOfTypeGroup(<code>string</code> domainId,
+                                                          <code>string</code> groupId,
                                                           <code>i32</code> offset,
                                                           <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get list of child groups in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_addChildGroupsToParentGroup">Function: SharingRegistryService.addChildGroupsToParentGroup</h4>
-<pre><code>bool</code> addChildGroupsToParentGroup(<code>list&lt;<code>string</code>&gt;</code> childIds,
+<pre><code>bool</code> addChildGroupsToParentGroup(<code>string</code> domainId,
+                                 <code>list&lt;<code>string</code>&gt;</code> childIds,
                                  <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to add a child group to a parent group.</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeChildGroupFromParentGroup">Function: SharingRegistryService.removeChildGroupFromParentGroup</h4>
-<pre><code>bool</code> removeChildGroupFromParentGroup(<code>string</code> childId,
+<pre><code>bool</code> removeChildGroupFromParentGroup(<code>string</code> domainId,
+                                     <code>string</code> childId,
                                      <code>string</code> groupId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to remove a child group from parent group.</p>
@@ -169,11 +179,13 @@
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to update entity type</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntityType">Function: SharingRegistryService.deleteEntityType</h4>
-<pre><code>bool</code> deleteEntityType(<code>string</code> entityTypeId)
+<pre><code>bool</code> deleteEntityType(<code>string</code> domainId,
+                      <code>string</code> entityTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to delete entity type</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityType">Function: SharingRegistryService.getEntityType</h4>
-<pre><code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> getEntityType(<code>string</code> entityTypeId)
+<pre><code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> getEntityType(<code>string</code> domainId,
+                                        <code>string</code> entityTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get an entity type</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityTypes">Function: SharingRegistryService.getEntityTypes</h4>
@@ -191,15 +203,18 @@
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to update entity</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntity">Function: SharingRegistryService.deleteEntity</h4>
-<pre><code>bool</code> deleteEntity(<code>string</code> entityId)
+<pre><code>bool</code> deleteEntity(<code>string</code> domainId,
+                  <code>string</code> entityId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to delete entity</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntity">Function: SharingRegistryService.getEntity</h4>
-<pre><code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> getEntity(<code>string</code> entityId)
+<pre><code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> getEntity(<code>string</code> domainId,
+                                <code>string</code> entityId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get entity</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_searchEntities">Function: SharingRegistryService.searchEntities</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code>&gt;</code> searchEntities(<code>string</code> userId,
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code>&gt;</code> searchEntities(<code>string</code> domainId,
+                                           <code>string</code> userId,
                                            <code>string</code> entityTypeId,
                                            <code>list&lt;<code><a href="sharing_models.html#Struct_SearchCriteria">sharing_models.SearchCriteria</a></code>&gt;</code> filters,
                                            <code>i32</code> offset,
@@ -207,12 +222,14 @@
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to search entities</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedUsers">Function: SharingRegistryService.getListOfSharedUsers</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getListOfSharedUsers(<code>string</code> entityId,
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getListOfSharedUsers(<code>string</code> domainId,
+                                               <code>string</code> entityId,
                                                <code>string</code> permissionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get a list of shared users given the entity id</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedGroups">Function: SharingRegistryService.getListOfSharedGroups</h4>
-<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getListOfSharedGroups(<code>string</code> entityId,
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getListOfSharedGroups(<code>string</code> domainId,
+                                                     <code>string</code> entityId,
                                                      <code>string</code> permissionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get a list of shared groups given the entity id</p>
@@ -225,11 +242,13 @@
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to update permission type</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deletePermissionType">Function: SharingRegistryService.deletePermissionType</h4>
-<pre><code>bool</code> deletePermissionType(<code>string</code> entityTypeId)
+<pre><code>bool</code> deletePermissionType(<code>string</code> domainId,
+                          <code>string</code> permissionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to delete permission type</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionType">Function: SharingRegistryService.getPermissionType</h4>
-<pre><code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> getPermissionType(<code>string</code> permissionTypeId)
+<pre><code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> getPermissionType(<code>string</code> domainId,
+                                                <code>string</code> permissionTypeId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
 </pre><p>API method to get permission type</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionTypes">Function: SharingRegistryService.getPermissionTypes</h4>

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
index 1d4dff8..5065c95 100644
--- a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
+++ b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html
@@ -145,7 +145,7 @@ will be same as the domain name</p>
 <tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 </table><br/><p>User is the model used to register a user in the system. Minimal user information will be required to provide
 regarding the user.</p>
-<li><b>userId</b> : Client provided user id. (The id is not system generated and it is a must to provide this id)</li>
+<li><b>userId</b> : User id provided by the client</li>
 <li><b>domainId</b> : Domain id for that user</li>
 <li><b>userName</b> : User name for the user</li>
 <li><b>firstName</b> : First name of the user</li>
@@ -157,7 +157,7 @@ regarding the user.</p>
 
 <br/></div><div class="definition"><h3 id="Struct_UserGroup">Struct: UserGroup</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
@@ -167,7 +167,7 @@ regarding the user.</p>
 <tr><td>8</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 </table><br/><p>User group is a collection of users.</p>
- <li>groupId : System generated grouo id. In the current implementation this is of the form domainId:name</li>
+ <li><b>groupId</b> : Group id provided by the client</li>
  <li><b>domainId</b> : Domain id for this user group</li>
  <li><b>name</b> : Name for the user group. should be one word</li>
  <li>description : Short description for the group.</li>
@@ -181,21 +181,22 @@ regarding the user.</p>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>parentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>childId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>3</td><td>childType</td><td><code><a href="#Enum_GroupChildType">GroupChildType</a></code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>childType</td><td><code><a href="#Enum_GroupChildType">GroupChildType</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 </table><br/><p>System internal data type to map group memberships</p>
 
 <br/></div><div class="definition"><h3 id="Struct_EntityType">Struct: EntityType</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>1</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 </table><br/><p>client defined entity types</p>
-<li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
+<li><b>entityTypeId</b> : Entity type id provided by the client</li>
 <li><b>domainId</b> : Domain id of the domain.</li>
 <li><b>name</b> : Name for the entity type. Should be a single word.</li>
 <li>description : Short description for the entity type.</li>
@@ -221,33 +222,33 @@ regarding the user.</p>
 <tr><td>5</td><td>parentEntityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>6</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>7</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>8</td><td>metadata</td><td><code>map&lt;<code>string</code>, <code>string</code>&gt;</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>binaryData</td><td><code>binary</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>9</td><td>fullText</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>10</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>11</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 </table><br/><p>Entity object which is used to register an entity in the system.</p>
-<li><b>entityId</b> : Client id provided by the client</li>
+<li><b>entityId</b> : Entity id provided by the client</li>
 <li><b>domainId</b> : Domain id</li>
 <li><b>entityTypeId</b> : Entity type id</li>
 <li><b>ownerId</b> : Owner id</li>
 <li>parentEntityId : Parent entity id</li>
 <li><b>name</b> : Name</li>
 <li>description : Short description for the entity</li>
-<li>metadata : Map of optional metadata</li>
+<li>binaryData : Any information stored in binary format</li>
 <li>fullText : A string which will be considered for full text search</li>
 <li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
 <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
 
 <br/></div><div class="definition"><h3 id="Struct_PermissionType">Struct: PermissionType</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
-<tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 </table><br/><p>Object for creating client defined permission type</p>
-<li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
+<li><b>permissionTypeId</b> : Permission type id provided by the client</li>
 <li><b>domainId</b> : Domain id</li>
 <li><b>name</b> : Single word name for the permission</li>
 <li>description : Short description for the permission type</li>
@@ -260,9 +261,10 @@ regarding the user.</p>
 <tr><td>2</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>3</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
 <tr><td>4</td><td>sharingType</td><td><code><a href="#Enum_SharingType">SharingType</a></code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>5</td><td>inheritedParentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>6</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
-<tr><td>7</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>inheritedParentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
 </table><br/><p>This is an internal enum type for managing sharings</p>
 
 <br/></div><div class="definition"><h3 id="Struct_SharingRegistryException">Exception: SharingRegistryException</h3>

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-service-docs/index.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/index.html b/modules/sharing-registry/sharing-service-docs/index.html
index 14f730b..d7a7868 100644
--- a/modules/sharing-registry/sharing-service-docs/index.html
+++ b/modules/sharing-registry/sharing-service-docs/index.html
@@ -7,7 +7,8 @@
 <div class="container-fluid">
     <h2>Welcome to Airavata Sharing Registry Service Documentation</h2>
 
-    <p>Airavata Data Sharing Registry Service is a general purpose data sharing and access controlling service.</p>
+    <p>Airavata Data Sharing Registry Service is a general purpose <em>Collaborative User Space Management Component</em> that can solve
+        your Scientific Data Management requirements related to sharing and access controlling.</p>
 
     <div>
         <ul><a href="#getting-started">Getting Started</a></ul>

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_cpi.thrift b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
index 274eb4b..f180738 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -56,11 +56,11 @@ service SharingRegistryService {
     /**
      <p>API method to delete user</p>
     */
-    bool deleteUser(1: required string userId) throws (1: sharing_models.SharingRegistryException sre)
+    bool deleteUser(1: required string domainId, 2: required string userId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get a user</p>
     */
-    sharing_models.User getUser(1: required string userId) throws (1: sharing_models.SharingRegistryException sre)
+    sharing_models.User getUser(1: required string domainId, 2: required string userId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get a list of users in a specific domain Users will be reverse sorted based on the created time.</p>
      <li>domainId : Domain id</li>
@@ -80,11 +80,11 @@ service SharingRegistryService {
     /**
      <p>API method to delete a group</p>
     */
-    bool deleteGroup(1: required string groupId) throws (1: sharing_models.SharingRegistryException sre)
+    bool deleteGroup(1: required string domainId, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get a group</p>
     */
-    sharing_models.UserGroup getGroup(1: required string groupId) throws (1: sharing_models.SharingRegistryException sre)
+    sharing_models.UserGroup getGroup(1: required string domainId, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get groups in a domainId. Results are reverse sorted based on created time.</p>
     */
@@ -93,27 +93,27 @@ service SharingRegistryService {
     /**
      <p>API method to add list of users to a group</p>
     */
-    bool addUsersToGroup(1: required list<string> userIds, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
+    bool addUsersToGroup(1: required string domainId, 2: required list<string> userIds, 3: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
     /**
      <p>API method to remove users from a group</p>
     */
-    bool removeUsersFromGroup(1: required list<string> userIds, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
+    bool removeUsersFromGroup(1: required string domainId, 2: required list<string> userIds, 3: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
     /**
      <p>API method to get list of child users in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
     */
-    list<sharing_models.User> getGroupMembersOfTypeUser(1: required string groupId, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
+    list<sharing_models.User> getGroupMembersOfTypeUser(1: string domainId, 2: required string groupId, 3: required i32 offset, 4: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
     /**
      <p>API method to get list of child groups in a group. Only the direct members will be returned. Results are reverse time sorted based on creation time</p>
     */
-    list<sharing_models.UserGroup> getGroupMembersOfTypeGroup(1: required string groupId, 2: required i32 offset, 3: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
+    list<sharing_models.UserGroup> getGroupMembersOfTypeGroup(1: required string domainId, 2: required string groupId, 3: required i32 offset, 4: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
     /**
      <p>API method to add a child group to a parent group.</p>
     */
-    bool addChildGroupsToParentGroup(1: required list<string> childIds, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
+    bool addChildGroupsToParentGroup(1: required string domainId, 2: required list<string> childIds, 3: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
     /**
      <p>API method to remove a child group from parent group.</p>
     */
-    bool removeChildGroupFromParentGroup(1: required string childId, 2: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
+    bool removeChildGroupFromParentGroup(1: required string domainId, 2: required string childId, 3: required string groupId) throws (1: sharing_models.SharingRegistryException sre);
 
     /**
      <p>API method to create a new entity type</p>
@@ -126,11 +126,11 @@ service SharingRegistryService {
     /**
      <p>API method to delete entity type</p>
     */
-    bool deleteEntityType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    bool deleteEntityType(1: required string domainId, 2: required string entityTypeId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get an entity type</p>
     */
-    sharing_models.EntityType getEntityType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    sharing_models.EntityType getEntityType(1: required string domainId, 2: required string entityTypeId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get entity types in a domainId. Results are reverse time sorted based on creation time</p>
     */
@@ -148,23 +148,23 @@ service SharingRegistryService {
     /**
      <p>API method to delete entity</p>
     */
-    bool deleteEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException sre)
+    bool deleteEntity(1: required string domainId, 2: required string entityId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get entity</p>
     */
-    sharing_models.Entity getEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException sre)
+    sharing_models.Entity getEntity(1: required string domainId, 2: required string entityId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to search entities</p>
     */
-    list<sharing_models.Entity> searchEntities(1: required string userId, 2: required string entityTypeId, 3: required list<sharing_models.SearchCriteria> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.SharingRegistryException sre)
+    list<sharing_models.Entity> searchEntities(1: required string domainId, 2: required string userId, 3: required string entityTypeId, 4: required list<sharing_models.SearchCriteria> filters, 5: required i32 offset, 6: required i32 limit) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get a list of shared users given the entity id</p>
     */
-    list<sharing_models.User> getListOfSharedUsers(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    list<sharing_models.User> getListOfSharedUsers(1: required string domainId, 2: required string entityId, 3: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get a list of shared groups given the entity id</p>
     */
-    list<sharing_models.UserGroup> getListOfSharedGroups(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    list<sharing_models.UserGroup> getListOfSharedGroups(1: required string domainId, 2: required string entityId, 3: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
 
     /**
      <p>API method to create permission type</p>
@@ -177,11 +177,11 @@ service SharingRegistryService {
     /**
      <p>API method to delete permission type</p>
     */
-    bool deletePermissionType(1: required string entityTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    bool deletePermissionType(1: required string domainId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get permission type</p>
     */
-    sharing_models.PermissionType getPermissionType(1: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
+    sharing_models.PermissionType getPermissionType(1: required string domainId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to get list of permission types in a given domainId. Results are reverse time sorted based on creation time</p>
     */

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/thrift_models/sharing_models.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_models.thrift b/modules/sharing-registry/thrift_models/sharing_models.thrift
index f8c6f31..d4d15c4 100644
--- a/modules/sharing-registry/thrift_models/sharing_models.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_models.thrift
@@ -43,7 +43,7 @@ struct Domain {
 /**
 * <p>User is the model used to register a user in the system. Minimal user information will be required to provide
 * regarding the user.</p>
-* <li><b>userId</b> : Client provided user id. (The id is not system generated and it is a must to provide this id)</li>
+* <li><b>userId</b> : User id provided by the client</li>
 * <li><b>domainId</b> : Domain id for that user</li>
 * <li><b>userName</b> : User name for the user</li>
 * <li><b>firstName</b> : First name of the user</li>
@@ -84,7 +84,7 @@ enum GroupType {
 
 /**
 *<p>User group is a collection of users.</p>
-* <li>groupId : System generated grouo id. In the current implementation this is of the form domainId:name</li>
+* <li><b>groupId</b> : Group id provided by the client</li>
 * <li><b>domainId</b> : Domain id for this user group</li>
 * <li><b>name</b> : Name for the user group. should be one word</li>
 * <li>description : Short description for the group.</li>
@@ -95,7 +95,7 @@ enum GroupType {
 * <li>updatedTime : Will be set by the system</li>
 **/
 struct UserGroup {
- 1: optional string groupId = DO_NOT_SET_AT_CLIENTS_ID,
+ 1: optional string groupId,
  2: optional string domainId,
  3: optional string name,
  4: optional string description,
@@ -118,17 +118,18 @@ enum GroupChildType {
 * <p>System internal data type to map group memberships</p>
 **/
 struct GroupMembership {
-1: optional string parentId,
-2: optional string childId,
-3: optional GroupChildType childType
-4: optional i64 createdTime,
-5: optional i64 updatedTime
+    1: optional string parentId,
+    2: optional string childId,
+    3: optional string domainId,
+    4: optional GroupChildType childType
+    5: optional i64 createdTime,
+    6: optional i64 updatedTime
 }
 
 
 /**
 * <p>client defined entity types</p>
-* <li>entityTypeId : System generated entity type id. In the current implementation it will of the form domainId:name</li>
+* <li><b>entityTypeId</b> : Entity type id provided by the client</li>
 * <li><b>domainId</b> : Domain id of the domain.</li>
 * <li><b>name</b> : Name for the entity type. Should be a single word.</li>
 * <li>description : Short description for the entity type.</li>
@@ -136,7 +137,7 @@ struct GroupMembership {
 * <li>updatedTime : Will be set by the system</li>
 **/
 struct EntityType {
-    1: optional string entityTypeId = DO_NOT_SET_AT_CLIENTS_ID,
+    1: optional string entityTypeId,
     2: optional string domainId,
     3: optional string name,
     4: optional string description,
@@ -192,14 +193,14 @@ struct SearchCriteria {
 
 /**
 * <p>Entity object which is used to register an entity in the system.</p>
-* <li><b>entityId</b> : Client id provided by the client</li>
+* <li><b>entityId</b> : Entity id provided by the client</li>
 * <li><b>domainId</b> : Domain id</li>
 * <li><b>entityTypeId</b> : Entity type id</li>
 * <li><b>ownerId</b> : Owner id</li>
 * <li>parentEntityId : Parent entity id</li>
 * <li><b>name</b> : Name</li>
 * <li>description : Short description for the entity</li>
-* <li>metadata : Map of optional metadata</li>
+* <li>binaryData : Any information stored in binary format</li>
 * <li>fullText : A string which will be considered for full text search</li>
 * <li>createdTime : If client provides this value then the system will use it if not the current time will be set</li>
 * <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
@@ -212,7 +213,7 @@ struct Entity {
     5: optional string parentEntityId,
     6: optional string name,
     7: optional string description,
-    8: optional map<string,string> metadata,
+    8: optional binary binaryData,
     9: optional string fullText,
     10: optional i64 createdTime,
     11: optional i64 updatedTime
@@ -220,7 +221,7 @@ struct Entity {
 
 /**
 * <p>Object for creating client defined permission type</p>
-* <li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
+* <li><b>permissionTypeId</b> : Permission type id provided by the client</li>
 * <li><b>domainId</b> : Domain id</li>
 * <li><b>name</b> : Single word name for the permission</li>
 * <li>description : Short description for the permission type</li>
@@ -228,7 +229,7 @@ struct Entity {
 * <li>updatedTime : Will be set by the system</li>
 **/
 struct PermissionType {
-    1: optional string permissionTypeId = DO_NOT_SET_AT_CLIENTS_ID,
+    1: optional string permissionTypeId,
     2: optional string domainId,
     3: optional string name,
     4: optional string description,
@@ -253,9 +254,10 @@ struct Sharing {
     2: optional string entityId,
     3: optional string groupId,
     4: optional SharingType sharingType,
-    5: optional string inheritedParentId,
-    6: optional i64 createdTime,
-    7: optional i64 updatedTime
+    5: optional string domainId,
+    6: optional string inheritedParentId,
+    7: optional i64 createdTime,
+    8: optional i64 updatedTime
 }
 
 /**


[44/51] [abbrv] airavata git commit: adding initial how to use documents

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/sharing-service-docs/api-docs/style.css
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/api-docs/style.css b/modules/sharing-registry/sharing-service-docs/api-docs/style.css
new file mode 100644
index 0000000..34fd9d7
--- /dev/null
+++ b/modules/sharing-registry/sharing-service-docs/api-docs/style.css
@@ -0,0 +1,184 @@
+/*!
+ * Bootstrap v2.0.3
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
+.clearfix:after{clear:both;}
+.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
+.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
+input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover{color:#005580;text-decoration:underline;}
+.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
+.row:after{clear:both;}
+[class*="span"]{float:left;margin-left:20px;}
+.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
+.span12{width:940px;}
+.span11{width:860px;}
+.span10{width:780px;}
+.span9{width:700px;}
+.span8{width:620px;}
+.span7{width:540px;}
+.span6{width:460px;}
+.span5{width:380px;}
+.span4{width:300px;}
+.span3{width:220px;}
+.span2{width:140px;}
+.span1{width:60px;}
+.offset12{margin-left:980px;}
+.offset11{margin-left:900px;}
+.offset10{margin-left:820px;}
+.offset9{margin-left:740px;}
+.offset8{margin-left:660px;}
+.offset7{margin-left:580px;}
+.offset6{margin-left:500px;}
+.offset5{margin-left:420px;}
+.offset4{margin-left:340px;}
+.offset3{margin-left:260px;}
+.offset2{margin-left:180px;}
+.offset1{margin-left:100px;}
+.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
+.row-fluid:after{clear:both;}
+.row-fluid [class*="span"]{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574%;*margin-left:2.0744680846382977%;}
+.row-fluid [class*="span"]:first-child{margin-left:0;}
+.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%;}
+.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%;}
+.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%;}
+.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%;}
+.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%;}
+.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%;}
+.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%;}
+.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%;}
+.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%;}
+.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%;}
+.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%;}
+.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%;}
+.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
+.container:after{clear:both;}
+.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
+.container-fluid:after{clear:both;}
+p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
+.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
+h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
+h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
+h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
+h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;}
+h4,h5,h6{line-height:18px;}
+h4{font-size:14px;}h4 small{font-size:12px;}
+h5{font-size:12px;}
+h6{font-size:11px;color:#999999;text-transform:uppercase;}
+.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
+.page-header h1{line-height:1;}
+ul,ol{padding:0;margin:0 0 9px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+ul{list-style:disc;}
+ol{list-style:decimal;}
+li{line-height:18px;}
+ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
+dl{margin-bottom:18px;}
+dt,dd{line-height:18px;}
+dt{font-weight:bold;line-height:17px;}
+dd{margin-left:9px;}
+.dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+.dl-horizontal dd{margin-left:130px;}
+hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+.muted{color:#999999;}
+abbr[title]{cursor:help;border-bottom:1px dotted #ddd;}
+abbr.initialism{font-size:90%;text-transform:uppercase;}
+blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
+blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;}
+small{font-size:100%;}
+cite{font-style:normal;}
+code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
+pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;}
+pre code{padding:0;color:inherit;background-color:transparent;border:0;}
+.pre-scrollable{max-height:340px;overflow-y:scroll;}
+.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
+.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
+a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
+.label-important,.badge-important{background-color:#b94a48;}
+.label-important[href],.badge-important[href]{background-color:#953b39;}
+.label-warning,.badge-warning{background-color:#f89406;}
+.label-warning[href],.badge-warning[href]{background-color:#c67605;}
+.label-success,.badge-success{background-color:#468847;}
+.label-success[href],.badge-success[href]{background-color:#356635;}
+.label-info,.badge-info{background-color:#3a87ad;}
+.label-info[href],.badge-info[href]{background-color:#2d6987;}
+.label-inverse,.badge-inverse{background-color:#333333;}
+.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
+table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
+.table th{font-weight:bold;}
+.table thead th{vertical-align:bottom;}
+.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #dddddd;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
+.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;}
+.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
+.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
+.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
+.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
+.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
+table .span1{float:none;width:44px;margin-left:0;}
+table .span2{float:none;width:124px;margin-left:0;}
+table .span3{float:none;width:204px;margin-left:0;}
+table .span4{float:none;width:284px;margin-left:0;}
+table .span5{float:none;width:364px;margin-left:0;}
+table .span6{float:none;width:444px;margin-left:0;}
+table .span7{float:none;width:524px;margin-left:0;}
+table .span8{float:none;width:604px;margin-left:0;}
+table .span9{float:none;width:684px;margin-left:0;}
+table .span10{float:none;width:764px;margin-left:0;}
+table .span11{float:none;width:844px;margin-left:0;}
+table .span12{float:none;width:924px;margin-left:0;}
+table .span13{float:none;width:1004px;margin-left:0;}
+table .span14{float:none;width:1084px;margin-left:0;}
+table .span15{float:none;width:1164px;margin-left:0;}
+table .span16{float:none;width:1244px;margin-left:0;}
+table .span17{float:none;width:1324px;margin-left:0;}
+table .span18{float:none;width:1404px;margin-left:0;}
+table .span19{float:none;width:1484px;margin-left:0;}
+table .span20{float:none;width:1564px;margin-left:0;}
+table .span21{float:none;width:1644px;margin-left:0;}
+table .span22{float:none;width:1724px;margin-left:0;}
+table .span23{float:none;width:1804px;margin-left:0;}
+table .span24{float:none;width:1884px;margin-left:0;}
+/* Auto-generated CSS for generated Thrift docs */
+h3, h4 { margin-bottom: 6px; }
+div.definition { border: 1px solid #CCC; margin-bottom: 10px; padding: 10px; }
+div.extends { margin: -0.5em 0 1em 5em }
+td { vertical-align: top; }
+table { empty-cells: show; }
+code { line-height: 20px; }
+.table-bordered th, .table-bordered td { border-bottom: 1px solid #DDDDDD; }

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/sharing-service-docs/index.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/index.html b/modules/sharing-registry/sharing-service-docs/index.html
new file mode 100644
index 0000000..14f730b
--- /dev/null
+++ b/modules/sharing-registry/sharing-service-docs/index.html
@@ -0,0 +1,93 @@
+<html>
+<head>
+    <title>Airavata Sharing Registry Service</title>
+    <link href="style.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<div class="container-fluid">
+    <h2>Welcome to Airavata Sharing Registry Service Documentation</h2>
+
+    <p>Airavata Data Sharing Registry Service is a general purpose data sharing and access controlling service.</p>
+
+    <div>
+        <ul><a href="#getting-started">Getting Started</a></ul>
+        <ul><a href="./api-docs/index.html" target="_blank">API Docs</a></ul>
+    </div>
+    <div id="#getting-started">
+        <h3>Getting started with Java client</h3>
+
+        <div class="definition">
+            <h4>0. Required maven dependencies</h4>
+            <pre>
+                &lt;dependency&gt;
+                    &lt;groupId>org.apache.airavata&lt;/groupId&gt;
+                    &lt;artifactId>airavata-sharing-registry-stubs&lt;/artifactId&gt;
+                    &lt;version>0.17-SNAPSHOT&lt;/version&gt;
+                &lt;/dependency&gt;
+
+                &lt;dependency&gt;
+                    &lt;groupId>org.apache.thrift&lt;/groupId&gt;
+                    &lt;artifactId>libthrift&lt;/artifactId&gt;
+                    &lt;version>0.9.3&lt;/version&gt;
+                &lt;/dependency&gt;
+            </pre>
+        </div>
+
+        <div class="definition">
+            <h4>1. Creating the thrift client</h4>
+            <pre>
+                //should use the correct host name and port here
+                String serverHost = "gw56.iu.xsede.org";
+                int serverPort = 7878;
+
+                TTransport transport = new TSocket(serverHost, serverPort);
+                transport.open();
+                TProtocol protocol = new TBinaryProtocol(transport);
+                SharingRegistryService.Client sharingServiceClient = new SharingRegistryService.Client(protocol);
+            </pre>
+        </div>
+
+        <div class="definition">
+            <h4>2. Create a domain</h4>
+            <pre>
+                Domain domain = new Domain();
+                //has to be one word
+                domain.setName("test-domain");
+                //optional
+                domain.setDescription("test domain description");
+
+                //domain id will be same as domain name
+                String domainId = sharingServiceClient.createDomain(domain);
+            </pre>
+        </div>
+
+        <div class="definition">
+            <h4>2. Create User</h4>
+            <pre>
+                User user = new User();
+                //required
+                user.setUserName("test-user");
+                //required
+                user.setDomainId(domainId);
+                //required
+                user.setFirstName("John");
+                //required
+                user.setLastName("Doe");
+                //required
+                user.setEmail("john.doe@abc.com");
+                //optional - this should be bytes of the users image icon
+                byte[] icon = new byte[10];
+                user.setIcon(icon);
+
+                //can be manually set. otherwise will be set to the current time by the system
+                user.setCreatedTime(System.currentTimeMillis());
+                user.setUpdatedTime(System.currentTimeMillis());
+
+                //will be of form &lt;domainId&gt;:&lt;userName&gt;
+                String userId = sharingServiceClient.createUser(user);
+            </pre>
+        </div>
+    </div>
+</div>
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/sharing-service-docs/style.css
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-service-docs/style.css b/modules/sharing-registry/sharing-service-docs/style.css
new file mode 100644
index 0000000..34fd9d7
--- /dev/null
+++ b/modules/sharing-registry/sharing-service-docs/style.css
@@ -0,0 +1,184 @@
+/*!
+ * Bootstrap v2.0.3
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
+.clearfix:after{clear:both;}
+.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
+.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
+input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover{color:#005580;text-decoration:underline;}
+.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
+.row:after{clear:both;}
+[class*="span"]{float:left;margin-left:20px;}
+.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
+.span12{width:940px;}
+.span11{width:860px;}
+.span10{width:780px;}
+.span9{width:700px;}
+.span8{width:620px;}
+.span7{width:540px;}
+.span6{width:460px;}
+.span5{width:380px;}
+.span4{width:300px;}
+.span3{width:220px;}
+.span2{width:140px;}
+.span1{width:60px;}
+.offset12{margin-left:980px;}
+.offset11{margin-left:900px;}
+.offset10{margin-left:820px;}
+.offset9{margin-left:740px;}
+.offset8{margin-left:660px;}
+.offset7{margin-left:580px;}
+.offset6{margin-left:500px;}
+.offset5{margin-left:420px;}
+.offset4{margin-left:340px;}
+.offset3{margin-left:260px;}
+.offset2{margin-left:180px;}
+.offset1{margin-left:100px;}
+.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
+.row-fluid:after{clear:both;}
+.row-fluid [class*="span"]{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574%;*margin-left:2.0744680846382977%;}
+.row-fluid [class*="span"]:first-child{margin-left:0;}
+.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%;}
+.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%;}
+.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%;}
+.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%;}
+.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%;}
+.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%;}
+.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%;}
+.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%;}
+.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%;}
+.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%;}
+.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%;}
+.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%;}
+.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
+.container:after{clear:both;}
+.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
+.container-fluid:after{clear:both;}
+p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
+.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
+h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
+h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
+h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
+h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;}
+h4,h5,h6{line-height:18px;}
+h4{font-size:14px;}h4 small{font-size:12px;}
+h5{font-size:12px;}
+h6{font-size:11px;color:#999999;text-transform:uppercase;}
+.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
+.page-header h1{line-height:1;}
+ul,ol{padding:0;margin:0 0 9px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+ul{list-style:disc;}
+ol{list-style:decimal;}
+li{line-height:18px;}
+ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
+dl{margin-bottom:18px;}
+dt,dd{line-height:18px;}
+dt{font-weight:bold;line-height:17px;}
+dd{margin-left:9px;}
+.dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+.dl-horizontal dd{margin-left:130px;}
+hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+.muted{color:#999999;}
+abbr[title]{cursor:help;border-bottom:1px dotted #ddd;}
+abbr.initialism{font-size:90%;text-transform:uppercase;}
+blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
+blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;}
+small{font-size:100%;}
+cite{font-style:normal;}
+code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
+pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;}
+pre code{padding:0;color:inherit;background-color:transparent;border:0;}
+.pre-scrollable{max-height:340px;overflow-y:scroll;}
+.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
+.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
+a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
+.label-important,.badge-important{background-color:#b94a48;}
+.label-important[href],.badge-important[href]{background-color:#953b39;}
+.label-warning,.badge-warning{background-color:#f89406;}
+.label-warning[href],.badge-warning[href]{background-color:#c67605;}
+.label-success,.badge-success{background-color:#468847;}
+.label-success[href],.badge-success[href]{background-color:#356635;}
+.label-info,.badge-info{background-color:#3a87ad;}
+.label-info[href],.badge-info[href]{background-color:#2d6987;}
+.label-inverse,.badge-inverse{background-color:#333333;}
+.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
+table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
+.table th{font-weight:bold;}
+.table thead th{vertical-align:bottom;}
+.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #dddddd;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
+.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;}
+.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
+.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
+.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
+.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
+.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
+table .span1{float:none;width:44px;margin-left:0;}
+table .span2{float:none;width:124px;margin-left:0;}
+table .span3{float:none;width:204px;margin-left:0;}
+table .span4{float:none;width:284px;margin-left:0;}
+table .span5{float:none;width:364px;margin-left:0;}
+table .span6{float:none;width:444px;margin-left:0;}
+table .span7{float:none;width:524px;margin-left:0;}
+table .span8{float:none;width:604px;margin-left:0;}
+table .span9{float:none;width:684px;margin-left:0;}
+table .span10{float:none;width:764px;margin-left:0;}
+table .span11{float:none;width:844px;margin-left:0;}
+table .span12{float:none;width:924px;margin-left:0;}
+table .span13{float:none;width:1004px;margin-left:0;}
+table .span14{float:none;width:1084px;margin-left:0;}
+table .span15{float:none;width:1164px;margin-left:0;}
+table .span16{float:none;width:1244px;margin-left:0;}
+table .span17{float:none;width:1324px;margin-left:0;}
+table .span18{float:none;width:1404px;margin-left:0;}
+table .span19{float:none;width:1484px;margin-left:0;}
+table .span20{float:none;width:1564px;margin-left:0;}
+table .span21{float:none;width:1644px;margin-left:0;}
+table .span22{float:none;width:1724px;margin-left:0;}
+table .span23{float:none;width:1804px;margin-left:0;}
+table .span24{float:none;width:1884px;margin-left:0;}
+/* Auto-generated CSS for generated Thrift docs */
+h3, h4 { margin-bottom: 6px; }
+div.definition { border: 1px solid #CCC; margin-bottom: 10px; padding: 10px; }
+div.extends { margin: -0.5em 0 1em 5em }
+td { vertical-align: top; }
+table { empty-cells: show; }
+code { line-height: 20px; }
+.table-bordered th, .table-bordered td { border-bottom: 1px solid #DDDDDD; }

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_cpi.thrift b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
index 6acae6d..274eb4b 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -27,11 +27,11 @@ service SharingRegistryService {
     /**
       <p>API method to create a new domain</p>
     */
-    string createDomain(1: required sharing_models.Domain domainId) throws (1: sharing_models.SharingRegistryException sre)
+    string createDomain(1: required sharing_models.Domain domain) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to update a domain</p>
     */
-    bool updateDomain(1: required sharing_models.Domain domainId) throws (1: sharing_models.SharingRegistryException sre)
+    bool updateDomain(1: required sharing_models.Domain domain) throws (1: sharing_models.SharingRegistryException sre)
     /**
      <p>API method to delete domain</p>
     */

http://git-wip-us.apache.org/repos/asf/airavata/blob/61a0fc95/modules/sharing-registry/thrift_models/thrift-gen.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/thrift-gen.sh b/modules/sharing-registry/thrift_models/thrift-gen.sh
index 89d2efd..7449682 100755
--- a/modules/sharing-registry/thrift_models/thrift-gen.sh
+++ b/modules/sharing-registry/thrift_models/thrift-gen.sh
@@ -18,5 +18,5 @@ rm -r gen-java
 thrift --gen html sharing_models.thrift
 thrift --gen html sharing_cpi.thrift
 
-rm -r ../api-docs
-mv gen-html ../api-docs
+rm -r ../sharing-service-docs/api-docs
+mv gen-html ../sharing-service-docs/api-docs


[16/51] [abbrv] airavata git commit: moving credential-store data model thrift file to data-models directory

Posted by sc...@apache.org.
moving credential-store data model thrift file to data-models directory


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

Branch: refs/heads/airavata-gov-registry
Commit: c9e26ec359c79d3d321e67060aac994941523e2f
Parents: 8e59d80
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Wed Oct 12 16:36:46 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 16:36:46 2016 -0400

----------------------------------------------------------------------
 .../component-cpis/credential-store-cpi.thrift  |  2 +-
 .../credential_store_data_models.thrift         | 72 --------------------
 .../credential_store_data_models.thrift         | 72 ++++++++++++++++++++
 .../generate-thrift-stubs.sh                    | 24 +++++++
 4 files changed, 97 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c9e26ec3/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
index 36e7980..923a192 100644
--- a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
+++ b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
@@ -23,7 +23,7 @@
  *
 */
 
-include "credential_store_data_models.thrift"
+include "../data-models/credential-store-models/credential_store_data_models.thrift"
 include "credential_store_errors.thrift"
 
 namespace java org.apache.airavata.credential.store.cpi

http://git-wip-us.apache.org/repos/asf/airavata/blob/c9e26ec3/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift b/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
deleted file mode 100644
index f2c2c77..0000000
--- a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
+++ /dev/null
@@ -1,72 +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.credential.store.datamodel
-namespace php Airavata.Model.Credential.Store
-
-const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS"
-
-struct SSHCredential {
-    1: required string gatewayId,
-    2: required string username,
-    3: optional string passphrase,
-    4: optional string publicKey,
-    5: optional string privateKey,
-    6: optional i64 persistedTime,
-    7: optional string token,
-    8: optional string description
-}
-
-struct SSHCredentialSummary {
-    1: required string gatewayId,
-    2: required string username,
-    3: optional string publicKey,
-    4: optional i64 persistedTime,
-    5: required string token,
-    6: optional string description
-}
-
-struct CommunityUser {
-    1: required string gatewayName,
-    2: required string username,
-    3: required string userEmail
-}
-
-struct CertificateCredential {
-    1: required CommunityUser communityUser,
-    2: required string x509Cert,
-    3: optional string notAfter,
-    4: optional string privateKey,
-    5: optional i64 lifeTime,
-    6: optional string notBefore
-    7: optional i64 persistedTime,
-    8: optional string token
-}
-
-struct PasswordCredential {
-    1: required string gatewayId,
-    2: required string portalUserName,
-    3: required string loginUserName,
-    4: required string password,
-    5: optional string description,
-    6: optional i64 persistedTime,
-    7: optional string token
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c9e26ec3/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift b/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift
new file mode 100644
index 0000000..f2c2c77
--- /dev/null
+++ b/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift
@@ -0,0 +1,72 @@
+/*
+ * 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.credential.store.datamodel
+namespace php Airavata.Model.Credential.Store
+
+const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS"
+
+struct SSHCredential {
+    1: required string gatewayId,
+    2: required string username,
+    3: optional string passphrase,
+    4: optional string publicKey,
+    5: optional string privateKey,
+    6: optional i64 persistedTime,
+    7: optional string token,
+    8: optional string description
+}
+
+struct SSHCredentialSummary {
+    1: required string gatewayId,
+    2: required string username,
+    3: optional string publicKey,
+    4: optional i64 persistedTime,
+    5: required string token,
+    6: optional string description
+}
+
+struct CommunityUser {
+    1: required string gatewayName,
+    2: required string username,
+    3: required string userEmail
+}
+
+struct CertificateCredential {
+    1: required CommunityUser communityUser,
+    2: required string x509Cert,
+    3: optional string notAfter,
+    4: optional string privateKey,
+    5: optional i64 lifeTime,
+    6: optional string notBefore
+    7: optional i64 persistedTime,
+    8: optional string token
+}
+
+struct PasswordCredential {
+    1: required string gatewayId,
+    2: required string portalUserName,
+    3: required string loginUserName,
+    4: required string password,
+    5: optional string description,
+    6: optional i64 persistedTime,
+    7: optional string token
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c9e26ec3/thrift-interface-descriptions/generate-thrift-stubs.sh
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/generate-thrift-stubs.sh b/thrift-interface-descriptions/generate-thrift-stubs.sh
index 4a9550a..949ce2e 100755
--- a/thrift-interface-descriptions/generate-thrift-stubs.sh
+++ b/thrift-interface-descriptions/generate-thrift-stubs.sh
@@ -69,12 +69,14 @@ DATAMODEL_THRIFT_FILE='data-models/airavata_data_models.thrift'
 APP_CATALOG_THRIFT_FILE='data-models/app-catalog-models/app_catalog_models.thrift'
 RESOURCE_CATALOG_THRIFT_FILE='data-models/resource-catalog-models/resource_catalog_models.thrift'
 WORKFLOW_THRIFT_FILE='data-models/workflow-models/workflow_data_model.thrift'
+CREDENTIAL_STORE_DATAMODEL_THRIFT_FILE='data-models/credential-store-models/credential_store_data_models.thrift'
 
 DATAMODEL_SRC_DIR='../airavata-api/airavata-data-models/src/main/java'
 JAVA_API_SDK_DIR='../airavata-api/airavata-api-stubs/src/main/java'
 PHP_SDK_DIR='../airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib'
 CPP_SDK_DIR='../airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/'
 PYTHON_SDK_DIR='../airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/'
+CREDENTIAL_DATAMODEL_SRC_DIR='../modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel'
 
 # Initialize the thrift arguments.
 #  Since most of the Airavata API and Data Models have includes, use recursive option by default.
@@ -184,6 +186,27 @@ generate_java_stubs() {
     # As a precaution  remove and previously generated files if exists
     rm -rf ${JAVA_GEN_DIR}
 
+    # Generate the credential store data models in move them to respective modules/credential-store directory
+
+     $THRIFT_EXEC ${THRIFT_ARGS} --gen java:beans ${CREDENTIAL_STORE_DATAMODEL_THRIFT_FILE} || fail unable to generate java bean thrift classes on app workflow data models
+
+    # For the generated java beans add the ASF V2 License header
+    add_license_header $JAVA_BEAN_GEN_DIR
+
+    # Compare the newly generated beans with existing sources and replace the changed ones.
+    copy_changed_files ${JAVA_BEAN_GEN_DIR}/org/apache/airavata/credential/store/datamodel} ${CREDENTIAL_DATAMODEL_SRC_DIR}
+
+    ###############################################################################
+    # Generate/Update source used by Airavata Server Skeletons & Java Client Stubs #
+    #  JAVA server and client both use generated api-boilerplate-code             #
+    ###############################################################################
+
+    #Java generation directory
+    JAVA_GEN_DIR=${BASE_TARGET_DIR}/gen-java
+
+    # As a precaution  remove and previously generated files if exists
+    rm -rf ${JAVA_GEN_DIR}
+
     # Using thrift Java generator, generate the java classes based on Airavata API. This
     #   The airavata_api.thrift includes rest of data models.
     $THRIFT_EXEC ${THRIFT_ARGS} --gen java ${AIRAVATA_API_THRIFT_FILE} || fail unable to generate java thrift classes on AiravataAPI
@@ -216,6 +239,7 @@ generate_php_stubs() {
     $THRIFT_EXEC ${THRIFT_ARGS} --gen php:autoload ${APP_CATALOG_THRIFT_FILE}  || fail unable to generate PHP thrift classes
     $THRIFT_EXEC ${THRIFT_ARGS} --gen php:autoload ${RESOURCE_CATALOG_THRIFT_FILE}   || fail unable to generate PHP thrift classes
     $THRIFT_EXEC ${THRIFT_ARGS} --gen php:autoload ${AIRAVATA_API_THRIFT_FILE} || fail unable to generate PHP thrift classes
+    $THRIFT_EXEC ${THRIFT_ARGS} --gen php:autoload ${CREDENTIAL_STORE_DATAMODEL_THRIFT_FILE} || fail unable to generate PHP thrift classes
 
     # For the generated java classes add the ASF V2 License header
     ## TODO Write PHP license parser


[15/51] [abbrv] airavata git commit: Approved and merge pull request 52 into develop branch

Posted by sc...@apache.org.
Approved and merge pull request 52 into develop branch


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

Branch: refs/heads/airavata-gov-registry
Commit: 6250ff1dcd72f54bca5333d3c71729b12578f740
Parents: 7c6c562 1b91dd1
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Wed Oct 12 15:37:33 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Wed Oct 12 15:37:33 2016 -0400

----------------------------------------------------------------------
 .../airavata/compute_resource_model_types.cpp   |  28 ++--
 .../lib/airavata/compute_resource_model_types.h |  13 +-
 .../Model/AppCatalog/ComputeResource/Types.php  |   2 +
 .../model/appcatalog/computeresource/ttypes.py  |   5 +
 .../computeresource/LOCALSubmission.java        |  53 +++----
 .../appcatalog/computeresource/MonitorMode.java |   5 +-
 .../server/src/main/resources/gfac-config.yaml  |   4 +-
 .../airavata/gfac/impl/GFacEngineImpl.java      |  11 +-
 .../apache/airavata/gfac/impl/HTTPUtils.java    |   7 +
 .../airavata/gfac/impl/LocalRemoteCluster.java  |  42 +++++-
 .../gfac/impl/task/LocalJobSubmissionTask.java  | 150 ++++++++++---------
 .../airavata/gfac/impl/task/TaskUtils.java      |   2 +-
 .../cpi/impl/SimpleOrchestratorImpl.java        |  12 +-
 .../app/catalog/impl/ComputeResourceImpl.java   |   1 +
 .../core/app/catalog/model/LocalSubmission.java |  11 ++
 .../resources/LocalSubmissionResource.java      |  12 +-
 .../app/catalog/util/AppCatalogJPAUtils.java    |   1 +
 .../util/AppCatalogThriftConversion.java        |   1 +
 .../src/main/resources/appcatalog-derby.sql     |   1 +
 .../src/main/resources/appcatalog-mysql.sql     |   1 +
 .../compute_resource_model.thrift               |   5 +-
 21 files changed, 228 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6250ff1d/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/6250ff1d/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/6250ff1d/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------


[07/51] [abbrv] airavata git commit: Correcting the create table query which was failing during build

Posted by sc...@apache.org.
Correcting the create table query which was failing during build


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

Branch: refs/heads/airavata-gov-registry
Commit: cc7496024032fc8d0f8e8b4bba3b932cb11d674f
Parents: c31cfa6
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Wed Oct 12 11:30:31 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 11:32:57 2016 -0400

----------------------------------------------------------------------
 .../credential/store/store/impl/db/CredentialsDAOTest.java        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/cc749602/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAOTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAOTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAOTest.java
index c175454..1750adc 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAOTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAOTest.java
@@ -72,13 +72,14 @@ public class CredentialsDAOTest extends DatabaseTestCases {
          * "        REQUESTED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',\n" +
          * "        PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME)\n" + ")";
          */
-
+        // Adding description field as per pull request https://github.com/apache/airavata/pull/54
         String createTable = "CREATE TABLE CREDENTIALS\n" + "(\n"
                 + "        GATEWAY_ID VARCHAR(256) NOT NULL,\n"
                 + "        TOKEN_ID VARCHAR(256) NOT NULL,\n"
                 + // Actual token used to identify the credential
                 "        CREDENTIAL BLOB NOT NULL,\n" + "        PORTAL_USER_ID VARCHAR(256) NOT NULL,\n"
                 + "        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n"
+                + "        DESCRIPTION VARCHAR(500),\n"
                 + "        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)\n" + ")";
 
         String dropTable = "drop table CREDENTIALS";


[27/51] [abbrv] airavata git commit: adding separate distribution

Posted by sc...@apache.org.
adding separate distribution


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

Branch: refs/heads/airavata-gov-registry
Commit: e36c145d0fa794d0a56be117f321c30fbce1189a
Parents: a8e0333
Author: scnakandala <su...@gmail.com>
Authored: Thu Oct 13 16:30:27 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Oct 13 16:30:40 2016 -0400

----------------------------------------------------------------------
 airavata-api/airavata-api-server/pom.xml        |   2 +-
 modules/sharing-registry/pom.xml                |  11 +-
 .../sharing-data-migrator/pom.xml               |   2 +-
 .../sharing-registry-core/pom.xml               | 104 ----
 .../registry/db/entities/DomainEntity.java      | 113 ----
 .../registry/db/entities/EntityEntity.java      | 192 ------
 .../registry/db/entities/EntityTypeEntity.java  | 125 ----
 .../db/entities/GroupMembershipEntity.java      | 112 ----
 .../db/entities/GroupMembershipEntityPK.java    |  74 ---
 .../db/entities/PermissionTypeEntity.java       | 125 ----
 .../registry/db/entities/SharingEntity.java     | 136 ----
 .../registry/db/entities/SharingEntityPK.java   |  99 ---
 .../registry/db/entities/SharingUserEntity.java | 146 -----
 .../registry/db/entities/UserGroupEntity.java   | 150 -----
 .../db/repositories/AbstractRepository.java     | 138 -----
 .../db/repositories/DomainRepository.java       |  34 -
 .../db/repositories/EntityRepository.java       |  86 ---
 .../db/repositories/EntityTypeRepository.java   |  34 -
 .../repositories/GroupMembershipRepository.java |  98 ---
 .../repositories/PermissionTypeRepository.java  |  52 --
 .../db/repositories/SharingRepository.java      |  80 ---
 .../db/repositories/UserGroupRepository.java    |  51 --
 .../db/repositories/UserRepository.java         |  51 --
 .../sharing/registry/db/utils/Committer.java    |  27 -
 .../registry/db/utils/ConnectionPool.java       | 382 ------------
 .../sharing/registry/db/utils/DBConstants.java  | 101 ---
 .../registry/db/utils/DatabaseCreator.java      | 353 -----------
 .../sharing/registry/db/utils/JPAUtils.java     | 230 -------
 .../sharing/registry/db/utils/JdbcStorage.java  | 175 ------
 .../db/utils/ObjectMapperSingleton.java         |  39 --
 .../registry/server/SharingRegistryServer.java  |  28 -
 .../server/SharingRegistryServerHandler.java    | 613 -------------------
 .../src/main/resources/META-INF/persistence.xml |  15 -
 .../main/resources/sharing-registry-derby.sql   | 141 -----
 .../main/resources/sharing-registry-mysql.sql   | 141 -----
 .../SharingRegistryServerHandlerTest.java       | 290 ---------
 .../sharing/registry/util/Initialize.java       | 298 ---------
 .../sharing-registry-distribution/pom.xml       |  91 +++
 .../src/main/assembly/bin-assembly.xml          |  69 +++
 .../src/main/resources/bin/setenv.sh            |  65 ++
 .../src/main/resources/bin/sharing-registry.sh  |  87 +++
 .../sharing-registry-server/pom.xml             |  99 +++
 .../registry/db/entities/DomainEntity.java      | 113 ++++
 .../registry/db/entities/EntityEntity.java      | 192 ++++++
 .../registry/db/entities/EntityTypeEntity.java  | 125 ++++
 .../db/entities/GroupMembershipEntity.java      | 112 ++++
 .../db/entities/GroupMembershipEntityPK.java    |  74 +++
 .../db/entities/PermissionTypeEntity.java       | 125 ++++
 .../registry/db/entities/SharingEntity.java     | 136 ++++
 .../registry/db/entities/SharingEntityPK.java   |  99 +++
 .../registry/db/entities/SharingUserEntity.java | 146 +++++
 .../registry/db/entities/UserGroupEntity.java   | 150 +++++
 .../db/repositories/AbstractRepository.java     | 138 +++++
 .../db/repositories/DomainRepository.java       |  34 +
 .../db/repositories/EntityRepository.java       |  86 +++
 .../db/repositories/EntityTypeRepository.java   |  34 +
 .../repositories/GroupMembershipRepository.java |  98 +++
 .../repositories/PermissionTypeRepository.java  |  52 ++
 .../db/repositories/SharingRepository.java      |  80 +++
 .../db/repositories/UserGroupRepository.java    |  51 ++
 .../db/repositories/UserRepository.java         |  51 ++
 .../sharing/registry/db/utils/Committer.java    |  27 +
 .../registry/db/utils/ConnectionPool.java       | 382 ++++++++++++
 .../sharing/registry/db/utils/DBConstants.java  | 101 +++
 .../registry/db/utils/DatabaseCreator.java      | 353 +++++++++++
 .../sharing/registry/db/utils/JPAUtils.java     | 230 +++++++
 .../sharing/registry/db/utils/JdbcStorage.java  | 175 ++++++
 .../db/utils/ObjectMapperSingleton.java         |  39 ++
 .../registry/server/SharingRegistryServer.java  |  28 +
 .../server/SharingRegistryServerHandler.java    | 613 +++++++++++++++++++
 .../src/main/resources/META-INF/persistence.xml |  15 +
 .../main/resources/sharing-registry-derby.sql   | 141 +++++
 .../main/resources/sharing-registry-mysql.sql   | 141 +++++
 .../SharingRegistryServerHandlerTest.java       | 290 +++++++++
 .../sharing/registry/util/Initialize.java       | 298 +++++++++
 .../sharing-registry-stubs/pom.xml              |   2 +-
 76 files changed, 5150 insertions(+), 4840 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/airavata-api/airavata-api-server/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/pom.xml b/airavata-api/airavata-api-server/pom.xml
index 3ceb494..7116c1d 100644
--- a/airavata-api/airavata-api-server/pom.xml
+++ b/airavata-api/airavata-api-server/pom.xml
@@ -73,7 +73,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-sharing-registry-core</artifactId>
+            <artifactId>airavata-sharing-registry-server</artifactId>
             <version>${project.version}</version>
         </dependency>
         <!--<dependency>-->

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/pom.xml b/modules/sharing-registry/pom.xml
index a931543..781a11d 100644
--- a/modules/sharing-registry/pom.xml
+++ b/modules/sharing-registry/pom.xml
@@ -11,18 +11,21 @@
         <version>0.17-SNAPSHOT</version>
     </parent>
 
+    <properties>
+        <global.version>0.17-SNAPSHOT</global.version>
+    </properties>
+
     <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>sharing-registry-stubs</module>
-        <module>sharing-registry-core</module>
+        <module>sharing-registry-server</module>
         <module>sharing-data-migrator</module>
+        <module>sharing-registry-distribution</module>
     </modules>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-data-migrator/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-data-migrator/pom.xml b/modules/sharing-registry/sharing-data-migrator/pom.xml
index 7a6de21..3fb2035 100644
--- a/modules/sharing-registry/sharing-data-migrator/pom.xml
+++ b/modules/sharing-registry/sharing-data-migrator/pom.xml
@@ -15,7 +15,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-sharing-registry-core</artifactId>
+            <artifactId>airavata-sharing-registry-server</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/pom.xml b/modules/sharing-registry/sharing-registry-core/pom.xml
deleted file mode 100644
index d529744..0000000
--- a/modules/sharing-registry/sharing-registry-core/pom.xml
+++ /dev/null
@@ -1,104 +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>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>
-    <packaging>jar</packaging>
-    <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-server-configuration</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>
-        <dependency>
-            <groupId>org.apache.thrift</groupId>
-            <artifactId>libthrift</artifactId>
-            <version>0.9.3</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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java
deleted file mode 100644
index 48b5314..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/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.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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
deleted file mode 100644
index de8abf4..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
+++ /dev/null
@@ -1,192 +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.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;
-
-    @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;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
deleted file mode 100644
index 0b789ed..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
+++ /dev/null
@@ -1,125 +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.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;
-
-    @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;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
deleted file mode 100644
index c62a52d..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
+++ /dev/null
@@ -1,112 +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.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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
deleted file mode 100644
index be3b1f9..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/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.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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
deleted file mode 100644
index c145cbe..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
+++ /dev/null
@@ -1,125 +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.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;
-
-    @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;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
deleted file mode 100644
index b4b74b0..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.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.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 String sharingType;
-    private String inheritedParentId;
-    private Long createdTime;
-    private Long updatedTime;
-
-    @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;
-    }
-
-
-    @Id
-    @Column(name = "INHERITED_PARENT_ID")
-    public String getInheritedParentId() {
-        return inheritedParentId;
-    }
-
-    public void setInheritedParentId(String inheritedParentId) {
-        this.inheritedParentId = inheritedParentId;
-    }
-
-    @Basic
-    @Column(name = "SHARING_TYPE")
-    public String getSharingType() {
-        return sharingType;
-    }
-
-    public void setSharingType(String sharingType) {
-        this.sharingType = sharingType;
-    }
-
-    @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;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
deleted file mode 100644
index da77a87..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
+++ /dev/null
@@ -1,99 +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.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 SharingEntityPK implements Serializable {
-    private final static Logger logger = LoggerFactory.getLogger(SharingEntityPK.class);
-    private String permissionTypeId;
-    private String entityId;
-    private String groupId;
-    private String inheritedParentId;
-
-    @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;
-    }
-
-    @Column(name = "INHERITED_PARENT_ID")
-    @Id
-    public String getInheritedParentId() {
-        return inheritedParentId;
-    }
-
-    public void setInheritedParentId(String inheritedParentId) {
-        this.inheritedParentId = inheritedParentId;
-    }
-
-    @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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
deleted file mode 100644
index 0d17279..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
+++ /dev/null
@@ -1,146 +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.sharing.registry.db.entities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.nio.ByteBuffer;
-
-@Entity
-@Table(name = "SHARING_USER", schema = "")
-public class SharingUserEntity {
-    private final static Logger logger = LoggerFactory.getLogger(SharingUserEntity.class);
-    private String userId;
-    private String domainId;
-    private String userName;
-    private String firstName;
-    private String lastName;
-    private ByteBuffer icon;
-    private Long createdTime;
-    private Long updatedTime;
-
-    @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 = "FIRST_NAME")
-    public String getFirstName() {
-        return firstName;
-    }
-
-    public void setFirstName(String firstName) {
-        this.firstName = firstName;
-    }
-
-    @Basic
-    @Column(name = "LAST_NAME")
-    public String getLastName() {
-        return lastName;
-    }
-
-    public void setLastName(String lastName) {
-        this.lastName = lastName;
-    }
-
-    @Lob
-    @Column(name = "ICON")
-    public ByteBuffer getIcon() {
-        return icon;
-    }
-
-    public void setIcon(ByteBuffer icon) {
-        this.icon = icon;
-    }
-
-    @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;
-
-        SharingUserEntity that = (SharingUserEntity) 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;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
deleted file mode 100644
index 10d901a..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
+++ /dev/null
@@ -1,150 +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.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;
-
-    @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;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
deleted file mode 100644
index a53a6a2..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
+++ /dev/null
@@ -1,138 +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.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.SharingRegistryException;
-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 SharingRegistryException {
-        return update(t);
-    }
-
-    public List<T> create(List<T> tList) throws SharingRegistryException {
-        return update(tList);
-    }
-
-    public  T update(T t) throws SharingRegistryException {
-        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 SharingRegistryException {
-        List<T> returnList = new ArrayList<>();
-        for(T temp : tList)
-            returnList.add(update(temp));
-        return returnList;
-    }
-
-    public boolean delete(Id id) throws SharingRegistryException {
-        JPAUtils.execute(entityManager -> {
-            E entity = entityManager.find(dbEntityGenericClass, id);
-            entityManager.remove(entity);
-            return entity;
-        });
-        return true;
-    }
-
-    public boolean delete(List<Id> idList) throws SharingRegistryException {
-        for(Id id : idList)
-            delete(id);
-        return true;
-    }
-
-    public T get(Id id) throws SharingRegistryException {
-        E entity = JPAUtils.execute(entityManager -> entityManager
-                .find(dbEntityGenericClass, id));
-        Mapper mapper = ObjectMapperSingleton.getInstance();
-        if(entity == null)
-            return null;
-        return mapper.map(entity, thriftGenericClass);
-    }
-
-    public boolean isExists(Id id) throws SharingRegistryException {
-        return get(id) != null;
-    }
-
-    public List<T> get(List<Id> idList) throws SharingRegistryException {
-        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 SharingRegistryException {
-        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 SharingRegistryException {
-        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";
-        if(filters != null && filters.size() != 0){
-            query += " WHERE ";
-            for(String k : filters.keySet()){
-                query += "p." + k + " = '" + 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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java
deleted file mode 100644
index 8cd44ef..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/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.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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
deleted file mode 100644
index b7137d2..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
+++ /dev/null
@@ -1,86 +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.sharing.registry.db.repositories;
-
-import org.apache.airavata.sharing.registry.db.entities.EntityEntity;
-import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
-import org.apache.airavata.sharing.registry.db.utils.DBConstants;
-import org.apache.airavata.sharing.registry.models.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.List;
-
-public class EntityRepository extends AbstractRepository<Entity, EntityEntity, String> {
-    private final static Logger logger = LoggerFactory.getLogger(EntityRepository.class);
-
-    public EntityRepository() {
-        super(Entity.class, EntityEntity.class);
-    }
-
-    public List<Entity> getChildEntities(String parentId) throws SharingRegistryException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.EntityTable.PARENT_ENTITY_ID, parentId);
-        return select(filters, 0, -1);
-    }
-
-    public List<Entity> searchEntities(List<String> groupIds, String entityTypeId, List<SearchCriteria> filters,
-                                       int offset, int limit) throws SharingRegistryException {
-        String groupIdString = "'";
-        for(String groupId : groupIds)
-            groupIdString += groupId + "','";
-        groupIdString = groupIdString.substring(0, groupIdString.length()-2);
-
-        String query = "SELECT E FROM " + EntityEntity.class.getSimpleName() + " E, " + SharingEntity.class.getSimpleName() + " S WHERE " +
-                "E." + DBConstants.EntityTable.ENTITY_ID + " = S." + DBConstants.SharingTable.ENTITY_ID + " AND " +
-                "S." + DBConstants.SharingTable.GROUP_ID + " IN(" + groupIdString + ") AND E." + DBConstants.EntityTable.ENTITY_TYPE_ID + "='" +
-                entityTypeId + "' AND ";
-
-        for(SearchCriteria searchCriteria : filters){
-            if(searchCriteria.getSearchField().equals(EntitySearchField.NAME)){
-                query += "E." + DBConstants.EntityTable.NAME + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
-            }else if(searchCriteria.getSearchField().equals(EntitySearchField.DESCRIPTION)){
-                query += "E." + DBConstants.EntityTable.DESCRIPTION + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
-            }else if(searchCriteria.getSearchField().equals(EntitySearchField.FULL_TEXT)){
-                query += "E." + DBConstants.EntityTable.FULL_TEXT + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
-            }else if(searchCriteria.getSearchField().equals(EntitySearchField.PRRENT_ENTITY_ID)){
-                query += "E." + DBConstants.EntityTable.PARENT_ENTITY_ID + " = '" + searchCriteria.getValue() + "' AND ";
-            }else if(searchCriteria.getSearchField().equals(EntitySearchField.CREATED_TIME)){
-                if(searchCriteria.getSearchCondition().equals(SearchCondition.GTE)){
-                    query += "E." + DBConstants.EntityTable.CREATED_TIME + " >= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
-                }else{
-                    query += "E." + DBConstants.EntityTable.CREATED_TIME + " <= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
-                }
-            }else if(searchCriteria.getSearchField().equals(EntitySearchField.UPDATED_TIME)){
-                if(searchCriteria.getSearchCondition().equals(SearchCondition.GTE)){
-                    query += "E." + DBConstants.EntityTable.UPDATED_TIME + " >= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
-                }else{
-                    query += "E." + DBConstants.EntityTable.UPDATED_TIME + " <= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
-                }
-            }
-        }
-
-        query = query.substring(0, query.length() - 5);
-        return select(query, offset, limit);
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
deleted file mode 100644
index ed2a7e9..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.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.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

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
deleted file mode 100644
index 87d5d4c..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
+++ /dev/null
@@ -1,98 +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.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.SharingUserEntity;
-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 SharingRegistryException {
-        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 SharingRegistryException {
-        String queryString = "SELECT U FROM " + SharingUserEntity.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 SharingRegistryException {
-        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 SharingRegistryException {
-        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 SharingRegistryException {
-        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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
deleted file mode 100644
index c5d683c..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
+++ /dev/null
@@ -1,52 +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.sharing.registry.db.repositories;
-
-import org.apache.airavata.sharing.registry.db.entities.PermissionTypeEntity;
-import org.apache.airavata.sharing.registry.db.utils.DBConstants;
-import org.apache.airavata.sharing.registry.models.SharingRegistryException;
-import org.apache.airavata.sharing.registry.models.PermissionType;
-import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.List;
-
-public class PermissionTypeRepository extends AbstractRepository<PermissionType, PermissionTypeEntity, String> {
-    private final static Logger logger = LoggerFactory.getLogger(PermissionTypeRepository.class);
-
-    public PermissionTypeRepository() {
-        super(PermissionType.class, PermissionTypeEntity.class);
-    }
-
-    public String getGlobalPermissionTypeIdForDomain(String domainId) throws SharingRegistryException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.PermissionTypeTable.DOMAIN_ID, domainId);
-        filters.put(DBConstants.PermissionTypeTable.NAME, SharingRegistryServerHandler.GLOBAL_PERMISSION_NAME);
-        List<PermissionType> permissionTypeList = select(filters, 0, -1);
-        if(permissionTypeList.size() != 1){
-            throw new SharingRegistryException("GLOBAL Permission inconsistency. Found " + permissionTypeList.size()
-                    + " records with " + SharingRegistryServerHandler.GLOBAL_PERMISSION_NAME + " name");
-        }
-        return permissionTypeList.get(0).getPermissionTypeId();
-    }
-}
\ No newline at end of file


[09/51] [abbrv] airavata git commit: moving sharing registry initialization to AiravataServerHandler

Posted by sc...@apache.org.
moving sharing registry initialization to AiravataServerHandler


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

Branch: refs/heads/airavata-gov-registry
Commit: 7c6c562533efbb5a42ab136b9a7a61a5d8d9b9e5
Parents: 81d8dee
Author: scnakandala <su...@gmail.com>
Authored: Wed Oct 12 11:46:50 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Oct 12 11:46:50 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   | 59 ++++++++++++++++++--
 .../server/SharingRegistryServerHandler.java    | 53 ------------------
 2 files changed, 55 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7c6c5625/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 1a64ef8..a0a563c 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
@@ -77,10 +77,7 @@ import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.registry.api.RegistryService;
 import org.apache.airavata.registry.api.client.RegistryServiceClientFactory;
 import org.apache.airavata.registry.api.exception.RegistryServiceException;
-import org.apache.airavata.sharing.registry.models.Domain;
-import org.apache.airavata.sharing.registry.models.Entity;
-import org.apache.airavata.sharing.registry.models.EntityType;
-import org.apache.airavata.sharing.registry.models.PermissionType;
+import org.apache.airavata.sharing.registry.models.*;
 import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
@@ -102,6 +99,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             experimentPublisher = MessagingFactory.getPublisher(Type.EXPERIMENT_LAUNCH);
 
             sharingRegistryServerHandler = new SharingRegistryServerHandler();
+            initSharingRegistry();
         } catch (ApplicationSettingsException e) {
             logger.error("Error occured while reading airavata-server properties..", e);
         } catch (AiravataException e) {
@@ -111,6 +109,59 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    private void initSharingRegistry() throws ApplicationSettingsException, TException {
+        if(sharingRegistryServerHandler.getDomain(ServerSettings.getDefaultUserGateway()) == null){
+            Domain domain = new Domain();
+            domain.setDomainId(ServerSettings.getDefaultUserGateway());
+            domain.setName(ServerSettings.getDefaultUserGateway());
+            domain.setDescription("Domain entry for " + domain.name);
+            sharingRegistryServerHandler.createDomain(domain);
+
+            User user = new User();
+            user.setDomainId(domain.domainId);
+            user.setUserId(ServerSettings.getDefaultUser()+"@"+ServerSettings.getDefaultUserGateway());
+            user.setUserName(ServerSettings.getDefaultUser());
+            sharingRegistryServerHandler.createUser(user);
+
+            //Creating Entity Types for each domain
+            EntityType entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":PROJECT");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("PROJECT");
+            entityType.setDescription("Project entity type");
+            sharingRegistryServerHandler.createEntityType(entityType);
+
+            entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":EXPERIMENT");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("EXPERIMENT");
+            entityType.setDescription("Experiment entity type");
+            sharingRegistryServerHandler.createEntityType(entityType);
+
+            entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":FILE");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("FILE");
+            entityType.setDescription("File entity type");
+            sharingRegistryServerHandler.createEntityType(entityType);
+
+            //Creating Permission Types for each domain
+            PermissionType permissionType = new PermissionType();
+            permissionType.setPermissionTypeId(domain.domainId+":READ");
+            permissionType.setDomainId(domain.domainId);
+            permissionType.setName("READ");
+            permissionType.setDescription("Read permission type");
+            sharingRegistryServerHandler.createPermissionType(permissionType);
+
+            permissionType = new PermissionType();
+            permissionType.setPermissionTypeId(domain.domainId+":WRITE");
+            permissionType.setDomainId(domain.domainId);
+            permissionType.setName("WRITE");
+            permissionType.setDescription("Write permission type");
+            sharingRegistryServerHandler.createPermissionType(permissionType);
+        }
+    }
+
     /**
      * Query Airavata to fetch the API version
      */

http://git-wip-us.apache.org/repos/asf/airavata/blob/7c6c5625/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
index 8716252..1c7714f 100644
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -21,7 +21,6 @@
 package org.apache.airavata.sharing.registry.server;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.sharing.registry.db.entities.GroupMembershipEntityPK;
 import org.apache.airavata.sharing.registry.db.entities.SharingEntityPK;
 import org.apache.airavata.sharing.registry.db.repositories.*;
@@ -61,58 +60,6 @@ public class SharingRegistryServerHandler implements GovRegistryService.Iface{
         this.permissionTypeRepository = new PermissionTypeRepository();
         this.entityRepository = new EntityRepository();
         this.sharingRepository = new SharingRepository();
-
-        if(!domainRepository.isExists(ServerSettings.getDefaultUserGateway())){
-            Domain domain = new Domain();
-            domain.setDomainId(ServerSettings.getDefaultUserGateway());
-            domain.setName(ServerSettings.getDefaultUserGateway());
-            domain.setDescription("Domain entry for " + domain.name);
-            createDomain(domain);
-
-            User user = new User();
-            user.setDomainId(domain.domainId);
-            user.setUserId(ServerSettings.getDefaultUser()+"@"+ServerSettings.getDefaultUserGateway());
-            user.setUserName(ServerSettings.getDefaultUser());
-            createUser(user);
-
-            //Creating Entity Types for each domain
-            EntityType entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":PROJECT");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("PROJECT");
-            entityType.setDescription("Project entity type");
-            createEntityType(entityType);
-
-            entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":EXPERIMENT");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("EXPERIMENT");
-            entityType.setDescription("Experiment entity type");
-            createEntityType(entityType);
-
-            entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":FILE");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("FILE");
-            entityType.setDescription("File entity type");
-            createEntityType(entityType);
-
-            //Creating Permission Types for each domain
-            PermissionType permissionType = new PermissionType();
-            permissionType.setPermissionTypeId(domain.domainId+":READ");
-            permissionType.setDomainId(domain.domainId);
-            permissionType.setName("READ");
-            permissionType.setDescription("Read permission type");
-            createPermissionType(permissionType);
-
-            permissionType = new PermissionType();
-            permissionType.setPermissionTypeId(domain.domainId+":WRITE");
-            permissionType.setDomainId(domain.domainId);
-            permissionType.setName("WRITE");
-            permissionType.setDescription("Write permission type");
-            createPermissionType(permissionType);
-
-        }
     }
 
     /**


[49/51] [abbrv] airavata git commit: fixing id issues

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
index 9fe3043..819dd0d 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
@@ -38,15 +38,16 @@ import org.slf4j.LoggerFactory;
  * <p>System internal data type to map group memberships</p>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 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 org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)3);
+  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)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 {
@@ -56,6 +57,7 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
 
   public String parentId; // optional
   public String childId; // optional
+  public String domainId; // optional
   /**
    * 
    * @see GroupChildType
@@ -68,13 +70,14 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     PARENT_ID((short)1, "parentId"),
     CHILD_ID((short)2, "childId"),
+    DOMAIN_ID((short)3, "domainId"),
     /**
      * 
      * @see GroupChildType
      */
-    CHILD_TYPE((short)3, "childType"),
-    CREATED_TIME((short)4, "createdTime"),
-    UPDATED_TIME((short)5, "updatedTime");
+    CHILD_TYPE((short)4, "childType"),
+    CREATED_TIME((short)5, "createdTime"),
+    UPDATED_TIME((short)6, "updatedTime");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -93,11 +96,13 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
           return PARENT_ID;
         case 2: // CHILD_ID
           return CHILD_ID;
-        case 3: // CHILD_TYPE
+        case 3: // DOMAIN_ID
+          return DOMAIN_ID;
+        case 4: // CHILD_TYPE
           return CHILD_TYPE;
-        case 4: // CREATED_TIME
+        case 5: // CREATED_TIME
           return CREATED_TIME;
-        case 5: // UPDATED_TIME
+        case 6: // UPDATED_TIME
           return UPDATED_TIME;
         default:
           return null;
@@ -142,7 +147,7 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
   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};
+  private static final _Fields optionals[] = {_Fields.PARENT_ID,_Fields.CHILD_ID,_Fields.DOMAIN_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);
@@ -150,6 +155,8 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
         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.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.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, 
@@ -174,6 +181,9 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
     if (other.isSetChildId()) {
       this.childId = other.childId;
     }
+    if (other.isSetDomainId()) {
+      this.domainId = other.domainId;
+    }
     if (other.isSetChildType()) {
       this.childType = other.childType;
     }
@@ -189,6 +199,7 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
   public void clear() {
     this.parentId = null;
     this.childId = null;
+    this.domainId = null;
     this.childType = null;
     setCreatedTimeIsSet(false);
     this.createdTime = 0;
@@ -244,6 +255,30 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
     }
   }
 
+  public String getDomainId() {
+    return this.domainId;
+  }
+
+  public GroupMembership 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;
+    }
+  }
+
   /**
    * 
    * @see GroupChildType
@@ -340,6 +375,14 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
       }
       break;
 
+    case DOMAIN_ID:
+      if (value == null) {
+        unsetDomainId();
+      } else {
+        setDomainId((String)value);
+      }
+      break;
+
     case CHILD_TYPE:
       if (value == null) {
         unsetChildType();
@@ -375,6 +418,9 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
     case CHILD_ID:
       return getChildId();
 
+    case DOMAIN_ID:
+      return getDomainId();
+
     case CHILD_TYPE:
       return getChildType();
 
@@ -399,6 +445,8 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
       return isSetParentId();
     case CHILD_ID:
       return isSetChildId();
+    case DOMAIN_ID:
+      return isSetDomainId();
     case CHILD_TYPE:
       return isSetChildType();
     case CREATED_TIME:
@@ -440,6 +488,15 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
         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_childType = true && this.isSetChildType();
     boolean that_present_childType = true && that.isSetChildType();
     if (this_present_childType || that_present_childType) {
@@ -484,6 +541,11 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
     if (present_childId)
       list.add(childId);
 
+    boolean present_domainId = true && (isSetDomainId());
+    list.add(present_domainId);
+    if (present_domainId)
+      list.add(domainId);
+
     boolean present_childType = true && (isSetChildType());
     list.add(present_childType);
     if (present_childType)
@@ -530,6 +592,16 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
         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(isSetChildType()).compareTo(other.isSetChildType());
     if (lastComparison != 0) {
       return lastComparison;
@@ -599,6 +671,16 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
       }
       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 (isSetChildType()) {
       if (!first) sb.append(", ");
       sb.append("childType:");
@@ -682,7 +764,15 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // CHILD_TYPE
+          case 3: // 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 4: // 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);
@@ -690,7 +780,7 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 4: // CREATED_TIME
+          case 5: // CREATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.createdTime = iprot.readI64();
               struct.setCreatedTimeIsSet(true);
@@ -698,7 +788,7 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 5: // UPDATED_TIME
+          case 6: // UPDATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.updatedTime = iprot.readI64();
               struct.setUpdatedTimeIsSet(true);
@@ -735,6 +825,13 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
           oprot.writeFieldEnd();
         }
       }
+      if (struct.domainId != null) {
+        if (struct.isSetDomainId()) {
+          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+          oprot.writeString(struct.domainId);
+          oprot.writeFieldEnd();
+        }
+      }
       if (struct.childType != null) {
         if (struct.isSetChildType()) {
           oprot.writeFieldBegin(CHILD_TYPE_FIELD_DESC);
@@ -776,22 +873,28 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
       if (struct.isSetChildId()) {
         optionals.set(1);
       }
-      if (struct.isSetChildType()) {
+      if (struct.isSetDomainId()) {
         optionals.set(2);
       }
-      if (struct.isSetCreatedTime()) {
+      if (struct.isSetChildType()) {
         optionals.set(3);
       }
-      if (struct.isSetUpdatedTime()) {
+      if (struct.isSetCreatedTime()) {
         optionals.set(4);
       }
-      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetUpdatedTime()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
       if (struct.isSetParentId()) {
         oprot.writeString(struct.parentId);
       }
       if (struct.isSetChildId()) {
         oprot.writeString(struct.childId);
       }
+      if (struct.isSetDomainId()) {
+        oprot.writeString(struct.domainId);
+      }
       if (struct.isSetChildType()) {
         oprot.writeI32(struct.childType.getValue());
       }
@@ -806,7 +909,7 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
     @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);
+      BitSet incoming = iprot.readBitSet(6);
       if (incoming.get(0)) {
         struct.parentId = iprot.readString();
         struct.setParentIdIsSet(true);
@@ -816,14 +919,18 @@ public class GroupMembership implements org.apache.thrift.TBase<GroupMembership,
         struct.setChildIdIsSet(true);
       }
       if (incoming.get(2)) {
+        struct.domainId = iprot.readString();
+        struct.setDomainIdIsSet(true);
+      }
+      if (incoming.get(3)) {
         struct.childType = org.apache.airavata.sharing.registry.models.GroupChildType.findByValue(iprot.readI32());
         struct.setChildTypeIsSet(true);
       }
-      if (incoming.get(3)) {
+      if (incoming.get(4)) {
         struct.createdTime = iprot.readI64();
         struct.setCreatedTimeIsSet(true);
       }
-      if (incoming.get(4)) {
+      if (incoming.get(5)) {
         struct.updatedTime = iprot.readI64();
         struct.setUpdatedTimeIsSet(true);
       }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
index 2952f7a..9736a85 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**
  * <p>Object for creating client defined permission type</p>
- * <li>permissionTypeId : System generated permission type id. In the current implementation it will of the form domainId:name</li>
+ * <li><b>permissionTypeId</b> : Permission type id provided by the client</li>
  * <li><b>domainId</b> : Domain id</li>
  * <li><b>name</b> : Single word name for the permission</li>
  * <li>description : Short description for the permission type</li>
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : Will be set by the system</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 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");
 
@@ -166,8 +166,6 @@ public class PermissionType implements org.apache.thrift.TBase<PermissionType, P
   }
 
   public PermissionType() {
-    this.permissionTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
-
   }
 
   /**
@@ -197,8 +195,7 @@ public class PermissionType implements org.apache.thrift.TBase<PermissionType, P
 
   @Override
   public void clear() {
-    this.permissionTypeId = "DO_NOT_SET_AT_CLIENTS_ID";
-
+    this.permissionTypeId = null;
     this.domainId = null;
     this.name = null;
     this.description = null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
index 71fd003..faffae0 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
  * <li><b>searchCondition</b> : EQUAL, LIKE etc..</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 public class SearchCriteria implements org.apache.thrift.TBase<SearchCriteria, SearchCriteria._Fields>, java.io.Serializable, Cloneable, Comparable<SearchCriteria> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SearchCriteria");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
index ed1cd61..753fe74 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * <p>This is an internal enum type for managing sharings</p>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 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");
 
@@ -46,9 +46,10 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
   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 SHARING_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("sharingType", org.apache.thrift.protocol.TType.I32, (short)4);
-  private static final org.apache.thrift.protocol.TField INHERITED_PARENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inheritedParentId", org.apache.thrift.protocol.TType.STRING, (short)5);
-  private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)6);
-  private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)7);
+  private static final org.apache.thrift.protocol.TField DOMAIN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("domainId", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField INHERITED_PARENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inheritedParentId", org.apache.thrift.protocol.TType.STRING, (short)6);
+  private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)7);
+  private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)8);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -64,6 +65,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
    * @see SharingType
    */
   public SharingType sharingType; // optional
+  public String domainId; // optional
   public String inheritedParentId; // optional
   public long createdTime; // optional
   public long updatedTime; // optional
@@ -78,9 +80,10 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
      * @see SharingType
      */
     SHARING_TYPE((short)4, "sharingType"),
-    INHERITED_PARENT_ID((short)5, "inheritedParentId"),
-    CREATED_TIME((short)6, "createdTime"),
-    UPDATED_TIME((short)7, "updatedTime");
+    DOMAIN_ID((short)5, "domainId"),
+    INHERITED_PARENT_ID((short)6, "inheritedParentId"),
+    CREATED_TIME((short)7, "createdTime"),
+    UPDATED_TIME((short)8, "updatedTime");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -103,11 +106,13 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
           return GROUP_ID;
         case 4: // SHARING_TYPE
           return SHARING_TYPE;
-        case 5: // INHERITED_PARENT_ID
+        case 5: // DOMAIN_ID
+          return DOMAIN_ID;
+        case 6: // INHERITED_PARENT_ID
           return INHERITED_PARENT_ID;
-        case 6: // CREATED_TIME
+        case 7: // CREATED_TIME
           return CREATED_TIME;
-        case 7: // UPDATED_TIME
+        case 8: // UPDATED_TIME
           return UPDATED_TIME;
         default:
           return null;
@@ -152,7 +157,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
   private static final int __CREATEDTIME_ISSET_ID = 0;
   private static final int __UPDATEDTIME_ISSET_ID = 1;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.PERMISSION_TYPE_ID,_Fields.ENTITY_ID,_Fields.GROUP_ID,_Fields.SHARING_TYPE,_Fields.INHERITED_PARENT_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
+  private static final _Fields optionals[] = {_Fields.PERMISSION_TYPE_ID,_Fields.ENTITY_ID,_Fields.GROUP_ID,_Fields.SHARING_TYPE,_Fields.DOMAIN_ID,_Fields.INHERITED_PARENT_ID,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -164,6 +169,8 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.SHARING_TYPE, new org.apache.thrift.meta_data.FieldMetaData("sharingType", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SharingType.class)));
+    tmpMap.put(_Fields.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.INHERITED_PARENT_ID, new org.apache.thrift.meta_data.FieldMetaData("inheritedParentId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -194,6 +201,9 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     if (other.isSetSharingType()) {
       this.sharingType = other.sharingType;
     }
+    if (other.isSetDomainId()) {
+      this.domainId = other.domainId;
+    }
     if (other.isSetInheritedParentId()) {
       this.inheritedParentId = other.inheritedParentId;
     }
@@ -211,6 +221,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     this.entityId = null;
     this.groupId = null;
     this.sharingType = null;
+    this.domainId = null;
     this.inheritedParentId = null;
     setCreatedTimeIsSet(false);
     this.createdTime = 0;
@@ -322,6 +333,30 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     }
   }
 
+  public String getDomainId() {
+    return this.domainId;
+  }
+
+  public Sharing 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 getInheritedParentId() {
     return this.inheritedParentId;
   }
@@ -426,6 +461,14 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       }
       break;
 
+    case DOMAIN_ID:
+      if (value == null) {
+        unsetDomainId();
+      } else {
+        setDomainId((String)value);
+      }
+      break;
+
     case INHERITED_PARENT_ID:
       if (value == null) {
         unsetInheritedParentId();
@@ -467,6 +510,9 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     case SHARING_TYPE:
       return getSharingType();
 
+    case DOMAIN_ID:
+      return getDomainId();
+
     case INHERITED_PARENT_ID:
       return getInheritedParentId();
 
@@ -495,6 +541,8 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       return isSetGroupId();
     case SHARING_TYPE:
       return isSetSharingType();
+    case DOMAIN_ID:
+      return isSetDomainId();
     case INHERITED_PARENT_ID:
       return isSetInheritedParentId();
     case CREATED_TIME:
@@ -554,6 +602,15 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
         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_inheritedParentId = true && this.isSetInheritedParentId();
     boolean that_present_inheritedParentId = true && that.isSetInheritedParentId();
     if (this_present_inheritedParentId || that_present_inheritedParentId) {
@@ -608,6 +665,11 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     if (present_sharingType)
       list.add(sharingType.getValue());
 
+    boolean present_domainId = true && (isSetDomainId());
+    list.add(present_domainId);
+    if (present_domainId)
+      list.add(domainId);
+
     boolean present_inheritedParentId = true && (isSetInheritedParentId());
     list.add(present_inheritedParentId);
     if (present_inheritedParentId)
@@ -674,6 +736,16 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
         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(isSetInheritedParentId()).compareTo(other.isSetInheritedParentId());
     if (lastComparison != 0) {
       return lastComparison;
@@ -763,6 +835,16 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       }
       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 (isSetInheritedParentId()) {
       if (!first) sb.append(", ");
       sb.append("inheritedParentId:");
@@ -862,7 +944,15 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 5: // INHERITED_PARENT_ID
+          case 5: // 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 6: // INHERITED_PARENT_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.inheritedParentId = iprot.readString();
               struct.setInheritedParentIdIsSet(true);
@@ -870,7 +960,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // CREATED_TIME
+          case 7: // CREATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.createdTime = iprot.readI64();
               struct.setCreatedTimeIsSet(true);
@@ -878,7 +968,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 7: // UPDATED_TIME
+          case 8: // UPDATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.updatedTime = iprot.readI64();
               struct.setUpdatedTimeIsSet(true);
@@ -929,6 +1019,13 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
           oprot.writeFieldEnd();
         }
       }
+      if (struct.domainId != null) {
+        if (struct.isSetDomainId()) {
+          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+          oprot.writeString(struct.domainId);
+          oprot.writeFieldEnd();
+        }
+      }
       if (struct.inheritedParentId != null) {
         if (struct.isSetInheritedParentId()) {
           oprot.writeFieldBegin(INHERITED_PARENT_ID_FIELD_DESC);
@@ -976,16 +1073,19 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       if (struct.isSetSharingType()) {
         optionals.set(3);
       }
-      if (struct.isSetInheritedParentId()) {
+      if (struct.isSetDomainId()) {
         optionals.set(4);
       }
-      if (struct.isSetCreatedTime()) {
+      if (struct.isSetInheritedParentId()) {
         optionals.set(5);
       }
-      if (struct.isSetUpdatedTime()) {
+      if (struct.isSetCreatedTime()) {
         optionals.set(6);
       }
-      oprot.writeBitSet(optionals, 7);
+      if (struct.isSetUpdatedTime()) {
+        optionals.set(7);
+      }
+      oprot.writeBitSet(optionals, 8);
       if (struct.isSetPermissionTypeId()) {
         oprot.writeString(struct.permissionTypeId);
       }
@@ -998,6 +1098,9 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
       if (struct.isSetSharingType()) {
         oprot.writeI32(struct.sharingType.getValue());
       }
+      if (struct.isSetDomainId()) {
+        oprot.writeString(struct.domainId);
+      }
       if (struct.isSetInheritedParentId()) {
         oprot.writeString(struct.inheritedParentId);
       }
@@ -1012,7 +1115,7 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, Sharing struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(7);
+      BitSet incoming = iprot.readBitSet(8);
       if (incoming.get(0)) {
         struct.permissionTypeId = iprot.readString();
         struct.setPermissionTypeIdIsSet(true);
@@ -1030,14 +1133,18 @@ public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields
         struct.setSharingTypeIsSet(true);
       }
       if (incoming.get(4)) {
+        struct.domainId = iprot.readString();
+        struct.setDomainIdIsSet(true);
+      }
+      if (incoming.get(5)) {
         struct.inheritedParentId = iprot.readString();
         struct.setInheritedParentIdIsSet(true);
       }
-      if (incoming.get(5)) {
+      if (incoming.get(6)) {
         struct.createdTime = iprot.readI64();
         struct.setCreatedTimeIsSet(true);
       }
-      if (incoming.get(6)) {
+      if (incoming.get(7)) {
         struct.updatedTime = iprot.readI64();
         struct.setUpdatedTimeIsSet(true);
       }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
index 06fa123..61e08aa 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * <p>Exception model used in the sharing registry service</p>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 public class SharingRegistryException extends TException implements org.apache.thrift.TBase<SharingRegistryException, SharingRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<SharingRegistryException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SharingRegistryException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
index 65b5e60..34508f7 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * <p>User is the model used to register a user in the system. Minimal user information will be required to provide
  * regarding the user.</p>
- * <li><b>userId</b> : Client provided user id. (The id is not system generated and it is a must to provide this id)</li>
+ * <li><b>userId</b> : User id provided by the client</li>
  * <li><b>domainId</b> : Domain id for that user</li>
  * <li><b>userName</b> : User name for the user</li>
  * <li><b>firstName</b> : First name of the user</li>
@@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b6e07d7b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
index 8edbcc1..484ea3b 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**
  * <p>User group is a collection of users.</p>
- *  <li>groupId : System generated grouo id. In the current implementation this is of the form domainId:name</li>
+ *  <li><b>groupId</b> : Group id provided by the client</li>
  *  <li><b>domainId</b> : Domain id for this user group</li>
  *  <li><b>name</b> : Name for the user group. should be one word</li>
  *  <li>description : Short description for the group.</li>
@@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
  *  <li>updatedTime : Will be set by the system</li>
  *  
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-16")
 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");
 
@@ -206,8 +206,6 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
   }
 
   public UserGroup() {
-    this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
-
   }
 
   /**
@@ -246,8 +244,7 @@ public class UserGroup implements org.apache.thrift.TBase<UserGroup, UserGroup._
 
   @Override
   public void clear() {
-    this.groupId = "DO_NOT_SET_AT_CLIENTS_ID";
-
+    this.groupId = null;
     this.domainId = null;
     this.name = null;
     this.description = null;


[37/51] [abbrv] airavata git commit: owner permission is not revokable or assignable

Posted by sc...@apache.org.
owner permission is not revokable  or assignable


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

Branch: refs/heads/airavata-gov-registry
Commit: 4bb7c6deec45966f00a4e9676b10d945bcdd8075
Parents: eb62af9
Author: scnakandala <su...@gmail.com>
Authored: Fri Oct 14 11:40:52 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Oct 14 11:40:52 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |  10 +-
 .../repositories/PermissionTypeRepository.java  |   4 +-
 .../server/SharingRegistryServerHandler.java    |  34 +-
 .../SharingRegistryServerHandlerTest.java       |   4 +-
 .../sharing/registry/models/Domain.java         |  25 +-
 .../airavata/sharing/registry/models/User.java  |  26 +-
 .../service/cpi/SharingRegistryService.java     | 613 ++++++++++++++++---
 .../thrift_models/sharing_cpi.thrift            |   8 +-
 8 files changed, 594 insertions(+), 130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/4bb7c6de/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 aba57eb..45ddc3f 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
@@ -3825,11 +3825,12 @@ public class AiravataServerHandler implements Airavata.Iface {
             AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
             for(Map.Entry<String, ResourcePermissionType> userPermission : userPermissionList.entrySet()){
+                String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
                 if(userPermission.getValue().equals(ResourcePermissionType.WRITE))
-                    sharingRegistryServerHandler.shareEntityWithUsers(resourceId,
+                    sharingRegistryServerHandler.shareEntityWithUsers(gatewayId, resourceId,
                             Arrays.asList(userPermission.getKey()), authzToken.getClaimsMap().get(Constants.GATEWAY_ID) + ":" + "WRITE", true);
                 else
-                    sharingRegistryServerHandler.shareEntityWithUsers(resourceId,
+                    sharingRegistryServerHandler.shareEntityWithUsers(gatewayId, resourceId,
                             Arrays.asList(userPermission.getKey()), authzToken.getClaimsMap().get(Constants.GATEWAY_ID) + ":" + "READ", true);
             }
             return true;
@@ -3848,11 +3849,12 @@ public class AiravataServerHandler implements Airavata.Iface {
                                                     Map<String, ResourcePermissionType> userPermissionList) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         try {
             for(Map.Entry<String, ResourcePermissionType> userPermission : userPermissionList.entrySet()){
+                String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
                 if(userPermission.getValue().equals(ResourcePermissionType.WRITE))
-                    sharingRegistryServerHandler.revokeEntitySharingFromUsers(resourceId,
+                    sharingRegistryServerHandler.revokeEntitySharingFromUsers(gatewayId, resourceId,
                             Arrays.asList(userPermission.getKey()), authzToken.getClaimsMap().get(Constants.GATEWAY_ID) + ":" + "WRITE");
                 else
-                    sharingRegistryServerHandler.revokeEntitySharingFromUsers(resourceId,
+                    sharingRegistryServerHandler.revokeEntitySharingFromUsers(gatewayId, resourceId,
                             Arrays.asList(userPermission.getKey()), authzToken.getClaimsMap().get(Constants.GATEWAY_ID) + ":" + "READ");
             }
             return true;

http://git-wip-us.apache.org/repos/asf/airavata/blob/4bb7c6de/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
index c5d683c..ac092f1 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
@@ -41,11 +41,11 @@ public class PermissionTypeRepository extends AbstractRepository<PermissionType,
     public String getGlobalPermissionTypeIdForDomain(String domainId) throws SharingRegistryException {
         HashMap<String, String> filters = new HashMap<>();
         filters.put(DBConstants.PermissionTypeTable.DOMAIN_ID, domainId);
-        filters.put(DBConstants.PermissionTypeTable.NAME, SharingRegistryServerHandler.GLOBAL_PERMISSION_NAME);
+        filters.put(DBConstants.PermissionTypeTable.NAME, SharingRegistryServerHandler.OWNER_PERMISSION_NAME);
         List<PermissionType> permissionTypeList = select(filters, 0, -1);
         if(permissionTypeList.size() != 1){
             throw new SharingRegistryException("GLOBAL Permission inconsistency. Found " + permissionTypeList.size()
-                    + " records with " + SharingRegistryServerHandler.GLOBAL_PERMISSION_NAME + " name");
+                    + " records with " + SharingRegistryServerHandler.OWNER_PERMISSION_NAME + " name");
         }
         return permissionTypeList.get(0).getPermissionTypeId();
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/4bb7c6de/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
index aa41a56..a123975 100644
--- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -38,7 +38,7 @@ import java.util.*;
 public class SharingRegistryServerHandler implements SharingRegistryService.Iface{
     private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServerHandler.class);
 
-    public static String GLOBAL_PERMISSION_NAME = "OWNER";
+    public static String OWNER_PERMISSION_NAME = "OWNER";
 
     private DomainRepository domainRepository;
     private UserRepository userRepository;
@@ -77,9 +77,9 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
 
         //create the global permission for the domain
         PermissionType permissionType = new PermissionType();
-        permissionType.setPermissionTypeId(domain.domainId+":"+GLOBAL_PERMISSION_NAME);
+        permissionType.setPermissionTypeId(domain.domainId+":"+ OWNER_PERMISSION_NAME);
         permissionType.setDomainId(domain.domainId);
-        permissionType.setName(GLOBAL_PERMISSION_NAME);
+        permissionType.setName(OWNER_PERMISSION_NAME);
         permissionType.setDescription("GLOBAL permission to " + domain.domainId);
         permissionType.setCreatedTime(System.currentTimeMillis());
         permissionType.setUpdatedTime(System.currentTimeMillis());
@@ -462,16 +462,20 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
      * @param permissionType
      */
     @Override
-    public boolean shareEntityWithUsers(String entityId, List<String> userList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
-        return shareEntity(entityId, userList, permissionTypeId, GroupType.SINGLE_USER, cascadePermission);
+    public boolean shareEntityWithUsers(String domainId, String entityId, List<String> userList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
+        return shareEntity(domainId, entityId, userList, permissionTypeId, GroupType.SINGLE_USER, cascadePermission);
     }
 
     @Override
-    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
-        return shareEntity(entityId, groupList, permissionTypeId, GroupType.MULTI_USER, cascadePermission);
+    public boolean shareEntityWithGroups(String domainId, String entityId, List<String> groupList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
+        return shareEntity(domainId, entityId, groupList, permissionTypeId, GroupType.MULTI_USER, cascadePermission);
     }
 
-    private boolean shareEntity(String entityId, List<String> groupOrUserList, String permissionTypeId, GroupType groupType, boolean cascadePermission)  throws SharingRegistryException, TException {
+    private boolean shareEntity(String domainId, String entityId, List<String> groupOrUserList, String permissionTypeId, GroupType groupType, boolean cascadePermission)  throws SharingRegistryException, TException {
+        if(permissionTypeId.equals(permissionTypeRepository.getGlobalPermissionTypeIdForDomain(domainId))){
+            throw new SharingRegistryException(OWNER_PERMISSION_NAME + " permission cannot be assigned");
+        }
+
         //Adding permission for the specified users/groups for the specified entity
         LinkedList<Entity> temp = new LinkedList<>();
         for(String userId : groupOrUserList){
@@ -516,14 +520,14 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
     }
 
     @Override
-    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String permissionTypeId) throws SharingRegistryException, TException {
-        return revokeEntitySharing(entityId, userList, permissionTypeId);
+    public boolean revokeEntitySharingFromUsers(String domainId, String entityId, List<String> userList, String permissionTypeId) throws SharingRegistryException, TException {
+        return revokeEntitySharing(domainId, entityId, userList, permissionTypeId);
     }
 
 
     @Override
-    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String permissionTypeId) throws SharingRegistryException, TException {
-        return revokeEntitySharing(entityId, groupList, permissionTypeId);
+    public boolean revokeEntitySharingFromGroups(String domainId, String entityId, List<String> groupList, String permissionTypeId) throws SharingRegistryException, TException {
+        return revokeEntitySharing(domainId, entityId, groupList, permissionTypeId);
     }
 
     @Override
@@ -537,7 +541,11 @@ public class SharingRegistryServerHandler implements SharingRegistryService.Ifac
                 permissionTypeRepository.getGlobalPermissionTypeIdForDomain(domainId)));
     }
 
-    public boolean revokeEntitySharing(String entityId, List<String> groupOrUserList, String permissionTypeId) throws SharingRegistryException {
+    public boolean revokeEntitySharing(String domainId, String entityId, List<String> groupOrUserList, String permissionTypeId) throws SharingRegistryException {
+        if(permissionTypeId.equals(permissionTypeRepository.getGlobalPermissionTypeIdForDomain(domainId))){
+            throw new SharingRegistryException(OWNER_PERMISSION_NAME + " permission cannot be removed");
+        }
+
         //revoking permission for the entity
         for(String groupId : groupOrUserList){
             SharingEntityPK sharingEntityPK = new SharingEntityPK();

http://git-wip-us.apache.org/repos/asf/airavata/blob/4bb7c6de/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
index cf92856..8a9bcb2 100644
--- a/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
+++ b/modules/sharing-registry/sharing-registry-server/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
@@ -247,8 +247,8 @@ public class SharingRegistryServerHandlerTest {
         String entityId3 = sharingRegistryServerHandler.createEntity(entity3);
         Assert.assertNotNull(entityId3);
 
-        sharingRegistryServerHandler.shareEntityWithUsers(entityId1, Arrays.asList(userId2), permissionTypeId1, true);
-        sharingRegistryServerHandler.shareEntityWithGroups(entityId3, Arrays.asList(groupId2), permissionTypeId1, true);
+        sharingRegistryServerHandler.shareEntityWithUsers(domainId, entityId1, Arrays.asList(userId2), permissionTypeId1, true);
+        sharingRegistryServerHandler.shareEntityWithGroups(domainId, entityId3, Arrays.asList(groupId2), permissionTypeId1, true);
 
         Entity entity4 = new Entity();
         entity4.setEntityId(domainId+":Entity4");

http://git-wip-us.apache.org/repos/asf/airavata/blob/4bb7c6de/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index 4604f02..f5d7135 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -6,15 +6,32 @@
  */
 package org.apache.airavata.sharing.registry.models;
 
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
 
+import org.apache.thrift.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 java.util.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")

http://git-wip-us.apache.org/repos/asf/airavata/blob/4bb7c6de/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
index 5ae3e73..1ac659a 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
@@ -6,16 +6,32 @@
  */
 package org.apache.airavata.sharing.registry.models;
 
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
 
-import javax.annotation.Generated;
+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.*;
+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)")


[34/51] [abbrv] airavata git commit: removing invalid echo

Posted by sc...@apache.org.
removing invalid echo


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

Branch: refs/heads/airavata-gov-registry
Commit: 6efb535b0a4df26f3fc2453e3180a429075fc5a4
Parents: fe76d11
Author: scnakandala <su...@gmail.com>
Authored: Thu Oct 13 18:01:37 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Oct 13 18:01:37 2016 -0400

----------------------------------------------------------------------
 .../src/main/resources/bin/sharing-registry.sh                      | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6efb535b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
index 0725c48..44aef1f 100644
--- a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
@@ -81,7 +81,6 @@ then
 		fi
 	done
 else
-	echo $SHARING_REGISTRY_CLASSPATH
 	if $IS_DAEMON_MODE ; then
 		echo "Starting Sharing Registry Server in daemon mode..."
 		nohup $JAVA_HOME/bin/java ${JAVA_OPTS} -classpath "$SHARING_REGISTRY_CLASSPATH"  org.apache.airavata.sharing.registry.server.SharingRegistryServer > ../sharing-registry.out & echo $! > "../sharing-registry-start_$!"


[24/51] [abbrv] airavata git commit: adding separate distribution

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
new file mode 100644
index 0000000..de8abf4
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityEntity.java
@@ -0,0 +1,192 @@
+/*
+ *
+ * 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;
+
+    @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;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
new file mode 100644
index 0000000..0b789ed
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/EntityTypeEntity.java
@@ -0,0 +1,125 @@
+/*
+ *
+ * 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;
+
+    @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;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntity.java
new file mode 100644
index 0000000..c62a52d
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/GroupMembershipEntityPK.java
new file mode 100644
index 0000000..be3b1f9
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
new file mode 100644
index 0000000..c145cbe
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/PermissionTypeEntity.java
@@ -0,0 +1,125 @@
+/*
+ *
+ * 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;
+
+    @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;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.java
new file mode 100644
index 0000000..b4b74b0
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntity.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 = "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 String sharingType;
+    private String inheritedParentId;
+    private Long createdTime;
+    private Long updatedTime;
+
+    @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;
+    }
+
+
+    @Id
+    @Column(name = "INHERITED_PARENT_ID")
+    public String getInheritedParentId() {
+        return inheritedParentId;
+    }
+
+    public void setInheritedParentId(String inheritedParentId) {
+        this.inheritedParentId = inheritedParentId;
+    }
+
+    @Basic
+    @Column(name = "SHARING_TYPE")
+    public String getSharingType() {
+        return sharingType;
+    }
+
+    public void setSharingType(String sharingType) {
+        this.sharingType = sharingType;
+    }
+
+    @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;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
new file mode 100644
index 0000000..da77a87
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingEntityPK.java
@@ -0,0 +1,99 @@
+/*
+ *
+ * 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 SharingEntityPK implements Serializable {
+    private final static Logger logger = LoggerFactory.getLogger(SharingEntityPK.class);
+    private String permissionTypeId;
+    private String entityId;
+    private String groupId;
+    private String inheritedParentId;
+
+    @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;
+    }
+
+    @Column(name = "INHERITED_PARENT_ID")
+    @Id
+    public String getInheritedParentId() {
+        return inheritedParentId;
+    }
+
+    public void setInheritedParentId(String inheritedParentId) {
+        this.inheritedParentId = inheritedParentId;
+    }
+
+    @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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
new file mode 100644
index 0000000..0d17279
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
@@ -0,0 +1,146 @@
+/*
+ *
+ * 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.nio.ByteBuffer;
+
+@Entity
+@Table(name = "SHARING_USER", schema = "")
+public class SharingUserEntity {
+    private final static Logger logger = LoggerFactory.getLogger(SharingUserEntity.class);
+    private String userId;
+    private String domainId;
+    private String userName;
+    private String firstName;
+    private String lastName;
+    private ByteBuffer icon;
+    private Long createdTime;
+    private Long updatedTime;
+
+    @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 = "FIRST_NAME")
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    @Basic
+    @Column(name = "LAST_NAME")
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    @Lob
+    @Column(name = "ICON")
+    public ByteBuffer getIcon() {
+        return icon;
+    }
+
+    public void setIcon(ByteBuffer icon) {
+        this.icon = icon;
+    }
+
+    @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;
+
+        SharingUserEntity that = (SharingUserEntity) 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;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
new file mode 100644
index 0000000..10d901a
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/UserGroupEntity.java
@@ -0,0 +1,150 @@
+/*
+ *
+ * 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;
+
+    @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;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
new file mode 100644
index 0000000..a53a6a2
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/AbstractRepository.java
@@ -0,0 +1,138 @@
+/*
+ *
+ * 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.SharingRegistryException;
+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 SharingRegistryException {
+        return update(t);
+    }
+
+    public List<T> create(List<T> tList) throws SharingRegistryException {
+        return update(tList);
+    }
+
+    public  T update(T t) throws SharingRegistryException {
+        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 SharingRegistryException {
+        List<T> returnList = new ArrayList<>();
+        for(T temp : tList)
+            returnList.add(update(temp));
+        return returnList;
+    }
+
+    public boolean delete(Id id) throws SharingRegistryException {
+        JPAUtils.execute(entityManager -> {
+            E entity = entityManager.find(dbEntityGenericClass, id);
+            entityManager.remove(entity);
+            return entity;
+        });
+        return true;
+    }
+
+    public boolean delete(List<Id> idList) throws SharingRegistryException {
+        for(Id id : idList)
+            delete(id);
+        return true;
+    }
+
+    public T get(Id id) throws SharingRegistryException {
+        E entity = JPAUtils.execute(entityManager -> entityManager
+                .find(dbEntityGenericClass, id));
+        Mapper mapper = ObjectMapperSingleton.getInstance();
+        if(entity == null)
+            return null;
+        return mapper.map(entity, thriftGenericClass);
+    }
+
+    public boolean isExists(Id id) throws SharingRegistryException {
+        return get(id) != null;
+    }
+
+    public List<T> get(List<Id> idList) throws SharingRegistryException {
+        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 SharingRegistryException {
+        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 SharingRegistryException {
+        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";
+        if(filters != null && filters.size() != 0){
+            query += " WHERE ";
+            for(String k : filters.keySet()){
+                query += "p." + k + " = '" + 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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/DomainRepository.java
new file mode 100644
index 0000000..8cd44ef
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
new file mode 100644
index 0000000..b7137d2
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
@@ -0,0 +1,86 @@
+/*
+ *
+ * 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.db.entities.SharingEntity;
+import org.apache.airavata.sharing.registry.db.utils.DBConstants;
+import org.apache.airavata.sharing.registry.models.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.List;
+
+public class EntityRepository extends AbstractRepository<Entity, EntityEntity, String> {
+    private final static Logger logger = LoggerFactory.getLogger(EntityRepository.class);
+
+    public EntityRepository() {
+        super(Entity.class, EntityEntity.class);
+    }
+
+    public List<Entity> getChildEntities(String parentId) throws SharingRegistryException {
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.EntityTable.PARENT_ENTITY_ID, parentId);
+        return select(filters, 0, -1);
+    }
+
+    public List<Entity> searchEntities(List<String> groupIds, String entityTypeId, List<SearchCriteria> filters,
+                                       int offset, int limit) throws SharingRegistryException {
+        String groupIdString = "'";
+        for(String groupId : groupIds)
+            groupIdString += groupId + "','";
+        groupIdString = groupIdString.substring(0, groupIdString.length()-2);
+
+        String query = "SELECT E FROM " + EntityEntity.class.getSimpleName() + " E, " + SharingEntity.class.getSimpleName() + " S WHERE " +
+                "E." + DBConstants.EntityTable.ENTITY_ID + " = S." + DBConstants.SharingTable.ENTITY_ID + " AND " +
+                "S." + DBConstants.SharingTable.GROUP_ID + " IN(" + groupIdString + ") AND E." + DBConstants.EntityTable.ENTITY_TYPE_ID + "='" +
+                entityTypeId + "' AND ";
+
+        for(SearchCriteria searchCriteria : filters){
+            if(searchCriteria.getSearchField().equals(EntitySearchField.NAME)){
+                query += "E." + DBConstants.EntityTable.NAME + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.DESCRIPTION)){
+                query += "E." + DBConstants.EntityTable.DESCRIPTION + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.FULL_TEXT)){
+                query += "E." + DBConstants.EntityTable.FULL_TEXT + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.PRRENT_ENTITY_ID)){
+                query += "E." + DBConstants.EntityTable.PARENT_ENTITY_ID + " = '" + searchCriteria.getValue() + "' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.CREATED_TIME)){
+                if(searchCriteria.getSearchCondition().equals(SearchCondition.GTE)){
+                    query += "E." + DBConstants.EntityTable.CREATED_TIME + " >= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
+                }else{
+                    query += "E." + DBConstants.EntityTable.CREATED_TIME + " <= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
+                }
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.UPDATED_TIME)){
+                if(searchCriteria.getSearchCondition().equals(SearchCondition.GTE)){
+                    query += "E." + DBConstants.EntityTable.UPDATED_TIME + " >= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
+                }else{
+                    query += "E." + DBConstants.EntityTable.UPDATED_TIME + " <= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
+                }
+            }
+        }
+
+        query = query.substring(0, query.length() - 5);
+        return select(query, offset, limit);
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityTypeRepository.java
new file mode 100644
index 0000000..ed2a7e9
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/GroupMembershipRepository.java
new file mode 100644
index 0000000..87d5d4c
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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.SharingUserEntity;
+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 SharingRegistryException {
+        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 SharingRegistryException {
+        String queryString = "SELECT U FROM " + SharingUserEntity.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 SharingRegistryException {
+        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 SharingRegistryException {
+        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 SharingRegistryException {
+        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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
new file mode 100644
index 0000000..c5d683c
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/PermissionTypeRepository.java
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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.db.utils.DBConstants;
+import org.apache.airavata.sharing.registry.models.SharingRegistryException;
+import org.apache.airavata.sharing.registry.models.PermissionType;
+import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.List;
+
+public class PermissionTypeRepository extends AbstractRepository<PermissionType, PermissionTypeEntity, String> {
+    private final static Logger logger = LoggerFactory.getLogger(PermissionTypeRepository.class);
+
+    public PermissionTypeRepository() {
+        super(PermissionType.class, PermissionTypeEntity.class);
+    }
+
+    public String getGlobalPermissionTypeIdForDomain(String domainId) throws SharingRegistryException {
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.PermissionTypeTable.DOMAIN_ID, domainId);
+        filters.put(DBConstants.PermissionTypeTable.NAME, SharingRegistryServerHandler.GLOBAL_PERMISSION_NAME);
+        List<PermissionType> permissionTypeList = select(filters, 0, -1);
+        if(permissionTypeList.size() != 1){
+            throw new SharingRegistryException("GLOBAL Permission inconsistency. Found " + permissionTypeList.size()
+                    + " records with " + SharingRegistryServerHandler.GLOBAL_PERMISSION_NAME + " name");
+        }
+        return permissionTypeList.get(0).getPermissionTypeId();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
new file mode 100644
index 0000000..9c30fa4
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.db.entities.SharingEntityPK;
+import org.apache.airavata.sharing.registry.db.utils.DBConstants;
+import org.apache.airavata.sharing.registry.models.Sharing;
+import org.apache.airavata.sharing.registry.models.SharingRegistryException;
+import org.apache.airavata.sharing.registry.models.SharingType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.List;
+
+public class SharingRepository extends AbstractRepository<Sharing, SharingEntity, SharingEntityPK> {
+    private final static Logger logger = LoggerFactory.getLogger(SharingRepository.class);
+
+    public SharingRepository() {
+        super(Sharing.class, SharingEntity.class);
+    }
+
+    public List<Sharing> getIndirectSharedChildren(String parentId, String permissionTypeId) throws SharingRegistryException {
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.SharingTable.INHERITED_PARENT_ID, parentId);
+        filters.put(DBConstants.SharingTable.SHARING_TYPE, SharingType.INDIRECT_CASCADING.toString());
+        filters.put(DBConstants.SharingTable.PERMISSION_TYPE_ID, permissionTypeId);
+
+        return select(filters, 0, -1);
+    }
+
+    public List<Sharing> getCascadingPermissionsForEntity(String entityId) throws SharingRegistryException {
+        HashMap<String, String> filters = new HashMap<>();
+        filters.put(DBConstants.SharingTable.ENTITY_ID, entityId);
+        String query = "SELECT p from " + SharingEntity.class.getSimpleName() + " as p";
+        query += " WHERE ";
+        query += "p." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
+        query += "p." + DBConstants.SharingTable.SHARING_TYPE + " IN('" + SharingType.DIRECT_CASCADING.toString()
+                + "', '" + SharingType.INDIRECT_CASCADING + "') ";
+        query += " ORDER BY p.createdTime DESC";
+        return select(query, 0, -1);
+    }
+
+    public boolean hasAccess(String entityId, List<String> groupIds, List<String> permissionTypeIds) throws SharingRegistryException {
+        String query = "SELECT p from " + SharingEntity.class.getSimpleName() + " as p";
+        query += " WHERE ";
+        query += "p." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
+        String permissionTypeIdString = "'";
+        for(String permissionId : permissionTypeIds)
+            permissionTypeIdString += permissionId + "','";
+        permissionTypeIdString = permissionTypeIdString.substring(0, permissionTypeIdString.length()-2);
+        query += "p." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " IN(" + permissionTypeIdString + ") AND ";
+        String groupIdString = "'";
+        for(String groupId : groupIds)
+            groupIdString += groupId + "','";
+        groupIdString = groupIdString.substring(0, groupIdString.length()-2);
+        query += "p." + DBConstants.SharingTable.GROUP_ID + " IN(" + groupIdString + ") ";
+        query += " ORDER BY p.createdTime DESC";
+        return select(query, 0, -1).size() > 0;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
new file mode 100644
index 0000000..ed49c94
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
@@ -0,0 +1,51 @@
+/*
+ *
+ * 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.db.entities.UserGroupEntity;
+import org.apache.airavata.sharing.registry.db.utils.DBConstants;
+import org.apache.airavata.sharing.registry.models.GroupType;
+import org.apache.airavata.sharing.registry.models.SharingRegistryException;
+import org.apache.airavata.sharing.registry.models.UserGroup;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroupEntity, String> {
+    private final static Logger logger = LoggerFactory.getLogger(UserGroupRepository.class);
+
+    public UserGroupRepository() {
+        super(UserGroup.class, UserGroupEntity.class);
+    }
+
+    public List<UserGroup> getAccessibleGroups(String entityId, String permissionTypeId) throws SharingRegistryException {
+        String query = "SELECT g from " + UserGroupEntity.class.getSimpleName() + " g, " + SharingEntity.class.getSimpleName() + " s";
+        query += " WHERE ";
+        query += "g." + DBConstants.UserGroupTable.GROUP_ID + " = s." + DBConstants.SharingTable.GROUP_ID + " AND ";
+        query += "s." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
+        query += "s." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " = '" + permissionTypeId + "' AND ";
+        query += "g." + DBConstants.UserGroupTable.GROUP_TYPE + " = '" + GroupType.MULTI_USER.toString() + "'";
+        query += " ORDER BY s.createdTime DESC";
+        return select(query, 0, -1);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
new file mode 100644
index 0000000..845c0b9
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
@@ -0,0 +1,51 @@
+/*
+ *
+ * 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.db.entities.SharingUserEntity;
+import org.apache.airavata.sharing.registry.db.utils.DBConstants;
+import org.apache.airavata.sharing.registry.models.SharingRegistryException;
+import org.apache.airavata.sharing.registry.models.User;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class UserRepository extends AbstractRepository<User, SharingUserEntity, String> {
+    private final static Logger logger = LoggerFactory.getLogger(UserRepository.class);
+
+    public UserRepository() {
+        super(User.class, SharingUserEntity.class);
+    }
+
+
+    public List<User> getAccessibleUsers(String entityId, String permissionTypeId) throws SharingRegistryException {
+        String query = "SELECT u from " + SharingUserEntity.class.getSimpleName() + " u, " + SharingEntity.class.getSimpleName() + " s";
+        query += " WHERE ";
+        query += "u." + DBConstants.UserTable.USER_ID + " = s." + DBConstants.SharingTable.GROUP_ID + " AND ";
+        query += "s." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
+        query += "s." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " = '" + permissionTypeId + "'";
+        query += " ORDER BY s.createdTime DESC";
+        return select(query, 0, -1);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java
new file mode 100644
index 0000000..ed8c9b3
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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


[40/51] [abbrv] airavata git commit: adding docs

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

<TRUNCATED>

[26/51] [abbrv] airavata git commit: adding separate distribution

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
deleted file mode 100644
index 9c30fa4..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/SharingRepository.java
+++ /dev/null
@@ -1,80 +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.sharing.registry.db.repositories;
-
-import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
-import org.apache.airavata.sharing.registry.db.entities.SharingEntityPK;
-import org.apache.airavata.sharing.registry.db.utils.DBConstants;
-import org.apache.airavata.sharing.registry.models.Sharing;
-import org.apache.airavata.sharing.registry.models.SharingRegistryException;
-import org.apache.airavata.sharing.registry.models.SharingType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.List;
-
-public class SharingRepository extends AbstractRepository<Sharing, SharingEntity, SharingEntityPK> {
-    private final static Logger logger = LoggerFactory.getLogger(SharingRepository.class);
-
-    public SharingRepository() {
-        super(Sharing.class, SharingEntity.class);
-    }
-
-    public List<Sharing> getIndirectSharedChildren(String parentId, String permissionTypeId) throws SharingRegistryException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.SharingTable.INHERITED_PARENT_ID, parentId);
-        filters.put(DBConstants.SharingTable.SHARING_TYPE, SharingType.INDIRECT_CASCADING.toString());
-        filters.put(DBConstants.SharingTable.PERMISSION_TYPE_ID, permissionTypeId);
-
-        return select(filters, 0, -1);
-    }
-
-    public List<Sharing> getCascadingPermissionsForEntity(String entityId) throws SharingRegistryException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.SharingTable.ENTITY_ID, entityId);
-        String query = "SELECT p from " + SharingEntity.class.getSimpleName() + " as p";
-        query += " WHERE ";
-        query += "p." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
-        query += "p." + DBConstants.SharingTable.SHARING_TYPE + " IN('" + SharingType.DIRECT_CASCADING.toString()
-                + "', '" + SharingType.INDIRECT_CASCADING + "') ";
-        query += " ORDER BY p.createdTime DESC";
-        return select(query, 0, -1);
-    }
-
-    public boolean hasAccess(String entityId, List<String> groupIds, List<String> permissionTypeIds) throws SharingRegistryException {
-        String query = "SELECT p from " + SharingEntity.class.getSimpleName() + " as p";
-        query += " WHERE ";
-        query += "p." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
-        String permissionTypeIdString = "'";
-        for(String permissionId : permissionTypeIds)
-            permissionTypeIdString += permissionId + "','";
-        permissionTypeIdString = permissionTypeIdString.substring(0, permissionTypeIdString.length()-2);
-        query += "p." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " IN(" + permissionTypeIdString + ") AND ";
-        String groupIdString = "'";
-        for(String groupId : groupIds)
-            groupIdString += groupId + "','";
-        groupIdString = groupIdString.substring(0, groupIdString.length()-2);
-        query += "p." + DBConstants.SharingTable.GROUP_ID + " IN(" + groupIdString + ") ";
-        query += " ORDER BY p.createdTime DESC";
-        return select(query, 0, -1).size() > 0;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
deleted file mode 100644
index ed49c94..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserGroupRepository.java
+++ /dev/null
@@ -1,51 +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.sharing.registry.db.repositories;
-
-import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
-import org.apache.airavata.sharing.registry.db.entities.UserGroupEntity;
-import org.apache.airavata.sharing.registry.db.utils.DBConstants;
-import org.apache.airavata.sharing.registry.models.GroupType;
-import org.apache.airavata.sharing.registry.models.SharingRegistryException;
-import org.apache.airavata.sharing.registry.models.UserGroup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class UserGroupRepository extends AbstractRepository<UserGroup, UserGroupEntity, String> {
-    private final static Logger logger = LoggerFactory.getLogger(UserGroupRepository.class);
-
-    public UserGroupRepository() {
-        super(UserGroup.class, UserGroupEntity.class);
-    }
-
-    public List<UserGroup> getAccessibleGroups(String entityId, String permissionTypeId) throws SharingRegistryException {
-        String query = "SELECT g from " + UserGroupEntity.class.getSimpleName() + " g, " + SharingEntity.class.getSimpleName() + " s";
-        query += " WHERE ";
-        query += "g." + DBConstants.UserGroupTable.GROUP_ID + " = s." + DBConstants.SharingTable.GROUP_ID + " AND ";
-        query += "s." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
-        query += "s." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " = '" + permissionTypeId + "' AND ";
-        query += "g." + DBConstants.UserGroupTable.GROUP_TYPE + " = '" + GroupType.MULTI_USER.toString() + "'";
-        query += " ORDER BY s.createdTime DESC";
-        return select(query, 0, -1);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
deleted file mode 100644
index 845c0b9..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/UserRepository.java
+++ /dev/null
@@ -1,51 +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.sharing.registry.db.repositories;
-
-
-import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
-import org.apache.airavata.sharing.registry.db.entities.SharingUserEntity;
-import org.apache.airavata.sharing.registry.db.utils.DBConstants;
-import org.apache.airavata.sharing.registry.models.SharingRegistryException;
-import org.apache.airavata.sharing.registry.models.User;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class UserRepository extends AbstractRepository<User, SharingUserEntity, String> {
-    private final static Logger logger = LoggerFactory.getLogger(UserRepository.class);
-
-    public UserRepository() {
-        super(User.class, SharingUserEntity.class);
-    }
-
-
-    public List<User> getAccessibleUsers(String entityId, String permissionTypeId) throws SharingRegistryException {
-        String query = "SELECT u from " + SharingUserEntity.class.getSimpleName() + " u, " + SharingEntity.class.getSimpleName() + " s";
-        query += " WHERE ";
-        query += "u." + DBConstants.UserTable.USER_ID + " = s." + DBConstants.SharingTable.GROUP_ID + " AND ";
-        query += "s." + DBConstants.SharingTable.ENTITY_ID + " = '" + entityId + "' AND ";
-        query += "s." + DBConstants.SharingTable.PERMISSION_TYPE_ID + " = '" + permissionTypeId + "'";
-        query += " ORDER BY s.createdTime DESC";
-        return select(query, 0, -1);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/Committer.java
deleted file mode 100644
index ed8c9b3..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/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.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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ConnectionPool.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ConnectionPool.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ConnectionPool.java
deleted file mode 100644
index 02484f7..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ConnectionPool.java
+++ /dev/null
@@ -1,382 +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.sharing.registry.db.utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.sql.DataSource;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Stack;
-import java.util.concurrent.Semaphore;
-
-
-/**
- * A class for preallocating, recycling, and managing JDBC connections.
- */
-public class ConnectionPool {
-    private static final Logger logger = LoggerFactory.getLogger(ConnectionPool.class);
-
-    private long MAX_IDLE_TIME = 5 * 60 * 1000; // 5 minutes
-
-    private String driver;
-    private String url;
-    private String username;
-    private String password;
-    private String jdbcUrl;
-
-    private int maxConnections;
-
-    private boolean autoCommit = true;
-    private boolean waitIfBusy;
-
-    private Semaphore needConnection = new Semaphore(0);
-    private boolean stop;
-
-    private Stack<Connection> availableConnections;
-    private Stack<Connection> busyConnections;
-
-    private HashMap<Connection, Long> lastAccessTimeRecord = new HashMap<Connection, Long>();
-
-    private String urlType = "";
-
-    private DataSource datasource;
-
-    private int transactionIsolation = Connection.TRANSACTION_NONE;
-
-    private Thread clenupThread;
-    private Thread producerThread;
-
-    public ConnectionPool(String driver, String url, String username, String password, int initialConnections,
-                          int maxConnections, boolean waitIfBusy) throws SQLException {
-        this.driver = driver;
-        this.url = url;
-        this.username = username;
-        this.password = password;
-        this.urlType = "speratedURL";
-        initialize(initialConnections, maxConnections, waitIfBusy);
-    }
-
-    public ConnectionPool(String driver, String jdbcUrl, int initialConnections, int maxConnections,
-                          boolean waitIfBusy, boolean autoCommit, int transactionIsolation) throws SQLException {
-        this.driver = driver;
-        this.jdbcUrl = jdbcUrl;
-        this.urlType = "simpleURL";
-        this.autoCommit = autoCommit;
-        this.transactionIsolation = transactionIsolation;
-        initialize(initialConnections, maxConnections, waitIfBusy);
-    }
-
-    public ConnectionPool(String driver, String jdbcUrl, int initialConnections, int maxConnections, boolean waitIfBusy)
-            throws SQLException {
-        this.driver = driver;
-        this.jdbcUrl = jdbcUrl;
-        this.urlType = "simpleURL";
-        initialize(initialConnections, maxConnections, waitIfBusy);
-    }
-
-    public ConnectionPool(DataSource dataSource, int initialConnections, int maxConnections, boolean waitIfBusy)
-            throws SQLException {
-        this.urlType = "dataSource";
-        this.datasource = dataSource;
-        initialize(initialConnections, maxConnections, waitIfBusy);
-    }
-
-    /**
-     * Check if this connection pool is auto commit or not
-     *
-     * @return
-     */
-    public boolean isAutoCommit() {
-        return this.autoCommit;
-    }
-
-    private void initialize(int initialConnections, int maxConnections, boolean waitIfBusy) throws SQLException {
-        this.maxConnections = maxConnections;
-        this.waitIfBusy = waitIfBusy;
-
-        int sizeOfConnections = (initialConnections > maxConnections) ? maxConnections : initialConnections;
-
-        availableConnections = new Stack<Connection>();
-        busyConnections = new Stack<Connection>();
-
-        for (int i = 0; i < sizeOfConnections; i++) {
-            Connection con = makeNewConnection();
-            setTimeStamp(con);
-            availableConnections.push(con);
-
-        }
-
-        producerThread = new Thread(new FillUpThread());
-        producerThread.start();
-
-        clenupThread = new Thread(new CleanUpThread());
-        clenupThread.start();
-    }
-
-    public synchronized Connection getConnection() throws SQLException {
-        if (!availableConnections.isEmpty()) {
-            Connection existingConnection = availableConnections.pop();
-
-            // If connection on available list is closed (e.g.,
-            // it timed out), then remove it from available list
-            // and race for a connection again.
-            if (existingConnection.isClosed()) {
-                lastAccessTimeRecord.remove(existingConnection);
-                // notifyAll for fairness
-                notifyAll();
-            } else {
-                busyConnections.push(existingConnection);
-                setTimeStamp(existingConnection);
-                return existingConnection;
-            }
-        } else if (!waitIfBusy && busyConnections.size() >= maxConnections) {
-            // You reached maxConnections limit and waitIfBusy flag is false.
-            // Throw SQLException in such a case.
-            throw new SQLException("Connection limit reached");
-        } else {
-
-            if (busyConnections.size() < maxConnections) {
-                // available connection is empty, but total number of connection
-                // doesn't reach maxConnection. Request for more connection
-                needConnection.release();
-            }
-
-            try {
-                // wait for free connection
-                wait();
-            } catch (InterruptedException ie) {
-            }
-        }
-        // always race for connection forever
-        return getConnection();
-    }
-
-    // This explicitly makes a new connection. Called in
-    // the foreground when initializing the ConnectionPool,
-    // and called in the background when running.
-    private Connection makeNewConnection() throws SQLException {
-        try {
-            // Load database driver if not already loaded
-            Class.forName(driver);
-            Connection connection;
-            // Establish network connection to database
-            if (urlType.equals("speratedURL")) {
-                connection = DriverManager.getConnection(url, username, password);
-            } else if (urlType.equals("simpleURL")) {
-                connection = DriverManager.getConnection(jdbcUrl);
-            } else { // if(urlType.equals("dataSource")){
-                connection = datasource.getConnection();
-            }
-            connection.setTransactionIsolation(this.transactionIsolation);
-            connection.setAutoCommit(this.autoCommit);
-            return connection;
-        } catch (ClassNotFoundException cnfe) {
-            // Simplify try/catch blocks of people using this by
-            // throwing only one exception type.
-            throw new SQLException("Can't find class for driver: " + driver);
-        }
-    }
-
-    private synchronized void fillUpConnection(Connection conn) {
-        setTimeStamp(conn);
-        availableConnections.push(conn);
-
-        // notify all since new connection is created
-        notifyAll();
-    }
-
-    private void setTimeStamp(Connection connection) {
-        lastAccessTimeRecord.put(connection, System.currentTimeMillis());
-    }
-
-    // The database connection cannot be left idle for too long, otherwise TCP
-    // connection will be broken.
-    /**
-     * From http://forums.mysql.com/read.php?39,28450,57460#msg-57460 Okay, then it looks like wait_timeout on the
-     * server is killing your connection (it is set to 8 hours of idle time by default). Either set that value higher on
-     * your server, or configure your connection pool to not hold connections idle that long (I prefer the latter). Most
-     * folks I know that run MySQL with a connection pool in high-load production environments only let connections sit
-     * idle for a matter of minutes, since it only takes a few milliseconds to open a connection, and the longer one
-     * sits idle the more chance it will go "bad" because of a network hiccup or the MySQL server being restarted.
-     *
-     * @throws java.sql.SQLException
-     */
-    private boolean isConnectionStale(Connection connection) {
-        long currentTime = System.currentTimeMillis();
-        long lastAccess = lastAccessTimeRecord.get(connection);
-        if (currentTime - lastAccess > MAX_IDLE_TIME) {
-            return true;
-        } else
-            return false;
-    }
-
-    private synchronized void closeStaleConnections() {
-        // close idle connections
-        Iterator<Connection> iter = availableConnections.iterator();
-        while (iter.hasNext()) {
-            Connection existingConnection = iter.next();
-            if (isConnectionStale(existingConnection)) {
-                try {
-                    existingConnection.close();
-                    iter.remove();
-                } catch (SQLException sql) {
-                    logger.error(sql.getMessage(), sql);
-                }
-            }
-        }
-        // close busy connections that have been checked out for too long.
-        // This should not happen since this means program has bug for not
-        // releasing connections .
-        iter = busyConnections.iterator();
-        while (iter.hasNext()) {
-            Connection busyConnection = iter.next();
-            if (isConnectionStale(busyConnection)) {
-                try {
-                    busyConnection.close();
-                    iter.remove();
-                    logger.warn("****Connection has checked out too long. Forced release. Check the program for calling release connection [free(Connection) method]");
-                } catch (SQLException sql) {
-                    logger.error(sql.getMessage(), sql);
-                }
-            }
-        }
-    }
-
-    public synchronized void free(Connection connection) {
-        busyConnections.removeElement(connection);
-        availableConnections.addElement(connection);
-        // Wake up threads that are waiting for a connection
-        notifyAll();
-    }
-
-    /**
-     * Close all the connections. Use with caution: be sure no connections are in use before calling. Note that you are
-     * not <I>required</I> to call this when done with a ConnectionPool, since connections are guaranteed to be closed
-     * when garbage collected. But this method gives more control regarding when the connections are closed.
-     */
-    public synchronized void dispose() {
-        logger.info("Connection Pool Shutting down");
-
-        // stop clean up thread
-        this.stop = true;
-        this.clenupThread.interrupt();
-
-        // stop producer up thread
-        this.producerThread.interrupt();
-
-        // close all connection
-        closeConnections(availableConnections);
-        availableConnections = new Stack<Connection>();
-        closeConnections(busyConnections);
-        busyConnections = new Stack<Connection>();
-        lastAccessTimeRecord.clear();
-
-        logger.info("All connection is closed");
-
-        try {
-            this.clenupThread.join();
-            this.producerThread.join();
-        } catch (Exception e) {
-            logger.error("Cannot shutdown cleanup thread", e);
-        }
-
-        logger.info("Connection Pool Shutdown");
-    }
-
-    private void closeConnections(Stack<Connection> connections) {
-        while (!connections.isEmpty()) {
-            Connection connection = connections.pop();
-            try {
-                if (!connection.isClosed()) {
-                    connection.close();
-                }
-            } catch (SQLException sqle) {
-                // Ignore errors; garbage collect anyhow
-                logger.warn(sqle.getMessage());
-            }
-        }
-    }
-
-    public synchronized String toString() {
-        String info = "ConnectionPool(" + url + "," + username + ")" + ", available=" + availableConnections.size()
-                + ", busy=" + busyConnections.size() + ", max=" + maxConnections;
-        return (info);
-    }
-
-    class CleanUpThread implements Runnable {
-        public void run() {
-            while (!stop) {
-                try {
-                    Thread.sleep(MAX_IDLE_TIME);
-                    closeStaleConnections();
-                } catch (InterruptedException e) {
-                    logger.info("Clean up thread is interrupted to close");
-                }
-            }
-        }
-    }
-
-    class FillUpThread implements Runnable {
-        public void run() {
-            while (!stop) {
-                try {
-                    // block until get
-                    needConnection.acquire();
-
-                    Connection conn = makeNewConnection();
-                    fillUpConnection(conn);
-                } catch (SQLException e) {
-                    // cannot create connection (increase semaphore value back)
-                    needConnection.release();
-                    logger.error(e.getMessage(), e);
-                } catch (InterruptedException e) {
-                    logger.info("Fill up thread is interrupted to close");
-                    break;
-                }
-            }
-        }
-    }
-
-    public void shutdown() throws SQLException{
-        for (Connection c : availableConnections) {
-            try {
-                c.close();
-            } catch (SQLException e) {
-                logger.error("Error while closing the connection", e);
-                throw new SQLException("Error while closing the connection", e);
-            }
-        }
-
-        for (Connection c : busyConnections) {
-            try {
-                c.close();
-            } catch (SQLException e) {
-                logger.error("Error while closing the connection", e);
-                throw new SQLException("Error while closing the connection", e);
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
deleted file mode 100644
index 387e0e5..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
+++ /dev/null
@@ -1,101 +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.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 = 1000;
-
-    public static class DomainTable {
-        public static String DOMAIN_ID = "domainId";
-        public static String NAME = "name";
-        public static String DESCRIPTION = "description";
-        public static final String CREATED_TIME = "createdTime";
-        public static final String UPDATED_TIME = "updatedTime";
-    }
-
-    public static class UserTable {
-        public static String USER_ID = "userId";
-        public static String DOMAIN_ID = "domainId";
-        public static String USER_NAME = "userName";
-        public static final String CREATED_TIME = "createdTime";
-        public static final String UPDATED_TIME = "updatedTime";
-    }
-
-    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 final String CREATED_TIME = "createdTime";
-        public static final String UPDATED_TIME = "updatedTime";
-    }
-
-    public static class GroupMembershipTable {
-        public static String PARENT_ID = "parentId";
-        public static String CHILD_ID = "childId";
-        public static String CHILD_TYPE = "childType";
-        public static final String CREATED_TIME = "createdTime";
-        public static final String UPDATED_TIME = "updatedTime";
-    }
-
-    public static class EntityTypeTable {
-        public static String ENTITY_TYPE_ID = "entityTypeId";
-        public static String DOMAIN_ID = "domainId";
-        public static final String CREATED_TIME = "createdTime";
-        public static final String UPDATED_TIME = "updatedTime";
-    }
-
-    public static class PermissionTypeTable {
-        public static String ENTITY_TYPE_ID = "permissionTypeId";
-        public static String DOMAIN_ID = "domainId";
-        public static String NAME = "name";
-        public static final String CREATED_TIME = "createdTime";
-        public static final String UPDATED_TIME = "updatedTime";
-    }
-
-    public static class EntityTable {
-        public static String ENTITY_ID = "entityId";
-        public static String PARENT_ENTITY_ID = "parentEntityId";
-        public static String ENTITY_TYPE_ID = "entityTypeId";
-        public static String NAME = "name";
-        public static String DESCRIPTION = "description";
-        public static String FULL_TEXT = "fullText";
-        public static final String CREATED_TIME = "createdTime";
-        public static final String UPDATED_TIME = "updatedTime";
-    }
-
-    public static class SharingTable {
-        public static String PERMISSION_TYPE_ID = "permissionTypeId";
-        public static String ENTITY_ID = "entityId";
-        public static String GROUP_ID = "groupId";
-        public static String INHERITED_PARENT_ID = "inheritedParentId";
-        public static final String SHARING_TYPE = "sharingType";
-        public static final String CREATED_TIME = "createdTime";
-        public static final String UPDATED_TIME = "updatedTime";
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DatabaseCreator.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DatabaseCreator.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DatabaseCreator.java
deleted file mode 100644
index 5aa423c..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DatabaseCreator.java
+++ /dev/null
@@ -1,353 +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.sharing.registry.db.utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.sql.*;
-import java.util.StringTokenizer;
-
-/**
- * This class creates the database tables required for airavata with default configuration this
- * class creates derby database in server mode. User can specify required database in appropriate
- * properties files.
- */
-public class DatabaseCreator {
-    private final static Logger logger = LoggerFactory.getLogger(DatabaseCreator.class);
-
-    public enum DatabaseType {
-        derby("(?i).*derby.*"), mysql("(?i).*mysql.*"), other("");
-
-        private String pattern;
-
-        private DatabaseType(String matchingPattern) {
-            this.pattern = matchingPattern;
-        }
-
-        public String getMatchingPattern() {
-            return this.pattern;
-        }
-    }
-
-    private static DatabaseType[] supportedDatabase = new DatabaseType[] { DatabaseType.derby, DatabaseType.mysql };
-
-    private static Logger log = LoggerFactory.getLogger(DatabaseCreator.class);
-    private static final String delimiter = ";";
-
-    /**
-     * Creates database
-     *
-     * @throws Exception
-     */
-    public static void createRegistryDatabase(String prefix, Connection conn) throws Exception {
-        createDatabase(prefix, conn);
-    }
-
-
-
-    /**
-     * Checks whether database tables are created by using select * on given table name
-     *
-     * @param tableName
-     *            Table which should be existed
-     * @return <code>true</core> if checkSQL is success, else <code>false</code> .
-     */
-    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
-        try {
-
-            log.debug("Running a query to test the database tables existence.");
-
-            // check whether the tables are already created with a query
-            Statement statement = null;
-            try {
-                statement = conn.createStatement();
-                ResultSet rs = statement.executeQuery("select * from " + tableName);
-                if (rs != null) {
-                    rs.close();
-                }
-            } finally {
-                try {
-                    if (statement != null) {
-                        statement.close();
-                    }
-                } catch (SQLException e) {
-                    return false;
-                }
-            }
-        } catch (SQLException e) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * executes given sql
-     *
-     * @param sql
-     * @throws Exception
-     */
-    private static void executeSQL(String sql, Connection conn) throws Exception {
-        // Check and ignore empty statements
-        if ("".equals(sql.trim())) {
-            return;
-        }
-
-        Statement statement = null;
-        try {
-            log.debug("SQL : " + sql);
-
-            boolean ret;
-            int updateCount = 0, updateCountTotal = 0;
-            statement = conn.createStatement();
-            ret = statement.execute(sql);
-            updateCount = statement.getUpdateCount();
-            do {
-                if (!ret) {
-                    if (updateCount != -1) {
-                        updateCountTotal += updateCount;
-                    }
-                }
-                ret = statement.getMoreResults();
-                if (ret) {
-                    updateCount = statement.getUpdateCount();
-                }
-            } while (ret);
-
-            log.debug(sql + " : " + updateCountTotal + " rows affected");
-
-            SQLWarning warning = conn.getWarnings();
-            while (warning != null) {
-                log.info(warning + " sql warning");
-                warning = warning.getNextWarning();
-            }
-            conn.clearWarnings();
-        } catch (SQLException e) {
-            if (e.getSQLState().equals("X0Y32")) {
-                // eliminating the table already exception for the derby
-                // database
-                log.info("Table Already Exists", e);
-            } else {
-                throw new Exception("Error occurred while executing : " + sql, e);
-            }
-        } finally {
-            if (statement != null) {
-                try {
-                    statement.close();
-                } catch (SQLException e) {
-                    log.error("Error occurred while closing result set.", e);
-                }
-            }
-        }
-    }
-
-    /**
-     * computes relatational database type using database name
-     *
-     * @return DatabaseType
-     * @throws Exception
-     *
-     */
-    public static DatabaseType getDatabaseType(Connection conn) throws Exception {
-        try {
-            if (conn != null && (!conn.isClosed())) {
-                DatabaseMetaData metaData = conn.getMetaData();
-                String databaseProductName = metaData.getDatabaseProductName();
-                return checkType(databaseProductName);
-            }
-        } catch (SQLException e) {
-            String msg = "Failed to create Airavata database." + e.getMessage();
-            log.error(msg, e);
-            throw new Exception(msg, e);
-        }
-        return DatabaseType.other;
-    }
-
-    /**
-     * Overloaded method with String input
-     *
-     * @return DatabaseType
-     * @throws Exception
-     *
-     */
-    public static DatabaseType getDatabaseType(String dbUrl) throws Exception {
-        return checkType(dbUrl);
-    }
-
-    private static DatabaseType checkType(String text) throws Exception {
-        try {
-            if (text != null) {
-                for (DatabaseType type : supportedDatabase) {
-                    if (text.matches(type.getMatchingPattern()))
-                        return type;
-                }
-            }
-            String msg = "Unsupported database: " + text
-                    + ". Database will not be created automatically by the Airavata. "
-                    + "Please create the database using appropriate database scripts for " + "the database.";
-            throw new Exception(msg);
-
-        } catch (SQLException e) {
-            String msg = "Failed to create Airavatadatabase." + e.getMessage();
-            log.error(msg, e);
-            throw new Exception(msg, e);
-        }
-    }
-
-    /**
-     * Get scripts location which is prefix + "-" + databaseType + ".sql"
-     *
-     * @param prefix
-     * @param databaseType
-     * @return script location
-     */
-    private static String getScriptLocation(String prefix, DatabaseType databaseType) {
-        String scriptName = prefix + "-" + databaseType + ".sql";
-        log.debug("Loading database script from :" + scriptName);
-        return  scriptName;
-    }
-
-    private static void createDatabase(String prefix, Connection conn) throws Exception {
-        Statement statement = null;
-        try {
-            conn.setAutoCommit(false);
-            statement = conn.createStatement();
-            executeSQLScript(getScriptLocation(prefix, DatabaseCreator.getDatabaseType(conn)), conn);
-            conn.commit();
-            log.debug("Tables are created successfully.");
-        } catch (SQLException e) {
-            String msg = "Failed to create database tables for Airavata resource store. " + e.getMessage();
-            log.error(msg, e);
-            conn.rollback();
-            throw new Exception(msg, e);
-        } finally {
-            conn.setAutoCommit(true);
-            try {
-                if (statement != null) {
-                    statement.close();
-                }
-            } catch (SQLException e) {
-                log.error("Failed to close statement.", e);
-            }
-        }
-    }
-
-    private static void executeSQLScript(String dbscriptName, Connection conn) throws Exception {
-        StringBuffer sql = new StringBuffer();
-        BufferedReader reader = null;
-
-        try {
-            InputStream is = DatabaseCreator.class.getClassLoader().getResourceAsStream(dbscriptName);
-            if(is == null) {
-                logger.info("Script file not found at " + dbscriptName + ". Uses default database script file");
-                DatabaseType databaseType = DatabaseCreator.getDatabaseType(conn);
-                if(databaseType.equals(DatabaseType.derby)){
-                    is = DatabaseCreator.class.getClassLoader().getResourceAsStream("experiment-derby.sql");
-                }else if(databaseType.equals(DatabaseType.mysql)){
-                    is = DatabaseCreator.class.getClassLoader().getResourceAsStream("experiment-mysql.sql");
-                }
-            }
-            reader = new BufferedReader(new InputStreamReader(is));
-            String line;
-            while ((line = reader.readLine()) != null) {
-                line = line.trim();
-                if (line.startsWith("//")) {
-                    continue;
-                }
-                if (line.startsWith("--")) {
-                    continue;
-                }
-                StringTokenizer st = new StringTokenizer(line);
-                if (st.hasMoreTokens()) {
-                    String token = st.nextToken();
-                    if ("REM".equalsIgnoreCase(token)) {
-                        continue;
-                    }
-                }
-                sql.append(" ").append(line);
-
-                // SQL defines "--" as a comment to EOL
-                // and in Oracle it may contain a hint
-                // so we cannot just remove it, instead we must end it
-                if (line.indexOf("--") >= 0) {
-                    sql.append("\n");
-                }
-                if ((checkStringBufferEndsWith(sql, delimiter))) {
-                    executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
-                    sql.replace(0, sql.length(), "");
-                }
-            }
-            // Catch any statements not followed by ;
-            if (sql.length() > 0) {
-                executeSQL(sql.toString(), conn);
-            }
-        } catch (IOException e) {
-            log.error("Error occurred while executing SQL script for creating Airavata database", e);
-            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
-
-        } finally {
-            if (reader != null) {
-                reader.close();
-            }
-        }
-    }
-
-    /**
-     * Checks that a string buffer ends up with a given string. It may sound trivial with the existing JDK API but the
-     * various implementation among JDKs can make those methods extremely resource intensive and perform poorly due to
-     * massive memory allocation and copying. See
-     *
-     * @param buffer
-     *            the buffer to perform the check on
-     * @param suffix
-     *            the suffix
-     * @return <code>true</code> if the character sequence represented by the argument is a suffix of the character
-     *         sequence represented by the StringBuffer object; <code>false</code> otherwise. Note that the result will
-     *         be <code>true</code> if the argument is the empty string.
-     */
-    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
-        if (suffix.length() > buffer.length()) {
-            return false;
-        }
-        // this loop is done on purpose to avoid memory allocation performance
-        // problems on various JDKs
-        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
-        // implementation is ok though does allocation/copying
-        // StringBuffer.toString().endsWith() does massive memory
-        // allocation/copying on JDK 1.5
-        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
-        int endIndex = suffix.length() - 1;
-        int bufferIndex = buffer.length() - 1;
-        while (endIndex >= 0) {
-            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
-                return false;
-            }
-            bufferIndex--;
-            endIndex--;
-        }
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
deleted file mode 100644
index f879c15..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JPAUtils.java
+++ /dev/null
@@ -1,230 +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.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.SharingRegistryException;
-import org.apache.derby.drda.NetworkServerControl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.*;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.URI;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.Map;
-
-public class JPAUtils {
-    private final static Logger logger = LoggerFactory.getLogger(JPAUtils.class);
-
-    public static final String PERSISTENCE_UNIT_NAME = "airavata-sharing-registry";
-    public static final String SHARING_REG_JDBC_DRIVER = "sharingcatalog.jdbc.driver";
-    public static final String SHARING_REG_JDBC_URL = "sharingcatalog.jdbc.url";
-    public static final String SHARING_REG_JDBC_USER = "sharingcatalog.jdbc.user";
-    public static final String SHARING_REG_JDBC_PWD = "sharingcatalog.jdbc.password";
-    public static final String SHARING_REG_VALIDATION_QUERY = "sharingcatalog.validationQuery";
-    public static final String JPA_CACHE_SIZE = "jpa.cache.size";
-    public static final String JPA_CACHE_ENABLED = "cache.enable";
-
-    public static final String CONFIGURATION = "CONFIGURATION";
-    public static final String START_DERBY_ENABLE = "start.derby.server.mode";
-    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
-    private static NetworkServerControl server;
-    private static JdbcStorage db;
-    private static String jdbcURl;
-    private static String jdbcDriver;
-    private static String jdbcUser;
-    private static String jdbcPassword;
-
-
-    @PersistenceUnit(unitName = PERSISTENCE_UNIT_NAME)
-    protected static EntityManagerFactory factory;
-    @PersistenceContext(unitName = PERSISTENCE_UNIT_NAME)
-    private static EntityManager entityManager;
-
-    public static EntityManager getEntityManager() throws SharingRegistryException {
-        if (factory == null) {
-            String connectionProperties = "DriverClassName=" + readServerProperties(SHARING_REG_JDBC_DRIVER) + "," +
-                    "Url=" + readServerProperties(SHARING_REG_JDBC_URL) + "?autoReconnect=true," +
-                    "Username=" + readServerProperties(SHARING_REG_JDBC_USER) + "," +
-                    "Password=" + readServerProperties(SHARING_REG_JDBC_PWD) +
-                    ",validationQuery=" + readServerProperties(SHARING_REG_VALIDATION_QUERY);
-//
-
-//            String connectionProperties = "DriverClassName=com.mysql.jdbc.Driver," +
-//                    "Url=jdbc:mysql://localhost:3306/airavata_sharing_catalog?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;
-    }
-
-    public static <R> R execute(Committer<EntityManager, R> committer) throws SharingRegistryException {
-        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();
-            }
-        }
-    }
-
-    public static void initializeDB() throws SharingRegistryException {
-        jdbcDriver = readServerProperties(SHARING_REG_JDBC_DRIVER);
-        jdbcURl = readServerProperties(SHARING_REG_JDBC_URL);
-        jdbcUser = readServerProperties(SHARING_REG_JDBC_USER);
-        jdbcPassword = readServerProperties(SHARING_REG_JDBC_PWD);
-        jdbcURl = jdbcURl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-
-        if (getDBType(jdbcURl).equals("derby") && isDerbyStartEnabled()) {
-            startDerbyInServerMode();
-        }
-        db = new JdbcStorage(10, 50, jdbcURl, jdbcDriver, true);
-
-        Connection conn = null;
-        try {
-            conn = db.connect();
-            if (!DatabaseCreator.isDatabaseStructureCreated(CONFIGURATION, conn)) {
-                DatabaseCreator.createRegistryDatabase("database_scripts/sharing-registry", conn);
-                logger.info("New Database created for Sharing Catalog !!! ");
-            } else {
-                logger.info("Database already created for Sharing Catalog !!!");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RuntimeException("Database failure", e);
-        } finally {
-            db.closeConnection(conn);
-            try {
-                if(conn != null){
-                    if (!conn.getAutoCommit()) {
-                        conn.commit();
-                    }
-                    conn.close();
-                }
-            } catch (SQLException e) {
-                logger.error("Error while closing database connection...", e.getMessage(), e);
-            }
-        }
-    }
-
-    public static String getDBType(String jdbcUrl){
-        try{
-            String cleanURI = jdbcUrl.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getScheme();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static boolean isDerbyStartEnabled(){
-        try {
-            String s = ServerSettings.getSetting(START_DERBY_ENABLE);
-            if("true".equals(s)){
-                return true;
-            }
-        }  catch (ApplicationSettingsException e) {
-            logger.error("Unable to read airavata server properties", e.getMessage(), e);
-            return false;
-        }
-        return false;
-    }
-
-    public static void startDerbyInServerMode() {
-        try {
-            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
-            server = new NetworkServerControl(InetAddress.getByName("0.0.0.0"),
-                    getPort(jdbcURl),
-                    jdbcUser, jdbcPassword);
-            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
-            server.start(consoleWriter);
-        } catch (IOException e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        } catch (Exception e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        }
-    }
-
-    public static void stopDerbyInServerMode() {
-        System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "false");
-        if (server!=null){
-            try {
-                server.shutdown();
-            } catch (Exception e) {
-                logger.error("Error when stopping the derby server : "+e.getLocalizedMessage());
-            }
-        }
-    }
-
-    public static int getPort(String jdbcURL){
-        try{
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getPort();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return -1;
-        }
-    }
-
-    public static String readServerProperties(String propertyName) throws SharingRegistryException {
-        try {
-            return ServerSettings.getSetting(propertyName);
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read airavata-server.properties...", e);
-            throw new SharingRegistryException("Unable to read airavata-server.properties...");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JdbcStorage.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JdbcStorage.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JdbcStorage.java
deleted file mode 100644
index 377c50b..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/JdbcStorage.java
+++ /dev/null
@@ -1,175 +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.sharing.registry.db.utils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.*;
-
-public class JdbcStorage {
-    private static Logger log = LoggerFactory.getLogger(JdbcStorage.class);
-
-    private ConnectionPool connectionPool;
-
-    public JdbcStorage(String jdbcUrl, String jdbcDriver) {
-        // default init connection and max connection
-        this(3, 50, jdbcUrl, jdbcDriver, true);
-    }
-
-    public JdbcStorage(int initCon, int maxCon, String url, String driver, boolean enableTransactions) {
-        try {
-            if (enableTransactions) {
-                connectionPool = new ConnectionPool(driver, url, initCon, maxCon, true, false,
-                        Connection.TRANSACTION_SERIALIZABLE);
-            } else {
-                connectionPool = new ConnectionPool(driver, url, initCon, maxCon, true);
-            }
-        } catch (Exception e) {
-            throw new RuntimeException("Failed to create database connection pool.", e);
-        }
-    }
-
-    /**
-     * Check if this connection pool is auto commit or not
-     *
-     * @return
-     */
-    public boolean isAutoCommit() {
-        return connectionPool.isAutoCommit();
-    }
-
-    public void commit(Connection conn) {
-        try {
-            if (conn != null && !conn.getAutoCommit()) {
-                conn.commit();
-            }
-        } catch (SQLException sqle) {
-            log.error("Cannot commit data", sqle);
-        }
-    }
-
-    public void commitAndFree(Connection conn) {
-        commit(conn);
-        closeConnection(conn);
-    }
-
-    public void rollback(Connection conn) {
-        try {
-            if (conn != null && !conn.getAutoCommit()) {
-                conn.rollback();
-            }
-        } catch (SQLException sqle) {
-            log.error("Cannot Rollback data", sqle);
-        }
-    }
-
-    public void rollbackAndFree(Connection conn) {
-        rollback(conn);
-        closeConnection(conn);
-    }
-
-    public Connection connect() {
-
-        Connection conn = null;
-        try {
-            conn = connectionPool.getConnection();
-        } catch (SQLException e) {
-            log.error(e.getMessage(), e);
-        }
-        return conn;
-    }
-
-    /**
-     * This method is provided so that you can have better control over the statement. For example: You can use
-     * stmt.setString to convert quotation mark automatically in an UPDATE statement
-     *
-     * NOTE: Statement is closed after execution
-     */
-    public int executeUpdateAndClose(PreparedStatement stmt) throws SQLException {
-        int rows = 0;
-        try {
-            rows = stmt.executeUpdate();
-            if (rows == 0) {
-                log.info("Problem: 0 rows affected by insert/update/delete statement.");
-            }
-        } finally {
-            stmt.close();
-        }
-        return rows;
-    }
-
-    public int countRow(String tableName, String columnName) throws SQLException {
-        String query = new String("SELECT COUNT(" + columnName + ") FROM " + tableName);
-        int count = -1;
-        Connection conn = null;
-        PreparedStatement stmt = null;
-        try {
-            conn = connectionPool.getConnection();
-            stmt = conn.prepareStatement(query);
-            ResultSet rs = stmt.executeQuery();
-            rs.next();
-            count = rs.getInt(1);
-            commit(conn);
-        } catch (SQLException sql) {
-            rollback(conn);
-            throw sql;
-        } finally {
-            try {
-                if (stmt != null && !stmt.isClosed()) {
-                    stmt.close();
-                }
-            } finally {
-                closeConnection(conn);
-            }
-        }
-        return count;
-    }
-
-    public void quietlyClose(Connection conn, Statement... stmts) {
-        if (stmts != null) {
-            for (Statement stmt : stmts) {
-                try {
-                    if (stmt != null && !stmt.isClosed()) {
-                        stmt.close();
-                    }
-                } catch (SQLException sql) {
-                    log.error(sql.getMessage(), sql);
-                }
-            }
-        }
-        closeConnection(conn);
-    }
-
-    public void closeConnection(Connection conn) {
-        if (conn != null) {
-            connectionPool.free(conn);
-        }
-    }
-
-    public void closeAllConnections() {
-        if (connectionPool != null)
-            connectionPool.dispose();
-    }
-
-    public void shutdown() throws SQLException {
-        connectionPool.shutdown();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/ObjectMapperSingleton.java
deleted file mode 100644
index de6bea9..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/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.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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.java
deleted file mode 100644
index 96fdb90..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServer.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.sharing.registry.server;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SharingRegistryServer {
-    private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServer.class);
-}
\ No newline at end of file


[43/51] [abbrv] airavata git commit: updating docs

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


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

Branch: refs/heads/airavata-gov-registry
Commit: 6718761f77e943aa65ee6545af2106a44d45d51c
Parents: 87564d2
Author: scnakandala <su...@gmail.com>
Authored: Fri Oct 14 18:20:47 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Oct 14 18:20:47 2016 -0400

----------------------------------------------------------------------
 modules/sharing-registry/api-docs/sharing_cpi.html    | 12 ++++++------
 .../airavata/sharing/registry/models/Domain.java      |  2 +-
 .../airavata/sharing/registry/models/Entity.java      |  2 +-
 .../airavata/sharing/registry/models/EntityType.java  |  2 +-
 .../sharing/registry/models/GroupMembership.java      |  2 +-
 .../sharing/registry/models/PermissionType.java       |  2 +-
 .../sharing/registry/models/SearchCriteria.java       |  2 +-
 .../airavata/sharing/registry/models/Sharing.java     |  2 +-
 .../registry/models/SharingRegistryException.java     |  2 +-
 .../apache/airavata/sharing/registry/models/User.java |  2 +-
 .../airavata/sharing/registry/models/UserGroup.java   |  2 +-
 .../registry/service/cpi/SharingRegistryService.java  | 14 +++++++-------
 .../sharing-registry/thrift_models/sharing_cpi.thrift | 12 ++++++------
 13 files changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/api-docs/sharing_cpi.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/sharing_cpi.html b/modules/sharing-registry/api-docs/sharing_cpi.html
index fa1edc1..037f75e 100644
--- a/modules/sharing-registry/api-docs/sharing_cpi.html
+++ b/modules/sharing-registry/api-docs/sharing_cpi.html
@@ -64,24 +64,24 @@
 <div class="definition"><h4 id="Fn_SharingRegistryService_createDomain">Function: SharingRegistryService.createDomain</h4>
 <pre><code>string</code> createDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domainId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to create a new domainId.</p>
+</pre><p>API method to create a new domain</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateDomain">Function: SharingRegistryService.updateDomain</h4>
 <pre><code>bool</code> updateDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domainId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to update a domainId.</p>
+</pre><p>API method to update a domain</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteDomain">Function: SharingRegistryService.deleteDomain</h4>
 <pre><code>bool</code> deleteDomain(<code>string</code> domainId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to delete domainId.</p>
+</pre><p>API method to delete domain</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomain">Function: SharingRegistryService.getDomain</h4>
 <pre><code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> getDomain(<code>string</code> domainId)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to retrieve a domainId.</p>
+</pre><p>API method to retrieve a domain</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomains">Function: SharingRegistryService.getDomains</h4>
 <pre><code>list&lt;<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code>&gt;</code> getDomains(<code>i32</code> offset,
                                        <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get all domainIds.</p>
+</pre><p>API method to get all domain.</p>
 <br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_registerUser">Function: SharingRegistryService.registerUser</h4>
 <pre><code>string</code> registerUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
@@ -103,7 +103,7 @@
                                    <code>i32</code> offset,
                                    <code>i32</code> limit)
     throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
-</pre><p>API method to get a list of users in a specific domainId. Users will be reverse sorted based on the created time.</p>
+</pre><p>API method to get a list of users in a specific domain Users will be reverse sorted based on the created time.</p>
 <li>domainId : Domain id</li>
 <li>offset : Starting result number</li>
 <li>limit : Number of max results to be sent</li>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index a0e89a5..f7ea565 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : Will be set by the system</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
index 00e0068..81aaf90 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
@@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
index fe72364..50d52de 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : Will be set by the system</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
index de4d5a8..9fe3043 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * <p>System internal data type to map group memberships</p>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class GroupMembership implements org.apache.thrift.TBase<GroupMembership, GroupMembership._Fields>, java.io.Serializable, Cloneable, Comparable<GroupMembership> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupMembership");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
index 103547a..2952f7a 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : Will be set by the system</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
index c0fc452..71fd003 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
  * <li><b>searchCondition</b> : EQUAL, LIKE etc..</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class SearchCriteria implements org.apache.thrift.TBase<SearchCriteria, SearchCriteria._Fields>, java.io.Serializable, Cloneable, Comparable<SearchCriteria> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SearchCriteria");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
index 0ffa332..ed1cd61 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Sharing.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * <p>This is an internal enum type for managing sharings</p>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class Sharing implements org.apache.thrift.TBase<Sharing, Sharing._Fields>, java.io.Serializable, Cloneable, Comparable<Sharing> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Sharing");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
index 4eca646..06fa123 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * <p>Exception model used in the sharing registry service</p>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class SharingRegistryException extends TException implements org.apache.thrift.TBase<SharingRegistryException, SharingRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<SharingRegistryException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SharingRegistryException");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
index f0d3979..65b5e60 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
@@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
  * <li>updatedTime : If client provides this value then the system will use it if not the current time will be set</li>
  * 
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
index 8f5d483..8edbcc1 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
@@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
  *  <li>updatedTime : Will be set by the system</li>
  *  
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
index 70459c3..7605f82 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
@@ -34,41 +34,41 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class SharingRegistryService {
 
   public interface Iface {
 
     /**
-     * <p>API method to create a new domainId.</p>
+     * <p>API method to create a new domain</p>
      * 
      * @param domainId
      */
     public String createDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     * <p>API method to update a domainId.</p>
+     * <p>API method to update a domain</p>
      * 
      * @param domainId
      */
     public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     * <p>API method to delete domainId.</p>
+     * <p>API method to delete domain</p>
      * 
      * @param domainId
      */
     public boolean deleteDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     * <p>API method to retrieve a domainId.</p>
+     * <p>API method to retrieve a domain</p>
      * 
      * @param domainId
      */
     public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     * <p>API method to get all domainIds.</p>
+     * <p>API method to get all domain.</p>
      * 
      * @param offset
      * @param limit
@@ -104,7 +104,7 @@ public class SharingRegistryService {
     public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
-     * <p>API method to get a list of users in a specific domainId. Users will be reverse sorted based on the created time.</p>
+     * <p>API method to get a list of users in a specific domain Users will be reverse sorted based on the created time.</p>
      * <li>domainId : Domain id</li>
      * <li>offset : Starting result number</li>
      * <li>limit : Number of max results to be sent</li>

http://git-wip-us.apache.org/repos/asf/airavata/blob/6718761f/modules/sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_cpi.thrift b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
index 51d494f..6acae6d 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -25,23 +25,23 @@ include "./sharing_models.thrift"
 service SharingRegistryService {
 
     /**
-      <p>API method to create a new domainId.</p>
+      <p>API method to create a new domain</p>
     */
     string createDomain(1: required sharing_models.Domain domainId) throws (1: sharing_models.SharingRegistryException sre)
     /**
-     <p>API method to update a domainId.</p>
+     <p>API method to update a domain</p>
     */
     bool updateDomain(1: required sharing_models.Domain domainId) throws (1: sharing_models.SharingRegistryException sre)
     /**
-     <p>API method to delete domainId.</p>
+     <p>API method to delete domain</p>
     */
     bool deleteDomain(1: required string domainId) throws (1: sharing_models.SharingRegistryException sre)
     /**
-     <p>API method to retrieve a domainId.</p>
+     <p>API method to retrieve a domain</p>
     */
     sharing_models.Domain getDomain(1: required string domainId) throws (1: sharing_models.SharingRegistryException sre)
     /**
-     <p>API method to get all domainIds.</p>
+     <p>API method to get all domain.</p>
     */
     list<sharing_models.Domain> getDomains(1: required i32 offset, 2: required i32 limit) throws (1: sharing_models.SharingRegistryException sre);
 
@@ -62,7 +62,7 @@ service SharingRegistryService {
     */
     sharing_models.User getUser(1: required string userId) throws (1: sharing_models.SharingRegistryException sre)
     /**
-     <p>API method to get a list of users in a specific domainId. Users will be reverse sorted based on the created time.</p>
+     <p>API method to get a list of users in a specific domain Users will be reverse sorted based on the created time.</p>
      <li>domainId : Domain id</li>
      <li>offset : Starting result number</li>
      <li>limit : Number of max results to be sent</li>


[20/51] [abbrv] airavata git commit: adding first name, last name, email and icon to sharing user profile

Posted by sc...@apache.org.
adding first name, last name, email and icon to sharing user profile


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

Branch: refs/heads/airavata-gov-registry
Commit: 7cb338d6aaf983e91a4213cde0ee6aa05715e872
Parents: bff7655
Author: scnakandala <su...@gmail.com>
Authored: Thu Oct 13 13:51:03 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Oct 13 13:51:03 2016 -0400

----------------------------------------------------------------------
 .../registry/db/entities/SharingUserEntity.java |  34 ++
 .../main/resources/sharing-registry-derby.sql   |   3 +
 .../main/resources/sharing-registry-mysql.sql   |   3 +
 .../sharing/registry/models/Domain.java         |   2 +-
 .../sharing/registry/models/Entity.java         |   2 +-
 .../registry/models/EntitySearchField.java      |   4 +
 .../sharing/registry/models/EntityType.java     |   2 +-
 .../registry/models/GroupMembership.java        |   2 +-
 .../sharing/registry/models/PermissionType.java |   2 +-
 .../sharing/registry/models/SearchCriteria.java |   2 +-
 .../sharing/registry/models/Sharing.java        |   2 +-
 .../models/SharingRegistryException.java        |   2 +-
 .../airavata/sharing/registry/models/User.java  | 387 +++++++++++++++++--
 .../sharing/registry/models/UserGroup.java      |   2 +-
 .../service/cpi/GovRegistryService.java         |   2 +-
 .../thrift_models/sharing_models.thrift         |   7 +-
 16 files changed, 410 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
index 31e6e6e..0d17279 100644
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
+++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/entities/SharingUserEntity.java
@@ -24,6 +24,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.persistence.*;
+import java.nio.ByteBuffer;
 
 @Entity
 @Table(name = "SHARING_USER", schema = "")
@@ -32,6 +33,9 @@ public class SharingUserEntity {
     private String userId;
     private String domainId;
     private String userName;
+    private String firstName;
+    private String lastName;
+    private ByteBuffer icon;
     private Long createdTime;
     private Long updatedTime;
 
@@ -66,6 +70,36 @@ public class SharingUserEntity {
     }
 
     @Basic
+    @Column(name = "FIRST_NAME")
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    @Basic
+    @Column(name = "LAST_NAME")
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    @Lob
+    @Column(name = "ICON")
+    public ByteBuffer getIcon() {
+        return icon;
+    }
+
+    public void setIcon(ByteBuffer icon) {
+        this.icon = icon;
+    }
+
+    @Basic
     @Column(name = "CREATED_TIME")
     public Long getCreatedTime() {
         return createdTime;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql b/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql
index 4e0fab3..0e58356 100644
--- a/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql
+++ b/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql
@@ -32,6 +32,9 @@ CREATE TABLE SHARING_USER (
   USER_ID VARCHAR(255) NOT NULL,
   DOMAIN_ID VARCHAR(255) NOT NULL,
   USER_NAME VARCHAR(255) NOT NULL,
+  FIRST_NAME VARCHAR (255),
+  LAST_NAME VARCHAR (255),
+  ICON BLOB,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
   PRIMARY KEY (USER_ID),

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql b/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql
index ebb3ec0..78d5d78 100644
--- a/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql
+++ b/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql
@@ -32,6 +32,9 @@ CREATE TABLE SHARING_USER (
   USER_ID VARCHAR(255) NOT NULL,
   DOMAIN_ID VARCHAR(255) NOT NULL,
   USER_NAME VARCHAR(255) NOT NULL,
+  FIRST_NAME VARCHAR (255),
+  LAST_NAME VARCHAR (255),
+  ICON BLOB,
   CREATED_TIME BIGINT NOT NULL,
   UPDATED_TIME BIGINT NOT NULL,
   PRIMARY KEY (USER_ID),

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index f3b5d25..238ee80 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 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/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
index 6f169aa..35748f7 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 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/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
index 8a88f01..9dd62b7 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
@@ -7,6 +7,10 @@
 package org.apache.airavata.sharing.registry.models;
 
 
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
 public enum EntitySearchField implements org.apache.thrift.TEnum {
   NAME(0),
   DESCRIPTION(1),

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
index 95220e3..535260c 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 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/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
index 784ae02..032cfe7 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 public class GroupMembership implements org.apache.thrift.TBase<GroupMembership, GroupMembership._Fields>, java.io.Serializable, Cloneable, Comparable<GroupMembership> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupMembership");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
index bb3c945..ddb006c 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 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/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
index 3693a19..4e2e6e3 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 public class SearchCriteria implements org.apache.thrift.TBase<SearchCriteria, SearchCriteria._Fields>, java.io.Serializable, Cloneable, Comparable<SearchCriteria> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SearchCriteria");
 

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

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
index 91649ca..f076336 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/User.java
@@ -6,43 +6,30 @@
  */
 package org.apache.airavata.sharing.registry.models;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
 import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.nio.ByteBuffer;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 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 org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)5);
+  private static final org.apache.thrift.protocol.TField ICON_FIELD_DESC = new org.apache.thrift.protocol.TField("icon", org.apache.thrift.protocol.TType.STRING, (short)6);
+  private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)7);
+  private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)8);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -53,6 +40,9 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
   public String userId; // optional
   public String domainId; // optional
   public String userName; // optional
+  public String firstName; // optional
+  public String lastName; // optional
+  public ByteBuffer icon; // optional
   public long createdTime; // optional
   public long updatedTime; // optional
 
@@ -61,8 +51,11 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     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");
+    FIRST_NAME((short)4, "firstName"),
+    LAST_NAME((short)5, "lastName"),
+    ICON((short)6, "icon"),
+    CREATED_TIME((short)7, "createdTime"),
+    UPDATED_TIME((short)8, "updatedTime");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -83,9 +76,15 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
           return DOMAIN_ID;
         case 3: // USER_NAME
           return USER_NAME;
-        case 4: // CREATED_TIME
+        case 4: // FIRST_NAME
+          return FIRST_NAME;
+        case 5: // LAST_NAME
+          return LAST_NAME;
+        case 6: // ICON
+          return ICON;
+        case 7: // CREATED_TIME
           return CREATED_TIME;
-        case 5: // UPDATED_TIME
+        case 8: // UPDATED_TIME
           return UPDATED_TIME;
         default:
           return null;
@@ -130,7 +129,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
   private static final int __CREATEDTIME_ISSET_ID = 0;
   private static final int __UPDATEDTIME_ISSET_ID = 1;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.USER_ID,_Fields.DOMAIN_ID,_Fields.USER_NAME,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
+  private static final _Fields optionals[] = {_Fields.USER_ID,_Fields.DOMAIN_ID,_Fields.USER_NAME,_Fields.FIRST_NAME,_Fields.LAST_NAME,_Fields.ICON,_Fields.CREATED_TIME,_Fields.UPDATED_TIME};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -140,6 +139,12 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.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.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.ICON, new org.apache.thrift.meta_data.FieldMetaData("icon", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         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, 
@@ -167,6 +172,15 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     if (other.isSetUserName()) {
       this.userName = other.userName;
     }
+    if (other.isSetFirstName()) {
+      this.firstName = other.firstName;
+    }
+    if (other.isSetLastName()) {
+      this.lastName = other.lastName;
+    }
+    if (other.isSetIcon()) {
+      this.icon = org.apache.thrift.TBaseHelper.copyBinary(other.icon);
+    }
     this.createdTime = other.createdTime;
     this.updatedTime = other.updatedTime;
   }
@@ -181,6 +195,9 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
 
     this.domainId = null;
     this.userName = null;
+    this.firstName = null;
+    this.lastName = null;
+    this.icon = null;
     setCreatedTimeIsSet(false);
     this.createdTime = 0;
     setUpdatedTimeIsSet(false);
@@ -259,6 +276,88 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     }
   }
 
+  public String getFirstName() {
+    return this.firstName;
+  }
+
+  public User setFirstName(String firstName) {
+    this.firstName = firstName;
+    return this;
+  }
+
+  public void unsetFirstName() {
+    this.firstName = null;
+  }
+
+  /** Returns true if field firstName is set (has been assigned a value) and false otherwise */
+  public boolean isSetFirstName() {
+    return this.firstName != null;
+  }
+
+  public void setFirstNameIsSet(boolean value) {
+    if (!value) {
+      this.firstName = null;
+    }
+  }
+
+  public String getLastName() {
+    return this.lastName;
+  }
+
+  public User setLastName(String lastName) {
+    this.lastName = lastName;
+    return this;
+  }
+
+  public void unsetLastName() {
+    this.lastName = null;
+  }
+
+  /** Returns true if field lastName is set (has been assigned a value) and false otherwise */
+  public boolean isSetLastName() {
+    return this.lastName != null;
+  }
+
+  public void setLastNameIsSet(boolean value) {
+    if (!value) {
+      this.lastName = null;
+    }
+  }
+
+  public byte[] getIcon() {
+    setIcon(org.apache.thrift.TBaseHelper.rightSize(icon));
+    return icon == null ? null : icon.array();
+  }
+
+  public ByteBuffer bufferForIcon() {
+    return org.apache.thrift.TBaseHelper.copyBinary(icon);
+  }
+
+  public User setIcon(byte[] icon) {
+    this.icon = icon == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(icon, icon.length));
+    return this;
+  }
+
+  public User setIcon(ByteBuffer icon) {
+    this.icon = org.apache.thrift.TBaseHelper.copyBinary(icon);
+    return this;
+  }
+
+  public void unsetIcon() {
+    this.icon = null;
+  }
+
+  /** Returns true if field icon is set (has been assigned a value) and false otherwise */
+  public boolean isSetIcon() {
+    return this.icon != null;
+  }
+
+  public void setIconIsSet(boolean value) {
+    if (!value) {
+      this.icon = null;
+    }
+  }
+
   public long getCreatedTime() {
     return this.createdTime;
   }
@@ -331,6 +430,30 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       }
       break;
 
+    case FIRST_NAME:
+      if (value == null) {
+        unsetFirstName();
+      } else {
+        setFirstName((String)value);
+      }
+      break;
+
+    case LAST_NAME:
+      if (value == null) {
+        unsetLastName();
+      } else {
+        setLastName((String)value);
+      }
+      break;
+
+    case ICON:
+      if (value == null) {
+        unsetIcon();
+      } else {
+        setIcon((ByteBuffer)value);
+      }
+      break;
+
     case CREATED_TIME:
       if (value == null) {
         unsetCreatedTime();
@@ -361,6 +484,15 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     case USER_NAME:
       return getUserName();
 
+    case FIRST_NAME:
+      return getFirstName();
+
+    case LAST_NAME:
+      return getLastName();
+
+    case ICON:
+      return getIcon();
+
     case CREATED_TIME:
       return getCreatedTime();
 
@@ -384,6 +516,12 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       return isSetDomainId();
     case USER_NAME:
       return isSetUserName();
+    case FIRST_NAME:
+      return isSetFirstName();
+    case LAST_NAME:
+      return isSetLastName();
+    case ICON:
+      return isSetIcon();
     case CREATED_TIME:
       return isSetCreatedTime();
     case UPDATED_TIME:
@@ -432,6 +570,33 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
         return false;
     }
 
+    boolean this_present_firstName = true && this.isSetFirstName();
+    boolean that_present_firstName = true && that.isSetFirstName();
+    if (this_present_firstName || that_present_firstName) {
+      if (!(this_present_firstName && that_present_firstName))
+        return false;
+      if (!this.firstName.equals(that.firstName))
+        return false;
+    }
+
+    boolean this_present_lastName = true && this.isSetLastName();
+    boolean that_present_lastName = true && that.isSetLastName();
+    if (this_present_lastName || that_present_lastName) {
+      if (!(this_present_lastName && that_present_lastName))
+        return false;
+      if (!this.lastName.equals(that.lastName))
+        return false;
+    }
+
+    boolean this_present_icon = true && this.isSetIcon();
+    boolean that_present_icon = true && that.isSetIcon();
+    if (this_present_icon || that_present_icon) {
+      if (!(this_present_icon && that_present_icon))
+        return false;
+      if (!this.icon.equals(that.icon))
+        return false;
+    }
+
     boolean this_present_createdTime = true && this.isSetCreatedTime();
     boolean that_present_createdTime = true && that.isSetCreatedTime();
     if (this_present_createdTime || that_present_createdTime) {
@@ -472,6 +637,21 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     if (present_userName)
       list.add(userName);
 
+    boolean present_firstName = true && (isSetFirstName());
+    list.add(present_firstName);
+    if (present_firstName)
+      list.add(firstName);
+
+    boolean present_lastName = true && (isSetLastName());
+    list.add(present_lastName);
+    if (present_lastName)
+      list.add(lastName);
+
+    boolean present_icon = true && (isSetIcon());
+    list.add(present_icon);
+    if (present_icon)
+      list.add(icon);
+
     boolean present_createdTime = true && (isSetCreatedTime());
     list.add(present_createdTime);
     if (present_createdTime)
@@ -523,6 +703,36 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFirstName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetLastName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetIcon()).compareTo(other.isSetIcon());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetIcon()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.icon, other.icon);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     lastComparison = Boolean.valueOf(isSetCreatedTime()).compareTo(other.isSetCreatedTime());
     if (lastComparison != 0) {
       return lastComparison;
@@ -592,6 +802,36 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       }
       first = false;
     }
+    if (isSetFirstName()) {
+      if (!first) sb.append(", ");
+      sb.append("firstName:");
+      if (this.firstName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.firstName);
+      }
+      first = false;
+    }
+    if (isSetLastName()) {
+      if (!first) sb.append(", ");
+      sb.append("lastName:");
+      if (this.lastName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.lastName);
+      }
+      first = false;
+    }
+    if (isSetIcon()) {
+      if (!first) sb.append(", ");
+      sb.append("icon:");
+      if (this.icon == null) {
+        sb.append("null");
+      } else {
+        org.apache.thrift.TBaseHelper.toString(this.icon, sb);
+      }
+      first = false;
+    }
     if (isSetCreatedTime()) {
       if (!first) sb.append(", ");
       sb.append("createdTime:");
@@ -673,7 +913,31 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 4: // CREATED_TIME
+          case 4: // FIRST_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.firstName = iprot.readString();
+              struct.setFirstNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // LAST_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.lastName = iprot.readString();
+              struct.setLastNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // ICON
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.icon = iprot.readBinary();
+              struct.setIconIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // CREATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.createdTime = iprot.readI64();
               struct.setCreatedTimeIsSet(true);
@@ -681,7 +945,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 5: // UPDATED_TIME
+          case 8: // UPDATED_TIME
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.updatedTime = iprot.readI64();
               struct.setUpdatedTimeIsSet(true);
@@ -725,6 +989,27 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
           oprot.writeFieldEnd();
         }
       }
+      if (struct.firstName != null) {
+        if (struct.isSetFirstName()) {
+          oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC);
+          oprot.writeString(struct.firstName);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.lastName != null) {
+        if (struct.isSetLastName()) {
+          oprot.writeFieldBegin(LAST_NAME_FIELD_DESC);
+          oprot.writeString(struct.lastName);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.icon != null) {
+        if (struct.isSetIcon()) {
+          oprot.writeFieldBegin(ICON_FIELD_DESC);
+          oprot.writeBinary(struct.icon);
+          oprot.writeFieldEnd();
+        }
+      }
       if (struct.isSetCreatedTime()) {
         oprot.writeFieldBegin(CREATED_TIME_FIELD_DESC);
         oprot.writeI64(struct.createdTime);
@@ -762,13 +1047,22 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       if (struct.isSetUserName()) {
         optionals.set(2);
       }
-      if (struct.isSetCreatedTime()) {
+      if (struct.isSetFirstName()) {
         optionals.set(3);
       }
-      if (struct.isSetUpdatedTime()) {
+      if (struct.isSetLastName()) {
         optionals.set(4);
       }
-      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetIcon()) {
+        optionals.set(5);
+      }
+      if (struct.isSetCreatedTime()) {
+        optionals.set(6);
+      }
+      if (struct.isSetUpdatedTime()) {
+        optionals.set(7);
+      }
+      oprot.writeBitSet(optionals, 8);
       if (struct.isSetUserId()) {
         oprot.writeString(struct.userId);
       }
@@ -778,6 +1072,15 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
       if (struct.isSetUserName()) {
         oprot.writeString(struct.userName);
       }
+      if (struct.isSetFirstName()) {
+        oprot.writeString(struct.firstName);
+      }
+      if (struct.isSetLastName()) {
+        oprot.writeString(struct.lastName);
+      }
+      if (struct.isSetIcon()) {
+        oprot.writeBinary(struct.icon);
+      }
       if (struct.isSetCreatedTime()) {
         oprot.writeI64(struct.createdTime);
       }
@@ -789,7 +1092,7 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(5);
+      BitSet incoming = iprot.readBitSet(8);
       if (incoming.get(0)) {
         struct.userId = iprot.readString();
         struct.setUserIdIsSet(true);
@@ -803,10 +1106,22 @@ public class User implements org.apache.thrift.TBase<User, User._Fields>, java.i
         struct.setUserNameIsSet(true);
       }
       if (incoming.get(3)) {
+        struct.firstName = iprot.readString();
+        struct.setFirstNameIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.lastName = iprot.readString();
+        struct.setLastNameIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.icon = iprot.readBinary();
+        struct.setIconIsSet(true);
+      }
+      if (incoming.get(6)) {
         struct.createdTime = iprot.readI64();
         struct.setCreatedTimeIsSet(true);
       }
-      if (incoming.get(4)) {
+      if (incoming.get(7)) {
         struct.updatedTime = iprot.readI64();
         struct.setUpdatedTimeIsSet(true);
       }

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
index f121e63..fc77feb 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 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");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
index c355c7e..25c4553 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-13")
 public class GovRegistryService {
 
   public interface Iface {

http://git-wip-us.apache.org/repos/asf/airavata/blob/7cb338d6/modules/sharing-registry/thrift_models/sharing_models.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_models.thrift b/modules/sharing-registry/thrift_models/sharing_models.thrift
index 79bb564..69409fc 100644
--- a/modules/sharing-registry/thrift_models/sharing_models.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_models.thrift
@@ -34,8 +34,11 @@ struct Domain {
      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
+     4: optional string firstName,
+     5: optional string lastName,
+     6: optional binary icon,
+     7: optional i64 createdTime,
+     8: optional i64 updatedTime
  }
 
 enum GroupType {


[38/51] [abbrv] airavata git commit: adding api docs of the sharing registry

Posted by sc...@apache.org.
adding api docs of the sharing registry


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

Branch: refs/heads/airavata-gov-registry
Commit: d521922ffe45ee224da8390b08700d1aee3a47e2
Parents: 4bb7c6d
Author: scnakandala <su...@gmail.com>
Authored: Fri Oct 14 13:38:37 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Oct 14 13:38:37 2016 -0400

----------------------------------------------------------------------
 modules/sharing-registry/api-docs/index.html    |  77 ++++++
 .../sharing-registry/api-docs/sharing_cpi.html  | 240 +++++++++++++++++++
 .../api-docs/sharing_models.html                | 165 +++++++++++++
 modules/sharing-registry/api-docs/style.css     | 184 ++++++++++++++
 .../sharing/registry/models/Domain.java         |   2 +-
 .../sharing/registry/models/Entity.java         |   2 +-
 .../sharing/registry/models/EntityType.java     |   2 +-
 .../registry/models/GroupMembership.java        |   2 +-
 .../sharing/registry/models/PermissionType.java |   2 +-
 .../sharing/registry/models/SearchCriteria.java |   2 +-
 .../sharing/registry/models/Sharing.java        |   2 +-
 .../models/SharingRegistryException.java        |   2 +-
 .../airavata/sharing/registry/models/User.java  |   2 +-
 .../sharing/registry/models/UserGroup.java      |   2 +-
 .../service/cpi/SharingRegistryService.java     |   2 +-
 .../thrift_models/thrift-gen.sh                 |   9 +-
 16 files changed, 685 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/api-docs/index.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/index.html b/modules/sharing-registry/api-docs/index.html
new file mode 100644
index 0000000..ead6c2f
--- /dev/null
+++ b/modules/sharing-registry/api-docs/index.html
@@ -0,0 +1,77 @@
+<html><head>
+<link href="style.css" rel="stylesheet" type="text/css"/>
+<title>All Thrift declarations</title></head><body>
+<div class="container-fluid">
+<h1>All Thrift declarations</h1>
+<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
+<tr>
+<td>sharing_cpi</td><td><a href="sharing_cpi.html#Svc_SharingRegistryService">SharingRegistryService</a><br/>
+<ul>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_addChildGroupToParentGroup">addChildGroupToParentGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_addUsersToGroup">addUsersToGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createDomain">createDomain</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createEntity">createEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createEntityType">createEntityType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createGroup">createGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createPermissionType">createPermissionType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_createUser">createUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteDomain">deleteDomain</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteEntity">deleteEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteEntityType">deleteEntityType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteGroup">deleteGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deletePermissionType">deletePermissionType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_deleteUser">deleteUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getDomain">getDomain</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getDomains">getDomains</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntity">getEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntityType">getEntityType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getEntityTypes">getEntityTypes</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroup">getGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroupMembers">getGroupMembers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getGroups">getGroups</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getListOfSharedGroups">getListOfSharedGroups</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getListOfSharedUsers">getListOfSharedUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getPermissionType">getPermissionType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getPermissionTypes">getPermissionTypes</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getUser">getUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_getUsers">getUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_removeChildGroupFromParentGroup">removeChildGroupFromParentGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_removeUsersFromGroup">removeUsersFromGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_revokeEntitySharingFromGroups">revokeEntitySharingFromGroups</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_revokeEntitySharingFromUsers">revokeEntitySharingFromUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_searchEntities">searchEntities</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_shareEntityWithGroups">shareEntityWithGroups</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_shareEntityWithUsers">shareEntityWithUsers</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateDomain">updateDomain</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateEntity">updateEntity</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateEntityType">updateEntityType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updateGroup">updateGroup</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updatePermissionType">updatePermissionType</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_updatedUser">updatedUser</a></li>
+<li><a href="sharing_cpi.html#Fn_SharingRegistryService_userHasAccess">userHasAccess</a></li>
+</ul>
+</td>
+<td></td>
+<td></code></td>
+</tr><tr>
+<td>sharing_models</td><td></td>
+<td><a href="sharing_models.html#Struct_Domain">Domain</a><br/>
+<a href="sharing_models.html#Struct_Entity">Entity</a><br/>
+<a href="sharing_models.html#Enum_EntitySearchField">EntitySearchField</a><br/>
+<a href="sharing_models.html#Struct_EntityType">EntityType</a><br/>
+<a href="sharing_models.html#Enum_GroupChildType">GroupChildType</a><br/>
+<a href="sharing_models.html#Struct_GroupMembership">GroupMembership</a><br/>
+<a href="sharing_models.html#Enum_GroupType">GroupType</a><br/>
+<a href="sharing_models.html#Struct_PermissionType">PermissionType</a><br/>
+<a href="sharing_models.html#Enum_SearchCondition">SearchCondition</a><br/>
+<a href="sharing_models.html#Struct_SearchCriteria">SearchCriteria</a><br/>
+<a href="sharing_models.html#Struct_Sharing">Sharing</a><br/>
+<a href="sharing_models.html#Struct_SharingRegistryException">SharingRegistryException</a><br/>
+<a href="sharing_models.html#Enum_SharingType">SharingType</a><br/>
+<a href="sharing_models.html#Struct_User">User</a><br/>
+<a href="sharing_models.html#Struct_UserGroup">UserGroup</a><br/>
+</td>
+<td><code><a href="sharing_models.html#Const_DO_NOT_SET_AT_CLIENTS_ID">DO_NOT_SET_AT_CLIENTS_ID</a></code><br/>
+</code></td>
+</tr></table>
+</div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/api-docs/sharing_cpi.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/sharing_cpi.html b/modules/sharing-registry/api-docs/sharing_cpi.html
new file mode 100644
index 0000000..b510ecc
--- /dev/null
+++ b/modules/sharing-registry/api-docs/sharing_cpi.html
@@ -0,0 +1,240 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<link href="style.css" rel="stylesheet" type="text/css"/>
+<title>Thrift module: sharing_cpi</title></head><body>
+<div class="container-fluid">
+<h1>Thrift module: sharing_cpi</h1>
+<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
+<tr>
+<td>sharing_cpi</td><td><a href="#Svc_SharingRegistryService">SharingRegistryService</a><br/>
+<ul>
+<li><a href="#Fn_SharingRegistryService_addChildGroupToParentGroup">addChildGroupToParentGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_addUsersToGroup">addUsersToGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_createDomain">createDomain</a></li>
+<li><a href="#Fn_SharingRegistryService_createEntity">createEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_createEntityType">createEntityType</a></li>
+<li><a href="#Fn_SharingRegistryService_createGroup">createGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_createPermissionType">createPermissionType</a></li>
+<li><a href="#Fn_SharingRegistryService_createUser">createUser</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteDomain">deleteDomain</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteEntity">deleteEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteEntityType">deleteEntityType</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteGroup">deleteGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_deletePermissionType">deletePermissionType</a></li>
+<li><a href="#Fn_SharingRegistryService_deleteUser">deleteUser</a></li>
+<li><a href="#Fn_SharingRegistryService_getDomain">getDomain</a></li>
+<li><a href="#Fn_SharingRegistryService_getDomains">getDomains</a></li>
+<li><a href="#Fn_SharingRegistryService_getEntity">getEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_getEntityType">getEntityType</a></li>
+<li><a href="#Fn_SharingRegistryService_getEntityTypes">getEntityTypes</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroup">getGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroupMembers">getGroupMembers</a></li>
+<li><a href="#Fn_SharingRegistryService_getGroups">getGroups</a></li>
+<li><a href="#Fn_SharingRegistryService_getListOfSharedGroups">getListOfSharedGroups</a></li>
+<li><a href="#Fn_SharingRegistryService_getListOfSharedUsers">getListOfSharedUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_getPermissionType">getPermissionType</a></li>
+<li><a href="#Fn_SharingRegistryService_getPermissionTypes">getPermissionTypes</a></li>
+<li><a href="#Fn_SharingRegistryService_getUser">getUser</a></li>
+<li><a href="#Fn_SharingRegistryService_getUsers">getUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_removeChildGroupFromParentGroup">removeChildGroupFromParentGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_removeUsersFromGroup">removeUsersFromGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_revokeEntitySharingFromGroups">revokeEntitySharingFromGroups</a></li>
+<li><a href="#Fn_SharingRegistryService_revokeEntitySharingFromUsers">revokeEntitySharingFromUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_searchEntities">searchEntities</a></li>
+<li><a href="#Fn_SharingRegistryService_shareEntityWithGroups">shareEntityWithGroups</a></li>
+<li><a href="#Fn_SharingRegistryService_shareEntityWithUsers">shareEntityWithUsers</a></li>
+<li><a href="#Fn_SharingRegistryService_updateDomain">updateDomain</a></li>
+<li><a href="#Fn_SharingRegistryService_updateEntity">updateEntity</a></li>
+<li><a href="#Fn_SharingRegistryService_updateEntityType">updateEntityType</a></li>
+<li><a href="#Fn_SharingRegistryService_updateGroup">updateGroup</a></li>
+<li><a href="#Fn_SharingRegistryService_updatePermissionType">updatePermissionType</a></li>
+<li><a href="#Fn_SharingRegistryService_updatedUser">updatedUser</a></li>
+<li><a href="#Fn_SharingRegistryService_userHasAccess">userHasAccess</a></li>
+</ul>
+</td>
+<td></td>
+<td></code></td>
+</tr></table>
+<hr/><h2 id="Services">Services</h2>
+<h3 id="Svc_SharingRegistryService">Service: SharingRegistryService</h3>
+<div class="definition"><h4 id="Fn_SharingRegistryService_createDomain">Function: SharingRegistryService.createDomain</h4>
+<pre><code>string</code> createDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domain)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre> * Domain Operations
+*
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateDomain">Function: SharingRegistryService.updateDomain</h4>
+<pre><code>bool</code> updateDomain(<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> domain)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteDomain">Function: SharingRegistryService.deleteDomain</h4>
+<pre><code>bool</code> deleteDomain(<code>string</code> domainId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomain">Function: SharingRegistryService.getDomain</h4>
+<pre><code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code> getDomain(<code>string</code> domainId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getDomains">Function: SharingRegistryService.getDomains</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_Domain">sharing_models.Domain</a></code>&gt;</code> getDomains(<code>i32</code> offset,
+                                       <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createUser">Function: SharingRegistryService.createUser</h4>
+<pre><code>string</code> createUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre> * User Operations
+*
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updatedUser">Function: SharingRegistryService.updatedUser</h4>
+<pre><code>bool</code> updatedUser(<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> user)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteUser">Function: SharingRegistryService.deleteUser</h4>
+<pre><code>bool</code> deleteUser(<code>string</code> userId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUser">Function: SharingRegistryService.getUser</h4>
+<pre><code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code> getUser(<code>string</code> userId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getUsers">Function: SharingRegistryService.getUsers</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getUsers(<code>string</code> domain,
+                                   <code>i32</code> offset,
+                                   <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createGroup">Function: SharingRegistryService.createGroup</h4>
+<pre><code>string</code> createGroup(<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> group)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre> * Group Operations
+*
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateGroup">Function: SharingRegistryService.updateGroup</h4>
+<pre><code>bool</code> updateGroup(<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> group)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteGroup">Function: SharingRegistryService.deleteGroup</h4>
+<pre><code>bool</code> deleteGroup(<code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroup">Function: SharingRegistryService.getGroup</h4>
+<pre><code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code> getGroup(<code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroups">Function: SharingRegistryService.getGroups</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getGroups(<code>string</code> domain,
+                                         <code>i32</code> offset,
+                                         <code>i32</code> limit)
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_addUsersToGroup">Function: SharingRegistryService.addUsersToGroup</h4>
+<pre><code>bool</code> addUsersToGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
+                     <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeUsersFromGroup">Function: SharingRegistryService.removeUsersFromGroup</h4>
+<pre><code>bool</code> removeUsersFromGroup(<code>list&lt;<code>string</code>&gt;</code> userIds,
+                          <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getGroupMembers">Function: SharingRegistryService.getGroupMembers</h4>
+<pre><code>map&lt;<code>string</code>, <code><a href="sharing_models.html#Enum_GroupChildType">sharing_models.GroupChildType</a></code>&gt;</code> getGroupMembers(<code>string</code> groupId,
+                                                         <code>i32</code> offset,
+                                                         <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_addChildGroupToParentGroup">Function: SharingRegistryService.addChildGroupToParentGroup</h4>
+<pre><code>bool</code> addChildGroupToParentGroup(<code>string</code> childId,
+                                <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_removeChildGroupFromParentGroup">Function: SharingRegistryService.removeChildGroupFromParentGroup</h4>
+<pre><code>bool</code> removeChildGroupFromParentGroup(<code>string</code> childId,
+                                     <code>string</code> groupId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createEntityType">Function: SharingRegistryService.createEntityType</h4>
+<pre><code>string</code> createEntityType(<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> entityType)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre> * EntityType Operations
+*
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateEntityType">Function: SharingRegistryService.updateEntityType</h4>
+<pre><code>bool</code> updateEntityType(<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> entityType)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntityType">Function: SharingRegistryService.deleteEntityType</h4>
+<pre><code>bool</code> deleteEntityType(<code>string</code> entityTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityType">Function: SharingRegistryService.getEntityType</h4>
+<pre><code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code> getEntityType(<code>string</code> entityTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntityTypes">Function: SharingRegistryService.getEntityTypes</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_EntityType">sharing_models.EntityType</a></code>&gt;</code> getEntityTypes(<code>string</code> domain,
+                                               <code>i32</code> offset,
+                                               <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createEntity">Function: SharingRegistryService.createEntity</h4>
+<pre><code>string</code> createEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre> * Entity Operations
+*
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updateEntity">Function: SharingRegistryService.updateEntity</h4>
+<pre><code>bool</code> updateEntity(<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> entity)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deleteEntity">Function: SharingRegistryService.deleteEntity</h4>
+<pre><code>bool</code> deleteEntity(<code>string</code> entityId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getEntity">Function: SharingRegistryService.getEntity</h4>
+<pre><code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code> getEntity(<code>string</code> entityId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_searchEntities">Function: SharingRegistryService.searchEntities</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_Entity">sharing_models.Entity</a></code>&gt;</code> searchEntities(<code>string</code> userId,
+                                           <code>string</code> entityTypeId,
+                                           <code>list&lt;<code><a href="sharing_models.html#Struct_SearchCriteria">sharing_models.SearchCriteria</a></code>&gt;</code> filters,
+                                           <code>i32</code> offset,
+                                           <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedUsers">Function: SharingRegistryService.getListOfSharedUsers</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_User">sharing_models.User</a></code>&gt;</code> getListOfSharedUsers(<code>string</code> entityId,
+                                               <code>string</code> permissionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getListOfSharedGroups">Function: SharingRegistryService.getListOfSharedGroups</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_UserGroup">sharing_models.UserGroup</a></code>&gt;</code> getListOfSharedGroups(<code>string</code> entityId,
+                                                     <code>string</code> permissionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_createPermissionType">Function: SharingRegistryService.createPermissionType</h4>
+<pre><code>string</code> createPermissionType(<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> permissionType)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre> * Permission Operations
+*
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_updatePermissionType">Function: SharingRegistryService.updatePermissionType</h4>
+<pre><code>bool</code> updatePermissionType(<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> permissionType)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_deletePermissionType">Function: SharingRegistryService.deletePermissionType</h4>
+<pre><code>bool</code> deletePermissionType(<code>string</code> entityTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionType">Function: SharingRegistryService.getPermissionType</h4>
+<pre><code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code> getPermissionType(<code>string</code> permissionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_getPermissionTypes">Function: SharingRegistryService.getPermissionTypes</h4>
+<pre><code>list&lt;<code><a href="sharing_models.html#Struct_PermissionType">sharing_models.PermissionType</a></code>&gt;</code> getPermissionTypes(<code>string</code> domain,
+                                                       <code>i32</code> offset,
+                                                       <code>i32</code> limit)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithUsers">Function: SharingRegistryService.shareEntityWithUsers</h4>
+<pre><code>bool</code> shareEntityWithUsers(<code>string</code> domainId,
+                          <code>string</code> entityId,
+                          <code>list&lt;<code>string</code>&gt;</code> userList,
+                          <code>string</code> perssionTypeId,
+                          <code>bool</code> cascadePermission)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre> * Sharing Entity with Users and Groups
+*
+<br/></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromUsers">Function: SharingRegistryService.revokeEntitySharingFromUsers</h4>
+<pre><code>bool</code> revokeEntitySharingFromUsers(<code>string</code> domainId,
+                                  <code>string</code> entityId,
+                                  <code>list&lt;<code>string</code>&gt;</code> userList,
+                                  <code>string</code> perssionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_shareEntityWithGroups">Function: SharingRegistryService.shareEntityWithGroups</h4>
+<pre><code>bool</code> shareEntityWithGroups(<code>string</code> domainId,
+                           <code>string</code> entityId,
+                           <code>list&lt;<code>string</code>&gt;</code> groupList,
+                           <code>string</code> perssionTypeId,
+                           <code>bool</code> cascadePermission)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_revokeEntitySharingFromGroups">Function: SharingRegistryService.revokeEntitySharingFromGroups</h4>
+<pre><code>bool</code> revokeEntitySharingFromGroups(<code>string</code> domainId,
+                                   <code>string</code> entityId,
+                                   <code>list&lt;<code>string</code>&gt;</code> groupList,
+                                   <code>string</code> perssionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_SharingRegistryService_userHasAccess">Function: SharingRegistryService.userHasAccess</h4>
+<pre><code>bool</code> userHasAccess(<code>string</code> domainId,
+                   <code>string</code> userId,
+                   <code>string</code> entityId,
+                   <code>string</code> permissionTypeId)
+    throws <code><a href="sharing_models.html#Struct_SharingRegistryException">sharing_models.SharingRegistryException</a></code>
+</pre></div></div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/api-docs/sharing_models.html
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/sharing_models.html b/modules/sharing-registry/api-docs/sharing_models.html
new file mode 100644
index 0000000..be6bd17
--- /dev/null
+++ b/modules/sharing-registry/api-docs/sharing_models.html
@@ -0,0 +1,165 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<link href="style.css" rel="stylesheet" type="text/css"/>
+<title>Thrift module: sharing_models</title></head><body>
+<div class="container-fluid">
+<h1>Thrift module: sharing_models</h1>
+<table class="table-bordered table-striped table-condensed"><thead><th>Module</th><th>Services</th><th>Data types</th><th>Constants</th></thead>
+<tr>
+<td>sharing_models</td><td></td>
+<td><a href="#Struct_Domain">Domain</a><br/>
+<a href="#Struct_Entity">Entity</a><br/>
+<a href="#Enum_EntitySearchField">EntitySearchField</a><br/>
+<a href="#Struct_EntityType">EntityType</a><br/>
+<a href="#Enum_GroupChildType">GroupChildType</a><br/>
+<a href="#Struct_GroupMembership">GroupMembership</a><br/>
+<a href="#Enum_GroupType">GroupType</a><br/>
+<a href="#Struct_PermissionType">PermissionType</a><br/>
+<a href="#Enum_SearchCondition">SearchCondition</a><br/>
+<a href="#Struct_SearchCriteria">SearchCriteria</a><br/>
+<a href="#Struct_Sharing">Sharing</a><br/>
+<a href="#Struct_SharingRegistryException">SharingRegistryException</a><br/>
+<a href="#Enum_SharingType">SharingType</a><br/>
+<a href="#Struct_User">User</a><br/>
+<a href="#Struct_UserGroup">UserGroup</a><br/>
+</td>
+<td><code><a href="#Const_DO_NOT_SET_AT_CLIENTS_ID">DO_NOT_SET_AT_CLIENTS_ID</a></code><br/>
+</code></td>
+</tr></table>
+<hr/><h2 id="Constants">Constants</h2>
+<table class="table-bordered table-striped table-condensed"><thead><th>Constant</th><th>Type</th><th>Value</th></thead>
+<tr id="Const_DO_NOT_SET_AT_CLIENTS_ID"><td><code>DO_NOT_SET_AT_CLIENTS_ID</code></td><td><code>string</code></td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr></table><hr/><h2 id="Enumerations">Enumerations</h2>
+<div class="definition"><h3 id="Enum_GroupType">Enumeration: GroupType</h3>
+<br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>SINGLE_USER</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>MULTI_USER</code></td><td><code>1</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_GroupChildType">Enumeration: GroupChildType</h3>
+<br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>USER</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>GROUP</code></td><td><code>1</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_EntitySearchField">Enumeration: EntitySearchField</h3>
+<br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>NAME</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>DESCRIPTION</code></td><td><code>1</code></td><td>
+</td></tr>
+<tr><td><code>FULL_TEXT</code></td><td><code>2</code></td><td>
+</td></tr>
+<tr><td><code>PRRENT_ENTITY_ID</code></td><td><code>3</code></td><td>
+</td></tr>
+<tr><td><code>CREATED_TIME</code></td><td><code>4</code></td><td>
+</td></tr>
+<tr><td><code>UPDATED_TIME</code></td><td><code>5</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_SearchCondition">Enumeration: SearchCondition</h3>
+<br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>EQUAL</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>LIKE</code></td><td><code>1</code></td><td>
+</td></tr>
+<tr><td><code>GTE</code></td><td><code>2</code></td><td>
+</td></tr>
+<tr><td><code>LTE</code></td><td><code>3</code></td><td>
+</td></tr>
+</table></div>
+<div class="definition"><h3 id="Enum_SharingType">Enumeration: SharingType</h3>
+<br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>DIRECT_NON_CASCADING</code></td><td><code>0</code></td><td>
+</td></tr>
+<tr><td><code>DIRECT_CASCADING</code></td><td><code>1</code></td><td>
+</td></tr>
+<tr><td><code>INDIRECT_CASCADING</code></td><td><code>2</code></td><td>
+</td></tr>
+</table></div>
+<hr/><h2 id="Structs">Data structures</h2>
+<div class="definition"><h3 id="Struct_Domain">Struct: Domain</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_User">Struct: User</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>userId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>userName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>firstName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>lastName</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>icon</td><td><code>binary</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_UserGroup">Struct: UserGroup</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>9</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>10</td><td>groupType</td><td><code><a href="#Enum_GroupType">GroupType</a></code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_GroupMembership">Struct: GroupMembership</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>parentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>2</td><td>childId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>childType</td><td><code><a href="#Enum_GroupChildType">GroupChildType</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_EntityType">Struct: EntityType</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_SearchCriteria">Struct: SearchCriteria</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>searchField</td><td><code><a href="#Enum_EntitySearchField">EntitySearchField</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>2</td><td>value</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>searchCondition</td><td><code><a href="#Enum_SearchCondition">SearchCondition</a></code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_Entity">Struct: Entity</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>entityTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>ownerId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>parentEntityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>8</td><td>metadata</td><td><code>map&lt;<code>string</code>, <code>string</code>&gt;</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>9</td><td>fullText</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>10</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>11</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_PermissionType">Struct: PermissionType</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td><code>"DO_NOT_SET_AT_CLIENTS_ID"</code></td></tr>
+<tr><td>2</td><td>domainId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>name</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>description</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_Sharing">Struct: Sharing</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>permissionTypeId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>2</td><td>entityId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>3</td><td>groupId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>4</td><td>sharingType</td><td><code><a href="#Enum_SharingType">SharingType</a></code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>5</td><td>inheritedParentId</td><td><code>string</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>6</td><td>createdTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+<tr><td>7</td><td>updatedTime</td><td><code>i64</code></td><td></td><td>optional</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_SharingRegistryException">Exception: SharingRegistryException</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
+<tr><td>1</td><td>message</td><td><code>string</code></td><td></td><td>required</td><td></td></tr>
+</table><br/></div></div></body></html>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/api-docs/style.css
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/api-docs/style.css b/modules/sharing-registry/api-docs/style.css
new file mode 100644
index 0000000..34fd9d7
--- /dev/null
+++ b/modules/sharing-registry/api-docs/style.css
@@ -0,0 +1,184 @@
+/*!
+ * Bootstrap v2.0.3
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
+.clearfix:after{clear:both;}
+.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
+.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
+input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover{color:#005580;text-decoration:underline;}
+.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
+.row:after{clear:both;}
+[class*="span"]{float:left;margin-left:20px;}
+.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
+.span12{width:940px;}
+.span11{width:860px;}
+.span10{width:780px;}
+.span9{width:700px;}
+.span8{width:620px;}
+.span7{width:540px;}
+.span6{width:460px;}
+.span5{width:380px;}
+.span4{width:300px;}
+.span3{width:220px;}
+.span2{width:140px;}
+.span1{width:60px;}
+.offset12{margin-left:980px;}
+.offset11{margin-left:900px;}
+.offset10{margin-left:820px;}
+.offset9{margin-left:740px;}
+.offset8{margin-left:660px;}
+.offset7{margin-left:580px;}
+.offset6{margin-left:500px;}
+.offset5{margin-left:420px;}
+.offset4{margin-left:340px;}
+.offset3{margin-left:260px;}
+.offset2{margin-left:180px;}
+.offset1{margin-left:100px;}
+.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
+.row-fluid:after{clear:both;}
+.row-fluid [class*="span"]{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574%;*margin-left:2.0744680846382977%;}
+.row-fluid [class*="span"]:first-child{margin-left:0;}
+.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%;}
+.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%;}
+.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%;}
+.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%;}
+.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%;}
+.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%;}
+.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%;}
+.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%;}
+.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%;}
+.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%;}
+.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%;}
+.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%;}
+.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
+.container:after{clear:both;}
+.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
+.container-fluid:after{clear:both;}
+p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
+.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
+h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
+h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
+h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
+h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;}
+h4,h5,h6{line-height:18px;}
+h4{font-size:14px;}h4 small{font-size:12px;}
+h5{font-size:12px;}
+h6{font-size:11px;color:#999999;text-transform:uppercase;}
+.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
+.page-header h1{line-height:1;}
+ul,ol{padding:0;margin:0 0 9px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+ul{list-style:disc;}
+ol{list-style:decimal;}
+li{line-height:18px;}
+ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
+dl{margin-bottom:18px;}
+dt,dd{line-height:18px;}
+dt{font-weight:bold;line-height:17px;}
+dd{margin-left:9px;}
+.dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+.dl-horizontal dd{margin-left:130px;}
+hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+.muted{color:#999999;}
+abbr[title]{cursor:help;border-bottom:1px dotted #ddd;}
+abbr.initialism{font-size:90%;text-transform:uppercase;}
+blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
+blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;}
+small{font-size:100%;}
+cite{font-style:normal;}
+code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
+pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;}
+pre code{padding:0;color:inherit;background-color:transparent;border:0;}
+.pre-scrollable{max-height:340px;overflow-y:scroll;}
+.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
+.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
+a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
+.label-important,.badge-important{background-color:#b94a48;}
+.label-important[href],.badge-important[href]{background-color:#953b39;}
+.label-warning,.badge-warning{background-color:#f89406;}
+.label-warning[href],.badge-warning[href]{background-color:#c67605;}
+.label-success,.badge-success{background-color:#468847;}
+.label-success[href],.badge-success[href]{background-color:#356635;}
+.label-info,.badge-info{background-color:#3a87ad;}
+.label-info[href],.badge-info[href]{background-color:#2d6987;}
+.label-inverse,.badge-inverse{background-color:#333333;}
+.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
+table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
+.table th{font-weight:bold;}
+.table thead th{vertical-align:bottom;}
+.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #dddddd;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
+.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;}
+.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
+.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
+.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
+.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
+.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
+table .span1{float:none;width:44px;margin-left:0;}
+table .span2{float:none;width:124px;margin-left:0;}
+table .span3{float:none;width:204px;margin-left:0;}
+table .span4{float:none;width:284px;margin-left:0;}
+table .span5{float:none;width:364px;margin-left:0;}
+table .span6{float:none;width:444px;margin-left:0;}
+table .span7{float:none;width:524px;margin-left:0;}
+table .span8{float:none;width:604px;margin-left:0;}
+table .span9{float:none;width:684px;margin-left:0;}
+table .span10{float:none;width:764px;margin-left:0;}
+table .span11{float:none;width:844px;margin-left:0;}
+table .span12{float:none;width:924px;margin-left:0;}
+table .span13{float:none;width:1004px;margin-left:0;}
+table .span14{float:none;width:1084px;margin-left:0;}
+table .span15{float:none;width:1164px;margin-left:0;}
+table .span16{float:none;width:1244px;margin-left:0;}
+table .span17{float:none;width:1324px;margin-left:0;}
+table .span18{float:none;width:1404px;margin-left:0;}
+table .span19{float:none;width:1484px;margin-left:0;}
+table .span20{float:none;width:1564px;margin-left:0;}
+table .span21{float:none;width:1644px;margin-left:0;}
+table .span22{float:none;width:1724px;margin-left:0;}
+table .span23{float:none;width:1804px;margin-left:0;}
+table .span24{float:none;width:1884px;margin-left:0;}
+/* Auto-generated CSS for generated Thrift docs */
+h3, h4 { margin-bottom: 6px; }
+div.definition { border: 1px solid #CCC; margin-bottom: 10px; padding: 10px; }
+div.extends { margin: -0.5em 0 1em 5em }
+td { vertical-align: top; }
+table { empty-cells: show; }
+code { line-height: 20px; }
+.table-bordered th, .table-bordered td { border-bottom: 1px solid #DDDDDD; }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index f5d7135..7d8270f 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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/d521922f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
index 215960f..81b8b2b 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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/d521922f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
index ca34bd1..cfce3e1 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntityType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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/d521922f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
index 9386b5e..629cf26 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/GroupMembership.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class GroupMembership implements org.apache.thrift.TBase<GroupMembership, GroupMembership._Fields>, java.io.Serializable, Cloneable, Comparable<GroupMembership> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupMembership");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
index 21097c2..f7e041f 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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/d521922f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
index 94b952d..b7e5d91 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class SearchCriteria implements org.apache.thrift.TBase<SearchCriteria, SearchCriteria._Fields>, java.io.Serializable, Cloneable, Comparable<SearchCriteria> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SearchCriteria");
 

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

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

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
index b004939..93819bd 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 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");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
index 598d80f..fc4f384 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
@@ -34,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)")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-14")
 public class SharingRegistryService {
 
   public interface Iface {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d521922f/modules/sharing-registry/thrift_models/thrift-gen.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/thrift-gen.sh b/modules/sharing-registry/thrift_models/thrift-gen.sh
index c9f2db9..0119a98 100755
--- a/modules/sharing-registry/thrift_models/thrift-gen.sh
+++ b/modules/sharing-registry/thrift_models/thrift-gen.sh
@@ -13,4 +13,11 @@ cp -r org/apache/airavata/sharing/registry/service/cpi/ ../../sharing-registry-s
 
 cd ..
 
-rm -r gen-java
\ No newline at end of file
+rm -r gen-java
+
+thrift --gen html sharing_models.thrift
+thrift --gen html sharing_cpi.thrift
+
+rm -r ../api-docs
+mv gen-html ../api-docs
+rm -r gen-html


[21/51] [abbrv] airavata git commit: Approved and merge pull request 54 into develop branch

Posted by sc...@apache.org.
Approved and merge pull request 54 into develop branch


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

Branch: refs/heads/airavata-gov-registry
Commit: a8e033358a6a315aa959fc51715b7d1bbfb2db01
Parents: 7cb338d c9e26ec
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Thu Oct 13 14:25:14 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Thu Oct 13 14:25:14 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    59 +
 .../java/org/apache/airavata/api/Airavata.java  | 10345 +++++++++++------
 .../credentialsummary/CredentialSummary.java    |   826 ++
 .../credential/store/credential/Credential.java |    11 +
 .../server/CredentialStoreServerHandler.java    |    96 +-
 .../store/store/impl/db/CredentialsDAO.java     |    15 +-
 .../store/store/impl/db/CredentialsDAOTest.java |     3 +-
 .../store/store/impl/db/SSHCredentialTest.java  |     2 +-
 .../store/cpi/CredentialStoreService.java       |  4086 ++++++-
 .../store/datamodel/CertificateCredential.java  |    27 +-
 .../store/datamodel/CommunityUser.java          |    26 +-
 .../store/datamodel/PasswordCredential.java     |    27 +-
 .../store/datamodel/SSHCredential.java          |   142 +-
 .../store/datamodel/SSHCredentialSummary.java   |   914 ++
 .../exception/CredentialStoreException.java     |     2 +-
 .../airavata-apis/airavata_api.thrift           |    43 +
 .../component-cpis/credential-store-cpi.thrift  |     9 +-
 .../credential_store_data_models.thrift         |    62 -
 .../credential_store_data_models.thrift         |    72 +
 .../credential_summary.thrift                   |    32 +
 .../resource_catalog_models.thrift              |     3 +-
 .../generate-thrift-stubs.sh                    |    24 +
 22 files changed, 12492 insertions(+), 4334 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a8e03335/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------


[25/51] [abbrv] airavata git commit: adding separate distribution

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
deleted file mode 100644
index 7f2eb32..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ /dev/null
@@ -1,613 +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.sharing.registry.server;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.sharing.registry.db.entities.GroupMembershipEntityPK;
-import org.apache.airavata.sharing.registry.db.entities.SharingEntityPK;
-import 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.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.lang.reflect.Field;
-import java.util.*;
-
-public class SharingRegistryServerHandler implements GovRegistryService.Iface{
-    private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServerHandler.class);
-
-    public static String GLOBAL_PERMISSION_NAME = "OWNER";
-
-    private DomainRepository domainRepository;
-    private UserRepository userRepository;
-    private UserGroupRepository userGroupRepository;
-    private GroupMembershipRepository groupMembershipRepository;
-    private EntityTypeRepository entityTypeRepository;
-    private PermissionTypeRepository permissionTypeRepository;
-    private EntityRepository entityRepository;
-    private SharingRepository sharingRepository;
-
-    public SharingRegistryServerHandler() throws ApplicationSettingsException, TException {
-        JPAUtils.initializeDB();
-
-        this.domainRepository = new DomainRepository();
-        this.userRepository = new UserRepository();
-        this.userGroupRepository = new UserGroupRepository();
-        this.groupMembershipRepository = new GroupMembershipRepository();
-        this.entityTypeRepository = new EntityTypeRepository();
-        this.permissionTypeRepository = new PermissionTypeRepository();
-        this.entityRepository = new EntityRepository();
-        this.sharingRepository = new SharingRepository();
-    }
-
-    /**
-     * * Domain Operations
-     * *
-     */
-    @Override
-    public String createDomain(Domain domain) throws SharingRegistryException, TException {
-        if(domainRepository.get(domain.domainId) != null)
-            throw new SharingRegistryException("There exist domain with given domain id");
-
-        domain.setCreatedTime(System.currentTimeMillis());
-        domain.setUpdatedTime(System.currentTimeMillis());
-        domainRepository.create(domain);
-
-        //create the global permission for the domain
-        PermissionType permissionType = new PermissionType();
-        permissionType.setPermissionTypeId(domain.domainId+":"+GLOBAL_PERMISSION_NAME);
-        permissionType.setDomainId(domain.domainId);
-        permissionType.setName(GLOBAL_PERMISSION_NAME);
-        permissionType.setDescription("GLOBAL permission to " + domain.domainId);
-        permissionType.setCreatedTime(System.currentTimeMillis());
-        permissionType.setUpdatedTime(System.currentTimeMillis());
-        permissionTypeRepository.create(permissionType);
-
-        return domain.domainId;
-    }
-
-    @Override
-    public boolean updateDomain(Domain domain) throws SharingRegistryException, TException {
-        Domain oldDomain = domainRepository.get(domain.domainId);
-        domain.setCreatedTime(oldDomain.createdTime);
-        domain.setUpdatedTime(System.currentTimeMillis());
-        domain = getUpdatedObject(oldDomain, domain);
-        domainRepository.update(domain);
-        return true;
-    }
-
-    @Override
-    public boolean deleteDomain(String domainId) throws SharingRegistryException, TException {
-        domainRepository.delete(domainId);
-        return true;
-    }
-
-    @Override
-    public Domain getDomain(String domainId) throws SharingRegistryException, TException {
-        return domainRepository.get(domainId);
-    }
-
-    @Override
-    public List<Domain> getDomains(int offset, int limit) throws TException {
-        return domainRepository.select(new HashMap<>(), offset, limit);
-    }
-
-    /**
-     * * User Operations
-     * *
-     */
-    @Override
-    public String createUser(User user) throws SharingRegistryException, TException {
-        if(userRepository.get(user.userId) != null)
-            throw new SharingRegistryException("There exist user with given user id");
-
-        user.setCreatedTime(System.currentTimeMillis());
-        user.setUpdatedTime(System.currentTimeMillis());
-        userRepository.create(user);
-
-        UserGroup userGroup = new UserGroup();
-        userGroup.setGroupId(user.userId);
-        userGroup.setDomainId(user.domainId);
-        userGroup.setName(user.userName);
-        userGroup.setDescription("user " + user.userName + " group");
-        userGroup.setOwnerId(user.userId);
-        userGroup.setGroupType(GroupType.SINGLE_USER);
-        createGroup(userGroup);
-
-        return user.userId;
-    }
-
-    @Override
-    public boolean updatedUser(User user) throws SharingRegistryException, TException {
-        User oldUser = userRepository.get(user.userId);
-        user.setCreatedTime(oldUser.createdTime);
-        user.setUpdatedTime(System.currentTimeMillis());
-        user = getUpdatedObject(oldUser, user);
-        userRepository.update(user);
-
-        UserGroup userGroup = userGroupRepository.get(user.userId);
-        userGroup.setName(user.userName);
-        userGroup.setDescription("user " + user.userName + " group");
-        updateGroup(userGroup);
-        return true;
-    }
-
-    @Override
-    public boolean deleteUser(String userId) throws SharingRegistryException, TException {
-        userRepository.delete(userId);
-        userGroupRepository.delete(userId);
-        return true;
-    }
-
-    @Override
-    public User getUser(String userId) throws SharingRegistryException, TException {
-        return userRepository.get(userId);
-    }
-
-    @Override
-    public List<User> getUsers(String domain, int offset, int limit) throws SharingRegistryException, TException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.UserTable.DOMAIN_ID, domain);
-        return userRepository.select(filters, offset, limit);
-    }
-
-    /**
-     * * Group Operations
-     * *
-     */
-    @Override
-    public String createGroup(UserGroup group) throws SharingRegistryException, TException {
-        if(userGroupRepository.get(group.groupId) != null)
-            throw new SharingRegistryException("There exist group with given group id");
-
-        group.setCreatedTime(System.currentTimeMillis());
-        group.setUpdatedTime(System.currentTimeMillis());
-        userGroupRepository.create(group);
-        return group.groupId;
-    }
-
-    @Override
-    public boolean updateGroup(UserGroup group) throws SharingRegistryException, TException {
-        group.setUpdatedTime(System.currentTimeMillis());
-        UserGroup oldGroup = userGroupRepository.get(group.groupId);
-        group.setCreatedTime(oldGroup.createdTime);
-        group = getUpdatedObject(oldGroup, group);
-        userGroupRepository.update(group);
-        return true;
-    }
-
-    @Override
-    public boolean deleteGroup(String groupId) throws SharingRegistryException, TException {
-        userGroupRepository.delete(groupId);
-        return true;
-    }
-
-    @Override
-    public UserGroup getGroup(String groupId) throws SharingRegistryException, TException {
-        return userGroupRepository.get(groupId);
-    }
-
-    @Override
-    public List<UserGroup> getGroups(String domain, int offset, int limit) throws TException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.UserTable.DOMAIN_ID, domain);
-        return userGroupRepository.select(filters, offset, limit);
-    }
-
-    @Override
-    public boolean addUsersToGroup(List<String> userIds, String groupId) throws SharingRegistryException, TException {
-        for(int i=0; i < userIds.size(); i++){
-            GroupMembership groupMembership = new GroupMembership();
-            groupMembership.setParentId(groupId);
-            groupMembership.setChildId(userIds.get(i));
-            groupMembership.setChildType(GroupChildType.USER);
-            groupMembership.setCreatedTime(System.currentTimeMillis());
-            groupMembership.setUpdatedTime(System.currentTimeMillis());
-            groupMembershipRepository.create(groupMembership);
-        }
-        return true;
-    }
-
-    @Override
-    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws SharingRegistryException, TException {
-        for(int i=0; i < userIds.size(); i++){
-            GroupMembershipEntityPK groupMembershipEntityPK = new GroupMembershipEntityPK();
-            groupMembershipEntityPK.setParentId(groupId);
-            groupMembershipEntityPK.setChildId(userIds.get(i));
-            groupMembershipRepository.delete(groupMembershipEntityPK);
-        }
-        return true;
-    }
-
-    @Override
-    public Map<String, GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws SharingRegistryException, TException {
-        HashMap<String, GroupChildType> groupMembers = new HashMap<>();
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.GroupMembershipTable.PARENT_ID, groupId);
-        List<GroupMembership> groupMembershipList = groupMembershipRepository.select(filters, 0, -1);
-        groupMembershipList.stream().forEach(gm->{groupMembers.put(gm.getChildId(), gm.getChildType());});
-        return groupMembers;
-    }
-
-    @Override
-    public boolean addChildGroupToParentGroup(String childId, String groupId) throws SharingRegistryException, TException {
-        //Todo check for cyclic dependencies
-        GroupMembership groupMembership = new GroupMembership();
-        groupMembership.setParentId(groupId);
-        groupMembership.setChildId(childId);
-        groupMembership.setChildType(GroupChildType.GROUP);
-        groupMembership.setCreatedTime(System.currentTimeMillis());
-        groupMembership.setUpdatedTime(System.currentTimeMillis());
-        groupMembershipRepository.create(groupMembership);
-        return true;
-    }
-
-    @Override
-    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws SharingRegistryException, TException {
-        GroupMembershipEntityPK groupMembershipEntityPK = new GroupMembershipEntityPK();
-        groupMembershipEntityPK.setParentId(groupId);
-        groupMembershipEntityPK.setChildId(childId);
-        groupMembershipRepository.delete(groupMembershipEntityPK);
-        return true;
-    }
-
-    /**
-     * * EntityType Operations
-     * *
-     */
-    @Override
-    public String createEntityType(EntityType entityType) throws SharingRegistryException, TException {
-        if(entityTypeRepository.get(entityType.entityTypeId) != null)
-            throw new SharingRegistryException("There exist EntityType with given EntityType id");
-
-        entityType.setCreatedTime(System.currentTimeMillis());
-        entityType.setUpdatedTime(System.currentTimeMillis());
-        entityTypeRepository.create(entityType);
-        return entityType.entityTypeId;
-    }
-
-    @Override
-    public boolean updateEntityType(EntityType entityType) throws SharingRegistryException, TException {
-        entityType.setUpdatedTime(System.currentTimeMillis());
-        EntityType oldEntityType = entityTypeRepository.get(entityType.entityTypeId);
-        entityType.setCreatedTime(oldEntityType.createdTime);
-        entityType = getUpdatedObject(oldEntityType, entityType);
-        entityTypeRepository.update(entityType);
-        return true;
-    }
-
-    @Override
-    public boolean deleteEntityType(String entityTypeId) throws SharingRegistryException, TException {
-        entityTypeRepository.delete(entityTypeId);
-        return true;
-    }
-
-    @Override
-    public EntityType getEntityType(String entityTypeId) throws SharingRegistryException, TException {
-        return entityTypeRepository.get(entityTypeId);
-    }
-
-    @Override
-    public List<EntityType> getEntityTypes(String domain, int offset, int limit) throws TException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.EntityTypeTable.DOMAIN_ID, domain);
-        return entityTypeRepository.select(domain, offset, limit);
-    }
-
-    /**
-     * * Permission Operations
-     * *
-     */
-    @Override
-    public String createPermissionType(PermissionType permissionType) throws SharingRegistryException, TException {
-        if(permissionTypeRepository.get(permissionType.permissionTypeId) != null)
-            throw new SharingRegistryException("There exist PermissionType with given PermissionType id");
-        permissionType.setCreatedTime(System.currentTimeMillis());
-        permissionType.setUpdatedTime(System.currentTimeMillis());
-        permissionTypeRepository.create(permissionType);
-        return permissionType.permissionTypeId;
-    }
-
-    @Override
-    public boolean updatePermissionType(PermissionType permissionType) throws SharingRegistryException, TException {
-        permissionType.setUpdatedTime(System.currentTimeMillis());
-        PermissionType oldPermissionType = permissionTypeRepository.get(permissionType.permissionTypeId);
-        permissionType = getUpdatedObject(oldPermissionType, permissionType);
-        permissionTypeRepository.update(permissionType);
-        return true;
-    }
-
-    @Override
-    public boolean deletePermissionType(String entityTypeId) throws SharingRegistryException, TException {
-        permissionTypeRepository.delete(entityTypeId);
-        return true;
-    }
-
-    @Override
-    public PermissionType getPermissionType(String permissionTypeId) throws SharingRegistryException, TException {
-        return permissionTypeRepository.get(permissionTypeId);
-    }
-
-    @Override
-    public List<PermissionType> getPermissionTypes(String domain, int offset, int limit) throws SharingRegistryException, TException {
-        HashMap<String, String> filters = new HashMap<>();
-        filters.put(DBConstants.PermissionTypeTable.DOMAIN_ID, domain);
-        return permissionTypeRepository.select(filters, offset, limit);
-    }
-
-    /**
-     * * Entity Operations
-     * *
-     */
-    @Override
-    public String createEntity(Entity entity) throws SharingRegistryException, TException {
-        if(entityRepository.get(entity.entityId) != null)
-            throw new SharingRegistryException("There exist Entity with given Entity id");
-
-        if(!userRepository.isExists(entity.getOwnerId())){
-            User user = new User();
-            user.setUserId(entity.getOwnerId());
-            user.setDomainId(entity.domainId);
-            user.setUserName(user.userId.split("@")[0]);
-
-            createUser(user);
-        }
-
-        entity.setCreatedTime(System.currentTimeMillis());
-        entity.setUpdatedTime(System.currentTimeMillis());
-        entityRepository.create(entity);
-
-        //Assigning global permission for the owner
-        Sharing newSharing = new Sharing();
-        newSharing.setPermissionTypeId(permissionTypeRepository.getGlobalPermissionTypeIdForDomain(entity.domainId));
-        newSharing.setEntityId(entity.entityId);
-        newSharing.setGroupId(entity.ownerId);
-        newSharing.setSharingType(SharingType.DIRECT_CASCADING);
-        newSharing.setInheritedParentId(entity.entityId);
-        newSharing.setCreatedTime(System.currentTimeMillis());
-        newSharing.setUpdatedTime(System.currentTimeMillis());
-
-        sharingRepository.create(newSharing);
-
-        //creating records for inherited permissions
-        if(entity.getParentEntityId() != null && entity.getParentEntityId() != ""){
-            List<Sharing> sharings = sharingRepository.getCascadingPermissionsForEntity(entity.parentEntityId);
-            for(Sharing sharing : sharings){
-                newSharing = new Sharing();
-                newSharing.setPermissionTypeId(sharing.permissionTypeId);
-                newSharing.setEntityId(entity.entityId);
-                newSharing.setGroupId(sharing.groupId);
-                newSharing.setInheritedParentId(sharing.inheritedParentId);
-                newSharing.setSharingType(SharingType.INDIRECT_CASCADING);
-                newSharing.setCreatedTime(System.currentTimeMillis());
-                newSharing.setUpdatedTime(System.currentTimeMillis());
-
-                sharingRepository.create(newSharing);
-            }
-        }
-
-        return entity.entityId;
-    }
-
-    @Override
-    public boolean updateEntity(Entity entity) throws SharingRegistryException, TException {
-        //TODO Check for permission changes
-        entity.setUpdatedTime(System.currentTimeMillis());
-        Entity oldEntity = entityRepository.get(entity.getEntityId());
-        entity.setCreatedTime(oldEntity.createdTime);
-        entity = getUpdatedObject(oldEntity, entity);
-        entityRepository.update(entity);
-        return true;
-    }
-
-    @Override
-    public boolean deleteEntity(String entityId) throws SharingRegistryException, TException {
-        //TODO Check for permission changes
-        entityRepository.delete(entityId);
-        return true;
-    }
-
-    @Override
-    public Entity getEntity(String entityId) throws SharingRegistryException, TException {
-        return entityRepository.get(entityId);
-    }
-
-    @Override
-    public List<Entity> searchEntities(String userId, String entityTypeId, List<SearchCriteria> filters,
-                                       int offset, int limit) throws SharingRegistryException, TException {
-        List<String> groupIds = new ArrayList<>();
-        groupIds.add(userId);
-        groupMembershipRepository.getAllParentMembershipsForChild(userId).stream().forEach(gm->groupIds.add(gm.parentId));
-        return entityRepository.searchEntities(groupIds, entityTypeId, filters, offset, limit);
-    }
-
-    @Override
-    public List<User> getListOfSharedUsers(String entityId, String permissionTypeId) throws SharingRegistryException, TException {
-        return userRepository.getAccessibleUsers(entityId, permissionTypeId);
-    }
-
-    @Override
-    public List<UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws SharingRegistryException, TException {
-        return userGroupRepository.getAccessibleGroups(entityId, permissionTypeId);
-    }
-
-    /**
-     * * Sharing Entity with Users and Groups
-     * *
-     *
-     * @param entityId
-     * @param userList
-     * @param permissionType
-     */
-    @Override
-    public boolean shareEntityWithUsers(String entityId, List<String> userList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
-        return shareEntity(entityId, userList, permissionTypeId, GroupType.SINGLE_USER, cascadePermission);
-    }
-
-    @Override
-    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String permissionTypeId, boolean cascadePermission) throws SharingRegistryException, TException {
-        return shareEntity(entityId, groupList, permissionTypeId, GroupType.MULTI_USER, cascadePermission);
-    }
-
-    private boolean shareEntity(String entityId, List<String> groupOrUserList, String permissionTypeId, GroupType groupType, boolean cascadePermission)  throws SharingRegistryException, TException {
-        //Adding permission for the specified users/groups for the specified entity
-        LinkedList<Entity> temp = new LinkedList<>();
-        for(String userId : groupOrUserList){
-            Sharing sharing = new Sharing();
-            sharing.setPermissionTypeId(permissionTypeId);
-            sharing.setEntityId(entityId);
-            sharing.setGroupId(userId);
-            sharing.setInheritedParentId(entityId);
-            if(cascadePermission) {
-                sharing.setSharingType(SharingType.DIRECT_CASCADING);
-            }else {
-                sharing.setSharingType(SharingType.DIRECT_NON_CASCADING);
-            }
-            sharing.setCreatedTime(System.currentTimeMillis());
-            sharing.setUpdatedTime(System.currentTimeMillis());
-
-            sharingRepository.create(sharing);
-        }
-
-        if(cascadePermission){
-            //Adding permission for the specified users/groups for all child entities
-            entityRepository.getChildEntities(entityId).stream().forEach(e-> temp.addLast(e));
-            while(temp.size() > 0){
-                Entity entity = temp.pop();
-                String childEntityId = entity.entityId;
-                for(String userId : groupOrUserList){
-                    Sharing sharing = new Sharing();
-                    sharing.setPermissionTypeId(permissionTypeId);
-                    sharing.setEntityId(childEntityId);
-                    sharing.setGroupId(userId);
-                    sharing.setInheritedParentId(entityId);
-                    sharing.setSharingType(SharingType.INDIRECT_CASCADING);
-                    sharing.setInheritedParentId(entityId);
-                    sharing.setCreatedTime(System.currentTimeMillis());
-                    sharing.setUpdatedTime(System.currentTimeMillis());
-                    sharingRepository.create(sharing);
-                    entityRepository.getChildEntities(childEntityId).stream().forEach(e-> temp.addLast(e));
-                }
-            }
-        }
-        return true;
-    }
-
-    @Override
-    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String permissionTypeId) throws SharingRegistryException, TException {
-        return revokeEntitySharing(entityId, userList, permissionTypeId);
-    }
-
-
-    @Override
-    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String permissionTypeId) throws SharingRegistryException, TException {
-        return revokeEntitySharing(entityId, groupList, permissionTypeId);
-    }
-
-    @Override
-    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws SharingRegistryException, TException {
-        //check whether the user has permission directly or indirectly
-        List<GroupMembership> parentMemberships = groupMembershipRepository.getAllParentMembershipsForChild(userId);
-        List<String> groupIds = new ArrayList<>();
-        parentMemberships.stream().forEach(pm->groupIds.add(pm.parentId));
-        groupIds.add(userId);
-        return sharingRepository.hasAccess(entityId, groupIds, Arrays.asList(permissionTypeId,
-                permissionTypeRepository.getGlobalPermissionTypeIdForDomain(domainId)));
-    }
-
-    public boolean revokeEntitySharing(String entityId, List<String> groupOrUserList, String permissionTypeId) throws SharingRegistryException {
-        //revoking permission for the entity
-        for(String groupId : groupOrUserList){
-            SharingEntityPK sharingEntityPK = new SharingEntityPK();
-            sharingEntityPK.setEntityId(entityId);
-            sharingEntityPK.setGroupId(groupId);
-            sharingEntityPK.setPermissionTypeId(permissionTypeId);
-            sharingEntityPK.setInheritedParentId(entityId);
-
-            sharingRepository.delete(sharingEntityPK);
-        }
-
-        //revoking permission from inheritance
-        List<Sharing> temp = new ArrayList<>();
-        sharingRepository.getIndirectSharedChildren(entityId, permissionTypeId).stream().forEach(s->temp.add(s));
-        for(Sharing sharing : temp){
-            String childEntityId = sharing.entityId;
-            for(String groupId : groupOrUserList){
-                SharingEntityPK sharingEntityPK = new SharingEntityPK();
-                sharingEntityPK.setEntityId(childEntityId);
-                sharingEntityPK.setGroupId(groupId);
-                sharingEntityPK.setPermissionTypeId(permissionTypeId);
-                sharingEntityPK.setInheritedParentId(entityId);
-
-                sharingRepository.delete(sharingEntityPK);
-            }
-        }
-        return true;
-    }
-
-
-
-    private <T> T getUpdatedObject(T oldEntity, T newEntity) throws SharingRegistryException {
-        Field[] newEntityFields = newEntity.getClass().getDeclaredFields();
-        Hashtable newHT = fieldsToHT(newEntityFields, newEntity);
-
-        Class oldEntityClass = oldEntity.getClass();
-        Field[] oldEntityFields = oldEntityClass.getDeclaredFields();
-
-        for (Field field : oldEntityFields){
-            field.setAccessible(true);
-            Object o = newHT.get(field.getName());
-            if (o != null){
-                Field f = null;
-                try {
-                    f = oldEntityClass.getDeclaredField(field.getName());
-                    f.setAccessible(true);
-                    logger.debug("setting " + f.getName());
-                    f.set(oldEntity, o);
-                } catch (Exception e) {
-                    throw new SharingRegistryException(e.getMessage());
-                }
-            }
-        }
-        return oldEntity;
-    }
-
-    private static Hashtable<String, Object> fieldsToHT(Field[] fields, Object obj){
-        Hashtable<String,Object> hashtable = new Hashtable<>();
-        for (Field field: fields){
-            field.setAccessible(true);
-            try {
-                Object retrievedObject = field.get(obj);
-                if (retrievedObject != null){
-                    logger.debug("scanning " + field.getName());
-                    hashtable.put(field.getName(), field.get(obj));
-                }
-            } catch (IllegalAccessException e) {
-                e.printStackTrace();
-            }
-        }
-        return hashtable;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/resources/META-INF/persistence.xml b/modules/sharing-registry/sharing-registry-core/src/main/resources/META-INF/persistence.xml
deleted file mode 100644
index 7b08528..0000000
--- a/modules/sharing-registry/sharing-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-sharing-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.SharingUserEntity</class>
-        <class>org.apache.airavata.sharing.registry.db.entities.UserGroupEntity</class>
-    </persistence-unit>
-</persistence>

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql b/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql
deleted file mode 100644
index 0e58356..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-derby.sql
+++ /dev/null
@@ -1,141 +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) NOT NULL,
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (DOMAIN_ID)
-);
-
-CREATE TABLE SHARING_USER (
-  USER_ID VARCHAR(255) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  USER_NAME VARCHAR(255) NOT NULL,
-  FIRST_NAME VARCHAR (255),
-  LAST_NAME VARCHAR (255),
-  ICON BLOB,
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (USER_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
-CREATE TABLE USER_GROUP (
-  GROUP_ID VARCHAR(255) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  OWNER_ID VARCHAR(255) NOT NULL,
-  GROUP_TYPE VARCHAR(255) NOT NULL,
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (GROUP_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
-
-CREATE TABLE GROUP_MEMBERSHIP (
-  PARENT_ID VARCHAR(255) NOT NULL,
-  CHILD_ID VARCHAR(255) NOT NULL,
-  CHILD_TYPE VARCHAR(255) NOT NULL,
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PARENT_ID, CHILD_ID),
-  FOREIGN KEY (PARENT_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (CHILD_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
-CREATE TABLE ENTITY_TYPE (
-  ENTITY_TYPE_ID VARCHAR(255) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (ENTITY_TYPE_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
-CREATE TABLE PERMISSION_TYPE (
-  PERMISSION_TYPE_ID VARCHAR(255) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PERMISSION_TYPE_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
-CREATE TABLE ENTITY (
-  ENTITY_ID VARCHAR(255) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  ENTITY_TYPE_ID VARCHAR(255) NOT NULL,
-  OWNER_ID VARCHAR(255) NOT NULL,
-  PARENT_ENTITY_ID VARCHAR(255),
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  FULL_TEXT CLOB,
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (ENTITY_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (ENTITY_TYPE_ID) REFERENCES ENTITY_TYPE(ENTITY_TYPE_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
--- ALTER TABLE ENTITY ADD FULLTEXT FULL_TEXT_INDEX(FULL_TEXT);
-
-CREATE TABLE ENTITY_METADATA (
-  ENTITY_ID VARCHAR (255) NOT NULL,
-  META_KEY VARCHAR (255) NOT NULL,
-  META_VALUE VARCHAR (255) NOT NULL,
-  PRIMARY KEY (ENTITY_ID, META_KEY),
-  FOREIGN KEY (ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
-CREATE TABLE SHARING (
-  PERMISSION_TYPE_ID VARCHAR(255) NOT NULL,
-  ENTITY_ID VARCHAR(255) NOT NULL,
-  GROUP_ID VARCHAR(255) NOT NULL,
-  SHARING_TYPE VARCHAR(255) NOT NULL,
-  INHERITED_PARENT_ID VARCHAR(255),
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID, INHERITED_PARENT_ID),
-  FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (INHERITED_PARENT_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE NO ACTION,
-  FOREIGN KEY (GROUP_ID) REFERENCES USER_GROUP(GROUP_ID) ON DELETE CASCADE ON UPDATE NO ACTION
-);
-
-CREATE TABLE CONFIGURATION
-(
-  CONFIG_KEY VARCHAR(255) NOT NULL,
-  CONFIG_VALUE VARCHAR(255) NOT NULL,
-  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/e36c145d/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql b/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql
deleted file mode 100644
index 78d5d78..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/main/resources/sharing-registry-mysql.sql
+++ /dev/null
@@ -1,141 +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) NOT NULL,
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (DOMAIN_ID)
-);
-
-CREATE TABLE SHARING_USER (
-  USER_ID VARCHAR(255) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  USER_NAME VARCHAR(255) NOT NULL,
-  FIRST_NAME VARCHAR (255),
-  LAST_NAME VARCHAR (255),
-  ICON BLOB,
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  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) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  OWNER_ID VARCHAR(255) NOT NULL,
-  GROUP_TYPE VARCHAR(255) NOT NULL,
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (GROUP_ID),
-  FOREIGN KEY (DOMAIN_ID) REFERENCES DOMAIN(DOMAIN_ID) ON DELETE CASCADE ON UPDATE CASCADE,
-  FOREIGN KEY (OWNER_ID) REFERENCES SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE CASCADE
-);
-
-
-CREATE TABLE GROUP_MEMBERSHIP (
-  PARENT_ID VARCHAR(255) NOT NULL,
-  CHILD_ID VARCHAR(255) NOT NULL,
-  CHILD_TYPE VARCHAR(255) NOT NULL,
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  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) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  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) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  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) NOT NULL,
-  DOMAIN_ID VARCHAR(255) NOT NULL,
-  ENTITY_TYPE_ID VARCHAR(255) NOT NULL,
-  OWNER_ID VARCHAR(255) NOT NULL,
-  PARENT_ENTITY_ID VARCHAR(255),
-  NAME VARCHAR(255) NOT NULL,
-  DESCRIPTION VARCHAR(255),
-  FULL_TEXT TEXT,
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  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 SHARING_USER(USER_ID) ON DELETE CASCADE ON UPDATE CASCADE,
-  FOREIGN KEY (PARENT_ENTITY_ID) REFERENCES ENTITY(ENTITY_ID) ON DELETE CASCADE ON UPDATE CASCADE
-);
-
-ALTER TABLE ENTITY ADD FULLTEXT FULL_TEXT_INDEX(FULL_TEXT);
-
-CREATE TABLE ENTITY_METADATA (
-  ENTITY_ID VARCHAR (255) NOT NULL,
-  META_KEY VARCHAR (255) NOT NULL,
-  META_VALUE VARCHAR (255) NOT NULL,
-  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) NOT NULL,
-  ENTITY_ID VARCHAR(255) NOT NULL,
-  GROUP_ID VARCHAR(255) NOT NULL,
-  SHARING_TYPE VARCHAR(255) NOT NULL,
-  INHERITED_PARENT_ID VARCHAR(255),
-  CREATED_TIME BIGINT NOT NULL,
-  UPDATED_TIME BIGINT NOT NULL,
-  PRIMARY KEY (PERMISSION_TYPE_ID, ENTITY_ID, GROUP_ID, INHERITED_PARENT_ID),
-  FOREIGN KEY (PERMISSION_TYPE_ID) REFERENCES PERMISSION_TYPE(PERMISSION_TYPE_ID) ON DELETE CASCADE ON UPDATE CASCADE,
-  FOREIGN KEY (INHERITED_PARENT_ID) REFERENCES ENTITY(ENTITY_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) NOT NULL,
-  CONFIG_VALUE VARCHAR(255) NOT NULL,
-  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/e36c145d/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java b/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
deleted file mode 100644
index cf92856..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
+++ /dev/null
@@ -1,290 +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.sharing.registry;
-
-import junit.framework.Assert;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.sharing.registry.models.*;
-import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
-import org.apache.airavata.sharing.registry.util.Initialize;
-import org.apache.thrift.TException;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-public class SharingRegistryServerHandlerTest {
-    private final static Logger logger = LoggerFactory.getLogger(SharingRegistryServerHandlerTest.class);
-
-    @BeforeClass
-    public static void setup() throws SharingRegistryException, SQLException {
-        Initialize initialize = new Initialize("sharing-registry-derby.sql");
-        initialize.initializeDB();
-    }
-
-    @Test
-    public void test() throws TException, ApplicationSettingsException {
-        SharingRegistryServerHandler sharingRegistryServerHandler = new SharingRegistryServerHandler();
-
-        //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());
-
-        Assert.assertNotNull(sharingRegistryServerHandler.createDomain(domain));
-        Assert.assertTrue(sharingRegistryServerHandler.getDomains(0, 10).size() > 0);
-
-
-        //Creating users
-        User user1 = new User();
-        String userName1 = "test-user-1." + System.currentTimeMillis();
-        String userId1 = domainId + ":" + userName1;
-        user1.setUserId(userId1);
-        user1.setUserName(userName1);
-        user1.setDomainId(domainId);
-        user1.setCreatedTime(System.currentTimeMillis());
-        user1.setUpdatedTime(System.currentTimeMillis());
-
-        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user1));
-
-        User user2 = new User();
-        String userName2 = "test-user-2." + System.currentTimeMillis();
-        String userId2 = domainId + ":" + userName2;
-        user2.setUserId(userId2);
-        user2.setUserName(userName2);
-        user2.setDomainId(domainId);
-        user2.setCreatedTime(System.currentTimeMillis());
-        user2.setUpdatedTime(System.currentTimeMillis());
-
-        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user2));
-
-        User user3 = new User();
-        String userName3 = "test-user-3." + System.currentTimeMillis();
-        String userId3 = domainId + ":" + userName3;
-        user3.setUserId(userId3);
-        user3.setUserName(userName3);
-        user3.setDomainId(domainId);
-        user3.setCreatedTime(System.currentTimeMillis());
-        user3.setUpdatedTime(System.currentTimeMillis());
-
-        Assert.assertNotNull(sharingRegistryServerHandler.createUser(user3));
-
-        Assert.assertTrue(sharingRegistryServerHandler.getUsers(domainId, 0, 10).size() > 0);
-
-        // Creating user groups
-        UserGroup userGroup1 = new UserGroup();
-        String groupName1 = "test-group-1." + System.currentTimeMillis();
-        String groupId1 = domainId + ":" + groupName1;
-        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());
-
-        Assert.assertNotNull(sharingRegistryServerHandler.createGroup(userGroup1));
-
-        UserGroup userGroup2 = new UserGroup();
-        String groupName2 = "test-group-2." + System.currentTimeMillis();
-        String groupId2 = domainId + ":" + groupName2;
-        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());
-
-        Assert.assertNotNull(sharingRegistryServerHandler.createGroup(userGroup2));
-
-        sharingRegistryServerHandler.addUsersToGroup(Arrays.asList(userId1), groupId1);
-        sharingRegistryServerHandler.addUsersToGroup(Arrays.asList(userId2, userId3), groupId2);
-        sharingRegistryServerHandler.addChildGroupToParentGroup(groupId2, groupId1);
-
-        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembers(groupId1, 0, 10).size() == 2);
-        Assert.assertTrue(sharingRegistryServerHandler.getGroupMembers(groupId2, 0, 10).size() == 2);
-
-
-        //Creating permission types
-        PermissionType permissionType1 = new PermissionType();
-        String permissionName1 = "READ";
-        permissionType1.setPermissionTypeId(domainId+":"+permissionName1);
-        permissionType1.setDomainId(domainId);
-        permissionType1.setName(permissionName1);
-        permissionType1.setDescription("READ description");
-        permissionType1.setCreatedTime(System.currentTimeMillis());
-        permissionType1.setUpdatedTime(System.currentTimeMillis());
-        String permissionTypeId1 = sharingRegistryServerHandler.createPermissionType(permissionType1);
-        Assert.assertNotNull(permissionTypeId1);
-
-        PermissionType permissionType2 = new PermissionType();
-        String permissionName2 = "WRITE";
-        permissionType2.setPermissionTypeId(domainId+":"+permissionName2);
-        permissionType2.setDomainId(domainId);
-        permissionType2.setName(permissionName2);
-        permissionType2.setDescription("WRITE description");
-        permissionType2.setCreatedTime(System.currentTimeMillis());
-        permissionType2.setUpdatedTime(System.currentTimeMillis());
-        String permissionTypeId2 = sharingRegistryServerHandler.createPermissionType(permissionType2);
-        Assert.assertNotNull(permissionTypeId2);
-
-        //Creating entity types
-        EntityType entityType1 = new EntityType();
-        String entityType1Name = "Project";
-        entityType1.setEntityTypeId(domainId+":"+entityType1Name);
-        entityType1.setDomainId(domainId);
-        entityType1.setName(entityType1Name);
-        entityType1.setDescription("test entity type");
-        entityType1.setCreatedTime(System.currentTimeMillis());
-        entityType1.setUpdatedTime(System.currentTimeMillis());
-        String entityTypeId1 = sharingRegistryServerHandler.createEntityType(entityType1);
-        Assert.assertNotNull(entityTypeId1);
-
-        EntityType entityType2 = new EntityType();
-        String entityType2Name = "Experiment";
-        entityType2.setEntityTypeId(domainId+":"+entityType2Name);
-        entityType2.setDomainId(domainId);
-        entityType2.setName(entityType2Name);
-        entityType2.setDescription("test entity type");
-        entityType2.setCreatedTime(System.currentTimeMillis());
-        entityType2.setUpdatedTime(System.currentTimeMillis());
-        String entityTypeId2 = sharingRegistryServerHandler.createEntityType(entityType2);
-        Assert.assertNotNull(entityTypeId2);
-
-        EntityType entityType3 = new EntityType();
-        String entityType3Name = "FileInput";
-        entityType3.setEntityTypeId(domainId+":"+entityType3Name);
-        entityType3.setDomainId(domainId);
-        entityType3.setName(entityType3Name);
-        entityType3.setDescription("file input type");
-        entityType3.setCreatedTime(System.currentTimeMillis());
-        entityType3.setUpdatedTime(System.currentTimeMillis());
-        String entityTypeId3 = sharingRegistryServerHandler.createEntityType(entityType3);
-        Assert.assertNotNull(entityTypeId3);
-
-        //Creating Entities
-        Entity entity1 = new Entity();
-        entity1.setEntityId(domainId+":Entity1");
-        entity1.setDomainId(domainId);
-        entity1.setEntityTypeId(entityTypeId1);
-        entity1.setOwnerId(userId1);
-        entity1.setName("Project name 1");
-        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());
-
-        String entityId1 = sharingRegistryServerHandler.createEntity(entity1);
-        Assert.assertNotNull(entityId1);
-
-        Entity entity2 = new Entity();
-        entity2.setEntityId(domainId+":Entity2");
-        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());
-
-        String entityId2 = sharingRegistryServerHandler.createEntity(entity2);
-        Assert.assertNotNull(entityId2);
-
-        Entity entity3 = new Entity();
-        entity3.setEntityId(domainId+":Entity3");
-        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());
-
-        String entityId3 = sharingRegistryServerHandler.createEntity(entity3);
-        Assert.assertNotNull(entityId3);
-
-        sharingRegistryServerHandler.shareEntityWithUsers(entityId1, Arrays.asList(userId2), permissionTypeId1, true);
-        sharingRegistryServerHandler.shareEntityWithGroups(entityId3, Arrays.asList(groupId2), permissionTypeId1, true);
-
-        Entity entity4 = new Entity();
-        entity4.setEntityId(domainId+":Entity4");
-        entity4.setDomainId(domainId);
-        entity4.setEntityTypeId(entityTypeId3);
-        entity4.setOwnerId(userId3);
-        entity4.setName("Input name");
-        entity4.setDescription("Input file description");
-        entity4.setParentEntityId(entityId3);
-        metadataMap = new HashMap<>();
-        metadataMap.put("key", "val");
-        entity4.setMetadata(metadataMap);
-        entity4.setFullText("Input File");
-        entity4.setCreatedTime(System.currentTimeMillis());
-        entity4.setUpdatedTime(System.currentTimeMillis());
-
-        String entityId4 = sharingRegistryServerHandler.createEntity(entity4);
-        Assert.assertNotNull(entityId4);
-
-        Assert.assertTrue(sharingRegistryServerHandler.userHasAccess(domainId, userId3, entityId4, permissionTypeId1));
-        Assert.assertTrue(sharingRegistryServerHandler.userHasAccess(domainId, userId2, entityId4, permissionTypeId1));
-        Assert.assertTrue(sharingRegistryServerHandler.userHasAccess(domainId, userId1, entityId4, permissionTypeId1));
-        Assert.assertFalse(sharingRegistryServerHandler.userHasAccess(domainId, userId3, entityId1, permissionTypeId1));
-
-        ArrayList<SearchCriteria> filters = new ArrayList<>();
-        SearchCriteria searchCriteria = new SearchCriteria();
-        searchCriteria.setSearchCondition(SearchCondition.LIKE);
-        searchCriteria.setValue("Input");
-        searchCriteria.setSearchField(EntitySearchField.NAME);
-        filters.add(searchCriteria);
-        Assert.assertTrue(sharingRegistryServerHandler.searchEntities(userId1, entityTypeId3, filters, 0, -1).size() > 0);
-
-        Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedUsers(entityId1, permissionTypeId1));
-        Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedGroups(entityId1, permissionTypeId1));
-
-//        sharingRegistryServerHandler.revokeEntitySharingFromUsers(entityId1, Arrays.asList(userId2), permissionTypeId1);
-//        sharingRegistryServerHandler.revokeEntitySharingFromGroups(entityId3, Arrays.asList(groupId2), permissionTypeId1);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/util/Initialize.java b/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/util/Initialize.java
deleted file mode 100644
index 4a89094..0000000
--- a/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/util/Initialize.java
+++ /dev/null
@@ -1,298 +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.sharing.registry.util;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.sharing.registry.db.utils.JPAUtils;
-import org.apache.derby.drda.NetworkServerControl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.net.URI;
-import java.sql.*;
-import java.util.StringTokenizer;
-
-public class Initialize {
-    private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
-    public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
-    public  String scriptName ;
-    private NetworkServerControl server;
-    private static final String delimiter = ";";
-    public static final String PERSISTANT_DATA = "Configuration";
-
-    public Initialize(String scriptName) {
-        this.scriptName = scriptName;
-    }
-
-    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
-        if (suffix.length() > buffer.length()) {
-            return false;
-        }
-        // this loop is done on purpose to avoid memory allocation performance
-        // problems on various JDKs
-        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
-        // implementation is ok though does allocation/copying
-        // StringBuffer.toString().endsWith() does massive memory
-        // allocation/copying on JDK 1.5
-        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
-        int endIndex = suffix.length() - 1;
-        int bufferIndex = buffer.length() - 1;
-        while (endIndex >= 0) {
-            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
-                return false;
-            }
-            bufferIndex--;
-            endIndex--;
-        }
-        return true;
-    }
-
-    private static boolean isServerStarted(NetworkServerControl server, int ntries)
-    {
-        for (int i = 1; i <= ntries; i ++)
-        {
-            try {
-                Thread.sleep(500);
-                server.ping();
-                return true;
-            }
-            catch (Exception e) {
-                if (i == ntries)
-                    return false;
-            }
-        }
-        return false;
-    }
-
-    public void initializeDB() throws SQLException{
-        String jdbcUrl = null;
-        String jdbcUser = null;
-        String jdbcPassword = null;
-        try{
-            jdbcUrl = ServerSettings.getSetting("sharingcatalog.jdbc.url");
-            jdbcUser = ServerSettings.getSetting("sharingcatalog.jdbc.user");
-            jdbcPassword = ServerSettings.getSetting("sharingcatalog.jdbc.password");
-            jdbcUrl = jdbcUrl + "?" + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read properties", e);
-        }
-        startDerbyInServerMode();
-        if(!isServerStarted(server, 20)){
-           throw new RuntimeException("Derby server cound not started within five seconds...");
-        }
-
-        Connection conn = null;
-        try {
-            Class.forName(JPAUtils.readServerProperties(JPAUtils.SHARING_REG_JDBC_DRIVER)).newInstance();
-            conn = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcPassword);
-            if (!isDatabaseStructureCreated(PERSISTANT_DATA, conn)) {
-                executeSQLScript(conn);
-                logger.info("New Database created for Registry");
-            } else {
-                logger.debug("Database already created for Registry!");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RuntimeException("Database failure", e);
-        } finally {
-            try {
-                if (conn != null){
-                    if (!conn.getAutoCommit()) {
-                        conn.commit();
-                    }
-                    conn.close();
-                }
-            } catch (SQLException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-    }
-
-    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
-        try {
-            System.out.println("Running a query to test the database tables existence.");
-            // check whether the tables are already created with a query
-            Statement statement = null;
-            try {
-                statement = conn.createStatement();
-                ResultSet rs = statement.executeQuery("select * from " + tableName);
-                if (rs != null) {
-                    rs.close();
-                }
-            } finally {
-                try {
-                    if (statement != null) {
-                        statement.close();
-                    }
-                } catch (SQLException e) {
-                    return false;
-                }
-            }
-        } catch (SQLException e) {
-            return false;
-        }
-
-        return true;
-    }
-
-    private void executeSQLScript(Connection conn) throws Exception {
-        StringBuffer sql = new StringBuffer();
-        BufferedReader reader = null;
-        try{
-
-        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(scriptName);
-        reader = new BufferedReader(new InputStreamReader(inputStream));
-        String line;
-        while ((line = reader.readLine()) != null) {
-            line = line.trim();
-            if (line.startsWith("//")) {
-                continue;
-            }
-            if (line.startsWith("--")) {
-                continue;
-            }
-            StringTokenizer st = new StringTokenizer(line);
-            if (st.hasMoreTokens()) {
-                String token = st.nextToken();
-                if ("REM".equalsIgnoreCase(token)) {
-                    continue;
-                }
-            }
-            sql.append(" ").append(line);
-
-            // SQL defines "--" as a comment to EOL
-            // and in Oracle it may contain a hint
-            // so we cannot just remove it, instead we must end it
-            if (line.indexOf("--") >= 0) {
-                sql.append("\n");
-            }
-            if ((checkStringBufferEndsWith(sql, delimiter))) {
-                executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
-                sql.replace(0, sql.length(), "");
-            }
-        }
-        // Catch any statements not followed by ;
-        if (sql.length() > 0) {
-            executeSQL(sql.toString(), conn);
-        }
-        }catch (IOException e){
-            logger.error("Error occurred while executing SQL script for creating Airavata database", e);
-            throw new Exception("Error occurred while executing SQL script for creating Airavata database", e);
-        }finally {
-            if (reader != null) {
-                reader.close();
-            }
-
-        }
-
-    }
-
-    private static void executeSQL(String sql, Connection conn) throws Exception {
-        // Check and ignore empty statements
-        if ("".equals(sql.trim())) {
-            return;
-        }
-
-        Statement statement = null;
-        try {
-            logger.debug("SQL : " + sql);
-
-            boolean ret;
-            int updateCount = 0, updateCountTotal = 0;
-            statement = conn.createStatement();
-            ret = statement.execute(sql);
-            updateCount = statement.getUpdateCount();
-            do {
-                if (!ret) {
-                    if (updateCount != -1) {
-                        updateCountTotal += updateCount;
-                    }
-                }
-                ret = statement.getMoreResults();
-                if (ret) {
-                    updateCount = statement.getUpdateCount();
-                }
-            } while (ret);
-
-            logger.debug(sql + " : " + updateCountTotal + " rows affected");
-
-            SQLWarning warning = conn.getWarnings();
-            while (warning != null) {
-                logger.warn(warning + " sql warning");
-                warning = warning.getNextWarning();
-            }
-            conn.clearWarnings();
-        } catch (SQLException e) {
-            if (e.getSQLState().equals("X0Y32")) {
-                // eliminating the table already exception for the derby
-                // database
-                logger.info("Table Already Exists", e);
-            } else {
-                throw new Exception("Error occurred while executing : " + sql, e);
-            }
-        } finally {
-            if (statement != null) {
-                try {
-                    statement.close();
-                } catch (SQLException e) {
-                    logger.error("Error occurred while closing result set.", e);
-                }
-            }
-        }
-    }
-
-    private void startDerbyInServerMode() {
-        try {
-            System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
-            String jdbcURL = JPAUtils.readServerProperties(JPAUtils.SHARING_REG_JDBC_URL);
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            server = new NetworkServerControl(InetAddress.getByName(uri.getHost()),
-                    20000,
-                    JPAUtils.readServerProperties(JPAUtils.SHARING_REG_JDBC_USER), JPAUtils.readServerProperties(JPAUtils.SHARING_REG_JDBC_USER));
-            java.io.PrintWriter consoleWriter = new java.io.PrintWriter(System.out, true);
-            server.start(consoleWriter);
-        } catch (IOException e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        } catch (Exception e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available");
-        }
-
-    }
-
-    public void stopDerbyServer() throws SQLException{
-        try {
-            server.shutdown();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new SQLException("Error while stopping derby server", e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/pom.xml b/modules/sharing-registry/sharing-registry-distribution/pom.xml
new file mode 100644
index 0000000..f818807
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-distribution/pom.xml
@@ -0,0 +1,91 @@
+<?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>
+        <version>${global.version}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>airavata-sharing-distribution</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.10</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-server-configuration</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>${mysql.connector.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-sharing-registry-server</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-sharing-registry-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</version>
+        </dependency>
+    </dependencies>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.3</version>
+                <executions>
+                    <execution>
+                        <id>distribution-package</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/bin-assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml b/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml
new file mode 100644
index 0000000..b8fdfd4
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/assembly/bin-assembly.xml
@@ -0,0 +1,69 @@
+<!--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.
+  -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>bin</id>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <baseDirectory>sharing-registry</baseDirectory>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+
+    <fileSets>
+        <fileSet>
+            <directory>src/main/resources/bin</directory>
+            <outputDirectory>bin</outputDirectory>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+            <fileMode>755</fileMode>
+        </fileSet>
+
+        <!-- ********************** copy airavata-server.properties ********************** -->
+        <fileSet>
+            <directory>../../configuration/server/src/main/resources/</directory>
+            <outputDirectory>bin</outputDirectory>
+            <includes>
+                <include>airavata-server.properties</include>
+            </includes>
+        </fileSet>
+
+        <!-- ********************** copy database scripts ********************** -->
+        <fileSet>
+            <directory>../sharing-registry-server/src/main/resources/
+            </directory>
+            <outputDirectory>bin/database_scripts
+            </outputDirectory>
+            <includes>
+                <include>*sql*</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/lib</outputDirectory>
+            <includes>
+                <include>*:jar:*</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
new file mode 100644
index 0000000..1dcf419
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# 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.
+
+# Get standard environment variables
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+  echo "You must set the JAVA_HOME variable before running sharing-registry scripts."
+  exit 1
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+PRGDIR=`dirname "$PRG"`
+
+# Only set SHARING_REGISTRY_HOME if not already set
+[ -z "$SHARING_REGISTRY_HOME" ] && SHARING_REGISTRY_HOME=`cd "$PRGDIR/.." ; pwd`
+
+SHARING_REGISTRY_CLASSPATH=""
+
+
+
+for f in "SHARING_REGISTRY_HOME"/lib/*.jar
+do
+  SHARING_REGISTRY_CLASSPATH="$SHARING_REGISTRY_CLASSPATH":$f
+done
+
+SHARING_REGISTRY_CLASSPATH="$SHARING_REGISTRY_CLASSPATH":"$SHARING_REGISTRY_HOME"/conf/log4j.properties
+
+export SHARING_REGISTRY_HOME
+export SHARING_REGISTRY_CLASSPATH
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
new file mode 100644
index 0000000..10e0619
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
@@ -0,0 +1,87 @@
+#!/bin/bash
+
+# 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.
+
+. `dirname $0`/setenv.sh
+cd $SHARING_REGISTRY_HOME
+
+IS_DAEMON_MODE=false
+SHARING_REGISTRY_COMMAND=""
+STOP=false
+FORCE=false
+
+for var in "$@"
+do
+    case $var in
+	start)
+	    IS_DAEMON_MODE=true
+            shift
+        ;;
+	stop)
+	    STOP=true
+	    SHARING_REGISTRY_COMMAND="$
+	    SHARING_REGISTRY_COMMAND $var"
+            shift
+        ;;
+        -h)
+            echo "Usage: sharing-registry.sh [command-options]"
+            echo "command options:"
+	    echo "  start              Start server in daemon mode"
+	    echo "  stop               Stop server."
+	    echo "  -h                 Display this help and exit"
+	        shift
+            exit 0
+        ;;
+	*)
+	    SHARING_REGISTRY_COMMAND="$SHARING_REGISTRY_COMMAND $var"
+            shift
+    esac
+done
+
+if $STOP;
+then
+	for f in `find . -name "*-start_*"`; do
+		IFS='_' read -a f_split <<< "$f"
+		echo "Found process file : $f"
+		echo -n "    Sending kill signals to process ${f_split[1]}..."
+		out=`kill -9 ${f_split[1]} 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+		echo -n "    Removing process file..."
+		out=`rm $f 2>&1`
+		if [ -z "$out" ]; then
+		    echo "done"
+		else
+		    echo "failed (REASON: $out)"
+		fi
+	done
+else
+	if $IS_DAEMON_MODE ; then
+		echo "Starting Sharing Catalog in daemon mode..."
+		cd "$SHARING_REGISTRY_HOME"/lib
+		nohup $JAVA_HOME/bin/java -jar "$SHARING_REGISTRY_HOME"/lib/airavata-sharing-registry-server-0.7-SNAPSHOT.jar > ../sharing-registry.out & echo $! > "../sharing-registry-start_$!"
+		cd ..
+	else
+        cd "$SHARING_REGISTRY_HOME"/lib
+		$JAVA_HOME/bin/java -jar "$SHARING_REGISTRY_HOME"/lib/airavata-sharing-registry-server-0.17-SNAPSHOT.jar
+		cd ..
+	fi
+fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e36c145d/modules/sharing-registry/sharing-registry-server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/pom.xml b/modules/sharing-registry/sharing-registry-server/pom.xml
new file mode 100644
index 0000000..730469b
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/pom.xml
@@ -0,0 +1,99 @@
+<?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-server</artifactId>
+    <packaging>jar</packaging>
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.10</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-server-configuration</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>${mysql.connector.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</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/e36c145d/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/entities/DomainEntity.java
new file mode 100644
index 0000000..48b5314
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-server/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


[36/51] [abbrv] airavata git commit: owner permission is not revokable or assignable

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/4bb7c6de/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
index b9840f6..598d80f 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/SharingRegistryService.java
@@ -153,18 +153,19 @@ public class SharingRegistryService {
      *  * Sharing Entity with Users and Groups
      * *
      * 
+     * @param domainId
      * @param entityId
      * @param userList
      * @param perssionTypeId
      * @param cascadePermission
      */
-    public boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean shareEntityWithUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean revokeEntitySharingFromUsers(String domainId, String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean shareEntityWithGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
+    public boolean revokeEntitySharingFromGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
@@ -246,13 +247,13 @@ public class SharingRegistryService {
 
     public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void shareEntityWithUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void revokeEntitySharingFromUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void shareEntityWithGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void revokeEntitySharingFromGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void userHasAccess(String domainId, String userId, String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -1258,15 +1259,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionTypes failed: unknown result");
     }
 
-    public boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean shareEntityWithUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_shareEntityWithUsers(entityId, userList, perssionTypeId, cascadePermission);
+      send_shareEntityWithUsers(domainId, entityId, userList, perssionTypeId, cascadePermission);
       return recv_shareEntityWithUsers();
     }
 
-    public void send_shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.thrift.TException
+    public void send_shareEntityWithUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.thrift.TException
     {
       shareEntityWithUsers_args args = new shareEntityWithUsers_args();
+      args.setDomainId(domainId);
       args.setEntityId(entityId);
       args.setUserList(userList);
       args.setPerssionTypeId(perssionTypeId);
@@ -1287,15 +1289,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithUsers failed: unknown result");
     }
 
-    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean revokeEntitySharingFromUsers(String domainId, String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_revokeEntitySharingFromUsers(entityId, userList, perssionTypeId);
+      send_revokeEntitySharingFromUsers(domainId, entityId, userList, perssionTypeId);
       return recv_revokeEntitySharingFromUsers();
     }
 
-    public void send_revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.thrift.TException
+    public void send_revokeEntitySharingFromUsers(String domainId, String entityId, List<String> userList, String perssionTypeId) throws org.apache.thrift.TException
     {
       revokeEntitySharingFromUsers_args args = new revokeEntitySharingFromUsers_args();
+      args.setDomainId(domainId);
       args.setEntityId(entityId);
       args.setUserList(userList);
       args.setPerssionTypeId(perssionTypeId);
@@ -1315,15 +1318,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromUsers failed: unknown result");
     }
 
-    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean shareEntityWithGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_shareEntityWithGroups(entityId, groupList, perssionTypeId, cascadePermission);
+      send_shareEntityWithGroups(domainId, entityId, groupList, perssionTypeId, cascadePermission);
       return recv_shareEntityWithGroups();
     }
 
-    public void send_shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.thrift.TException
+    public void send_shareEntityWithGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.thrift.TException
     {
       shareEntityWithGroups_args args = new shareEntityWithGroups_args();
+      args.setDomainId(domainId);
       args.setEntityId(entityId);
       args.setGroupList(groupList);
       args.setPerssionTypeId(perssionTypeId);
@@ -1344,15 +1348,16 @@ public class SharingRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithGroups failed: unknown result");
     }
 
-    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
+    public boolean revokeEntitySharingFromGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
-      send_revokeEntitySharingFromGroups(entityId, groupList, perssionTypeId);
+      send_revokeEntitySharingFromGroups(domainId, entityId, groupList, perssionTypeId);
       return recv_revokeEntitySharingFromGroups();
     }
 
-    public void send_revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.thrift.TException
+    public void send_revokeEntitySharingFromGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId) throws org.apache.thrift.TException
     {
       revokeEntitySharingFromGroups_args args = new revokeEntitySharingFromGroups_args();
+      args.setDomainId(domainId);
       args.setEntityId(entityId);
       args.setGroupList(groupList);
       args.setPerssionTypeId(perssionTypeId);
@@ -2666,20 +2671,22 @@ public class SharingRegistryService {
       }
     }
 
-    public void shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void shareEntityWithUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      shareEntityWithUsers_call method_call = new shareEntityWithUsers_call(entityId, userList, perssionTypeId, cascadePermission, resultHandler, this, ___protocolFactory, ___transport);
+      shareEntityWithUsers_call method_call = new shareEntityWithUsers_call(domainId, entityId, userList, perssionTypeId, cascadePermission, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class shareEntityWithUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityId;
       private List<String> userList;
       private String perssionTypeId;
       private boolean cascadePermission;
-      public shareEntityWithUsers_call(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public shareEntityWithUsers_call(String domainId, String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, 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;
         this.entityId = entityId;
         this.userList = userList;
         this.perssionTypeId = perssionTypeId;
@@ -2689,6 +2696,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shareEntityWithUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
         shareEntityWithUsers_args args = new shareEntityWithUsers_args();
+        args.setDomainId(domainId);
         args.setEntityId(entityId);
         args.setUserList(userList);
         args.setPerssionTypeId(perssionTypeId);
@@ -2707,19 +2715,21 @@ public class SharingRegistryService {
       }
     }
 
-    public void revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void revokeEntitySharingFromUsers(String domainId, String entityId, List<String> userList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      revokeEntitySharingFromUsers_call method_call = new revokeEntitySharingFromUsers_call(entityId, userList, perssionTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      revokeEntitySharingFromUsers_call method_call = new revokeEntitySharingFromUsers_call(domainId, entityId, userList, perssionTypeId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class revokeEntitySharingFromUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityId;
       private List<String> userList;
       private String perssionTypeId;
-      public revokeEntitySharingFromUsers_call(String entityId, List<String> userList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public revokeEntitySharingFromUsers_call(String domainId, String entityId, List<String> userList, String perssionTypeId, 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;
         this.entityId = entityId;
         this.userList = userList;
         this.perssionTypeId = perssionTypeId;
@@ -2728,6 +2738,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revokeEntitySharingFromUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
         revokeEntitySharingFromUsers_args args = new revokeEntitySharingFromUsers_args();
+        args.setDomainId(domainId);
         args.setEntityId(entityId);
         args.setUserList(userList);
         args.setPerssionTypeId(perssionTypeId);
@@ -2745,20 +2756,22 @@ public class SharingRegistryService {
       }
     }
 
-    public void shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void shareEntityWithGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      shareEntityWithGroups_call method_call = new shareEntityWithGroups_call(entityId, groupList, perssionTypeId, cascadePermission, resultHandler, this, ___protocolFactory, ___transport);
+      shareEntityWithGroups_call method_call = new shareEntityWithGroups_call(domainId, entityId, groupList, perssionTypeId, cascadePermission, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class shareEntityWithGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityId;
       private List<String> groupList;
       private String perssionTypeId;
       private boolean cascadePermission;
-      public shareEntityWithGroups_call(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public shareEntityWithGroups_call(String domainId, String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission, 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;
         this.entityId = entityId;
         this.groupList = groupList;
         this.perssionTypeId = perssionTypeId;
@@ -2768,6 +2781,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shareEntityWithGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
         shareEntityWithGroups_args args = new shareEntityWithGroups_args();
+        args.setDomainId(domainId);
         args.setEntityId(entityId);
         args.setGroupList(groupList);
         args.setPerssionTypeId(perssionTypeId);
@@ -2786,19 +2800,21 @@ public class SharingRegistryService {
       }
     }
 
-    public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void revokeEntitySharingFromGroups(String domainId, String entityId, List<String> groupList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      revokeEntitySharingFromGroups_call method_call = new revokeEntitySharingFromGroups_call(entityId, groupList, perssionTypeId, resultHandler, this, ___protocolFactory, ___transport);
+      revokeEntitySharingFromGroups_call method_call = new revokeEntitySharingFromGroups_call(domainId, entityId, groupList, perssionTypeId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class revokeEntitySharingFromGroups_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String domainId;
       private String entityId;
       private List<String> groupList;
       private String perssionTypeId;
-      public revokeEntitySharingFromGroups_call(String entityId, List<String> groupList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public revokeEntitySharingFromGroups_call(String domainId, String entityId, List<String> groupList, String perssionTypeId, 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;
         this.entityId = entityId;
         this.groupList = groupList;
         this.perssionTypeId = perssionTypeId;
@@ -2807,6 +2823,7 @@ public class SharingRegistryService {
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revokeEntitySharingFromGroups", org.apache.thrift.protocol.TMessageType.CALL, 0));
         revokeEntitySharingFromGroups_args args = new revokeEntitySharingFromGroups_args();
+        args.setDomainId(domainId);
         args.setEntityId(entityId);
         args.setGroupList(groupList);
         args.setPerssionTypeId(perssionTypeId);
@@ -3839,7 +3856,7 @@ public class SharingRegistryService {
       public shareEntityWithUsers_result getResult(I iface, shareEntityWithUsers_args args) throws org.apache.thrift.TException {
         shareEntityWithUsers_result result = new shareEntityWithUsers_result();
         try {
-          result.success = iface.shareEntityWithUsers(args.entityId, args.userList, args.perssionTypeId, args.cascadePermission);
+          result.success = iface.shareEntityWithUsers(args.domainId, args.entityId, args.userList, args.perssionTypeId, args.cascadePermission);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.sharing.registry.models.SharingRegistryException gre) {
           result.gre = gre;
@@ -3864,7 +3881,7 @@ public class SharingRegistryService {
       public revokeEntitySharingFromUsers_result getResult(I iface, revokeEntitySharingFromUsers_args args) throws org.apache.thrift.TException {
         revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
         try {
-          result.success = iface.revokeEntitySharingFromUsers(args.entityId, args.userList, args.perssionTypeId);
+          result.success = iface.revokeEntitySharingFromUsers(args.domainId, args.entityId, args.userList, args.perssionTypeId);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.sharing.registry.models.SharingRegistryException gre) {
           result.gre = gre;
@@ -3889,7 +3906,7 @@ public class SharingRegistryService {
       public shareEntityWithGroups_result getResult(I iface, shareEntityWithGroups_args args) throws org.apache.thrift.TException {
         shareEntityWithGroups_result result = new shareEntityWithGroups_result();
         try {
-          result.success = iface.shareEntityWithGroups(args.entityId, args.groupList, args.perssionTypeId, args.cascadePermission);
+          result.success = iface.shareEntityWithGroups(args.domainId, args.entityId, args.groupList, args.perssionTypeId, args.cascadePermission);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.sharing.registry.models.SharingRegistryException gre) {
           result.gre = gre;
@@ -3914,7 +3931,7 @@ public class SharingRegistryService {
       public revokeEntitySharingFromGroups_result getResult(I iface, revokeEntitySharingFromGroups_args args) throws org.apache.thrift.TException {
         revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
         try {
-          result.success = iface.revokeEntitySharingFromGroups(args.entityId, args.groupList, args.perssionTypeId);
+          result.success = iface.revokeEntitySharingFromGroups(args.domainId, args.entityId, args.groupList, args.perssionTypeId);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.sharing.registry.models.SharingRegistryException gre) {
           result.gre = gre;
@@ -6179,7 +6196,7 @@ public class SharingRegistryService {
       }
 
       public void start(I iface, shareEntityWithUsers_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.shareEntityWithUsers(args.entityId, args.userList, args.perssionTypeId, args.cascadePermission,resultHandler);
+        iface.shareEntityWithUsers(args.domainId, args.entityId, args.userList, args.perssionTypeId, args.cascadePermission,resultHandler);
       }
     }
 
@@ -6237,7 +6254,7 @@ public class SharingRegistryService {
       }
 
       public void start(I iface, revokeEntitySharingFromUsers_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.revokeEntitySharingFromUsers(args.entityId, args.userList, args.perssionTypeId,resultHandler);
+        iface.revokeEntitySharingFromUsers(args.domainId, args.entityId, args.userList, args.perssionTypeId,resultHandler);
       }
     }
 
@@ -6295,7 +6312,7 @@ public class SharingRegistryService {
       }
 
       public void start(I iface, shareEntityWithGroups_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.shareEntityWithGroups(args.entityId, args.groupList, args.perssionTypeId, args.cascadePermission,resultHandler);
+        iface.shareEntityWithGroups(args.domainId, args.entityId, args.groupList, args.perssionTypeId, args.cascadePermission,resultHandler);
       }
     }
 
@@ -6353,7 +6370,7 @@ public class SharingRegistryService {
       }
 
       public void start(I iface, revokeEntitySharingFromGroups_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.revokeEntitySharingFromGroups(args.entityId, args.groupList, args.perssionTypeId,resultHandler);
+        iface.revokeEntitySharingFromGroups(args.domainId, args.entityId, args.groupList, args.perssionTypeId,resultHandler);
       }
     }
 
@@ -39543,10 +39560,11 @@ public class SharingRegistryService {
   public static class shareEntityWithUsers_args implements org.apache.thrift.TBase<shareEntityWithUsers_args, shareEntityWithUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<shareEntityWithUsers_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("shareEntityWithUsers_args");
 
-    private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField USER_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("userList", org.apache.thrift.protocol.TType.LIST, (short)2);
-    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField CASCADE_PERMISSION_FIELD_DESC = new org.apache.thrift.protocol.TField("cascadePermission", org.apache.thrift.protocol.TType.BOOL, (short)4);
+    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 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 USER_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("userList", org.apache.thrift.protocol.TType.LIST, (short)3);
+    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)4);
+    private static final org.apache.thrift.protocol.TField CASCADE_PERMISSION_FIELD_DESC = new org.apache.thrift.protocol.TField("cascadePermission", org.apache.thrift.protocol.TType.BOOL, (short)5);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -39554,6 +39572,7 @@ public class SharingRegistryService {
       schemes.put(TupleScheme.class, new shareEntityWithUsers_argsTupleSchemeFactory());
     }
 
+    public String domainId; // required
     public String entityId; // required
     public List<String> userList; // required
     public String perssionTypeId; // required
@@ -39561,10 +39580,11 @@ public class SharingRegistryService {
 
     /** 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"),
-      USER_LIST((short)2, "userList"),
-      PERSSION_TYPE_ID((short)3, "perssionTypeId"),
-      CASCADE_PERMISSION((short)4, "cascadePermission");
+      DOMAIN_ID((short)1, "domainId"),
+      ENTITY_ID((short)2, "entityId"),
+      USER_LIST((short)3, "userList"),
+      PERSSION_TYPE_ID((short)4, "perssionTypeId"),
+      CASCADE_PERMISSION((short)5, "cascadePermission");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -39579,13 +39599,15 @@ public class SharingRegistryService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // ENTITY_ID
+          case 1: // DOMAIN_ID
+            return DOMAIN_ID;
+          case 2: // ENTITY_ID
             return ENTITY_ID;
-          case 2: // USER_LIST
+          case 3: // USER_LIST
             return USER_LIST;
-          case 3: // PERSSION_TYPE_ID
+          case 4: // PERSSION_TYPE_ID
             return PERSSION_TYPE_ID;
-          case 4: // CASCADE_PERMISSION
+          case 5: // CASCADE_PERMISSION
             return CASCADE_PERMISSION;
           default:
             return null;
@@ -39632,6 +39654,8 @@ public class SharingRegistryService {
     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.REQUIRED, 
+          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.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.USER_LIST, new org.apache.thrift.meta_data.FieldMetaData("userList", org.apache.thrift.TFieldRequirementType.REQUIRED, 
@@ -39649,12 +39673,14 @@ public class SharingRegistryService {
     }
 
     public shareEntityWithUsers_args(
+      String domainId,
       String entityId,
       List<String> userList,
       String perssionTypeId,
       boolean cascadePermission)
     {
       this();
+      this.domainId = domainId;
       this.entityId = entityId;
       this.userList = userList;
       this.perssionTypeId = perssionTypeId;
@@ -39667,6 +39693,9 @@ public class SharingRegistryService {
      */
     public shareEntityWithUsers_args(shareEntityWithUsers_args other) {
       __isset_bitfield = other.__isset_bitfield;
+      if (other.isSetDomainId()) {
+        this.domainId = other.domainId;
+      }
       if (other.isSetEntityId()) {
         this.entityId = other.entityId;
       }
@@ -39686,6 +39715,7 @@ public class SharingRegistryService {
 
     @Override
     public void clear() {
+      this.domainId = null;
       this.entityId = null;
       this.userList = null;
       this.perssionTypeId = null;
@@ -39693,6 +39723,30 @@ public class SharingRegistryService {
       this.cascadePermission = false;
     }
 
+    public String getDomainId() {
+      return this.domainId;
+    }
+
+    public shareEntityWithUsers_args 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 getEntityId() {
       return this.entityId;
     }
@@ -39805,6 +39859,14 @@ public class SharingRegistryService {
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
+      case DOMAIN_ID:
+        if (value == null) {
+          unsetDomainId();
+        } else {
+          setDomainId((String)value);
+        }
+        break;
+
       case ENTITY_ID:
         if (value == null) {
           unsetEntityId();
@@ -39842,6 +39904,9 @@ public class SharingRegistryService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
+      case DOMAIN_ID:
+        return getDomainId();
+
       case ENTITY_ID:
         return getEntityId();
 
@@ -39865,6 +39930,8 @@ public class SharingRegistryService {
       }
 
       switch (field) {
+      case DOMAIN_ID:
+        return isSetDomainId();
       case ENTITY_ID:
         return isSetEntityId();
       case USER_LIST:
@@ -39890,6 +39957,15 @@ public class SharingRegistryService {
       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_entityId = true && this.isSetEntityId();
       boolean that_present_entityId = true && that.isSetEntityId();
       if (this_present_entityId || that_present_entityId) {
@@ -39933,6 +40009,11 @@ public class SharingRegistryService {
     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_entityId = true && (isSetEntityId());
       list.add(present_entityId);
       if (present_entityId)
@@ -39964,6 +40045,16 @@ public class SharingRegistryService {
 
       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(isSetEntityId()).compareTo(other.isSetEntityId());
       if (lastComparison != 0) {
         return lastComparison;
@@ -40024,6 +40115,14 @@ public class SharingRegistryService {
       StringBuilder sb = new StringBuilder("shareEntityWithUsers_args(");
       boolean first = true;
 
+      sb.append("domainId:");
+      if (this.domainId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.domainId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
       sb.append("entityId:");
       if (this.entityId == null) {
         sb.append("null");
@@ -40057,6 +40156,9 @@ public class SharingRegistryService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      if (domainId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainId' was not present! Struct: " + toString());
+      }
       if (entityId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityId' was not present! Struct: " + toString());
       }
@@ -40106,7 +40208,15 @@ public class SharingRegistryService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // ENTITY_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: // ENTITY_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.entityId = iprot.readString();
                 struct.setEntityIdIsSet(true);
@@ -40114,7 +40224,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // USER_LIST
+            case 3: // USER_LIST
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
                   org.apache.thrift.protocol.TList _list98 = iprot.readListBegin();
@@ -40132,7 +40242,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 3: // PERSSION_TYPE_ID
+            case 4: // PERSSION_TYPE_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.perssionTypeId = iprot.readString();
                 struct.setPerssionTypeIdIsSet(true);
@@ -40140,7 +40250,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 4: // CASCADE_PERMISSION
+            case 5: // CASCADE_PERMISSION
               if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                 struct.cascadePermission = iprot.readBool();
                 struct.setCascadePermissionIsSet(true);
@@ -40166,6 +40276,11 @@ public class SharingRegistryService {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.domainId != null) {
+          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+          oprot.writeString(struct.domainId);
+          oprot.writeFieldEnd();
+        }
         if (struct.entityId != null) {
           oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
           oprot.writeString(struct.entityId);
@@ -40208,6 +40323,7 @@ public class SharingRegistryService {
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, shareEntityWithUsers_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.domainId);
         oprot.writeString(struct.entityId);
         {
           oprot.writeI32(struct.userList.size());
@@ -40223,6 +40339,8 @@ public class SharingRegistryService {
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, shareEntityWithUsers_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.domainId = iprot.readString();
+        struct.setDomainIdIsSet(true);
         struct.entityId = iprot.readString();
         struct.setEntityIdIsSet(true);
         {
@@ -40716,9 +40834,10 @@ public class SharingRegistryService {
   public static class revokeEntitySharingFromUsers_args implements org.apache.thrift.TBase<revokeEntitySharingFromUsers_args, revokeEntitySharingFromUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<revokeEntitySharingFromUsers_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revokeEntitySharingFromUsers_args");
 
-    private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField USER_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("userList", org.apache.thrift.protocol.TType.LIST, (short)2);
-    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
+    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 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 USER_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("userList", org.apache.thrift.protocol.TType.LIST, (short)3);
+    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)4);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -40726,15 +40845,17 @@ public class SharingRegistryService {
       schemes.put(TupleScheme.class, new revokeEntitySharingFromUsers_argsTupleSchemeFactory());
     }
 
+    public String domainId; // required
     public String entityId; // required
     public List<String> userList; // required
     public String perssionTypeId; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      ENTITY_ID((short)1, "entityId"),
-      USER_LIST((short)2, "userList"),
-      PERSSION_TYPE_ID((short)3, "perssionTypeId");
+      DOMAIN_ID((short)1, "domainId"),
+      ENTITY_ID((short)2, "entityId"),
+      USER_LIST((short)3, "userList"),
+      PERSSION_TYPE_ID((short)4, "perssionTypeId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -40749,11 +40870,13 @@ public class SharingRegistryService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // ENTITY_ID
+          case 1: // DOMAIN_ID
+            return DOMAIN_ID;
+          case 2: // ENTITY_ID
             return ENTITY_ID;
-          case 2: // USER_LIST
+          case 3: // USER_LIST
             return USER_LIST;
-          case 3: // PERSSION_TYPE_ID
+          case 4: // PERSSION_TYPE_ID
             return PERSSION_TYPE_ID;
           default:
             return null;
@@ -40798,6 +40921,8 @@ public class SharingRegistryService {
     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.REQUIRED, 
+          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.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.USER_LIST, new org.apache.thrift.meta_data.FieldMetaData("userList", org.apache.thrift.TFieldRequirementType.REQUIRED, 
@@ -40813,11 +40938,13 @@ public class SharingRegistryService {
     }
 
     public revokeEntitySharingFromUsers_args(
+      String domainId,
       String entityId,
       List<String> userList,
       String perssionTypeId)
     {
       this();
+      this.domainId = domainId;
       this.entityId = entityId;
       this.userList = userList;
       this.perssionTypeId = perssionTypeId;
@@ -40827,6 +40954,9 @@ public class SharingRegistryService {
      * Performs a deep copy on <i>other</i>.
      */
     public revokeEntitySharingFromUsers_args(revokeEntitySharingFromUsers_args other) {
+      if (other.isSetDomainId()) {
+        this.domainId = other.domainId;
+      }
       if (other.isSetEntityId()) {
         this.entityId = other.entityId;
       }
@@ -40845,11 +40975,36 @@ public class SharingRegistryService {
 
     @Override
     public void clear() {
+      this.domainId = null;
       this.entityId = null;
       this.userList = null;
       this.perssionTypeId = null;
     }
 
+    public String getDomainId() {
+      return this.domainId;
+    }
+
+    public revokeEntitySharingFromUsers_args 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 getEntityId() {
       return this.entityId;
     }
@@ -40939,6 +41094,14 @@ public class SharingRegistryService {
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
+      case DOMAIN_ID:
+        if (value == null) {
+          unsetDomainId();
+        } else {
+          setDomainId((String)value);
+        }
+        break;
+
       case ENTITY_ID:
         if (value == null) {
           unsetEntityId();
@@ -40968,6 +41131,9 @@ public class SharingRegistryService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
+      case DOMAIN_ID:
+        return getDomainId();
+
       case ENTITY_ID:
         return getEntityId();
 
@@ -40988,6 +41154,8 @@ public class SharingRegistryService {
       }
 
       switch (field) {
+      case DOMAIN_ID:
+        return isSetDomainId();
       case ENTITY_ID:
         return isSetEntityId();
       case USER_LIST:
@@ -41011,6 +41179,15 @@ public class SharingRegistryService {
       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_entityId = true && this.isSetEntityId();
       boolean that_present_entityId = true && that.isSetEntityId();
       if (this_present_entityId || that_present_entityId) {
@@ -41045,6 +41222,11 @@ public class SharingRegistryService {
     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_entityId = true && (isSetEntityId());
       list.add(present_entityId);
       if (present_entityId)
@@ -41071,6 +41253,16 @@ public class SharingRegistryService {
 
       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(isSetEntityId()).compareTo(other.isSetEntityId());
       if (lastComparison != 0) {
         return lastComparison;
@@ -41121,6 +41313,14 @@ public class SharingRegistryService {
       StringBuilder sb = new StringBuilder("revokeEntitySharingFromUsers_args(");
       boolean first = true;
 
+      sb.append("domainId:");
+      if (this.domainId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.domainId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
       sb.append("entityId:");
       if (this.entityId == null) {
         sb.append("null");
@@ -41150,6 +41350,9 @@ public class SharingRegistryService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      if (domainId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainId' was not present! Struct: " + toString());
+      }
       if (entityId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityId' was not present! Struct: " + toString());
       }
@@ -41196,7 +41399,15 @@ public class SharingRegistryService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // ENTITY_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: // ENTITY_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.entityId = iprot.readString();
                 struct.setEntityIdIsSet(true);
@@ -41204,7 +41415,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // USER_LIST
+            case 3: // USER_LIST
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
                   org.apache.thrift.protocol.TList _list106 = iprot.readListBegin();
@@ -41222,7 +41433,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 3: // PERSSION_TYPE_ID
+            case 4: // PERSSION_TYPE_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.perssionTypeId = iprot.readString();
                 struct.setPerssionTypeIdIsSet(true);
@@ -41245,6 +41456,11 @@ public class SharingRegistryService {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.domainId != null) {
+          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+          oprot.writeString(struct.domainId);
+          oprot.writeFieldEnd();
+        }
         if (struct.entityId != null) {
           oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
           oprot.writeString(struct.entityId);
@@ -41284,6 +41500,7 @@ public class SharingRegistryService {
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, revokeEntitySharingFromUsers_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.domainId);
         oprot.writeString(struct.entityId);
         {
           oprot.writeI32(struct.userList.size());
@@ -41298,6 +41515,8 @@ public class SharingRegistryService {
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, revokeEntitySharingFromUsers_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.domainId = iprot.readString();
+        struct.setDomainIdIsSet(true);
         struct.entityId = iprot.readString();
         struct.setEntityIdIsSet(true);
         {
@@ -41789,10 +42008,11 @@ public class SharingRegistryService {
   public static class shareEntityWithGroups_args implements org.apache.thrift.TBase<shareEntityWithGroups_args, shareEntityWithGroups_args._Fields>, java.io.Serializable, Cloneable, Comparable<shareEntityWithGroups_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("shareEntityWithGroups_args");
 
-    private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField GROUP_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("groupList", org.apache.thrift.protocol.TType.LIST, (short)2);
-    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField CASCADE_PERMISSION_FIELD_DESC = new org.apache.thrift.protocol.TField("cascadePermission", org.apache.thrift.protocol.TType.BOOL, (short)4);
+    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 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_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("groupList", org.apache.thrift.protocol.TType.LIST, (short)3);
+    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)4);
+    private static final org.apache.thrift.protocol.TField CASCADE_PERMISSION_FIELD_DESC = new org.apache.thrift.protocol.TField("cascadePermission", org.apache.thrift.protocol.TType.BOOL, (short)5);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -41800,6 +42020,7 @@ public class SharingRegistryService {
       schemes.put(TupleScheme.class, new shareEntityWithGroups_argsTupleSchemeFactory());
     }
 
+    public String domainId; // required
     public String entityId; // required
     public List<String> groupList; // required
     public String perssionTypeId; // required
@@ -41807,10 +42028,11 @@ public class SharingRegistryService {
 
     /** 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"),
-      GROUP_LIST((short)2, "groupList"),
-      PERSSION_TYPE_ID((short)3, "perssionTypeId"),
-      CASCADE_PERMISSION((short)4, "cascadePermission");
+      DOMAIN_ID((short)1, "domainId"),
+      ENTITY_ID((short)2, "entityId"),
+      GROUP_LIST((short)3, "groupList"),
+      PERSSION_TYPE_ID((short)4, "perssionTypeId"),
+      CASCADE_PERMISSION((short)5, "cascadePermission");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -41825,13 +42047,15 @@ public class SharingRegistryService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // ENTITY_ID
+          case 1: // DOMAIN_ID
+            return DOMAIN_ID;
+          case 2: // ENTITY_ID
             return ENTITY_ID;
-          case 2: // GROUP_LIST
+          case 3: // GROUP_LIST
             return GROUP_LIST;
-          case 3: // PERSSION_TYPE_ID
+          case 4: // PERSSION_TYPE_ID
             return PERSSION_TYPE_ID;
-          case 4: // CASCADE_PERMISSION
+          case 5: // CASCADE_PERMISSION
             return CASCADE_PERMISSION;
           default:
             return null;
@@ -41878,6 +42102,8 @@ public class SharingRegistryService {
     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.REQUIRED, 
+          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.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.GROUP_LIST, new org.apache.thrift.meta_data.FieldMetaData("groupList", org.apache.thrift.TFieldRequirementType.REQUIRED, 
@@ -41895,12 +42121,14 @@ public class SharingRegistryService {
     }
 
     public shareEntityWithGroups_args(
+      String domainId,
       String entityId,
       List<String> groupList,
       String perssionTypeId,
       boolean cascadePermission)
     {
       this();
+      this.domainId = domainId;
       this.entityId = entityId;
       this.groupList = groupList;
       this.perssionTypeId = perssionTypeId;
@@ -41913,6 +42141,9 @@ public class SharingRegistryService {
      */
     public shareEntityWithGroups_args(shareEntityWithGroups_args other) {
       __isset_bitfield = other.__isset_bitfield;
+      if (other.isSetDomainId()) {
+        this.domainId = other.domainId;
+      }
       if (other.isSetEntityId()) {
         this.entityId = other.entityId;
       }
@@ -41932,6 +42163,7 @@ public class SharingRegistryService {
 
     @Override
     public void clear() {
+      this.domainId = null;
       this.entityId = null;
       this.groupList = null;
       this.perssionTypeId = null;
@@ -41939,6 +42171,30 @@ public class SharingRegistryService {
       this.cascadePermission = false;
     }
 
+    public String getDomainId() {
+      return this.domainId;
+    }
+
+    public shareEntityWithGroups_args 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 getEntityId() {
       return this.entityId;
     }
@@ -42051,6 +42307,14 @@ public class SharingRegistryService {
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
+      case DOMAIN_ID:
+        if (value == null) {
+          unsetDomainId();
+        } else {
+          setDomainId((String)value);
+        }
+        break;
+
       case ENTITY_ID:
         if (value == null) {
           unsetEntityId();
@@ -42088,6 +42352,9 @@ public class SharingRegistryService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
+      case DOMAIN_ID:
+        return getDomainId();
+
       case ENTITY_ID:
         return getEntityId();
 
@@ -42111,6 +42378,8 @@ public class SharingRegistryService {
       }
 
       switch (field) {
+      case DOMAIN_ID:
+        return isSetDomainId();
       case ENTITY_ID:
         return isSetEntityId();
       case GROUP_LIST:
@@ -42136,6 +42405,15 @@ public class SharingRegistryService {
       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_entityId = true && this.isSetEntityId();
       boolean that_present_entityId = true && that.isSetEntityId();
       if (this_present_entityId || that_present_entityId) {
@@ -42179,6 +42457,11 @@ public class SharingRegistryService {
     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_entityId = true && (isSetEntityId());
       list.add(present_entityId);
       if (present_entityId)
@@ -42210,6 +42493,16 @@ public class SharingRegistryService {
 
       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(isSetEntityId()).compareTo(other.isSetEntityId());
       if (lastComparison != 0) {
         return lastComparison;
@@ -42270,6 +42563,14 @@ public class SharingRegistryService {
       StringBuilder sb = new StringBuilder("shareEntityWithGroups_args(");
       boolean first = true;
 
+      sb.append("domainId:");
+      if (this.domainId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.domainId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
       sb.append("entityId:");
       if (this.entityId == null) {
         sb.append("null");
@@ -42303,6 +42604,9 @@ public class SharingRegistryService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      if (domainId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainId' was not present! Struct: " + toString());
+      }
       if (entityId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityId' was not present! Struct: " + toString());
       }
@@ -42352,7 +42656,15 @@ public class SharingRegistryService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // ENTITY_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: // ENTITY_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.entityId = iprot.readString();
                 struct.setEntityIdIsSet(true);
@@ -42360,7 +42672,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // GROUP_LIST
+            case 3: // GROUP_LIST
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
                   org.apache.thrift.protocol.TList _list114 = iprot.readListBegin();
@@ -42378,7 +42690,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 3: // PERSSION_TYPE_ID
+            case 4: // PERSSION_TYPE_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.perssionTypeId = iprot.readString();
                 struct.setPerssionTypeIdIsSet(true);
@@ -42386,7 +42698,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 4: // CASCADE_PERMISSION
+            case 5: // CASCADE_PERMISSION
               if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                 struct.cascadePermission = iprot.readBool();
                 struct.setCascadePermissionIsSet(true);
@@ -42412,6 +42724,11 @@ public class SharingRegistryService {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.domainId != null) {
+          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+          oprot.writeString(struct.domainId);
+          oprot.writeFieldEnd();
+        }
         if (struct.entityId != null) {
           oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
           oprot.writeString(struct.entityId);
@@ -42454,6 +42771,7 @@ public class SharingRegistryService {
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, shareEntityWithGroups_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.domainId);
         oprot.writeString(struct.entityId);
         {
           oprot.writeI32(struct.groupList.size());
@@ -42469,6 +42787,8 @@ public class SharingRegistryService {
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, shareEntityWithGroups_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.domainId = iprot.readString();
+        struct.setDomainIdIsSet(true);
         struct.entityId = iprot.readString();
         struct.setEntityIdIsSet(true);
         {
@@ -42962,9 +43282,10 @@ public class SharingRegistryService {
   public static class revokeEntitySharingFromGroups_args implements org.apache.thrift.TBase<revokeEntitySharingFromGroups_args, revokeEntitySharingFromGroups_args._Fields>, java.io.Serializable, Cloneable, Comparable<revokeEntitySharingFromGroups_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revokeEntitySharingFromGroups_args");
 
-    private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField GROUP_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("groupList", org.apache.thrift.protocol.TType.LIST, (short)2);
-    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)3);
+    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 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_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("groupList", org.apache.thrift.protocol.TType.LIST, (short)3);
+    private static final org.apache.thrift.protocol.TField PERSSION_TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("perssionTypeId", org.apache.thrift.protocol.TType.STRING, (short)4);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -42972,15 +43293,17 @@ public class SharingRegistryService {
       schemes.put(TupleScheme.class, new revokeEntitySharingFromGroups_argsTupleSchemeFactory());
     }
 
+    public String domainId; // required
     public String entityId; // required
     public List<String> groupList; // required
     public String perssionTypeId; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      ENTITY_ID((short)1, "entityId"),
-      GROUP_LIST((short)2, "groupList"),
-      PERSSION_TYPE_ID((short)3, "perssionTypeId");
+      DOMAIN_ID((short)1, "domainId"),
+      ENTITY_ID((short)2, "entityId"),
+      GROUP_LIST((short)3, "groupList"),
+      PERSSION_TYPE_ID((short)4, "perssionTypeId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -42995,11 +43318,13 @@ public class SharingRegistryService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // ENTITY_ID
+          case 1: // DOMAIN_ID
+            return DOMAIN_ID;
+          case 2: // ENTITY_ID
             return ENTITY_ID;
-          case 2: // GROUP_LIST
+          case 3: // GROUP_LIST
             return GROUP_LIST;
-          case 3: // PERSSION_TYPE_ID
+          case 4: // PERSSION_TYPE_ID
             return PERSSION_TYPE_ID;
           default:
             return null;
@@ -43044,6 +43369,8 @@ public class SharingRegistryService {
     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.REQUIRED, 
+          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.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.GROUP_LIST, new org.apache.thrift.meta_data.FieldMetaData("groupList", org.apache.thrift.TFieldRequirementType.REQUIRED, 
@@ -43059,11 +43386,13 @@ public class SharingRegistryService {
     }
 
     public revokeEntitySharingFromGroups_args(
+      String domainId,
       String entityId,
       List<String> groupList,
       String perssionTypeId)
     {
       this();
+      this.domainId = domainId;
       this.entityId = entityId;
       this.groupList = groupList;
       this.perssionTypeId = perssionTypeId;
@@ -43073,6 +43402,9 @@ public class SharingRegistryService {
      * Performs a deep copy on <i>other</i>.
      */
     public revokeEntitySharingFromGroups_args(revokeEntitySharingFromGroups_args other) {
+      if (other.isSetDomainId()) {
+        this.domainId = other.domainId;
+      }
       if (other.isSetEntityId()) {
         this.entityId = other.entityId;
       }
@@ -43091,11 +43423,36 @@ public class SharingRegistryService {
 
     @Override
     public void clear() {
+      this.domainId = null;
       this.entityId = null;
       this.groupList = null;
       this.perssionTypeId = null;
     }
 
+    public String getDomainId() {
+      return this.domainId;
+    }
+
+    public revokeEntitySharingFromGroups_args 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 getEntityId() {
       return this.entityId;
     }
@@ -43185,6 +43542,14 @@ public class SharingRegistryService {
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
+      case DOMAIN_ID:
+        if (value == null) {
+          unsetDomainId();
+        } else {
+          setDomainId((String)value);
+        }
+        break;
+
       case ENTITY_ID:
         if (value == null) {
           unsetEntityId();
@@ -43214,6 +43579,9 @@ public class SharingRegistryService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
+      case DOMAIN_ID:
+        return getDomainId();
+
       case ENTITY_ID:
         return getEntityId();
 
@@ -43234,6 +43602,8 @@ public class SharingRegistryService {
       }
 
       switch (field) {
+      case DOMAIN_ID:
+        return isSetDomainId();
       case ENTITY_ID:
         return isSetEntityId();
       case GROUP_LIST:
@@ -43257,6 +43627,15 @@ public class SharingRegistryService {
       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_entityId = true && this.isSetEntityId();
       boolean that_present_entityId = true && that.isSetEntityId();
       if (this_present_entityId || that_present_entityId) {
@@ -43291,6 +43670,11 @@ public class SharingRegistryService {
     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_entityId = true && (isSetEntityId());
       list.add(present_entityId);
       if (present_entityId)
@@ -43317,6 +43701,16 @@ public class SharingRegistryService {
 
       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(isSetEntityId()).compareTo(other.isSetEntityId());
       if (lastComparison != 0) {
         return lastComparison;
@@ -43367,6 +43761,14 @@ public class SharingRegistryService {
       StringBuilder sb = new StringBuilder("revokeEntitySharingFromGroups_args(");
       boolean first = true;
 
+      sb.append("domainId:");
+      if (this.domainId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.domainId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
       sb.append("entityId:");
       if (this.entityId == null) {
         sb.append("null");
@@ -43396,6 +43798,9 @@ public class SharingRegistryService {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      if (domainId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'domainId' was not present! Struct: " + toString());
+      }
       if (entityId == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'entityId' was not present! Struct: " + toString());
       }
@@ -43442,7 +43847,15 @@ public class SharingRegistryService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // ENTITY_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: // ENTITY_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.entityId = iprot.readString();
                 struct.setEntityIdIsSet(true);
@@ -43450,7 +43863,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // GROUP_LIST
+            case 3: // GROUP_LIST
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
                   org.apache.thrift.protocol.TList _list122 = iprot.readListBegin();
@@ -43468,7 +43881,7 @@ public class SharingRegistryService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 3: // PERSSION_TYPE_ID
+            case 4: // PERSSION_TYPE_ID
               if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                 struct.perssionTypeId = iprot.readString();
                 struct.setPerssionTypeIdIsSet(true);
@@ -43491,6 +43904,11 @@ public class SharingRegistryService {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.domainId != null) {
+          oprot.writeFieldBegin(DOMAIN_ID_FIELD_DESC);
+          oprot.writeString(struct.domainId);
+          oprot.writeFieldEnd();
+        }
         if (struct.entityId != null) {
           oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
           oprot.writeString(struct.entityId);
@@ -43530,6 +43948,7 @@ public class SharingRegistryService {
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, revokeEntitySharingFromGroups_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.domainId);
         oprot.writeString(struct.entityId);
         {
           oprot.writeI32(struct.groupList.size());
@@ -43544,6 +43963,8 @@ public class SharingRegistryService {
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, revokeEntitySharingFromGroups_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.domainId = iprot.readString();
+        struct.setDomainIdIsSet(true);
         struct.entityId = iprot.readString();
         struct.setEntityIdIsSet(true);
         {

http://git-wip-us.apache.org/repos/asf/airavata/blob/4bb7c6de/modules/sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_cpi.thrift b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
index f3a91dc..3cef3e6 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -89,9 +89,9 @@ service SharingRegistryService {
     /**
      * Sharing Entity with Users and Groups
     **/
-    bool shareEntityWithUsers(1: required string entityId, 2: required list<string> userList, 3: required string perssionTypeId, 4: required bool cascadePermission) throws (1: sharing_models.SharingRegistryException gre)
-    bool revokeEntitySharingFromUsers(1: required string entityId, 2: required list<string> userList, 3: required string perssionTypeId ) throws (1: sharing_models.SharingRegistryException gre)
-    bool shareEntityWithGroups(1: required string entityId, 2: required list<string> groupList, 3: required string perssionTypeId, 4: required bool cascadePermission) throws (1: sharing_models.SharingRegistryException gre)
-    bool revokeEntitySharingFromGroups(1: required string entityId, 2: required list<string> groupList, 3: required string perssionTypeId) throws (1: sharing_models.SharingRegistryException gre)
+    bool shareEntityWithUsers(1: required string domainId, 2: required string entityId, 3: required list<string> userList, 4: required string perssionTypeId, 5: required bool cascadePermission) throws (1: sharing_models.SharingRegistryException gre)
+    bool revokeEntitySharingFromUsers(1: required string domainId, 2: required string entityId, 3: required list<string> userList, 4: required string perssionTypeId ) throws (1: sharing_models.SharingRegistryException gre)
+    bool shareEntityWithGroups(1: required string domainId, 2: required string entityId, 3: required list<string> groupList, 4: required string perssionTypeId, 5: required bool cascadePermission) throws (1: sharing_models.SharingRegistryException gre)
+    bool revokeEntitySharingFromGroups(1: required string domainId, 2: required string entityId, 3: required list<string> groupList, 4: required string perssionTypeId) throws (1: sharing_models.SharingRegistryException gre)
     bool userHasAccess(1: required string domainId, 2: required string userId, 3: required string entityId, 4: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
 }
\ No newline at end of file


[19/51] [abbrv] airavata git commit: adding search criteria as a new struct

Posted by sc...@apache.org.
adding search criteria as a new struct


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

Branch: refs/heads/airavata-gov-registry
Commit: bff76559ecdb0a49250404aab4c57a5e41630d1c
Parents: 6250ff1
Author: scnakandala <su...@gmail.com>
Authored: Wed Oct 12 16:42:40 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Oct 12 16:42:45 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    6 +-
 modules/sharing-registry/README.md              |    2 +-
 .../sharing/registry/AiravataDataMigrator.java  |  166 ++
 .../airavata/sharing/registry/DataMigrator.java |  166 --
 .../db/repositories/EntityRepository.java       |   35 +-
 .../sharing/registry/db/utils/DBConstants.java  |   18 +-
 .../server/SharingRegistryServerHandler.java    |    2 +-
 .../SharingRegistryServerHandlerTest.java       |    9 +-
 .../sharing-registry-stubs/pom.xml              |   14 +
 .../sharing/registry/models/Domain.java         |    2 +-
 .../sharing/registry/models/Entity.java         |    2 +-
 .../registry/models/EntitySearchField.java      |   53 +
 .../registry/models/EntitySearchFields.java     |   48 -
 .../sharing/registry/models/EntityType.java     |    2 +-
 .../registry/models/GroupMembership.java        |    2 +-
 .../sharing/registry/models/PermissionType.java |    2 +-
 .../registry/models/SearchCondition.java        |   51 +
 .../sharing/registry/models/SearchCriteria.java |  642 +++++++
 .../sharing/registry/models/Sharing.java        |    2 +-
 .../models/SharingRegistryException.java        |   36 +-
 .../airavata/sharing/registry/models/User.java  |    2 +-
 .../sharing/registry/models/UserGroup.java      |    2 +-
 .../service/cpi/GovRegistryService.java         | 1609 +++++++++---------
 .../thrift_models/sharing_cpi.thrift            |    3 +-
 .../thrift_models/sharing_models.thrift         |   19 +-
 25 files changed, 1829 insertions(+), 1066 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/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 a0a563c..f0c0559 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
@@ -756,7 +756,7 @@ public class AiravataServerHandler implements Airavata.Iface {
                 // user projects + user accessible projects
                 List<String> accessibleProjectIds = new ArrayList<>();
                 sharingRegistryServerHandler.searchEntities(userName+"@"+gatewayId , gatewayId+":PROJECT",
-                        new HashMap<>(), offset, limit).stream().forEach(p->accessibleProjectIds.add(p.entityId));
+                        new ArrayList<>(), offset, limit).stream().forEach(p->accessibleProjectIds.add(p.entityId));
                 return getRegistryServiceClient().searchProjects(gatewayId, userName, accessibleProjectIds, new HashMap<>(), limit, offset);
             }else{
                 return getRegistryServiceClient().getUserProjects(gatewayId, userName, limit, offset);
@@ -801,7 +801,7 @@ public class AiravataServerHandler implements Airavata.Iface {
 
             if(ServerSettings.isEnableSharing())
                 sharingRegistryServerHandler.searchEntities(userName+"@"+gatewayId, gatewayId+":PROJECT",
-                        new HashMap<>(), 0, -1).stream().forEach(e->accessibleProjIds.add(e.entityId));
+                        new ArrayList<>(), 0, -1).stream().forEach(e->accessibleProjIds.add(e.entityId));
 
             return getRegistryServiceClient().searchProjects(gatewayId, userName, accessibleProjIds, filters, limit, offset);
         }catch (Exception e) {
@@ -838,7 +838,7 @@ public class AiravataServerHandler implements Airavata.Iface {
             List<String> accessibleExpIds = new ArrayList<>();
             if(ServerSettings.isEnableSharing())
                 sharingRegistryServerHandler.searchEntities(userName+"@"+gatewayId, gatewayId+":EXPERIMENT",
-                        new HashMap<>(), 0, -1).forEach(e->accessibleExpIds.add(e.entityId));
+                        new ArrayList<>(), 0, -1).forEach(e->accessibleExpIds.add(e.entityId));
             return getRegistryServiceClient().searchExperiments(gatewayId, userName, accessibleExpIds, filters, limit, offset);
         }catch (Exception e) {
             logger.error("Error while retrieving experiments", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/README.md
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/README.md b/modules/sharing-registry/README.md
index 299e7b4..524a36b 100644
--- a/modules/sharing-registry/README.md
+++ b/modules/sharing-registry/README.md
@@ -1,3 +1,3 @@
-## Airavata Governance Registry
+## Airavata Sharing 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/bff76559/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/AiravataDataMigrator.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/AiravataDataMigrator.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/AiravataDataMigrator.java
new file mode 100644
index 0000000..1a80683
--- /dev/null
+++ b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/AiravataDataMigrator.java
@@ -0,0 +1,166 @@
+/*
+ *
+ * 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;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.sharing.registry.models.*;
+import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
+import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.HashMap;
+import java.util.Map;
+
+public class AiravataDataMigrator {
+    private final static Logger logger = LoggerFactory.getLogger(AiravataDataMigrator.class);
+
+    public static void main(String[] args) throws SQLException, ClassNotFoundException, TException, ApplicationSettingsException {
+        Connection expCatConnection = ConnectionFactory.getInstance().getExpCatConnection();
+
+        SharingRegistryServerHandler govRegistryServerHandler = new SharingRegistryServerHandler();
+
+        String query = "SELECT * FROM GATEWAY";
+        Statement statement = expCatConnection.createStatement();
+        ResultSet rs = statement.executeQuery(query);
+
+        while (rs.next()) {
+            //Creating domain entries
+            Domain domain = new Domain();
+            domain.setDomainId(rs.getString("GATEWAY_ID"));
+            if(rs.getString("GATEWAY_NAME") != null)
+                domain.setName(rs.getString("GATEWAY_NAME"));
+            else
+                domain.setName(rs.getString("GATEWAY_ID"));
+            domain.setDescription("Domain entry for " + domain.name);
+
+            govRegistryServerHandler.createDomain(domain);
+
+            //Creating Entity Types for each domain
+            EntityType entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":PROJECT");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("PROJECT");
+            entityType.setDescription("Project entity type");
+            govRegistryServerHandler.createEntityType(entityType);
+
+            entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":EXPERIMENT");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("EXPERIMENT");
+            entityType.setDescription("Experiment entity type");
+            govRegistryServerHandler.createEntityType(entityType);
+
+            entityType = new EntityType();
+            entityType.setEntityTypeId(domain.domainId+":FILE");
+            entityType.setDomainId(domain.domainId);
+            entityType.setName("FILE");
+            entityType.setDescription("File entity type");
+            govRegistryServerHandler.createEntityType(entityType);
+
+            //Creating Permission Types for each domain
+            PermissionType permissionType = new PermissionType();
+            permissionType.setPermissionTypeId(domain.domainId+":READ");
+            permissionType.setDomainId(domain.domainId);
+            permissionType.setName("READ");
+            permissionType.setDescription("Read permission type");
+            govRegistryServerHandler.createPermissionType(permissionType);
+
+            permissionType = new PermissionType();
+            permissionType.setPermissionTypeId(domain.domainId+":WRITE");
+            permissionType.setDomainId(domain.domainId);
+            permissionType.setName("WRITE");
+            permissionType.setDescription("Write permission type");
+            govRegistryServerHandler.createPermissionType(permissionType);
+        }
+
+        //Creating user entries
+        query = "SELECT * FROM USERS";
+        statement = expCatConnection.createStatement();
+        rs = statement.executeQuery(query);
+        while(rs.next()){
+            User user = new User();
+            user.setUserId(rs.getString("AIRAVATA_INTERNAL_USER_ID"));
+            user.setDomainId(rs.getString("GATEWAY_ID"));
+            user.setUserName(rs.getString("USER_NAME"));
+
+            govRegistryServerHandler.createUser(user);
+        }
+
+        //Creating project entries
+        query = "SELECT * FROM PROJECT";
+        statement = expCatConnection.createStatement();
+        rs = statement.executeQuery(query);
+        while(rs.next()){
+            Entity entity = new Entity();
+            entity.setEntityId(rs.getString("PROJECT_ID"));
+            entity.setDomainId(rs.getString("GATEWAY_ID"));
+            entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":PROJECT");
+            entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID"));
+            entity.setName(rs.getString("PROJECT_NAME"));
+            entity.setDescription(rs.getString("DESCRIPTION"));
+            if(entity.getDescription() == null)
+                entity.setFullText(entity.getName());
+            else
+                entity.setFullText(entity.getName() + " " + entity.getDescription());
+            Map<String, String> metadata = new HashMap<>();
+            metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
+
+            govRegistryServerHandler.createEntity(entity);
+        }
+
+        //Creating experiment entries
+        query = "SELECT * FROM EXPERIMENT";
+        statement = expCatConnection.createStatement();
+        rs = statement.executeQuery(query);
+        while(rs.next()){
+            Entity entity = new Entity();
+            entity.setEntityId(rs.getString("EXPERIMENT_ID"));
+            entity.setDomainId(rs.getString("GATEWAY_ID"));
+            entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":EXPERIMENT");
+            entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID"));
+            entity.setParentEntityId(rs.getString("PROJECT_ID"));
+            entity.setName(rs.getString("EXPERIMENT_NAME"));
+            entity.setDescription(rs.getString("DESCRIPTION"));
+            if(entity.getDescription() == null)
+                entity.setFullText(entity.getName());
+            else
+                entity.setFullText(entity.getName() + " " + entity.getDescription());
+            Map<String, String> metadata = new HashMap<>();
+            metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
+            metadata.put("EXPERIMENT_TYPE", rs.getString("EXPERIMENT_TYPE"));
+            metadata.put("EXECUTION_ID", rs.getString("EXECUTION_ID"));
+            metadata.put("GATEWAY_EXECUTION_ID", rs.getString("GATEWAY_EXECUTION_ID"));
+            metadata.put("ENABLE_EMAIL_NOTIFICATION", rs.getString("ENABLE_EMAIL_NOTIFICATION"));
+            metadata.put("EMAIL_ADDRESSES", rs.getString("EMAIL_ADDRESSES"));
+            metadata.put("GATEWAY_INSTANCE_ID", rs.getString("GATEWAY_INSTANCE_ID"));
+            metadata.put("ARCHIVE", rs.getString("ARCHIVE"));
+
+            govRegistryServerHandler.createEntity(entity);
+        }
+
+        expCatConnection.close();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/DataMigrator.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/DataMigrator.java b/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/DataMigrator.java
deleted file mode 100644
index ea23042..0000000
--- a/modules/sharing-registry/sharing-data-migrator/src/main/java/org/apache/airavata/sharing/registry/DataMigrator.java
+++ /dev/null
@@ -1,166 +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.sharing.registry;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.sharing.registry.models.*;
-import org.apache.airavata.sharing.registry.server.SharingRegistryServerHandler;
-import org.apache.thrift.TException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.HashMap;
-import java.util.Map;
-
-public class DataMigrator {
-    private final static Logger logger = LoggerFactory.getLogger(DataMigrator.class);
-
-    public static void main(String[] args) throws SQLException, ClassNotFoundException, TException, ApplicationSettingsException {
-        Connection expCatConnection = ConnectionFactory.getInstance().getExpCatConnection();
-
-        SharingRegistryServerHandler govRegistryServerHandler = new SharingRegistryServerHandler();
-
-        String query = "SELECT * FROM GATEWAY";
-        Statement statement = expCatConnection.createStatement();
-        ResultSet rs = statement.executeQuery(query);
-
-        while (rs.next()) {
-            //Creating domain entries
-            Domain domain = new Domain();
-            domain.setDomainId(rs.getString("GATEWAY_ID"));
-            if(rs.getString("GATEWAY_NAME") != null)
-                domain.setName(rs.getString("GATEWAY_NAME"));
-            else
-                domain.setName(rs.getString("GATEWAY_ID"));
-            domain.setDescription("Domain entry for " + domain.name);
-
-            govRegistryServerHandler.createDomain(domain);
-
-            //Creating Entity Types for each domain
-            EntityType entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":PROJECT");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("PROJECT");
-            entityType.setDescription("Project entity type");
-            govRegistryServerHandler.createEntityType(entityType);
-
-            entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":EXPERIMENT");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("EXPERIMENT");
-            entityType.setDescription("Experiment entity type");
-            govRegistryServerHandler.createEntityType(entityType);
-
-            entityType = new EntityType();
-            entityType.setEntityTypeId(domain.domainId+":FILE");
-            entityType.setDomainId(domain.domainId);
-            entityType.setName("FILE");
-            entityType.setDescription("File entity type");
-            govRegistryServerHandler.createEntityType(entityType);
-
-            //Creating Permission Types for each domain
-            PermissionType permissionType = new PermissionType();
-            permissionType.setPermissionTypeId(domain.domainId+":READ");
-            permissionType.setDomainId(domain.domainId);
-            permissionType.setName("READ");
-            permissionType.setDescription("Read permission type");
-            govRegistryServerHandler.createPermissionType(permissionType);
-
-            permissionType = new PermissionType();
-            permissionType.setPermissionTypeId(domain.domainId+":WRITE");
-            permissionType.setDomainId(domain.domainId);
-            permissionType.setName("WRITE");
-            permissionType.setDescription("Write permission type");
-            govRegistryServerHandler.createPermissionType(permissionType);
-        }
-
-        //Creating user entries
-        query = "SELECT * FROM USERS";
-        statement = expCatConnection.createStatement();
-        rs = statement.executeQuery(query);
-        while(rs.next()){
-            User user = new User();
-            user.setUserId(rs.getString("AIRAVATA_INTERNAL_USER_ID"));
-            user.setDomainId(rs.getString("GATEWAY_ID"));
-            user.setUserName(rs.getString("USER_NAME"));
-
-            govRegistryServerHandler.createUser(user);
-        }
-
-        //Creating project entries
-        query = "SELECT * FROM PROJECT";
-        statement = expCatConnection.createStatement();
-        rs = statement.executeQuery(query);
-        while(rs.next()){
-            Entity entity = new Entity();
-            entity.setEntityId(rs.getString("PROJECT_ID"));
-            entity.setDomainId(rs.getString("GATEWAY_ID"));
-            entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":PROJECT");
-            entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID"));
-            entity.setName(rs.getString("PROJECT_NAME"));
-            entity.setDescription(rs.getString("DESCRIPTION"));
-            if(entity.getDescription() == null)
-                entity.setFullText(entity.getName());
-            else
-                entity.setFullText(entity.getName() + " " + entity.getDescription());
-            Map<String, String> metadata = new HashMap<>();
-            metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
-
-            govRegistryServerHandler.createEntity(entity);
-        }
-
-        //Creating experiment entries
-        query = "SELECT * FROM EXPERIMENT";
-        statement = expCatConnection.createStatement();
-        rs = statement.executeQuery(query);
-        while(rs.next()){
-            Entity entity = new Entity();
-            entity.setEntityId(rs.getString("EXPERIMENT_ID"));
-            entity.setDomainId(rs.getString("GATEWAY_ID"));
-            entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":EXPERIMENT");
-            entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID"));
-            entity.setParentEntityId(rs.getString("PROJECT_ID"));
-            entity.setName(rs.getString("EXPERIMENT_NAME"));
-            entity.setDescription(rs.getString("DESCRIPTION"));
-            if(entity.getDescription() == null)
-                entity.setFullText(entity.getName());
-            else
-                entity.setFullText(entity.getName() + " " + entity.getDescription());
-            Map<String, String> metadata = new HashMap<>();
-            metadata.put("CREATION_TIME", rs.getDate("CREATION_TIME").toString());
-            metadata.put("EXPERIMENT_TYPE", rs.getString("EXPERIMENT_TYPE"));
-            metadata.put("EXECUTION_ID", rs.getString("EXECUTION_ID"));
-            metadata.put("GATEWAY_EXECUTION_ID", rs.getString("GATEWAY_EXECUTION_ID"));
-            metadata.put("ENABLE_EMAIL_NOTIFICATION", rs.getString("ENABLE_EMAIL_NOTIFICATION"));
-            metadata.put("EMAIL_ADDRESSES", rs.getString("EMAIL_ADDRESSES"));
-            metadata.put("GATEWAY_INSTANCE_ID", rs.getString("GATEWAY_INSTANCE_ID"));
-            metadata.put("ARCHIVE", rs.getString("ARCHIVE"));
-
-            govRegistryServerHandler.createEntity(entity);
-        }
-
-        expCatConnection.close();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
index bc726f6..b7137d2 100644
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
+++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java
@@ -23,15 +23,12 @@ package org.apache.airavata.sharing.registry.db.repositories;
 import org.apache.airavata.sharing.registry.db.entities.EntityEntity;
 import org.apache.airavata.sharing.registry.db.entities.SharingEntity;
 import org.apache.airavata.sharing.registry.db.utils.DBConstants;
-import org.apache.airavata.sharing.registry.models.Entity;
-import org.apache.airavata.sharing.registry.models.EntitySearchFields;
-import org.apache.airavata.sharing.registry.models.SharingRegistryException;
+import org.apache.airavata.sharing.registry.models.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 public class EntityRepository extends AbstractRepository<Entity, EntityEntity, String> {
     private final static Logger logger = LoggerFactory.getLogger(EntityRepository.class);
@@ -46,7 +43,7 @@ public class EntityRepository extends AbstractRepository<Entity, EntityEntity, S
         return select(filters, 0, -1);
     }
 
-    public List<Entity> searchEntities(List<String> groupIds, String entityTypeId, Map<EntitySearchFields, String> filters,
+    public List<Entity> searchEntities(List<String> groupIds, String entityTypeId, List<SearchCriteria> filters,
                                        int offset, int limit) throws SharingRegistryException {
         String groupIdString = "'";
         for(String groupId : groupIds)
@@ -58,13 +55,27 @@ public class EntityRepository extends AbstractRepository<Entity, EntityEntity, S
                 "S." + DBConstants.SharingTable.GROUP_ID + " IN(" + groupIdString + ") AND E." + DBConstants.EntityTable.ENTITY_TYPE_ID + "='" +
                 entityTypeId + "' AND ";
 
-        for(Map.Entry<EntitySearchFields, String> mapEntry : filters.entrySet()){
-            if(mapEntry.getKey().equals(EntitySearchFields.NAME)){
-                query += "E." + DBConstants.EntityTable.NAME + " LIKE '%" + mapEntry.getValue() + "%' AND ";
-            }else if(mapEntry.getKey().equals(EntitySearchFields.DESCRIPTION)){
-                query += "E." + DBConstants.EntityTable.DESCRIPTION + " LIKE '%" + mapEntry.getValue() + "%' AND ";
-            }else if(mapEntry.getKey().equals(EntitySearchFields.FULL_TEXT)){
-                query += "E." + DBConstants.EntityTable.FULL_TEXT + " LIKE '%" + mapEntry.getValue() + "%' AND ";
+        for(SearchCriteria searchCriteria : filters){
+            if(searchCriteria.getSearchField().equals(EntitySearchField.NAME)){
+                query += "E." + DBConstants.EntityTable.NAME + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.DESCRIPTION)){
+                query += "E." + DBConstants.EntityTable.DESCRIPTION + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.FULL_TEXT)){
+                query += "E." + DBConstants.EntityTable.FULL_TEXT + " LIKE '%" + searchCriteria.getValue() + "%' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.PRRENT_ENTITY_ID)){
+                query += "E." + DBConstants.EntityTable.PARENT_ENTITY_ID + " = '" + searchCriteria.getValue() + "' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.CREATED_TIME)){
+                if(searchCriteria.getSearchCondition().equals(SearchCondition.GTE)){
+                    query += "E." + DBConstants.EntityTable.CREATED_TIME + " >= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
+                }else{
+                    query += "E." + DBConstants.EntityTable.CREATED_TIME + " <= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
+                }
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.UPDATED_TIME)){
+                if(searchCriteria.getSearchCondition().equals(SearchCondition.GTE)){
+                    query += "E." + DBConstants.EntityTable.UPDATED_TIME + " >= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
+                }else{
+                    query += "E." + DBConstants.EntityTable.UPDATED_TIME + " <= " + Integer.parseInt(searchCriteria.getValue().trim()) + " AND ";
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
index f963de2..387e0e5 100644
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
+++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/db/utils/DBConstants.java
@@ -26,18 +26,22 @@ 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 int SELECT_MAX_ROWS = 1000;
 
     public static class DomainTable {
         public static String DOMAIN_ID = "domainId";
         public static String NAME = "name";
         public static String DESCRIPTION = "description";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class UserTable {
         public static String USER_ID = "userId";
         public static String DOMAIN_ID = "domainId";
         public static String USER_NAME = "userName";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class UserGroupTable {
@@ -47,23 +51,31 @@ public class DBConstants {
         public static String DESCRIPTION = "description";
         public static String OWNER_ID = "ownerId";
         public static String GROUP_TYPE = "groupType";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class GroupMembershipTable {
         public static String PARENT_ID = "parentId";
         public static String CHILD_ID = "childId";
         public static String CHILD_TYPE = "childType";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class EntityTypeTable {
         public static String ENTITY_TYPE_ID = "entityTypeId";
         public static String DOMAIN_ID = "domainId";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class PermissionTypeTable {
         public static String ENTITY_TYPE_ID = "permissionTypeId";
         public static String DOMAIN_ID = "domainId";
         public static String NAME = "name";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class EntityTable {
@@ -73,6 +85,8 @@ public class DBConstants {
         public static String NAME = "name";
         public static String DESCRIPTION = "description";
         public static String FULL_TEXT = "fullText";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
     }
 
     public static class SharingTable {
@@ -81,5 +95,7 @@ public class DBConstants {
         public static String GROUP_ID = "groupId";
         public static String INHERITED_PARENT_ID = "inheritedParentId";
         public static final String SHARING_TYPE = "sharingType";
+        public static final String CREATED_TIME = "createdTime";
+        public static final String UPDATED_TIME = "updatedTime";
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
index 1c7714f..7f2eb32 100644
--- a/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
+++ b/modules/sharing-registry/sharing-registry-core/src/main/java/org/apache/airavata/sharing/registry/server/SharingRegistryServerHandler.java
@@ -435,7 +435,7 @@ public class SharingRegistryServerHandler implements GovRegistryService.Iface{
     }
 
     @Override
-    public List<Entity> searchEntities(String userId, String entityTypeId, Map<EntitySearchFields, String> filters,
+    public List<Entity> searchEntities(String userId, String entityTypeId, List<SearchCriteria> filters,
                                        int offset, int limit) throws SharingRegistryException, TException {
         List<String> groupIds = new ArrayList<>();
         groupIds.add(userId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java b/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
index 09e98ca..cf92856 100644
--- a/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
+++ b/modules/sharing-registry/sharing-registry-core/src/test/java/org/apache/airavata/sharing/registry/SharingRegistryServerHandlerTest.java
@@ -32,6 +32,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
@@ -272,8 +273,12 @@ public class SharingRegistryServerHandlerTest {
         Assert.assertTrue(sharingRegistryServerHandler.userHasAccess(domainId, userId1, entityId4, permissionTypeId1));
         Assert.assertFalse(sharingRegistryServerHandler.userHasAccess(domainId, userId3, entityId1, permissionTypeId1));
 
-        HashMap<EntitySearchFields, String> filters = new HashMap<>();
-        filters.put(EntitySearchFields.NAME, "Input");
+        ArrayList<SearchCriteria> filters = new ArrayList<>();
+        SearchCriteria searchCriteria = new SearchCriteria();
+        searchCriteria.setSearchCondition(SearchCondition.LIKE);
+        searchCriteria.setValue("Input");
+        searchCriteria.setSearchField(EntitySearchField.NAME);
+        filters.add(searchCriteria);
         Assert.assertTrue(sharingRegistryServerHandler.searchEntities(userId1, entityTypeId3, filters, 0, -1).size() > 0);
 
         Assert.assertNotNull(sharingRegistryServerHandler.getListOfSharedUsers(entityId1, permissionTypeId1));

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/pom.xml b/modules/sharing-registry/sharing-registry-stubs/pom.xml
index f0a46ef..eb47dc9 100644
--- a/modules/sharing-registry/sharing-registry-stubs/pom.xml
+++ b/modules/sharing-registry/sharing-registry-stubs/pom.xml
@@ -20,5 +20,19 @@
         </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>
+        </plugins>
+    </build>
+
 
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index eb30e38..f3b5d25 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
 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/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
index 0818b70..6f169aa 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
 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/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
new file mode 100644
index 0000000..8a88f01
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
@@ -0,0 +1,53 @@
+/**
+ * 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 EntitySearchField implements org.apache.thrift.TEnum {
+  NAME(0),
+  DESCRIPTION(1),
+  FULL_TEXT(2),
+  PRRENT_ENTITY_ID(3),
+  CREATED_TIME(4),
+  UPDATED_TIME(5);
+
+  private final int value;
+
+  private EntitySearchField(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 EntitySearchField findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return NAME;
+      case 1:
+        return DESCRIPTION;
+      case 2:
+        return FULL_TEXT;
+      case 3:
+        return PRRENT_ENTITY_ID;
+      case 4:
+        return CREATED_TIME;
+      case 5:
+        return UPDATED_TIME;
+      default:
+        return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchFields.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchFields.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchFields.java
deleted file mode 100644
index 6832191..0000000
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchFields.java
+++ /dev/null
@@ -1,48 +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.sharing.registry.models;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-public enum EntitySearchFields implements org.apache.thrift.TEnum {
-  NAME(0),
-  DESCRIPTION(1),
-  FULL_TEXT(2);
-
-  private final int value;
-
-  private EntitySearchFields(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 EntitySearchFields findByValue(int value) { 
-    switch (value) {
-      case 0:
-        return NAME;
-      case 1:
-        return DESCRIPTION;
-      case 2:
-        return FULL_TEXT;
-      default:
-        return null;
-    }
-  }
-}

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
index 806c15b..bb3c945 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/PermissionType.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
 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/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
new file mode 100644
index 0000000..a111c6a
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCondition.java
@@ -0,0 +1,51 @@
+/**
+ * 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 SearchCondition implements org.apache.thrift.TEnum {
+  EQUAL(0),
+  LIKE(1),
+  GTE(2),
+  LTE(3);
+
+  private final int value;
+
+  private SearchCondition(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 SearchCondition findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return EQUAL;
+      case 1:
+        return LIKE;
+      case 2:
+        return GTE;
+      case 3:
+        return LTE;
+      default:
+        return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
new file mode 100644
index 0000000..3693a19
--- /dev/null
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SearchCriteria.java
@@ -0,0 +1,642 @@
+/**
+ * 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-10-12")
+public class SearchCriteria implements org.apache.thrift.TBase<SearchCriteria, SearchCriteria._Fields>, java.io.Serializable, Cloneable, Comparable<SearchCriteria> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SearchCriteria");
+
+  private static final org.apache.thrift.protocol.TField SEARCH_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("searchField", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField SEARCH_CONDITION_FIELD_DESC = new org.apache.thrift.protocol.TField("searchCondition", org.apache.thrift.protocol.TType.I32, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SearchCriteriaStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SearchCriteriaTupleSchemeFactory());
+  }
+
+  /**
+   * 
+   * @see EntitySearchField
+   */
+  public EntitySearchField searchField; // optional
+  public String value; // optional
+  /**
+   * 
+   * @see SearchCondition
+   */
+  public SearchCondition searchCondition; // 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 {
+    /**
+     * 
+     * @see EntitySearchField
+     */
+    SEARCH_FIELD((short)1, "searchField"),
+    VALUE((short)2, "value"),
+    /**
+     * 
+     * @see SearchCondition
+     */
+    SEARCH_CONDITION((short)3, "searchCondition");
+
+    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: // SEARCH_FIELD
+          return SEARCH_FIELD;
+        case 2: // VALUE
+          return VALUE;
+        case 3: // SEARCH_CONDITION
+          return SEARCH_CONDITION;
+        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 _Fields optionals[] = {_Fields.SEARCH_FIELD,_Fields.VALUE,_Fields.SEARCH_CONDITION};
+  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.SEARCH_FIELD, new org.apache.thrift.meta_data.FieldMetaData("searchField", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EntitySearchField.class)));
+    tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.SEARCH_CONDITION, new org.apache.thrift.meta_data.FieldMetaData("searchCondition", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SearchCondition.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SearchCriteria.class, metaDataMap);
+  }
+
+  public SearchCriteria() {
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public SearchCriteria(SearchCriteria other) {
+    if (other.isSetSearchField()) {
+      this.searchField = other.searchField;
+    }
+    if (other.isSetValue()) {
+      this.value = other.value;
+    }
+    if (other.isSetSearchCondition()) {
+      this.searchCondition = other.searchCondition;
+    }
+  }
+
+  public SearchCriteria deepCopy() {
+    return new SearchCriteria(this);
+  }
+
+  @Override
+  public void clear() {
+    this.searchField = null;
+    this.value = null;
+    this.searchCondition = null;
+  }
+
+  /**
+   * 
+   * @see EntitySearchField
+   */
+  public EntitySearchField getSearchField() {
+    return this.searchField;
+  }
+
+  /**
+   * 
+   * @see EntitySearchField
+   */
+  public SearchCriteria setSearchField(EntitySearchField searchField) {
+    this.searchField = searchField;
+    return this;
+  }
+
+  public void unsetSearchField() {
+    this.searchField = null;
+  }
+
+  /** Returns true if field searchField is set (has been assigned a value) and false otherwise */
+  public boolean isSetSearchField() {
+    return this.searchField != null;
+  }
+
+  public void setSearchFieldIsSet(boolean value) {
+    if (!value) {
+      this.searchField = null;
+    }
+  }
+
+  public String getValue() {
+    return this.value;
+  }
+
+  public SearchCriteria setValue(String value) {
+    this.value = value;
+    return this;
+  }
+
+  public void unsetValue() {
+    this.value = null;
+  }
+
+  /** Returns true if field value is set (has been assigned a value) and false otherwise */
+  public boolean isSetValue() {
+    return this.value != null;
+  }
+
+  public void setValueIsSet(boolean value) {
+    if (!value) {
+      this.value = null;
+    }
+  }
+
+  /**
+   * 
+   * @see SearchCondition
+   */
+  public SearchCondition getSearchCondition() {
+    return this.searchCondition;
+  }
+
+  /**
+   * 
+   * @see SearchCondition
+   */
+  public SearchCriteria setSearchCondition(SearchCondition searchCondition) {
+    this.searchCondition = searchCondition;
+    return this;
+  }
+
+  public void unsetSearchCondition() {
+    this.searchCondition = null;
+  }
+
+  /** Returns true if field searchCondition is set (has been assigned a value) and false otherwise */
+  public boolean isSetSearchCondition() {
+    return this.searchCondition != null;
+  }
+
+  public void setSearchConditionIsSet(boolean value) {
+    if (!value) {
+      this.searchCondition = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case SEARCH_FIELD:
+      if (value == null) {
+        unsetSearchField();
+      } else {
+        setSearchField((EntitySearchField)value);
+      }
+      break;
+
+    case VALUE:
+      if (value == null) {
+        unsetValue();
+      } else {
+        setValue((String)value);
+      }
+      break;
+
+    case SEARCH_CONDITION:
+      if (value == null) {
+        unsetSearchCondition();
+      } else {
+        setSearchCondition((SearchCondition)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case SEARCH_FIELD:
+      return getSearchField();
+
+    case VALUE:
+      return getValue();
+
+    case SEARCH_CONDITION:
+      return getSearchCondition();
+
+    }
+    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 SEARCH_FIELD:
+      return isSetSearchField();
+    case VALUE:
+      return isSetValue();
+    case SEARCH_CONDITION:
+      return isSetSearchCondition();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof SearchCriteria)
+      return this.equals((SearchCriteria)that);
+    return false;
+  }
+
+  public boolean equals(SearchCriteria that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_searchField = true && this.isSetSearchField();
+    boolean that_present_searchField = true && that.isSetSearchField();
+    if (this_present_searchField || that_present_searchField) {
+      if (!(this_present_searchField && that_present_searchField))
+        return false;
+      if (!this.searchField.equals(that.searchField))
+        return false;
+    }
+
+    boolean this_present_value = true && this.isSetValue();
+    boolean that_present_value = true && that.isSetValue();
+    if (this_present_value || that_present_value) {
+      if (!(this_present_value && that_present_value))
+        return false;
+      if (!this.value.equals(that.value))
+        return false;
+    }
+
+    boolean this_present_searchCondition = true && this.isSetSearchCondition();
+    boolean that_present_searchCondition = true && that.isSetSearchCondition();
+    if (this_present_searchCondition || that_present_searchCondition) {
+      if (!(this_present_searchCondition && that_present_searchCondition))
+        return false;
+      if (!this.searchCondition.equals(that.searchCondition))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_searchField = true && (isSetSearchField());
+    list.add(present_searchField);
+    if (present_searchField)
+      list.add(searchField.getValue());
+
+    boolean present_value = true && (isSetValue());
+    list.add(present_value);
+    if (present_value)
+      list.add(value);
+
+    boolean present_searchCondition = true && (isSetSearchCondition());
+    list.add(present_searchCondition);
+    if (present_searchCondition)
+      list.add(searchCondition.getValue());
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(SearchCriteria other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetSearchField()).compareTo(other.isSetSearchField());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSearchField()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchField, other.searchField);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetValue()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSearchCondition()).compareTo(other.isSetSearchCondition());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSearchCondition()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchCondition, other.searchCondition);
+      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("SearchCriteria(");
+    boolean first = true;
+
+    if (isSetSearchField()) {
+      sb.append("searchField:");
+      if (this.searchField == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.searchField);
+      }
+      first = false;
+    }
+    if (isSetValue()) {
+      if (!first) sb.append(", ");
+      sb.append("value:");
+      if (this.value == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.value);
+      }
+      first = false;
+    }
+    if (isSetSearchCondition()) {
+      if (!first) sb.append(", ");
+      sb.append("searchCondition:");
+      if (this.searchCondition == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.searchCondition);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class SearchCriteriaStandardSchemeFactory implements SchemeFactory {
+    public SearchCriteriaStandardScheme getScheme() {
+      return new SearchCriteriaStandardScheme();
+    }
+  }
+
+  private static class SearchCriteriaStandardScheme extends StandardScheme<SearchCriteria> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, SearchCriteria 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: // SEARCH_FIELD
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.searchField = org.apache.airavata.sharing.registry.models.EntitySearchField.findByValue(iprot.readI32());
+              struct.setSearchFieldIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // VALUE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.value = iprot.readString();
+              struct.setValueIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // SEARCH_CONDITION
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.searchCondition = org.apache.airavata.sharing.registry.models.SearchCondition.findByValue(iprot.readI32());
+              struct.setSearchConditionIsSet(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, SearchCriteria struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.searchField != null) {
+        if (struct.isSetSearchField()) {
+          oprot.writeFieldBegin(SEARCH_FIELD_FIELD_DESC);
+          oprot.writeI32(struct.searchField.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.value != null) {
+        if (struct.isSetValue()) {
+          oprot.writeFieldBegin(VALUE_FIELD_DESC);
+          oprot.writeString(struct.value);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.searchCondition != null) {
+        if (struct.isSetSearchCondition()) {
+          oprot.writeFieldBegin(SEARCH_CONDITION_FIELD_DESC);
+          oprot.writeI32(struct.searchCondition.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SearchCriteriaTupleSchemeFactory implements SchemeFactory {
+    public SearchCriteriaTupleScheme getScheme() {
+      return new SearchCriteriaTupleScheme();
+    }
+  }
+
+  private static class SearchCriteriaTupleScheme extends TupleScheme<SearchCriteria> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, SearchCriteria struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetSearchField()) {
+        optionals.set(0);
+      }
+      if (struct.isSetValue()) {
+        optionals.set(1);
+      }
+      if (struct.isSetSearchCondition()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetSearchField()) {
+        oprot.writeI32(struct.searchField.getValue());
+      }
+      if (struct.isSetValue()) {
+        oprot.writeString(struct.value);
+      }
+      if (struct.isSetSearchCondition()) {
+        oprot.writeI32(struct.searchCondition.getValue());
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, SearchCriteria struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.searchField = org.apache.airavata.sharing.registry.models.EntitySearchField.findByValue(iprot.readI32());
+        struct.setSearchFieldIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.value = iprot.readString();
+        struct.setValueIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.searchCondition = org.apache.airavata.sharing.registry.models.SearchCondition.findByValue(iprot.readI32());
+        struct.setSearchConditionIsSet(true);
+      }
+    }
+  }
+
+}
+

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
index 83d0c00..97917d8 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/SharingRegistryException.java
@@ -12,19 +12,29 @@ 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-10-06")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
 public class SharingRegistryException extends TException implements org.apache.thrift.TBase<SharingRegistryException, SharingRegistryException._Fields>, java.io.Serializable, Cloneable, Comparable<SharingRegistryException> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SharingRegistryException");
 
@@ -32,8 +42,8 @@ public class SharingRegistryException extends TException implements org.apache.t
 
   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());
+    schemes.put(StandardScheme.class, new SharingRegistryExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SharingRegistryExceptionTupleSchemeFactory());
   }
 
   public String message; // required
@@ -110,7 +120,7 @@ public class SharingRegistryException extends TException implements org.apache.t
   }
 
   public SharingRegistryException(
-          String message)
+    String message)
   {
     this();
     this.message = message;
@@ -303,13 +313,13 @@ public class SharingRegistryException extends TException implements org.apache.t
     }
   }
 
-  private static class GovRegistryExceptionStandardSchemeFactory implements SchemeFactory {
-    public GovRegistryExceptionStandardScheme getScheme() {
-      return new GovRegistryExceptionStandardScheme();
+  private static class SharingRegistryExceptionStandardSchemeFactory implements SchemeFactory {
+    public SharingRegistryExceptionStandardScheme getScheme() {
+      return new SharingRegistryExceptionStandardScheme();
     }
   }
 
-  private static class GovRegistryExceptionStandardScheme extends StandardScheme<SharingRegistryException> {
+  private static class SharingRegistryExceptionStandardScheme extends StandardScheme<SharingRegistryException> {
 
     public void read(org.apache.thrift.protocol.TProtocol iprot, SharingRegistryException struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TField schemeField;
@@ -355,13 +365,13 @@ public class SharingRegistryException extends TException implements org.apache.t
 
   }
 
-  private static class GovRegistryExceptionTupleSchemeFactory implements SchemeFactory {
-    public GovRegistryExceptionTupleScheme getScheme() {
-      return new GovRegistryExceptionTupleScheme();
+  private static class SharingRegistryExceptionTupleSchemeFactory implements SchemeFactory {
+    public SharingRegistryExceptionTupleScheme getScheme() {
+      return new SharingRegistryExceptionTupleScheme();
     }
   }
 
-  private static class GovRegistryExceptionTupleScheme extends TupleScheme<SharingRegistryException> {
+  private static class SharingRegistryExceptionTupleScheme extends TupleScheme<SharingRegistryException> {
 
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, SharingRegistryException struct) throws org.apache.thrift.TException {

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

http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
index f3a9a02..f121e63 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/UserGroup.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-06")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
 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");
 


[32/51] [abbrv] airavata git commit: fixing the sharing server start script issue

Posted by sc...@apache.org.
fixing the sharing server start script issue


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

Branch: refs/heads/airavata-gov-registry
Commit: 1764699364e5a07f3d9fe129a6af4e7505c68e10
Parents: 9101a51
Author: scnakandala <su...@gmail.com>
Authored: Thu Oct 13 17:35:49 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Oct 13 17:35:49 2016 -0400

----------------------------------------------------------------------
 .../src/main/resources/bin/setenv.sh              |  6 +-----
 .../src/main/resources/bin/sharing-registry.sh    | 18 +++++++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/17646993/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
index 1dcf419..1e5475d 100644
--- a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/setenv.sh
@@ -52,14 +52,10 @@ PRGDIR=`dirname "$PRG"`
 
 SHARING_REGISTRY_CLASSPATH=""
 
-
-
-for f in "SHARING_REGISTRY_HOME"/lib/*.jar
+for f in "$SHARING_REGISTRY_HOME"/lib/*.jar
 do
   SHARING_REGISTRY_CLASSPATH="$SHARING_REGISTRY_CLASSPATH":$f
 done
 
-SHARING_REGISTRY_CLASSPATH="$SHARING_REGISTRY_CLASSPATH":"$SHARING_REGISTRY_HOME"/conf/log4j.properties
-
 export SHARING_REGISTRY_HOME
 export SHARING_REGISTRY_CLASSPATH
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/17646993/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
index 35bf0ef..0725c48 100644
--- a/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
+++ b/modules/sharing-registry/sharing-registry-distribution/src/main/resources/bin/sharing-registry.sh
@@ -18,16 +18,22 @@
 # under the License.
 
 . `dirname $0`/setenv.sh
-cd $SHARING_REGISTRY_HOME
+cd $SHARING_REGISTRY_HOME/bin
 
 IS_DAEMON_MODE=false
 SHARING_REGISTRY_COMMAND=""
 STOP=false
 FORCE=false
+JAVA_OPTS=""
 
 for var in "$@"
 do
     case $var in
+    -xdebug)
+        	AIRAVATA_COMMAND="${AIRAVATA_COMMAND}"
+            JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000"
+            shift
+        ;;
 	start)
 	    IS_DAEMON_MODE=true
             shift
@@ -43,6 +49,7 @@ do
             echo "command options:"
 	    echo "  start              Start server in daemon mode"
 	    echo "  stop               Stop server."
+	    echo "  -xdebug			   Start Sharing Registry Server under JPDA debugger"
 	    echo "  -h                 Display this help and exit"
 	        shift
             exit 0
@@ -74,14 +81,11 @@ then
 		fi
 	done
 else
+	echo $SHARING_REGISTRY_CLASSPATH
 	if $IS_DAEMON_MODE ; then
 		echo "Starting Sharing Registry Server in daemon mode..."
-		cd "$SHARING_REGISTRY_HOME"/lib
-		nohup $JAVA_HOME/bin/java -jar "$SHARING_REGISTRY_HOME"/lib/airavata-sharing-registry-server-0.17-SNAPSHOT.jar > ../sharing-registry.out & echo $! > "../sharing-registry-start_$!"
-		cd ..
+		nohup $JAVA_HOME/bin/java ${JAVA_OPTS} -classpath "$SHARING_REGISTRY_CLASSPATH"  org.apache.airavata.sharing.registry.server.SharingRegistryServer > ../sharing-registry.out & echo $! > "../sharing-registry-start_$!"
 	else
-        cd "$SHARING_REGISTRY_HOME"/lib
-		$JAVA_HOME/bin/java -jar "$SHARING_REGISTRY_HOME"/lib/airavata-sharing-registry-server-0.17-SNAPSHOT.jar
-		cd ..
+		$JAVA_HOME/bin/java ${JAVA_OPTS} -classpath "$SHARING_REGISTRY_CLASSPATH"  org.apache.airavata.sharing.registry.server.SharingRegistryServer
 	fi
 fi
\ No newline at end of file


[30/51] [abbrv] airavata git commit: implementing sharing server

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/9101a519/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
deleted file mode 100644
index 25c4553..0000000
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
+++ /dev/null
@@ -1,45160 +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.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-10-13")
-public class GovRegistryService {
-
-  public interface Iface {
-
-    /**
-     *  * Domain Operations
-     * *
-     * 
-     * @param domain
-     */
-    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean deleteDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.sharing.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    /**
-     *  * User Operations
-     * *
-     * 
-     * @param user
-     */
-    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean deleteUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    /**
-     *  * Group Operations
-     * *
-     * 
-     * @param group
-     */
-    public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean deleteGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
-
-    public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean addChildGroupToParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    /**
-     *  * EntityType Operations
-     * *
-     * 
-     * @param entityType
-     */
-    public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    /**
-     *  * Entity Operations
-     * *
-     * 
-     * @param entity
-     */
-    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean deleteEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    /**
-     *  * Permission Operations
-     * *
-     * 
-     * @param permissionType
-     */
-    public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    /**
-     *  * Sharing Entity with Users and Groups
-     * *
-     * 
-     * @param entityId
-     * @param userList
-     * @param perssionTypeId
-     * @param cascadePermission
-     */
-    public boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
-
-  }
-
-  public interface AsyncIface {
-
-    public void createDomain(org.apache.airavata.sharing.registry.models.Domain domain, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void 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 createUser(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, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void addChildGroupToParentGroup(String childId, String groupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void removeChildGroupFromParentGroup(String childId, 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 createEntity(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 userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void getListOfSharedUsers(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void getListOfSharedGroups(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void deletePermissionType(String entityTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void getPermissionType(String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void getPermissionTypes(String domain, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void userHasAccess(String domainId, String userId, String entityId, String permissionTypeId, 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 String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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 String recv_createDomain() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      getDomains_result result = new getDomains_result();
-      receiveBase(result, "getDomains");
-      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, "getDomains failed: unknown result");
-    }
-
-    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_createUser(user);
-      return recv_createUser();
-    }
-
-    public void send_createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.thrift.TException
-    {
-      createUser_args args = new createUser_args();
-      args.setUser(user);
-      sendBase("createUser", args);
-    }
-
-    public String recv_createUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      createUser_result result = new createUser_result();
-      receiveBase(result, "createUser");
-      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, "createUser failed: unknown result");
-    }
-
-    public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      getUsers_result result = new getUsers_result();
-      receiveBase(result, "getUsers");
-      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, "getUsers failed: unknown result");
-    }
-
-    public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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 String recv_createGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_getGroupMembers(groupId, offset, limit);
-      return recv_getGroupMembers();
-    }
-
-    public void send_getGroupMembers(String groupId, int offset, int limit) throws org.apache.thrift.TException
-    {
-      getGroupMembers_args args = new getGroupMembers_args();
-      args.setGroupId(groupId);
-      args.setOffset(offset);
-      args.setLimit(limit);
-      sendBase("getGroupMembers", args);
-    }
-
-    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> recv_getGroupMembers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      getGroupMembers_result result = new getGroupMembers_result();
-      receiveBase(result, "getGroupMembers");
-      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, "getGroupMembers failed: unknown result");
-    }
-
-    public boolean addChildGroupToParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_addChildGroupToParentGroup(childId, groupId);
-      return recv_addChildGroupToParentGroup();
-    }
-
-    public void send_addChildGroupToParentGroup(String childId, String groupId) throws org.apache.thrift.TException
-    {
-      addChildGroupToParentGroup_args args = new addChildGroupToParentGroup_args();
-      args.setChildId(childId);
-      args.setGroupId(groupId);
-      sendBase("addChildGroupToParentGroup", args);
-    }
-
-    public boolean recv_addChildGroupToParentGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      addChildGroupToParentGroup_result result = new addChildGroupToParentGroup_result();
-      receiveBase(result, "addChildGroupToParentGroup");
-      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, "addChildGroupToParentGroup failed: unknown result");
-    }
-
-    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_removeChildGroupFromParentGroup(childId, groupId);
-      return recv_removeChildGroupFromParentGroup();
-    }
-
-    public void send_removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.thrift.TException
-    {
-      removeChildGroupFromParentGroup_args args = new removeChildGroupFromParentGroup_args();
-      args.setChildId(childId);
-      args.setGroupId(groupId);
-      sendBase("removeChildGroupFromParentGroup", args);
-    }
-
-    public boolean recv_removeChildGroupFromParentGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      removeChildGroupFromParentGroup_result result = new removeChildGroupFromParentGroup_result();
-      receiveBase(result, "removeChildGroupFromParentGroup");
-      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, "removeChildGroupFromParentGroup failed: unknown result");
-    }
-
-    public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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 String recv_createEntityType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, 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.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      getEntityTypes_result result = new getEntityTypes_result();
-      receiveBase(result, "getEntityTypes");
-      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, "getEntityTypes failed: unknown result");
-    }
-
-    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_createEntity(entity);
-      return recv_createEntity();
-    }
-
-    public void send_createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.thrift.TException
-    {
-      createEntity_args args = new createEntity_args();
-      args.setEntity(entity);
-      sendBase("createEntity", args);
-    }
-
-    public String recv_createEntity() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      createEntity_result result = new createEntity_result();
-      receiveBase(result, "createEntity");
-      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, "createEntity failed: unknown result");
-    }
-
-    public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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 userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_searchEntities(userId, entityTypeId, filters, offset, limit);
-      return recv_searchEntities();
-    }
-
-    public void send_searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.thrift.TException
-    {
-      searchEntities_args args = new searchEntities_args();
-      args.setUserId(userId);
-      args.setEntityTypeId(entityTypeId);
-      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.SharingRegistryException, 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 List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_getListOfSharedUsers(entityId, permissionTypeId);
-      return recv_getListOfSharedUsers();
-    }
-
-    public void send_getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.thrift.TException
-    {
-      getListOfSharedUsers_args args = new getListOfSharedUsers_args();
-      args.setEntityId(entityId);
-      args.setPermissionTypeId(permissionTypeId);
-      sendBase("getListOfSharedUsers", args);
-    }
-
-    public List<org.apache.airavata.sharing.registry.models.User> recv_getListOfSharedUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      getListOfSharedUsers_result result = new getListOfSharedUsers_result();
-      receiveBase(result, "getListOfSharedUsers");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.gre != null) {
-        throw result.gre;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedUsers failed: unknown result");
-    }
-
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_getListOfSharedGroups(entityId, permissionTypeId);
-      return recv_getListOfSharedGroups();
-    }
-
-    public void send_getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.thrift.TException
-    {
-      getListOfSharedGroups_args args = new getListOfSharedGroups_args();
-      args.setEntityId(entityId);
-      args.setPermissionTypeId(permissionTypeId);
-      sendBase("getListOfSharedGroups", args);
-    }
-
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> recv_getListOfSharedGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      getListOfSharedGroups_result result = new getListOfSharedGroups_result();
-      receiveBase(result, "getListOfSharedGroups");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.gre != null) {
-        throw result.gre;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedGroups failed: unknown result");
-    }
-
-    public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_createPermissionType(permissionType);
-      return recv_createPermissionType();
-    }
-
-    public void send_createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.thrift.TException
-    {
-      createPermissionType_args args = new createPermissionType_args();
-      args.setPermissionType(permissionType);
-      sendBase("createPermissionType", args);
-    }
-
-    public String recv_createPermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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 permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_updatePermissionType(permissionType);
-      return recv_updatePermissionType();
-    }
-
-    public void send_updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.thrift.TException
-    {
-      updatePermissionType_args args = new updatePermissionType_args();
-      args.setPermissionType(permissionType);
-      sendBase("updatePermissionType", args);
-    }
-
-    public boolean recv_updatePermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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 permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_getPermissionType(permissionTypeId);
-      return recv_getPermissionType();
-    }
-
-    public void send_getPermissionType(String permissionTypeId) throws org.apache.thrift.TException
-    {
-      getPermissionType_args args = new getPermissionType_args();
-      args.setPermissionTypeId(permissionTypeId);
-      sendBase("getPermissionType", args);
-    }
-
-    public org.apache.airavata.sharing.registry.models.PermissionType recv_getPermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, 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.SharingRegistryException, 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.SharingRegistryException, 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 boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_shareEntityWithUsers(entityId, userList, perssionTypeId, cascadePermission);
-      return recv_shareEntityWithUsers();
-    }
-
-    public void send_shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.thrift.TException
-    {
-      shareEntityWithUsers_args args = new shareEntityWithUsers_args();
-      args.setEntityId(entityId);
-      args.setUserList(userList);
-      args.setPerssionTypeId(perssionTypeId);
-      args.setCascadePermission(cascadePermission);
-      sendBase("shareEntityWithUsers", args);
-    }
-
-    public boolean recv_shareEntityWithUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      shareEntityWithUsers_result result = new shareEntityWithUsers_result();
-      receiveBase(result, "shareEntityWithUsers");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.gre != null) {
-        throw result.gre;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithUsers failed: unknown result");
-    }
-
-    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_revokeEntitySharingFromUsers(entityId, userList, perssionTypeId);
-      return recv_revokeEntitySharingFromUsers();
-    }
-
-    public void send_revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.thrift.TException
-    {
-      revokeEntitySharingFromUsers_args args = new revokeEntitySharingFromUsers_args();
-      args.setEntityId(entityId);
-      args.setUserList(userList);
-      args.setPerssionTypeId(perssionTypeId);
-      sendBase("revokeEntitySharingFromUsers", args);
-    }
-
-    public boolean recv_revokeEntitySharingFromUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
-      receiveBase(result, "revokeEntitySharingFromUsers");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.gre != null) {
-        throw result.gre;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromUsers failed: unknown result");
-    }
-
-    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_shareEntityWithGroups(entityId, groupList, perssionTypeId, cascadePermission);
-      return recv_shareEntityWithGroups();
-    }
-
-    public void send_shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.thrift.TException
-    {
-      shareEntityWithGroups_args args = new shareEntityWithGroups_args();
-      args.setEntityId(entityId);
-      args.setGroupList(groupList);
-      args.setPerssionTypeId(perssionTypeId);
-      args.setCascadePermission(cascadePermission);
-      sendBase("shareEntityWithGroups", args);
-    }
-
-    public boolean recv_shareEntityWithGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      shareEntityWithGroups_result result = new shareEntityWithGroups_result();
-      receiveBase(result, "shareEntityWithGroups");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.gre != null) {
-        throw result.gre;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithGroups failed: unknown result");
-    }
-
-    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_revokeEntitySharingFromGroups(entityId, groupList, perssionTypeId);
-      return recv_revokeEntitySharingFromGroups();
-    }
-
-    public void send_revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.thrift.TException
-    {
-      revokeEntitySharingFromGroups_args args = new revokeEntitySharingFromGroups_args();
-      args.setEntityId(entityId);
-      args.setGroupList(groupList);
-      args.setPerssionTypeId(perssionTypeId);
-      sendBase("revokeEntitySharingFromGroups", args);
-    }
-
-    public boolean recv_revokeEntitySharingFromGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
-      receiveBase(result, "revokeEntitySharingFromGroups");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.gre != null) {
-        throw result.gre;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromGroups failed: unknown result");
-    }
-
-    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      send_userHasAccess(domainId, userId, entityId, permissionTypeId);
-      return recv_userHasAccess();
-    }
-
-    public void send_userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.thrift.TException
-    {
-      userHasAccess_args args = new userHasAccess_args();
-      args.setDomainId(domainId);
-      args.setUserId(userId);
-      args.setEntityId(entityId);
-      args.setPermissionTypeId(permissionTypeId);
-      sendBase("userHasAccess", args);
-    }
-
-    public boolean recv_userHasAccess() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
-    {
-      userHasAccess_result result = new userHasAccess_result();
-      receiveBase(result, "userHasAccess");
-      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, "userHasAccess 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 String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_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.SharingRegistryException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_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.SharingRegistryException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_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.SharingRegistryException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_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.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_getDomains();
-      }
-    }
-
-    public void createUser(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      createUser_call method_call = new createUser_call(user, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class createUser_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private org.apache.airavata.sharing.registry.models.User user;
-      public createUser_call(org.apache.airavata.sharing.registry.models.User user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.user = user;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        createUser_args args = new createUser_args();
-        args.setUser(user);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_createUser();
-      }
-    }
-
-    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.SharingRegistryException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_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.SharingRegistryException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_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 arg

<TRUNCATED>

[11/51] [abbrv] airavata git commit: Adding Airavata Api level changes associated with last commit

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e59d800/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
index 9195209..78ec08c 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -365,6 +365,29 @@ service Airavata {
                          2: airavata_errors.AiravataClientException ace,
                          3: airavata_errors.AiravataSystemException ase)
 
+  /**
+         *
+         * Get all Public Key summaries for user in a Gateway
+         *
+         * @param CredStoreToken
+         *    Credential Store Token which you want to find the Public Key for.
+         *
+         * @param gatewayId
+         *    This is the unique identifier of your gateway where the token and public key was generated from.
+         *
+         * @param userId
+         *    This is the unique identifier of user whose public keys are to be fetched.
+         *
+         * @return CredentialSummary
+         *
+         **/
+    list<credential_summary.CredentialSummary> getAllSSHPubKeysSummaryForUserInGateway (1: required security_model.AuthzToken authzToken,
+                                                     2: required string gatewayId,
+                                                     3: required string userId)
+                   throws (1: airavata_errors.InvalidRequestException ire,
+                           2: airavata_errors.AiravataClientException ace,
+                           3: airavata_errors.AiravataSystemException ase)
+
 
   map<string, string> getAllGatewayPWDCredentials (1: required security_model.AuthzToken authzToken,
                                                  2: required string gatewayId)


[14/51] [abbrv] airavata git commit: Code cleanup

Posted by sc...@apache.org.
Code cleanup


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

Branch: refs/heads/airavata-gov-registry
Commit: 1b91dd1ce35f2ed37ad93b9762fe227aa72ae913
Parents: 8f91bde
Author: Ajinkya Dhamnaskar <ad...@umail.iu.edu>
Authored: Wed Oct 12 13:47:00 2016 -0400
Committer: Ajinkya Dhamnaskar <ad...@umail.iu.edu>
Committed: Wed Oct 12 13:47:00 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/airavata/gfac/impl/HTTPUtils.java    | 7 +++++++
 .../orchestrator/cpi/impl/SimpleOrchestratorImpl.java         | 6 ++----
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1b91dd1c/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HTTPUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HTTPUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HTTPUtils.java
new file mode 100644
index 0000000..cbf5adc
--- /dev/null
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HTTPUtils.java
@@ -0,0 +1,7 @@
+package org.apache.airavata.gfac.impl;
+
+/**
+ * Created by Ajinkya on 10/10/16.
+ */
+public class HTTPUtils {
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1b91dd1c/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index b14b5cd..dec9b2c 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -406,15 +406,13 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
                 DataType type = processOutput.getType();
                 switch (type) {
                     case STDOUT :
-                        if(null == processOutput.getValue() ||
-                                (null != processOutput.getValue() && processOutput.getValue().trim().isEmpty())){
+                        if(null == processOutput.getValue() || processOutput.getValue().trim().isEmpty()){
                             processOutput.setValue(appName + ".stdout");
                         }
                         createOutputDataSatagingTasks(processModel, gatewayId, dataStagingTaskIds, processOutput);
                         break;
                     case STDERR:
-                        if(null == processOutput.getValue() ||
-                                (null != processOutput.getValue() && processOutput.getValue().trim().isEmpty())){
+                        if(null == processOutput.getValue() || processOutput.getValue().trim().isEmpty()){
                             processOutput.setValue(appName + ".stderr");
                         }
                         createOutputDataSatagingTasks(processModel, gatewayId, dataStagingTaskIds, processOutput);


[18/51] [abbrv] airavata git commit: adding search criteria as a new struct

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
index e041fd5..c355c7e 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/service/cpi/GovRegistryService.java
@@ -6,13 +6,13 @@
  */
 package org.apache.airavata.sharing.registry.service.cpi;
 
-import org.apache.airavata.sharing.registry.models.SharingRegistryException;
 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;
@@ -22,15 +22,19 @@ 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-10-06")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-12")
 public class GovRegistryService {
 
   public interface Iface {
@@ -41,15 +45,15 @@ public class GovRegistryService {
      * 
      * @param domain
      */
-    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws SharingRegistryException, org.apache.thrift.TException;
+    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean deleteDomain(String domainId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.Domain> getDomains(int offset, int limit) throws SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      *  * User Operations
@@ -57,15 +61,15 @@ public class GovRegistryService {
      * 
      * @param user
      */
-    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws SharingRegistryException, org.apache.thrift.TException;
+    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean deleteUser(String userId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      *  * Group Operations
@@ -73,25 +77,25 @@ public class GovRegistryService {
      * 
      * @param group
      */
-    public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws SharingRegistryException, org.apache.thrift.TException;
+    public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean deleteGroup(String groupId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     public List<org.apache.airavata.sharing.registry.models.UserGroup> getGroups(String domain, int offset, int limit) throws org.apache.thrift.TException;
 
-    public boolean addUsersToGroup(List<String> userIds, String groupId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws SharingRegistryException, org.apache.thrift.TException;
+    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean addChildGroupToParentGroup(String childId, String groupId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean addChildGroupToParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      *  * EntityType Operations
@@ -99,15 +103,15 @@ public class GovRegistryService {
      * 
      * @param entityType
      */
-    public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws SharingRegistryException, org.apache.thrift.TException;
+    public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean deleteEntityType(String entityTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      *  * Entity Operations
@@ -115,19 +119,19 @@ public class GovRegistryService {
      * 
      * @param entity
      */
-    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws SharingRegistryException, org.apache.thrift.TException;
+    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean deleteEntity(String entityId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean deleteEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String userId, String entityTypeId, Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters, int offset, int limit) throws SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      *  * Permission Operations
@@ -135,15 +139,15 @@ public class GovRegistryService {
      * 
      * @param permissionType
      */
-    public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws SharingRegistryException, org.apache.thrift.TException;
+    public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean deletePermissionType(String entityTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permissionTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws SharingRegistryException, org.apache.thrift.TException;
+    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
     /**
      *  * Sharing Entity with Users and Groups
@@ -154,15 +158,15 @@ public class GovRegistryService {
      * @param perssionTypeId
      * @param cascadePermission
      */
-    public boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
-    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws SharingRegistryException, org.apache.thrift.TException;
+    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException;
 
   }
 
@@ -226,7 +230,7 @@ public class GovRegistryService {
 
     public void getEntity(String entityId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void searchEntities(String userId, String entityTypeId, Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getListOfSharedUsers(String entityId, String permissionTypeId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -274,7 +278,7 @@ public class GovRegistryService {
       super(iprot, oprot);
     }
 
-    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws SharingRegistryException, org.apache.thrift.TException
+    public String createDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_createDomain(domain);
       return recv_createDomain();
@@ -287,7 +291,7 @@ public class GovRegistryService {
       sendBase("createDomain", args);
     }
 
-    public String recv_createDomain() throws SharingRegistryException, org.apache.thrift.TException
+    public String recv_createDomain() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       createDomain_result result = new createDomain_result();
       receiveBase(result, "createDomain");
@@ -300,7 +304,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public boolean updateDomain(org.apache.airavata.sharing.registry.models.Domain domain) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_updateDomain(domain);
       return recv_updateDomain();
@@ -313,7 +317,7 @@ public class GovRegistryService {
       sendBase("updateDomain", args);
     }
 
-    public boolean recv_updateDomain() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_updateDomain() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       updateDomain_result result = new updateDomain_result();
       receiveBase(result, "updateDomain");
@@ -326,7 +330,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateDomain failed: unknown result");
     }
 
-    public boolean deleteDomain(String domainId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_deleteDomain(domainId);
       return recv_deleteDomain();
@@ -339,7 +343,7 @@ public class GovRegistryService {
       sendBase("deleteDomain", args);
     }
 
-    public boolean recv_deleteDomain() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_deleteDomain() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       deleteDomain_result result = new deleteDomain_result();
       receiveBase(result, "deleteDomain");
@@ -352,7 +356,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.Domain getDomain(String domainId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getDomain(domainId);
       return recv_getDomain();
@@ -365,7 +369,7 @@ public class GovRegistryService {
       sendBase("getDomain", args);
     }
 
-    public org.apache.airavata.sharing.registry.models.Domain recv_getDomain() throws SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.Domain recv_getDomain() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getDomain_result result = new getDomain_result();
       receiveBase(result, "getDomain");
@@ -378,7 +382,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.Domain> getDomains(int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getDomains(offset, limit);
       return recv_getDomains();
@@ -392,7 +396,7 @@ public class GovRegistryService {
       sendBase("getDomains", args);
     }
 
-    public List<org.apache.airavata.sharing.registry.models.Domain> recv_getDomains() throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.Domain> recv_getDomains() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getDomains_result result = new getDomains_result();
       receiveBase(result, "getDomains");
@@ -405,7 +409,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDomains failed: unknown result");
     }
 
-    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws SharingRegistryException, org.apache.thrift.TException
+    public String createUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_createUser(user);
       return recv_createUser();
@@ -418,7 +422,7 @@ public class GovRegistryService {
       sendBase("createUser", args);
     }
 
-    public String recv_createUser() throws SharingRegistryException, org.apache.thrift.TException
+    public String recv_createUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       createUser_result result = new createUser_result();
       receiveBase(result, "createUser");
@@ -431,7 +435,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
     }
 
-    public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean updatedUser(org.apache.airavata.sharing.registry.models.User user) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_updatedUser(user);
       return recv_updatedUser();
@@ -444,7 +448,7 @@ public class GovRegistryService {
       sendBase("updatedUser", args);
     }
 
-    public boolean recv_updatedUser() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_updatedUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       updatedUser_result result = new updatedUser_result();
       receiveBase(result, "updatedUser");
@@ -457,7 +461,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatedUser failed: unknown result");
     }
 
-    public boolean deleteUser(String userId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_deleteUser(userId);
       return recv_deleteUser();
@@ -470,7 +474,7 @@ public class GovRegistryService {
       sendBase("deleteUser", args);
     }
 
-    public boolean recv_deleteUser() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_deleteUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       deleteUser_result result = new deleteUser_result();
       receiveBase(result, "deleteUser");
@@ -483,7 +487,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.User getUser(String userId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getUser(userId);
       return recv_getUser();
@@ -496,7 +500,7 @@ public class GovRegistryService {
       sendBase("getUser", args);
     }
 
-    public org.apache.airavata.sharing.registry.models.User recv_getUser() throws SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.User recv_getUser() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getUser_result result = new getUser_result();
       receiveBase(result, "getUser");
@@ -509,7 +513,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> getUsers(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getUsers(domain, offset, limit);
       return recv_getUsers();
@@ -524,7 +528,7 @@ public class GovRegistryService {
       sendBase("getUsers", args);
     }
 
-    public List<org.apache.airavata.sharing.registry.models.User> recv_getUsers() throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> recv_getUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getUsers_result result = new getUsers_result();
       receiveBase(result, "getUsers");
@@ -537,7 +541,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
     }
 
-    public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws SharingRegistryException, org.apache.thrift.TException
+    public String createGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_createGroup(group);
       return recv_createGroup();
@@ -550,7 +554,7 @@ public class GovRegistryService {
       sendBase("createGroup", args);
     }
 
-    public String recv_createGroup() throws SharingRegistryException, org.apache.thrift.TException
+    public String recv_createGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       createGroup_result result = new createGroup_result();
       receiveBase(result, "createGroup");
@@ -563,7 +567,7 @@ 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.sharing.registry.models.UserGroup group) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean updateGroup(org.apache.airavata.sharing.registry.models.UserGroup group) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_updateGroup(group);
       return recv_updateGroup();
@@ -576,7 +580,7 @@ public class GovRegistryService {
       sendBase("updateGroup", args);
     }
 
-    public boolean recv_updateGroup() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_updateGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       updateGroup_result result = new updateGroup_result();
       receiveBase(result, "updateGroup");
@@ -589,7 +593,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateGroup failed: unknown result");
     }
 
-    public boolean deleteGroup(String groupId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_deleteGroup(groupId);
       return recv_deleteGroup();
@@ -602,7 +606,7 @@ public class GovRegistryService {
       sendBase("deleteGroup", args);
     }
 
-    public boolean recv_deleteGroup() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_deleteGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       deleteGroup_result result = new deleteGroup_result();
       receiveBase(result, "deleteGroup");
@@ -615,7 +619,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.UserGroup getGroup(String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getGroup(groupId);
       return recv_getGroup();
@@ -628,7 +632,7 @@ public class GovRegistryService {
       sendBase("getGroup", args);
     }
 
-    public org.apache.airavata.sharing.registry.models.UserGroup recv_getGroup() throws SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.UserGroup recv_getGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getGroup_result result = new getGroup_result();
       receiveBase(result, "getGroup");
@@ -666,7 +670,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public boolean addUsersToGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_addUsersToGroup(userIds, groupId);
       return recv_addUsersToGroup();
@@ -680,7 +684,7 @@ public class GovRegistryService {
       sendBase("addUsersToGroup", args);
     }
 
-    public boolean recv_addUsersToGroup() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_addUsersToGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       addUsersToGroup_result result = new addUsersToGroup_result();
       receiveBase(result, "addUsersToGroup");
@@ -693,7 +697,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public boolean removeUsersFromGroup(List<String> userIds, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_removeUsersFromGroup(userIds, groupId);
       return recv_removeUsersFromGroup();
@@ -707,7 +711,7 @@ public class GovRegistryService {
       sendBase("removeUsersFromGroup", args);
     }
 
-    public boolean recv_removeUsersFromGroup() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_removeUsersFromGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       removeUsersFromGroup_result result = new removeUsersFromGroup_result();
       receiveBase(result, "removeUsersFromGroup");
@@ -720,7 +724,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeUsersFromGroup failed: unknown result");
     }
 
-    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws SharingRegistryException, org.apache.thrift.TException
+    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getGroupMembers(String groupId, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getGroupMembers(groupId, offset, limit);
       return recv_getGroupMembers();
@@ -735,7 +739,7 @@ public class GovRegistryService {
       sendBase("getGroupMembers", args);
     }
 
-    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> recv_getGroupMembers() throws SharingRegistryException, org.apache.thrift.TException
+    public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> recv_getGroupMembers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getGroupMembers_result result = new getGroupMembers_result();
       receiveBase(result, "getGroupMembers");
@@ -748,7 +752,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGroupMembers failed: unknown result");
     }
 
-    public boolean addChildGroupToParentGroup(String childId, String groupId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean addChildGroupToParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_addChildGroupToParentGroup(childId, groupId);
       return recv_addChildGroupToParentGroup();
@@ -762,7 +766,7 @@ public class GovRegistryService {
       sendBase("addChildGroupToParentGroup", args);
     }
 
-    public boolean recv_addChildGroupToParentGroup() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_addChildGroupToParentGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       addChildGroupToParentGroup_result result = new addChildGroupToParentGroup_result();
       receiveBase(result, "addChildGroupToParentGroup");
@@ -775,7 +779,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addChildGroupToParentGroup failed: unknown result");
     }
 
-    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean removeChildGroupFromParentGroup(String childId, String groupId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_removeChildGroupFromParentGroup(childId, groupId);
       return recv_removeChildGroupFromParentGroup();
@@ -789,7 +793,7 @@ public class GovRegistryService {
       sendBase("removeChildGroupFromParentGroup", args);
     }
 
-    public boolean recv_removeChildGroupFromParentGroup() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_removeChildGroupFromParentGroup() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       removeChildGroupFromParentGroup_result result = new removeChildGroupFromParentGroup_result();
       receiveBase(result, "removeChildGroupFromParentGroup");
@@ -802,7 +806,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeChildGroupFromParentGroup failed: unknown result");
     }
 
-    public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws SharingRegistryException, org.apache.thrift.TException
+    public String createEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_createEntityType(entityType);
       return recv_createEntityType();
@@ -815,7 +819,7 @@ public class GovRegistryService {
       sendBase("createEntityType", args);
     }
 
-    public String recv_createEntityType() throws SharingRegistryException, org.apache.thrift.TException
+    public String recv_createEntityType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       createEntityType_result result = new createEntityType_result();
       receiveBase(result, "createEntityType");
@@ -828,7 +832,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public boolean updateEntityType(org.apache.airavata.sharing.registry.models.EntityType entityType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_updateEntityType(entityType);
       return recv_updateEntityType();
@@ -841,7 +845,7 @@ public class GovRegistryService {
       sendBase("updateEntityType", args);
     }
 
-    public boolean recv_updateEntityType() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_updateEntityType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       updateEntityType_result result = new updateEntityType_result();
       receiveBase(result, "updateEntityType");
@@ -854,7 +858,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateEntityType failed: unknown result");
     }
 
-    public boolean deleteEntityType(String entityTypeId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_deleteEntityType(entityTypeId);
       return recv_deleteEntityType();
@@ -867,7 +871,7 @@ public class GovRegistryService {
       sendBase("deleteEntityType", args);
     }
 
-    public boolean recv_deleteEntityType() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_deleteEntityType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       deleteEntityType_result result = new deleteEntityType_result();
       receiveBase(result, "deleteEntityType");
@@ -880,7 +884,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.EntityType getEntityType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getEntityType(entityTypeId);
       return recv_getEntityType();
@@ -893,7 +897,7 @@ public class GovRegistryService {
       sendBase("getEntityType", args);
     }
 
-    public org.apache.airavata.sharing.registry.models.EntityType recv_getEntityType() throws SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.EntityType recv_getEntityType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getEntityType_result result = new getEntityType_result();
       receiveBase(result, "getEntityType");
@@ -906,7 +910,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.EntityType> getEntityTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getEntityTypes(domain, offset, limit);
       return recv_getEntityTypes();
@@ -921,7 +925,7 @@ public class GovRegistryService {
       sendBase("getEntityTypes", args);
     }
 
-    public List<org.apache.airavata.sharing.registry.models.EntityType> recv_getEntityTypes() throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.EntityType> recv_getEntityTypes() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getEntityTypes_result result = new getEntityTypes_result();
       receiveBase(result, "getEntityTypes");
@@ -934,7 +938,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEntityTypes failed: unknown result");
     }
 
-    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws SharingRegistryException, org.apache.thrift.TException
+    public String createEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_createEntity(entity);
       return recv_createEntity();
@@ -947,7 +951,7 @@ public class GovRegistryService {
       sendBase("createEntity", args);
     }
 
-    public String recv_createEntity() throws SharingRegistryException, org.apache.thrift.TException
+    public String recv_createEntity() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       createEntity_result result = new createEntity_result();
       receiveBase(result, "createEntity");
@@ -960,7 +964,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createEntity failed: unknown result");
     }
 
-    public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean updateEntity(org.apache.airavata.sharing.registry.models.Entity entity) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_updateEntity(entity);
       return recv_updateEntity();
@@ -973,7 +977,7 @@ public class GovRegistryService {
       sendBase("updateEntity", args);
     }
 
-    public boolean recv_updateEntity() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_updateEntity() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       updateEntity_result result = new updateEntity_result();
       receiveBase(result, "updateEntity");
@@ -986,7 +990,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateEntity failed: unknown result");
     }
 
-    public boolean deleteEntity(String entityId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean deleteEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_deleteEntity(entityId);
       return recv_deleteEntity();
@@ -999,7 +1003,7 @@ public class GovRegistryService {
       sendBase("deleteEntity", args);
     }
 
-    public boolean recv_deleteEntity() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_deleteEntity() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       deleteEntity_result result = new deleteEntity_result();
       receiveBase(result, "deleteEntity");
@@ -1012,7 +1016,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.Entity getEntity(String entityId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getEntity(entityId);
       return recv_getEntity();
@@ -1025,7 +1029,7 @@ public class GovRegistryService {
       sendBase("getEntity", args);
     }
 
-    public org.apache.airavata.sharing.registry.models.Entity recv_getEntity() throws SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.Entity recv_getEntity() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getEntity_result result = new getEntity_result();
       receiveBase(result, "getEntity");
@@ -1038,13 +1042,13 @@ public class GovRegistryService {
       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 userId, String entityTypeId, Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters, int offset, int limit) throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.Entity> searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_searchEntities(userId, entityTypeId, filters, offset, limit);
       return recv_searchEntities();
     }
 
-    public void send_searchEntities(String userId, String entityTypeId, Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters, int offset, int limit) throws org.apache.thrift.TException
+    public void send_searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit) throws org.apache.thrift.TException
     {
       searchEntities_args args = new searchEntities_args();
       args.setUserId(userId);
@@ -1055,7 +1059,7 @@ public class GovRegistryService {
       sendBase("searchEntities", args);
     }
 
-    public List<org.apache.airavata.sharing.registry.models.Entity> recv_searchEntities() throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.Entity> recv_searchEntities() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       searchEntities_result result = new searchEntities_result();
       receiveBase(result, "searchEntities");
@@ -1068,7 +1072,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchEntities failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> getListOfSharedUsers(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getListOfSharedUsers(entityId, permissionTypeId);
       return recv_getListOfSharedUsers();
@@ -1082,7 +1086,7 @@ public class GovRegistryService {
       sendBase("getListOfSharedUsers", args);
     }
 
-    public List<org.apache.airavata.sharing.registry.models.User> recv_getListOfSharedUsers() throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.User> recv_getListOfSharedUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getListOfSharedUsers_result result = new getListOfSharedUsers_result();
       receiveBase(result, "getListOfSharedUsers");
@@ -1095,7 +1099,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedUsers failed: unknown result");
     }
 
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> getListOfSharedGroups(String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getListOfSharedGroups(entityId, permissionTypeId);
       return recv_getListOfSharedGroups();
@@ -1109,7 +1113,7 @@ public class GovRegistryService {
       sendBase("getListOfSharedGroups", args);
     }
 
-    public List<org.apache.airavata.sharing.registry.models.UserGroup> recv_getListOfSharedGroups() throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.UserGroup> recv_getListOfSharedGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getListOfSharedGroups_result result = new getListOfSharedGroups_result();
       receiveBase(result, "getListOfSharedGroups");
@@ -1122,7 +1126,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getListOfSharedGroups failed: unknown result");
     }
 
-    public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws SharingRegistryException, org.apache.thrift.TException
+    public String createPermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_createPermissionType(permissionType);
       return recv_createPermissionType();
@@ -1135,7 +1139,7 @@ public class GovRegistryService {
       sendBase("createPermissionType", args);
     }
 
-    public String recv_createPermissionType() throws SharingRegistryException, org.apache.thrift.TException
+    public String recv_createPermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       createPermissionType_result result = new createPermissionType_result();
       receiveBase(result, "createPermissionType");
@@ -1148,7 +1152,7 @@ public class GovRegistryService {
       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 permissionType) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean updatePermissionType(org.apache.airavata.sharing.registry.models.PermissionType permissionType) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_updatePermissionType(permissionType);
       return recv_updatePermissionType();
@@ -1161,7 +1165,7 @@ public class GovRegistryService {
       sendBase("updatePermissionType", args);
     }
 
-    public boolean recv_updatePermissionType() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_updatePermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       updatePermissionType_result result = new updatePermissionType_result();
       receiveBase(result, "updatePermissionType");
@@ -1174,7 +1178,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatePermissionType failed: unknown result");
     }
 
-    public boolean deletePermissionType(String entityTypeId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean deletePermissionType(String entityTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_deletePermissionType(entityTypeId);
       return recv_deletePermissionType();
@@ -1187,7 +1191,7 @@ public class GovRegistryService {
       sendBase("deletePermissionType", args);
     }
 
-    public boolean recv_deletePermissionType() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_deletePermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       deletePermissionType_result result = new deletePermissionType_result();
       receiveBase(result, "deletePermissionType");
@@ -1200,7 +1204,7 @@ public class GovRegistryService {
       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 permissionTypeId) throws SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.PermissionType getPermissionType(String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getPermissionType(permissionTypeId);
       return recv_getPermissionType();
@@ -1213,7 +1217,7 @@ public class GovRegistryService {
       sendBase("getPermissionType", args);
     }
 
-    public org.apache.airavata.sharing.registry.models.PermissionType recv_getPermissionType() throws SharingRegistryException, org.apache.thrift.TException
+    public org.apache.airavata.sharing.registry.models.PermissionType recv_getPermissionType() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getPermissionType_result result = new getPermissionType_result();
       receiveBase(result, "getPermissionType");
@@ -1226,7 +1230,7 @@ public class GovRegistryService {
       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 SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.PermissionType> getPermissionTypes(String domain, int offset, int limit) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_getPermissionTypes(domain, offset, limit);
       return recv_getPermissionTypes();
@@ -1241,7 +1245,7 @@ public class GovRegistryService {
       sendBase("getPermissionTypes", args);
     }
 
-    public List<org.apache.airavata.sharing.registry.models.PermissionType> recv_getPermissionTypes() throws SharingRegistryException, org.apache.thrift.TException
+    public List<org.apache.airavata.sharing.registry.models.PermissionType> recv_getPermissionTypes() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       getPermissionTypes_result result = new getPermissionTypes_result();
       receiveBase(result, "getPermissionTypes");
@@ -1254,7 +1258,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionTypes failed: unknown result");
     }
 
-    public boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean shareEntityWithUsers(String entityId, List<String> userList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_shareEntityWithUsers(entityId, userList, perssionTypeId, cascadePermission);
       return recv_shareEntityWithUsers();
@@ -1270,7 +1274,7 @@ public class GovRegistryService {
       sendBase("shareEntityWithUsers", args);
     }
 
-    public boolean recv_shareEntityWithUsers() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_shareEntityWithUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       shareEntityWithUsers_result result = new shareEntityWithUsers_result();
       receiveBase(result, "shareEntityWithUsers");
@@ -1283,7 +1287,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithUsers failed: unknown result");
     }
 
-    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean revokeEntitySharingFromUsers(String entityId, List<String> userList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_revokeEntitySharingFromUsers(entityId, userList, perssionTypeId);
       return recv_revokeEntitySharingFromUsers();
@@ -1298,7 +1302,7 @@ public class GovRegistryService {
       sendBase("revokeEntitySharingFromUsers", args);
     }
 
-    public boolean recv_revokeEntitySharingFromUsers() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_revokeEntitySharingFromUsers() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       revokeEntitySharingFromUsers_result result = new revokeEntitySharingFromUsers_result();
       receiveBase(result, "revokeEntitySharingFromUsers");
@@ -1311,7 +1315,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromUsers failed: unknown result");
     }
 
-    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean shareEntityWithGroups(String entityId, List<String> groupList, String perssionTypeId, boolean cascadePermission) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_shareEntityWithGroups(entityId, groupList, perssionTypeId, cascadePermission);
       return recv_shareEntityWithGroups();
@@ -1327,7 +1331,7 @@ public class GovRegistryService {
       sendBase("shareEntityWithGroups", args);
     }
 
-    public boolean recv_shareEntityWithGroups() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_shareEntityWithGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       shareEntityWithGroups_result result = new shareEntityWithGroups_result();
       receiveBase(result, "shareEntityWithGroups");
@@ -1340,7 +1344,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "shareEntityWithGroups failed: unknown result");
     }
 
-    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean revokeEntitySharingFromGroups(String entityId, List<String> groupList, String perssionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_revokeEntitySharingFromGroups(entityId, groupList, perssionTypeId);
       return recv_revokeEntitySharingFromGroups();
@@ -1355,7 +1359,7 @@ public class GovRegistryService {
       sendBase("revokeEntitySharingFromGroups", args);
     }
 
-    public boolean recv_revokeEntitySharingFromGroups() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_revokeEntitySharingFromGroups() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       revokeEntitySharingFromGroups_result result = new revokeEntitySharingFromGroups_result();
       receiveBase(result, "revokeEntitySharingFromGroups");
@@ -1368,7 +1372,7 @@ public class GovRegistryService {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revokeEntitySharingFromGroups failed: unknown result");
     }
 
-    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws SharingRegistryException, org.apache.thrift.TException
+    public boolean userHasAccess(String domainId, String userId, String entityId, String permissionTypeId) throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       send_userHasAccess(domainId, userId, entityId, permissionTypeId);
       return recv_userHasAccess();
@@ -1384,7 +1388,7 @@ public class GovRegistryService {
       sendBase("userHasAccess", args);
     }
 
-    public boolean recv_userHasAccess() throws SharingRegistryException, org.apache.thrift.TException
+    public boolean recv_userHasAccess() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException
     {
       userHasAccess_result result = new userHasAccess_result();
       receiveBase(result, "userHasAccess");
@@ -1437,7 +1441,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public String getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1469,7 +1473,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1501,7 +1505,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1533,7 +1537,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public org.apache.airavata.sharing.registry.models.Domain getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public org.apache.airavata.sharing.registry.models.Domain getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1568,7 +1572,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public List<org.apache.airavata.sharing.registry.models.Domain> getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public List<org.apache.airavata.sharing.registry.models.Domain> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1600,7 +1604,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public String getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1632,7 +1636,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1664,7 +1668,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1696,7 +1700,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public org.apache.airavata.sharing.registry.models.User getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public org.apache.airavata.sharing.registry.models.User getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1734,7 +1738,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public List<org.apache.airavata.sharing.registry.models.User> getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public List<org.apache.airavata.sharing.registry.models.User> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1766,7 +1770,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public String getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1798,7 +1802,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1830,7 +1834,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1862,7 +1866,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public org.apache.airavata.sharing.registry.models.UserGroup getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public org.apache.airavata.sharing.registry.models.UserGroup getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1935,7 +1939,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -1970,7 +1974,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2008,7 +2012,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public Map<String,org.apache.airavata.sharing.registry.models.GroupChildType> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2043,7 +2047,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2078,7 +2082,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2110,7 +2114,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public String getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2142,7 +2146,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2174,7 +2178,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2206,7 +2210,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public org.apache.airavata.sharing.registry.models.EntityType getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public org.apache.airavata.sharing.registry.models.EntityType getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2244,7 +2248,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public List<org.apache.airavata.sharing.registry.models.EntityType> getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public List<org.apache.airavata.sharing.registry.models.EntityType> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2276,7 +2280,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public String getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2308,7 +2312,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2340,7 +2344,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2372,7 +2376,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public org.apache.airavata.sharing.registry.models.Entity getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public org.apache.airavata.sharing.registry.models.Entity getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2382,7 +2386,7 @@ public class GovRegistryService {
       }
     }
 
-    public void searchEntities(String userId, String entityTypeId, Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void searchEntities(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       searchEntities_call method_call = new searchEntities_call(userId, entityTypeId, filters, offset, limit, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
@@ -2392,10 +2396,10 @@ public class GovRegistryService {
     public static class searchEntities_call extends org.apache.thrift.async.TAsyncMethodCall {
       private String userId;
       private String entityTypeId;
-      private Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters;
+      private List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters;
       private int offset;
       private int limit;
-      public searchEntities_call(String userId, String entityTypeId, Map<org.apache.airavata.sharing.registry.models.EntitySearchFields,String> filters, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public searchEntities_call(String userId, String entityTypeId, List<org.apache.airavata.sharing.registry.models.SearchCriteria> filters, 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.userId = userId;
         this.entityTypeId = entityTypeId;
@@ -2416,7 +2420,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public List<org.apache.airavata.sharing.registry.models.Entity> getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public List<org.apache.airavata.sharing.registry.models.Entity> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2451,7 +2455,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public List<org.apache.airavata.sharing.registry.models.User> getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public List<org.apache.airavata.sharing.registry.models.User> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2486,7 +2490,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public List<org.apache.airavata.sharing.registry.models.UserGroup> getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public List<org.apache.airavata.sharing.registry.models.UserGroup> getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2518,7 +2522,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public String getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public String getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2550,7 +2554,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws SharingRegistryException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.sharing.registry.models.SharingRegistryException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -2582,7 +2586,7 @@ public class GovRegistryService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() thro

<TRUNCATED>