You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/10/13 18:32:54 UTC
[01/30] airavata git commit: Adding SSHCredentialSummary model &
adding desc field to SSHCredential
Repository: airavata
Updated Branches:
refs/heads/develop 7cb338d6a -> a8e033358
http://git-wip-us.apache.org/repos/asf/airavata/blob/eb0cd635/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/eb0cd635/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/eb0cd635/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/eb0cd635/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 {
[30/30] airavata git commit: Approved and merge pull request 54 into
develop branch
Posted by sh...@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/develop
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
----------------------------------------------------------------------
[28/30] airavata git commit: Adding Airavata Api level changes
associated with last commit
Posted by sh...@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/develop
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 {
[18/30] airavata git commit: removing add and delete method for
SSHCredentialSummary, serverhandler implemented got get method
Posted by sh...@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>
[29/30] airavata git commit: moving credential-store data model
thrift file to data-models directory
Posted by sh...@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/develop
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
[27/30] airavata git commit: Adding Airavata Api level changes
associated with last commit
Posted by sh...@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>
[05/30] airavata git commit: removing add and delete method for
SSHCredentialSummary, serverhandler implemented got get method
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/efed2956/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>
[09/30] airavata git commit: Implementing API level changes
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6548366/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/credentialsummary/CredentialSummary.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/credentialsummary/CredentialSummary.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/credentialsummary/CredentialSummary.java
new file mode 100644
index 0000000..5f3fc82
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/credentialsummary/CredentialSummary.java
@@ -0,0 +1,826 @@
+/**
+ * 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.model.appcatalog.credentialsummary;
+
+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 CredentialSummary implements org.apache.thrift.TBase<CredentialSummary, CredentialSummary._Fields>, java.io.Serializable, Cloneable, Comparable<CredentialSummary> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CredentialSummary");
+
+ 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 DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new CredentialSummaryStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new CredentialSummaryTupleSchemeFactory());
+ }
+
+ private String gatewayId; // required
+ private String username; // required
+ private String publicKey; // optional
+ private long persistedTime; // optional
+ private 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"),
+ DESCRIPTION((short)5, "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: // 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.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.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(CredentialSummary.class, metaDataMap);
+ }
+
+ public CredentialSummary() {
+ }
+
+ public CredentialSummary(
+ String gatewayId,
+ String username)
+ {
+ this();
+ this.gatewayId = gatewayId;
+ this.username = username;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public CredentialSummary(CredentialSummary 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.isSetDescription()) {
+ this.description = other.description;
+ }
+ }
+
+ public CredentialSummary deepCopy() {
+ return new CredentialSummary(this);
+ }
+
+ @Override
+ public void clear() {
+ this.gatewayId = null;
+ this.username = null;
+ this.publicKey = null;
+ setPersistedTimeIsSet(false);
+ this.persistedTime = 0;
+ this.description = null;
+ }
+
+ public String getGatewayId() {
+ return this.gatewayId;
+ }
+
+ public void setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
+ }
+
+ 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 void setUsername(String username) {
+ this.username = username;
+ }
+
+ 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 void setPublicKey(String publicKey) {
+ this.publicKey = publicKey;
+ }
+
+ 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 void setPersistedTime(long persistedTime) {
+ this.persistedTime = persistedTime;
+ setPersistedTimeIsSet(true);
+ }
+
+ 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 getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ 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 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 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 DESCRIPTION:
+ return isSetDescription();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof CredentialSummary)
+ return this.equals((CredentialSummary)that);
+ return false;
+ }
+
+ public boolean equals(CredentialSummary 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_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_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(CredentialSummary 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(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("CredentialSummary(");
+ 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 (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 (!isSetGatewayId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetUsername()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' is unset! 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 CredentialSummaryStandardSchemeFactory implements SchemeFactory {
+ public CredentialSummaryStandardScheme getScheme() {
+ return new CredentialSummaryStandardScheme();
+ }
+ }
+
+ private static class CredentialSummaryStandardScheme extends StandardScheme<CredentialSummary> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, CredentialSummary 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: // 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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, CredentialSummary 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.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class CredentialSummaryTupleSchemeFactory implements SchemeFactory {
+ public CredentialSummaryTupleScheme getScheme() {
+ return new CredentialSummaryTupleScheme();
+ }
+ }
+
+ private static class CredentialSummaryTupleScheme extends TupleScheme<CredentialSummary> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, CredentialSummary 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.isSetDescription()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetPublicKey()) {
+ oprot.writeString(struct.publicKey);
+ }
+ if (struct.isSetPersistedTime()) {
+ oprot.writeI64(struct.persistedTime);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, CredentialSummary 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(3);
+ 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.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6548366/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 77a85d4..b41a4ad 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
@@ -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 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/b6548366/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 457cad6..f963726 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
@@ -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 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/b6548366/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 c488315..6710c96 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
@@ -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 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/b6548366/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 48ea94c..b55c84e 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-08-09")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
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/b6548366/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 54bd588..9195209 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -36,6 +36,7 @@ include "../data-models/app-catalog-models/application_io_models.thrift"
include "../data-models/app-catalog-models/application_deployment_model.thrift"
include "../data-models/app-catalog-models/application_interface_model.thrift"
include "../data-models/resource-catalog-models/compute_resource_model.thrift"
+include "../data-models/resource-catalog-models/credential_summary.thrift"
include "../data-models/resource-catalog-models/storage_resource_model.thrift"
include "../data-models/resource-catalog-models/gateway_resource_profile_model.thrift"
include "../data-models/resource-catalog-models/user_resource_profile_model.thrift"
@@ -345,6 +346,25 @@ service Airavata {
2: airavata_errors.AiravataClientException ace,
3: airavata_errors.AiravataSystemException ase)
+ /**
+ *
+ * Get all Public Keys of the 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.
+ *
+ * @return publicKey
+ *
+ **/
+ list<credential_summary.CredentialSummary> getAllGatewaySSHPubKeysSummary (1: required security_model.AuthzToken authzToken,
+ 2: required string gatewayId)
+ 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)
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6548366/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 c1b4d85..915804f 100644
--- a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
+++ b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
@@ -41,9 +41,6 @@ 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);
@@ -66,12 +63,12 @@ service CredentialStoreService {
map<string,string> getAllSSHKeysForGateway (1: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException);
+ list<credential_store_data_models.SSHCredentialSummary> getAllGatewaySSHCredentialSummary (1: required string gatewayId) 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);
- 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/b6548366/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift
new file mode 100644
index 0000000..c7aaa89
--- /dev/null
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace java org.apache.airavata.model.appcatalog.credentialsummary
+namespace php Airavata.Model.AppCatalog.CredetialSummary
+namespace cpp apache.airavata.model.appcatalog.credentialsummary
+namespace py apache.airavata.model.appcatalog.credentialsummary
+
+struct CredentialSummary {
+ 1: required string gatewayId,
+ 2: required string username,
+ 3: optional string publicKey,
+ 4: optional i64 persistedTime,
+ 5: optional string description
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6548366/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift
index da4a340..3b144eb 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift
@@ -21,4 +21,5 @@
include "compute_resource_model.thrift"
include "storage_resource_model.thrift"
include "gateway_resource_profile_model.thrift"
-include "user_resource_profile_model.thrift"
\ No newline at end of file
+include "user_resource_profile_model.thrift"
+include "credential_summary.thrift"
\ No newline at end of file
[22/30] airavata git commit: adding method to get all ssh pub key
Summaries
Posted by sh...@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/develop
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);
[23/30] airavata git commit: Correcting the create table query which
was failing during build
Posted by sh...@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/develop
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";
[17/30] airavata git commit: Adding SSHCredentialSummary model &
adding desc field to SSHCredential
Posted by sh...@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/develop
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(-)
----------------------------------------------------------------------
[10/30] airavata git commit: Implementing API level changes
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6548366/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 77a2c9d..0b12271 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
@@ -297,6 +297,25 @@ public class Airavata {
*/
public Map<String,String> getAllGatewaySSHPubKeys(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 Keys of the 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.
+ *
+ * @return publicKey
+ *
+ *
+ *
+ * @param authzToken
+ * @param gatewayId
+ */
+ 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;
+
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;
/**
@@ -2892,6 +2911,8 @@ public class Airavata {
public void getAllGatewaySSHPubKeys(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ 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 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;
@@ -3850,6 +3871,39 @@ public class Airavata {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGatewaySSHPubKeys failed: unknown result");
}
+ 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
+ {
+ send_getAllGatewaySSHPubKeysSummary(authzToken, gatewayId);
+ return recv_getAllGatewaySSHPubKeysSummary();
+ }
+
+ public void send_getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.thrift.TException
+ {
+ getAllGatewaySSHPubKeysSummary_args args = new getAllGatewaySSHPubKeysSummary_args();
+ args.setAuthzToken(authzToken);
+ args.setGatewayId(gatewayId);
+ sendBase("getAllGatewaySSHPubKeysSummary", args);
+ }
+
+ public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> recv_getAllGatewaySSHPubKeysSummary() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result();
+ receiveBase(result, "getAllGatewaySSHPubKeysSummary");
+ 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, "getAllGatewaySSHPubKeysSummary 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);
@@ -9897,6 +9951,41 @@ 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 {
+ checkReady();
+ getAllGatewaySSHPubKeysSummary_call method_call = new getAllGatewaySSHPubKeysSummary_call(authzToken, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getAllGatewaySSHPubKeysSummary_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.model.security.AuthzToken authzToken;
+ private String gatewayId;
+ public getAllGatewaySSHPubKeysSummary_call(org.apache.airavata.model.security.AuthzToken authzToken, 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.authzToken = authzToken;
+ 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("getAllGatewaySSHPubKeysSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getAllGatewaySSHPubKeysSummary_args args = new getAllGatewaySSHPubKeysSummary_args();
+ args.setAuthzToken(authzToken);
+ args.setGatewayId(gatewayId);
+ 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_getAllGatewaySSHPubKeysSummary();
+ }
+ }
+
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);
@@ -15404,6 +15493,7 @@ public class Airavata {
processMap.put("registerPwdCredential", new registerPwdCredential());
processMap.put("getSSHPubKey", new getSSHPubKey());
processMap.put("getAllGatewaySSHPubKeys", new getAllGatewaySSHPubKeys());
+ processMap.put("getAllGatewaySSHPubKeysSummary", new getAllGatewaySSHPubKeysSummary());
processMap.put("getAllGatewayPWDCredentials", new getAllGatewayPWDCredentials());
processMap.put("deleteSSHPubKey", new deleteSSHPubKey());
processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -16091,6 +16181,34 @@ public class Airavata {
}
}
+ public static class getAllGatewaySSHPubKeysSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllGatewaySSHPubKeysSummary_args> {
+ public getAllGatewaySSHPubKeysSummary() {
+ super("getAllGatewaySSHPubKeysSummary");
+ }
+
+ public getAllGatewaySSHPubKeysSummary_args getEmptyArgsInstance() {
+ return new getAllGatewaySSHPubKeysSummary_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getAllGatewaySSHPubKeysSummary_result getResult(I iface, getAllGatewaySSHPubKeysSummary_args args) throws org.apache.thrift.TException {
+ getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result();
+ try {
+ result.success = iface.getAllGatewaySSHPubKeysSummary(args.authzToken, args.gatewayId);
+ } 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");
@@ -20570,6 +20688,7 @@ public class Airavata {
processMap.put("registerPwdCredential", new registerPwdCredential());
processMap.put("getSSHPubKey", new getSSHPubKey());
processMap.put("getAllGatewaySSHPubKeys", new getAllGatewaySSHPubKeys());
+ processMap.put("getAllGatewaySSHPubKeysSummary", new getAllGatewaySSHPubKeysSummary());
processMap.put("getAllGatewayPWDCredentials", new getAllGatewayPWDCredentials());
processMap.put("deleteSSHPubKey", new deleteSSHPubKey());
processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -22001,20 +22120,20 @@ public class Airavata {
}
}
- public static class getAllGatewayPWDCredentials<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayPWDCredentials_args, Map<String,String>> {
- public getAllGatewayPWDCredentials() {
- super("getAllGatewayPWDCredentials");
+ public static class getAllGatewaySSHPubKeysSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewaySSHPubKeysSummary_args, List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>> {
+ public getAllGatewaySSHPubKeysSummary() {
+ super("getAllGatewaySSHPubKeysSummary");
}
- public getAllGatewayPWDCredentials_args getEmptyArgsInstance() {
- return new getAllGatewayPWDCredentials_args();
+ public getAllGatewaySSHPubKeysSummary_args getEmptyArgsInstance() {
+ return new getAllGatewaySSHPubKeysSummary_args();
}
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ 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<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getAllGatewayPWDCredentials_result result = new getAllGatewayPWDCredentials_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> o) {
+ getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22027,7 +22146,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllGatewayPWDCredentials_result result = new getAllGatewayPWDCredentials_result();
+ getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22063,27 +22182,26 @@ public class Airavata {
return false;
}
- public void start(I iface, getAllGatewayPWDCredentials_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getAllGatewayPWDCredentials(args.authzToken, args.gatewayId,resultHandler);
+ public void start(I iface, getAllGatewaySSHPubKeysSummary_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>> resultHandler) throws TException {
+ iface.getAllGatewaySSHPubKeysSummary(args.authzToken, args.gatewayId,resultHandler);
}
}
- public static class deleteSSHPubKey<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSSHPubKey_args, Boolean> {
- public deleteSSHPubKey() {
- super("deleteSSHPubKey");
+ public static class getAllGatewayPWDCredentials<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayPWDCredentials_args, Map<String,String>> {
+ public getAllGatewayPWDCredentials() {
+ super("getAllGatewayPWDCredentials");
}
- public deleteSSHPubKey_args getEmptyArgsInstance() {
- return new deleteSSHPubKey_args();
+ public getAllGatewayPWDCredentials_args getEmptyArgsInstance() {
+ return new getAllGatewayPWDCredentials_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteSSHPubKey_result result = new deleteSSHPubKey_result();
+ return new AsyncMethodCallback<Map<String,String>>() {
+ public void onComplete(Map<String,String> o) {
+ getAllGatewayPWDCredentials_result result = new getAllGatewayPWDCredentials_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22095,7 +22213,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteSSHPubKey_result result = new deleteSSHPubKey_result();
+ getAllGatewayPWDCredentials_result result = new getAllGatewayPWDCredentials_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22131,25 +22249,25 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteSSHPubKey_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteSSHPubKey(args.authzToken, args.airavataCredStoreToken, args.gatewayId,resultHandler);
+ public void start(I iface, getAllGatewayPWDCredentials_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
+ iface.getAllGatewayPWDCredentials(args.authzToken, args.gatewayId,resultHandler);
}
}
- public static class deletePWDCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePWDCredential_args, Boolean> {
- public deletePWDCredential() {
- super("deletePWDCredential");
+ public static class deleteSSHPubKey<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSSHPubKey_args, Boolean> {
+ public deleteSSHPubKey() {
+ super("deleteSSHPubKey");
}
- public deletePWDCredential_args getEmptyArgsInstance() {
- return new deletePWDCredential_args();
+ public deleteSSHPubKey_args getEmptyArgsInstance() {
+ return new deleteSSHPubKey_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) {
- deletePWDCredential_result result = new deletePWDCredential_result();
+ deleteSSHPubKey_result result = new deleteSSHPubKey_result();
result.success = o;
result.setSuccessIsSet(true);
try {
@@ -22163,7 +22281,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deletePWDCredential_result result = new deletePWDCredential_result();
+ deleteSSHPubKey_result result = new deleteSSHPubKey_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22199,26 +22317,27 @@ public class Airavata {
return false;
}
- public void start(I iface, deletePWDCredential_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deletePWDCredential(args.authzToken, args.airavataCredStoreToken, args.gatewayId,resultHandler);
+ public void start(I iface, deleteSSHPubKey_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteSSHPubKey(args.authzToken, args.airavataCredStoreToken, args.gatewayId,resultHandler);
}
}
- public static class createProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createProject_args, String> {
- public createProject() {
- super("createProject");
+ public static class deletePWDCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePWDCredential_args, Boolean> {
+ public deletePWDCredential() {
+ super("deletePWDCredential");
}
- public createProject_args getEmptyArgsInstance() {
- return new createProject_args();
+ public deletePWDCredential_args getEmptyArgsInstance() {
+ return new deletePWDCredential_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- createProject_result result = new createProject_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deletePWDCredential_result result = new deletePWDCredential_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22230,78 +22349,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- createProject_result result = new createProject_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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
- result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
- result.setAeIsSet(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, createProject_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.createProject(args.authzToken, args.gatewayId, args.project,resultHandler);
- }
- }
-
- public static class updateProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateProject_args, Void> {
- public updateProject() {
- super("updateProject");
- }
-
- public updateProject_args getEmptyArgsInstance() {
- return new updateProject_args();
- }
-
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- updateProject_result result = new updateProject_result();
- 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;
- updateProject_result result = new updateProject_result();
+ deletePWDCredential_result result = new deletePWDCredential_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22317,16 +22365,6 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
- else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
- result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
- result.setPnfeIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
- result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
- result.setAeIsSet(true);
- msg = result;
- }
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
@@ -22347,25 +22385,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateProject_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateProject(args.authzToken, args.projectId, args.updatedProject,resultHandler);
+ public void start(I iface, deletePWDCredential_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deletePWDCredential(args.authzToken, args.airavataCredStoreToken, args.gatewayId,resultHandler);
}
}
- public static class getProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getProject_args, org.apache.airavata.model.workspace.Project> {
- public getProject() {
- super("getProject");
+ public static class createProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createProject_args, String> {
+ public createProject() {
+ super("createProject");
}
- public getProject_args getEmptyArgsInstance() {
- return new getProject_args();
+ public createProject_args getEmptyArgsInstance() {
+ return new createProject_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.workspace.Project> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.workspace.Project>() {
- public void onComplete(org.apache.airavata.model.workspace.Project o) {
- getProject_result result = new getProject_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ createProject_result result = new createProject_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22378,7 +22416,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getProject_result result = new getProject_result();
+ createProject_result result = new createProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22394,11 +22432,6 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
- else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
- result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
- result.setPnfeIsSet(true);
- msg = result;
- }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -22424,27 +22457,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getProject_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Project> resultHandler) throws TException {
- iface.getProject(args.authzToken, args.projectId,resultHandler);
+ public void start(I iface, createProject_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.createProject(args.authzToken, args.gatewayId, args.project,resultHandler);
}
}
- public static class deleteProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteProject_args, Boolean> {
- public deleteProject() {
- super("deleteProject");
+ public static class updateProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateProject_args, Void> {
+ public updateProject() {
+ super("updateProject");
}
- public deleteProject_args getEmptyArgsInstance() {
- return new deleteProject_args();
+ public updateProject_args getEmptyArgsInstance() {
+ return new updateProject_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteProject_result result = new deleteProject_result();
- result.success = o;
- result.setSuccessIsSet(true);
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ updateProject_result result = new updateProject_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22456,7 +22487,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteProject_result result = new deleteProject_result();
+ updateProject_result result = new updateProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22502,25 +22533,25 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteProject_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteProject(args.authzToken, args.projectId,resultHandler);
+ public void start(I iface, updateProject_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateProject(args.authzToken, args.projectId, args.updatedProject,resultHandler);
}
}
- public static class getUserProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserProjects_args, List<org.apache.airavata.model.workspace.Project>> {
- public getUserProjects() {
- super("getUserProjects");
+ public static class getProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getProject_args, org.apache.airavata.model.workspace.Project> {
+ public getProject() {
+ super("getProject");
}
- public getUserProjects_args getEmptyArgsInstance() {
- return new getUserProjects_args();
+ public getProject_args getEmptyArgsInstance() {
+ return new getProject_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.workspace.Project> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>>() {
- public void onComplete(List<org.apache.airavata.model.workspace.Project> o) {
- getUserProjects_result result = new getUserProjects_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.workspace.Project>() {
+ public void onComplete(org.apache.airavata.model.workspace.Project o) {
+ getProject_result result = new getProject_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22533,7 +22564,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getUserProjects_result result = new getUserProjects_result();
+ getProject_result result = new getProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22549,6 +22580,11 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
+ else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(true);
+ msg = result;
+ }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -22574,26 +22610,27 @@ public class Airavata {
return false;
}
- public void start(I iface, getUserProjects_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> resultHandler) throws TException {
- iface.getUserProjects(args.authzToken, args.gatewayId, args.userName, args.limit, args.offset,resultHandler);
+ public void start(I iface, getProject_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Project> resultHandler) throws TException {
+ iface.getProject(args.authzToken, args.projectId,resultHandler);
}
}
- public static class searchProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchProjects_args, List<org.apache.airavata.model.workspace.Project>> {
- public searchProjects() {
- super("searchProjects");
+ public static class deleteProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteProject_args, Boolean> {
+ public deleteProject() {
+ super("deleteProject");
}
- public searchProjects_args getEmptyArgsInstance() {
- return new searchProjects_args();
+ public deleteProject_args getEmptyArgsInstance() {
+ return new deleteProject_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>>() {
- public void onComplete(List<org.apache.airavata.model.workspace.Project> o) {
- searchProjects_result result = new searchProjects_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteProject_result result = new deleteProject_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22605,7 +22642,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- searchProjects_result result = new searchProjects_result();
+ deleteProject_result result = new deleteProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22621,6 +22658,11 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
+ else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(true);
+ msg = result;
+ }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -22646,25 +22688,25 @@ public class Airavata {
return false;
}
- public void start(I iface, searchProjects_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> resultHandler) throws TException {
- iface.searchProjects(args.authzToken, args.gatewayId, args.userName, args.filters, args.limit, args.offset,resultHandler);
+ public void start(I iface, deleteProject_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteProject(args.authzToken, args.projectId,resultHandler);
}
}
- public static class searchExperiments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchExperiments_args, List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> {
- public searchExperiments() {
- super("searchExperiments");
+ public static class getUserProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserProjects_args, List<org.apache.airavata.model.workspace.Project>> {
+ public getUserProjects() {
+ super("getUserProjects");
}
- public searchExperiments_args getEmptyArgsInstance() {
- return new searchExperiments_args();
+ public getUserProjects_args getEmptyArgsInstance() {
+ return new getUserProjects_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>>() {
- public void onComplete(List<org.apache.airavata.model.experiment.ExperimentSummaryModel> o) {
- searchExperiments_result result = new searchExperiments_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>>() {
+ public void onComplete(List<org.apache.airavata.model.workspace.Project> o) {
+ getUserProjects_result result = new getUserProjects_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22677,7 +22719,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- searchExperiments_result result = new searchExperiments_result();
+ getUserProjects_result result = new getUserProjects_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22718,25 +22760,25 @@ public class Airavata {
return false;
}
- public void start(I iface, searchExperiments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> resultHandler) throws TException {
- iface.searchExperiments(args.authzToken, args.gatewayId, args.userName, args.filters, args.limit, args.offset,resultHandler);
+ public void start(I iface, getUserProjects_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> resultHandler) throws TException {
+ iface.getUserProjects(args.authzToken, args.gatewayId, args.userName, args.limit, args.offset,resultHandler);
}
}
- public static class getExperimentStatistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentStatistics_args, org.apache.airavata.model.experiment.ExperimentStatistics> {
- public getExperimentStatistics() {
- super("getExperimentStatistics");
+ public static class searchProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchProjects_args, List<org.apache.airavata.model.workspace.Project>> {
+ public searchProjects() {
+ super("searchProjects");
}
- public getExperimentStatistics_args getEmptyArgsInstance() {
- return new getExperimentStatistics_args();
+ public searchProjects_args getEmptyArgsInstance() {
+ return new searchProjects_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics>() {
- public void onComplete(org.apache.airavata.model.experiment.ExperimentStatistics o) {
- getExperimentStatistics_result result = new getExperimentStatistics_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>>() {
+ public void onComplete(List<org.apache.airavata.model.workspace.Project> o) {
+ searchProjects_result result = new searchProjects_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22749,7 +22791,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getExperimentStatistics_result result = new getExperimentStatistics_result();
+ searchProjects_result result = new searchProjects_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22790,25 +22832,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getExperimentStatistics_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> resultHandler) throws TException {
- iface.getExperimentStatistics(args.authzToken, args.gatewayId, args.fromTime, args.toTime,resultHandler);
+ public void start(I iface, searchProjects_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> resultHandler) throws TException {
+ iface.searchProjects(args.authzToken, args.gatewayId, args.userName, args.filters, args.limit, args.offset,resultHandler);
}
}
- public static class getExperimentsInProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentsInProject_args, List<org.apache.airavata.model.experiment.ExperimentModel>> {
- public getExperimentsInProject() {
- super("getExperimentsInProject");
+ public static class searchExperiments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchExperiments_args, List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> {
+ public searchExperiments() {
+ super("searchExperiments");
}
- public getExperimentsInProject_args getEmptyArgsInstance() {
- return new getExperimentsInProject_args();
+ public searchExperiments_args getEmptyArgsInstance() {
+ return new searchExperiments_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>>() {
- public void onComplete(List<org.apache.airavata.model.experiment.ExperimentModel> o) {
- getExperimentsInProject_result result = new getExperimentsInProject_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>>() {
+ public void onComplete(List<org.apache.airavata.model.experiment.ExperimentSummaryModel> o) {
+ searchExperiments_result result = new searchExperiments_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22821,7 +22863,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getExperimentsInProject_result result = new getExperimentsInProject_result();
+ searchExperiments_result result = new searchExperiments_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22837,11 +22879,6 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
- else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
- result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
- result.setPnfeIsSet(true);
- msg = result;
- }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -22867,25 +22904,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getExperimentsInProject_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws TException {
- iface.getExperimentsInProject(args.authzToken, args.projectId, args.limit, args.offset,resultHandler);
+ public void start(I iface, searchExperiments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> resultHandler) throws TException {
+ iface.searchExperiments(args.authzToken, args.gatewayId, args.userName, args.filters, args.limit, args.offset,resultHandler);
}
}
- public static class getUserExperiments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserExperiments_args, List<org.apache.airavata.model.experiment.ExperimentModel>> {
- public getUserExperiments() {
- super("getUserExperiments");
+ public static class getExperimentStatistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentStatistics_args, org.apache.airavata.model.experiment.ExperimentStatistics> {
+ public getExperimentStatistics() {
+ super("getExperimentStatistics");
}
- public getUserExperiments_args getEmptyArgsInstance() {
- return new getUserExperiments_args();
+ public getExperimentStatistics_args getEmptyArgsInstance() {
+ return new getExperimentStatistics_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>>() {
- public void onComplete(List<org.apache.airavata.model.experiment.ExperimentModel> o) {
- getUserExperiments_result result = new getUserExperiments_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics>() {
+ public void onComplete(org.apache.airavata.model.experiment.ExperimentStatistics o) {
+ getExperimentStatistics_result result = new getExperimentStatistics_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22898,7 +22935,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getUserExperiments_result result = new getUserExperiments_result();
+ getExperimentStatistics_result result = new getExperimentStatistics_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22939,25 +22976,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getUserExperiments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws TException {
- iface.getUserExperiments(args.authzToken, args.gatewayId, args.userName, args.limit, args.offset,resultHandler);
+ public void start(I iface, getExperimentStatistics_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> resultHandler) throws TException {
+ iface.getExperimentStatistics(args.authzToken, args.gatewayId, args.fromTime, args.toTime,resultHandler);
}
}
- public static class createExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createExperiment_args, String> {
- public createExperiment() {
- super("createExperiment");
+ public static class getExperimentsInProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentsInProject_args, List<org.apache.airavata.model.experiment.ExperimentModel>> {
+ public getExperimentsInProject() {
+ super("getExperimentsInProject");
}
- public createExperiment_args getEmptyArgsInstance() {
- return new createExperiment_args();
+ public getExperimentsInProject_args getEmptyArgsInstance() {
+ return new getExperimentsInProject_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- createExperiment_result result = new createExperiment_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>>() {
+ public void onComplete(List<org.apache.airavata.model.experiment.ExperimentModel> o) {
+ getExperimentsInProject_result result = new getExperimentsInProject_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22970,7 +23007,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- createExperiment_result result = new createExperiment_result();
+ getExperimentsInProject_result result = new getExperimentsInProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22986,6 +23023,11 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
+ else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(true);
+ msg = result;
+ }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -23011,27 +23053,26 @@ public class Airavata {
return false;
}
- public void start(I iface, createExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.createExperiment(args.authzToken, args.gatewayId, args.experiment,resultHandler);
+ public void start(I iface, getExperimentsInProject_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws TException {
+ iface.getExperimentsInProject(args.authzToken, args.projectId, args.limit, args.offset,resultHandler);
}
}
- public static class deleteExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteExperiment_args, Boolean> {
- public deleteExperiment() {
- super("deleteExperiment");
+ public static class getUserExperiments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserExperiments_args, List<org.apache.airavata.model.experiment.ExperimentModel>> {
+ public getUserExperiments() {
+ super("getUserExperiments");
}
- public deleteExperiment_args getEmptyArgsInstance() {
- return new deleteExperiment_args();
+ public getUserExperiments_args getEmptyArgsInstance() {
+ return new getUserExperiments_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteExperiment_result result = new deleteExperiment_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>>() {
+ public void onComplete(List<org.apache.airavata.model.experiment.ExperimentModel> o) {
+ getUserExperiments_result result = new getUserExperiments_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23043,7 +23084,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteExperiment_result result = new deleteExperiment_result();
+ getUserExperiments_result result = new getUserExperiments_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -23084,25 +23125,25 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteExperiment(args.authzToken, args.experimentId,resultHandler);
+ public void start(I iface, getUserExperiments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws TException {
+ iface.getUserExperiments(args.authzToken, args.gatewayId, args.userName, args.limit, args.offset,resultHandler);
}
}
- public static class getExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperiment_args, org.apache.airavata.model.experiment.ExperimentModel> {
- public getExperiment() {
- super("getExperiment");
+ public static class createExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createExperiment_args, String> {
+ public createExperiment() {
+ super("createExperiment");
}
- public getExperiment_args getEmptyArgsInstance() {
- return new getExperiment_args();
+ public createExperiment_args getEmptyArgsInstance() {
+ return new createExperiment_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
- public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
- getExperiment_result result = new getExperiment_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ createExperiment_result result = new createExperiment_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -23115,17 +23156,12 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getExperiment_result result = new getExperiment_result();
+ createExperiment_result result = new createExperiment_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.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(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);
@@ -23161,26 +23197,27 @@ public class Airavata {
return false;
}
- public void start(I iface, getExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
- iface.getExperiment(args.authzToken, args.airavataExperimentId,resultHandler);
+ public void start(I iface, createExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.createExperiment(args.authzToken, args.gatewayId, args.experiment,resultHandler);
}
}
- public static class getDetailedExperimentTree<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getDetailedExperimentTree_args, org.apache.airavata.model.experiment.ExperimentModel> {
- public getDetailedExperimentTree() {
- super("getDetailedExperimentTree");
+ public static class deleteExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteExperiment_args, Boolean> {
+ public deleteExperiment() {
+ super("deleteExperiment");
}
- public getDetailedExperimentTree_args getEmptyArgsInstance() {
- return new getDetailedExperimentTree_args();
+ public deleteExperiment_args getEmptyArgsInstance() {
+ return new deleteExperiment_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
- public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
- getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteExperiment_result result = new deleteExperiment_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23192,17 +23229,12 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ deleteExperiment_result result = new deleteExperiment_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.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(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);
@@ -23238,25 +23270,26 @@ public class Airavata {
return false;
}
- public void start(I iface, getDetailedExperimentTree_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
- iface.getDetailedExperimentTree(args.authzToken, args.airavataExperimentId,resultHandler);
+ public void start(I iface, deleteExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteExperiment(args.authzToken, args.experimentId,resultHandler);
}
}
- public static class updateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperiment_args, Void> {
- public updateExperiment() {
- super("updateExperiment");
+ public static class getExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperiment_args, org.apache.airavata.model.experiment.ExperimentModel> {
+ public getExperiment() {
+ super("getExperiment");
}
- public updateExperiment_args getEmptyArgsInstance() {
- return new updateExperiment_args();
+ public getExperiment_args getEmptyArgsInstance() {
+ return new getExperiment_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- updateExperiment_result result = new updateExperiment_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
+ public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
+ getExperiment_result result = new getExperiment_result();
+ result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23268,7 +23301,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateExperiment_result result = new updateExperiment_result();
+ getExperiment_result result = new getExperiment_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -23314,25 +23347,26 @@ public class Airavata {
return false;
}
- public void start(I iface, updateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateExperiment(args.authzToken, args.airavataExperimentId, args.experiment,resultHandler);
+ public void start(I iface, getExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
+ iface.getExperiment(args.authzToken, args.airavataExperimentId,resultHandler);
}
}
- public static class updateExperimentConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperimentConfiguration_args, Void> {
- public updateExperimentConfiguration() {
- super("updateExperimentConfiguration");
+ public static class getDetailedExperimentTree<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getDetailedExperimentTree_args, org.apache.airavata.model.experiment.ExperimentModel> {
+ public getDetailedExperimentTree() {
+ super("getDetailedExperimentTree");
}
- public updateExperimentConfiguration_args getEmptyArgsInstance() {
- return new updateExperimentConfiguration_args();
+ public getDetailedExperimentTree_args getEmptyArgsInstance() {
+ return new getDetailedExperimentTree_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
+ public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
+ getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23344,8 +23378,28 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
- if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ getDetailedExperimentTree_result result = new getDetailedExperimentTree_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.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -23370,25 +23424,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateExperimentConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateExperimentConfiguration(args.authzToken, args.airavataExperimentId, args.userConfiguration,resultHandler);
+ public void start(I iface, getDetailedExperimentTree_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
+ iface.getDetailedExperimentTree(args.authzToken, args.airavataExperimentId,resultHandler);
}
}
- public static class updateResourceScheduleing<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateResourceScheduleing_args, Void> {
- public updateResourceScheduleing() {
- super("updateResourceScheduleing");
+ public static class updateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperiment_args, Void> {
+ public updateExperiment() {
+ super("updateExperiment");
}
- public updateResourceScheduleing_args getEmptyArgsInstance() {
- return new updateResourceScheduleing_args();
+ public updateExperiment_args getEmptyArgsInstance() {
+ return new updateExperiment_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
- updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ updateExperiment_result result = new updateExperiment_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23400,8 +23454,28 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateResourceScheduleing_result result = new updateResourceScheduleing_result();
- if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ updateExperiment_result result = new updateExperiment_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.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -23426,27 +23500,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateResourceScheduleing_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateResourceScheduleing(args.authzToken, args.airavataExperimentId, args.resourceScheduling,resultHandler);
+ public void start(I iface, updateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateExperiment(args.authzToken, args.airavataExperimentId, args.experiment,resultHandler);
}
}
- public static class validateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, validateExperiment_args, Boolean> {
- public validateExperiment() {
- super("validateExperiment");
+ public static class updateExperimentConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperimentConfiguration_args, Void> {
+ public updateExperimentConfiguration() {
+ super("updateExperimentConfiguration");
}
- public validateExperiment_args getEmptyArgsInstance() {
- return new validateExperiment_args();
+ public updateExperimentConfiguration_args getEmptyArgsInstance() {
+ return new updateExperimentConfiguration_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- validateExperiment_result result = new validateExperiment_result();
- result.success = o;
- result.setSuccessIsSet(true);
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23458,28 +23530,8 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- validateExperiment_result result = new validateExperiment_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.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
+ if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -23504,25 +23556,25 @@ public class Airavata {
return false;
}
- public void start(I iface, validateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.validateExperiment(args.authzToken, args.airavataExperimentId,resultHandler);
+ public void start(I iface, updateExperimentConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateExperimentConfiguration(args.authzToken, args.airavataExperimentId, args.userConfiguration,resultHandler);
}
}
- public static class launchExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, launchExperiment_args, Void> {
- public launchExperiment() {
- super("launchExperiment");
+ public static class updateResourceScheduleing<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateResourceScheduleing_args, Void> {
+ public updateResourceScheduleing() {
+ super("updateResourceScheduleing");
}
- public launchExperiment_args getEmptyArgsInstance() {
- return new launchExperiment_args();
+ public updateResourceScheduleing_args getEmptyArgsInstance() {
+ return new updateResourceScheduleing_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
- launchExperiment_result result = new launchExperiment_result();
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23534,28 +23586,8 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- launchExperiment_result result = new launchExperiment_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.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -23580,26 +23612,27 @@ public class Airavata {
return false;
}
- public void start(I iface, launchExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.launchExperiment(args.authzToken, args.airavataExperimentId, args.gatewayId,resultHandler);
+ public void start(I iface, updateResourceScheduleing_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateResourceScheduleing(args.authzToken, args.airavataExperimentId, args.resourceScheduling,resultHandler);
}
}
- public static class getExperimentStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentStatus_args, org.apache.airavata.model.status.ExperimentStatus> {
- public getExperimentStatus() {
- super("getExperimentStatus");
+ public static class validateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, validateExperiment_args, Boolean> {
+ public validateExperiment() {
+ super("validateExperiment");
}
- public getExperimentStatus_args getEmptyArgsInstance() {
- return new getExperimentStatus_args();
+ public validateExperiment_args getEmptyArgsInstance() {
+ return new validateExperiment_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.status.ExperimentStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.status.ExperimentStatus>() {
- public void onComplete(org.apache.airavata.model.status.ExperimentStatus o) {
- getExperimentStatus_result result = new getExperimentStatus_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ validateExperiment_result result = new validateExperiment_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.T
<TRUNCATED>
[21/30] airavata git commit: implementing DAO and db utils
Posted by sh...@apache.org.
implementing DAO and db utils
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/6632b1a8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/6632b1a8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/6632b1a8
Branch: refs/heads/develop
Commit: 6632b1a8f70b15d6278c27fb0124d5c267af1fb4
Parents: c4fb532
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 18:30:04 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 11:30:42 2016 -0400
----------------------------------------------------------------------
.../credential/store/credential/Credential.java | 11 +++++++++++
.../store/store/impl/db/CredentialsDAO.java | 15 +++++++++++----
.../store/store/impl/db/SSHCredentialTest.java | 2 +-
3 files changed, 23 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/6632b1a8/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java
index 0e9ee82..4715337 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java
@@ -34,6 +34,17 @@ public abstract class Credential implements Serializable {
private Date persistedTime;
private String token;
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ private String description;
+
+
public String getToken() {
return token;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/6632b1a8/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java
index e73ea04..90e58af 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java
@@ -86,7 +86,7 @@ public class CredentialsDAO extends ParentDAO {
public void addCredentials(String gatewayId, Credential credential, Connection connection)
throws CredentialStoreException {
- String sql = "INSERT INTO CREDENTIALS VALUES (?, ?, ?, ?, ?)";
+ String sql = "INSERT INTO CREDENTIALS VALUES (?, ?, ?, ?, ?, ?)";
PreparedStatement preparedStatement = null;
@@ -106,6 +106,8 @@ public class CredentialsDAO extends ParentDAO {
preparedStatement.setTimestamp(5, timestamp);
+ preparedStatement.setString(6,credential.getDescription());
+
preparedStatement.executeUpdate();
} catch (SQLException e) {
@@ -161,7 +163,7 @@ public class CredentialsDAO extends ParentDAO {
public void updateCredentials(String gatewayId, Credential credential, Connection connection)
throws CredentialStoreException {
- String sql = "UPDATE CREDENTIALS set CREDENTIAL = ?, PORTAL_USER_ID = ?, TIME_PERSISTED = ? where GATEWAY_ID = ? and TOKEN_ID = ?";
+ String sql = "UPDATE CREDENTIALS set CREDENTIAL = ?, PORTAL_USER_ID = ?, TIME_PERSISTED = ?, DESCRIPTION = ? where GATEWAY_ID = ? and TOKEN_ID = ?";
PreparedStatement preparedStatement = null;
@@ -174,8 +176,10 @@ public class CredentialsDAO extends ParentDAO {
preparedStatement.setString(2, credential.getPortalUserName());
preparedStatement.setTimestamp(3, new Timestamp(new java.util.Date().getTime()));
- preparedStatement.setString(4, gatewayId);
- preparedStatement.setString(5, credential.getToken());
+ preparedStatement.setString(4, credential.getDescription());
+ preparedStatement.setString(5, gatewayId);
+ preparedStatement.setString(6, credential.getToken());
+
preparedStatement.executeUpdate();
@@ -227,6 +231,7 @@ public class CredentialsDAO extends ParentDAO {
certificateCredential.setPortalUserName(resultSet.getString("PORTAL_USER_ID"));
certificateCredential.setCertificateRequestedTime(resultSet.getTimestamp("TIME_PERSISTED"));
+ certificateCredential.setDescription(resultSet.getString("DESCRIPTION"));
return certificateCredential;
}
@@ -314,6 +319,7 @@ public class CredentialsDAO extends ParentDAO {
certificateCredential.setPortalUserName(resultSet.getString("PORTAL_USER_ID"));
certificateCredential.setCertificateRequestedTime(resultSet.getTimestamp("TIME_PERSISTED"));
+ certificateCredential.setDescription(resultSet.getString("DESCRIPTION"));
credentialList.add(certificateCredential);
}
@@ -363,6 +369,7 @@ public class CredentialsDAO extends ParentDAO {
certificateCredential.setPortalUserName(resultSet.getString("PORTAL_USER_ID"));
certificateCredential.setCertificateRequestedTime(resultSet.getTimestamp("TIME_PERSISTED"));
+ certificateCredential.setDescription(resultSet.getString("DESCRIPTION"));
credentialList.add(certificateCredential);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/6632b1a8/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
index 703ee7d..e160910 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
@@ -23,7 +23,6 @@ package org.apache.airavata.credential.store.store.impl.db;
import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
import org.apache.airavata.common.utils.DBUtil;
import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
import org.apache.airavata.credential.store.store.CredentialStoreException;
@@ -54,6 +53,7 @@ public class SSHCredentialTest {
String token = TokenGenerator.generateToken(gatewayId, null);
sshCredential.setToken(token);
sshCredential.setPortalUserName("phasta");
+ sshCredential.setDescription("dummy creds for testing");
FileInputStream privateKeyStream = new FileInputStream(privateKeyPath);
File filePri = new File(privateKeyPath);
byte[] bFilePri = new byte[(int) filePri.length()];
[06/30] airavata git commit: removing add and delete method for
SSHCredentialSummary, serverhandler implemented got get method
Posted by sh...@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/efed2956
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/efed2956
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/efed2956
Branch: refs/heads/develop
Commit: efed2956fb93443575da73db0128ba1b3a18416d
Parents: 3170fef
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 16:34:38 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Mon Oct 10 16:34:58 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/efed2956/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/efed2956/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);
[16/30] airavata git commit: Adding SSHCredentialSummary model &
adding desc field to SSHCredential
Posted by sh...@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>
[11/30] airavata git commit: Implementing API level changes
Posted by sh...@apache.org.
Implementing API level changes
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b6548366
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b6548366
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b6548366
Branch: refs/heads/develop
Commit: b6548366daab592e260acbd3fb77001986866678
Parents: fcc44af
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 18:33:41 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Mon Oct 10 18:33:41 2016 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 31 +
.../java/org/apache/airavata/api/Airavata.java | 12720 +++++++++--------
.../credentialsummary/CredentialSummary.java | 826 ++
.../store/datamodel/CertificateCredential.java | 2 +-
.../store/datamodel/CommunityUser.java | 2 +-
.../store/datamodel/PasswordCredential.java | 2 +-
.../exception/CredentialStoreException.java | 2 +-
.../airavata-apis/airavata_api.thrift | 20 +
.../component-cpis/credential-store-cpi.thrift | 7 +-
.../credential_summary.thrift | 32 +
.../resource_catalog_models.thrift | 3 +-
11 files changed, 7968 insertions(+), 5679 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/b6548366/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 61b9d83..658eb69 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
@@ -33,6 +33,7 @@ import org.apache.airavata.credential.store.client.CredentialStoreClientFactory;
import org.apache.airavata.credential.store.cpi.CredentialStoreService;
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.exception.CredentialStoreException;
import org.apache.airavata.messaging.core.MessageContext;
import org.apache.airavata.messaging.core.MessagingFactory;
@@ -50,6 +51,7 @@ import org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescr
import org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile;
import org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference;
import org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference;
+import org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary;
import org.apache.airavata.model.application.io.InputDataObjectType;
import org.apache.airavata.model.application.io.OutputDataObjectType;
import org.apache.airavata.model.commons.airavata_commonsConstants;
@@ -486,6 +488,35 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
@SecurityCheck
+ public List<CredentialSummary> getAllGatewaySSHPubKeysSummary(AuthzToken authzToken, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+ try {
+ List<CredentialSummary> allCredentialSummaries = new ArrayList<>();
+ if (csClient == null){
+ csClient = getCredentialStoreServiceClient();
+ }
+ List<SSHCredentialSummary> sshSummaryList = csClient.getAllGatewaySSHCredentialSummary(gatewayId);
+ for(SSHCredentialSummary key : sshSummaryList){
+ CredentialSummary summary = new CredentialSummary();
+ summary.setGatewayId(key.getGatewayId());
+ summary.setUsername(key.getUsername());
+ summary.setPublicKey(key.getPublicKey());
+ summary.setDescription(key.getDescription());
+ summary.setPersistedTime(key.getPersistedTime());
+ allCredentialSummaries.add(summary);
+ }
+ logger.debug("Airavata retrieved all SSH pub keys summaries for gateway Id : " + gatewayId);
+ return allCredentialSummaries;
+ }catch (Exception e){
+ logger.error("Error occurred while retrieving SSH public keys summaries for gateway : " + gatewayId , e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error occurred while retrieving SSH public keys summaries for gateway : " + gatewayId + ". More info : " + e.getMessage());
+ throw exception;
+ }
+ }
+
+ @Override
+ @SecurityCheck
public Map<String, String> getAllGatewayPWDCredentials(AuthzToken authzToken, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
if (csClient == null){
[04/30] airavata git commit: Making the token field required in
SSHCredentialSummary
Posted by sh...@apache.org.
Making the token field required in SSHCredentialSummary
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/3170fefd
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/3170fefd
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/3170fefd
Branch: refs/heads/develop
Commit: 3170fefdf371e6db6cd4099570ff294909eec10e
Parents: eb0cd63
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 15:18:02 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Mon Oct 10 15:35:32 2016 -0400
----------------------------------------------------------------------
.../impl/ssh/SSHCredentialSummary.java | 101 +++++++++++++++++++
.../store/datamodel/SSHCredentialSummary.java | 56 +++++-----
.../credential_store_data_models.thrift | 2 +-
3 files changed, 127 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/3170fefd/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
new file mode 100644
index 0000000..f838eaa
--- /dev/null
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/impl/ssh/SSHCredentialSummary.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.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/3170fefd/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 d0a8a12..624fc0b 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
@@ -71,7 +71,7 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
public String username; // required
public String publicKey; // optional
public long persistedTime; // optional
- public String token; // optional
+ public String token; // required
public String description; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -150,7 +150,7 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
// 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};
+ private static final _Fields optionals[] = {_Fields.PUBLIC_KEY,_Fields.PERSISTED_TIME,_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);
@@ -162,7 +162,7 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
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,
+ tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.REQUIRED,
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)));
@@ -175,11 +175,13 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
public SSHCredentialSummary(
String gatewayId,
- String username)
+ String username,
+ String token)
{
this();
this.gatewayId = gatewayId;
this.username = username;
+ this.token = token;
}
/**
@@ -689,16 +691,14 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
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 (!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:");
@@ -721,6 +721,9 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
+ if (token == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'token' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
}
@@ -846,11 +849,9 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
oprot.writeFieldEnd();
}
if (struct.token != null) {
- if (struct.isSetToken()) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
+ oprot.writeFieldBegin(TOKEN_FIELD_DESC);
+ oprot.writeString(struct.token);
+ oprot.writeFieldEnd();
}
if (struct.description != null) {
if (struct.isSetDescription()) {
@@ -878,6 +879,7 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeString(struct.gatewayId);
oprot.writeString(struct.username);
+ oprot.writeString(struct.token);
BitSet optionals = new BitSet();
if (struct.isSetPublicKey()) {
optionals.set(0);
@@ -885,22 +887,16 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
if (struct.isSetPersistedTime()) {
optionals.set(1);
}
- if (struct.isSetToken()) {
- optionals.set(2);
- }
if (struct.isSetDescription()) {
- optionals.set(3);
+ optionals.set(2);
}
- oprot.writeBitSet(optionals, 4);
+ oprot.writeBitSet(optionals, 3);
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);
}
@@ -913,7 +909,9 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
struct.setGatewayIdIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
+ struct.token = iprot.readString();
+ struct.setTokenIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.publicKey = iprot.readString();
struct.setPublicKeyIsSet(true);
@@ -923,10 +921,6 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
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/3170fefd/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 c7998e3..f2c2c77 100644
--- a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
+++ b/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
@@ -40,7 +40,7 @@ struct SSHCredentialSummary {
2: required string username,
3: optional string publicKey,
4: optional i64 persistedTime,
- 5: optional string token,
+ 5: required string token,
6: optional string description
}
[24/30] airavata git commit: Merge branch 'ssh-cred-model-change' of
github.com:anujbhan/airavata into ssh-cred-model-change
Posted by sh...@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/develop
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
----------------------------------------------------------------------
----------------------------------------------------------------------
[26/30] airavata git commit: Adding Airavata Api level changes
associated with last commit
Posted by sh...@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)
[03/30] airavata git commit: Adding SSHCredentialSummary model &
adding desc field to SSHCredential
Posted by sh...@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/eb0cd635
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/eb0cd635
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/eb0cd635
Branch: refs/heads/develop
Commit: eb0cd635ea9e065d622abb30ff30b54a9f60910b
Parents: a4ed488
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 12:58:25 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Mon Oct 10 12:58:25 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(-)
----------------------------------------------------------------------
[02/30] airavata git commit: Adding SSHCredentialSummary model &
adding desc field to SSHCredential
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/eb0cd635/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>
[25/30] airavata git commit: Adding getAllSSHKeyForUsersInGateway and
removing dates in auto gen files
Posted by sh...@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/develop
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);
[20/30] airavata git commit: Making the token field required in
SSHCredentialSummary
Posted by sh...@apache.org.
Making the token field required in SSHCredentialSummary
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/157efab5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/157efab5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/157efab5
Branch: refs/heads/develop
Commit: 157efab54df3578189c53ddec6e63d5eacff768c
Parents: 5aa40b8
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 15:18:02 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 11:30:42 2016 -0400
----------------------------------------------------------------------
.../impl/ssh/SSHCredentialSummary.java | 101 +++++++++++++++++++
.../store/datamodel/SSHCredentialSummary.java | 56 +++++-----
.../credential_store_data_models.thrift | 2 +-
3 files changed, 127 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/157efab5/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
new file mode 100644
index 0000000..f838eaa
--- /dev/null
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/impl/ssh/SSHCredentialSummary.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.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/157efab5/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 d0a8a12..624fc0b 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
@@ -71,7 +71,7 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
public String username; // required
public String publicKey; // optional
public long persistedTime; // optional
- public String token; // optional
+ public String token; // required
public String description; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -150,7 +150,7 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
// 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};
+ private static final _Fields optionals[] = {_Fields.PUBLIC_KEY,_Fields.PERSISTED_TIME,_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);
@@ -162,7 +162,7 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
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,
+ tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.REQUIRED,
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)));
@@ -175,11 +175,13 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
public SSHCredentialSummary(
String gatewayId,
- String username)
+ String username,
+ String token)
{
this();
this.gatewayId = gatewayId;
this.username = username;
+ this.token = token;
}
/**
@@ -689,16 +691,14 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
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 (!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:");
@@ -721,6 +721,9 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
if (username == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
}
+ if (token == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'token' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
}
@@ -846,11 +849,9 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
oprot.writeFieldEnd();
}
if (struct.token != null) {
- if (struct.isSetToken()) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
+ oprot.writeFieldBegin(TOKEN_FIELD_DESC);
+ oprot.writeString(struct.token);
+ oprot.writeFieldEnd();
}
if (struct.description != null) {
if (struct.isSetDescription()) {
@@ -878,6 +879,7 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeString(struct.gatewayId);
oprot.writeString(struct.username);
+ oprot.writeString(struct.token);
BitSet optionals = new BitSet();
if (struct.isSetPublicKey()) {
optionals.set(0);
@@ -885,22 +887,16 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
if (struct.isSetPersistedTime()) {
optionals.set(1);
}
- if (struct.isSetToken()) {
- optionals.set(2);
- }
if (struct.isSetDescription()) {
- optionals.set(3);
+ optionals.set(2);
}
- oprot.writeBitSet(optionals, 4);
+ oprot.writeBitSet(optionals, 3);
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);
}
@@ -913,7 +909,9 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
struct.setGatewayIdIsSet(true);
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
+ struct.token = iprot.readString();
+ struct.setTokenIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.publicKey = iprot.readString();
struct.setPublicKeyIsSet(true);
@@ -923,10 +921,6 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase<SSHCredenti
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/157efab5/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 c7998e3..f2c2c77 100644
--- a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
+++ b/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift
@@ -40,7 +40,7 @@ struct SSHCredentialSummary {
2: required string username,
3: optional string publicKey,
4: optional i64 persistedTime,
- 5: optional string token,
+ 5: required string token,
6: optional string description
}
[08/30] airavata git commit: implementing DAO and db utils
Posted by sh...@apache.org.
implementing DAO and db utils
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fcc44af3
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fcc44af3
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fcc44af3
Branch: refs/heads/develop
Commit: fcc44af33b34afa230a190e92a9b3f80123dadd9
Parents: 218870c
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 18:30:04 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Mon Oct 10 18:30:04 2016 -0400
----------------------------------------------------------------------
.../credential/store/credential/Credential.java | 11 +++++++++++
.../store/store/impl/db/CredentialsDAO.java | 15 +++++++++++----
.../store/store/impl/db/SSHCredentialTest.java | 2 +-
3 files changed, 23 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcc44af3/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java
index 0e9ee82..4715337 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/credential/Credential.java
@@ -34,6 +34,17 @@ public abstract class Credential implements Serializable {
private Date persistedTime;
private String token;
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ private String description;
+
+
public String getToken() {
return token;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcc44af3/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java
index e73ea04..90e58af 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CredentialsDAO.java
@@ -86,7 +86,7 @@ public class CredentialsDAO extends ParentDAO {
public void addCredentials(String gatewayId, Credential credential, Connection connection)
throws CredentialStoreException {
- String sql = "INSERT INTO CREDENTIALS VALUES (?, ?, ?, ?, ?)";
+ String sql = "INSERT INTO CREDENTIALS VALUES (?, ?, ?, ?, ?, ?)";
PreparedStatement preparedStatement = null;
@@ -106,6 +106,8 @@ public class CredentialsDAO extends ParentDAO {
preparedStatement.setTimestamp(5, timestamp);
+ preparedStatement.setString(6,credential.getDescription());
+
preparedStatement.executeUpdate();
} catch (SQLException e) {
@@ -161,7 +163,7 @@ public class CredentialsDAO extends ParentDAO {
public void updateCredentials(String gatewayId, Credential credential, Connection connection)
throws CredentialStoreException {
- String sql = "UPDATE CREDENTIALS set CREDENTIAL = ?, PORTAL_USER_ID = ?, TIME_PERSISTED = ? where GATEWAY_ID = ? and TOKEN_ID = ?";
+ String sql = "UPDATE CREDENTIALS set CREDENTIAL = ?, PORTAL_USER_ID = ?, TIME_PERSISTED = ?, DESCRIPTION = ? where GATEWAY_ID = ? and TOKEN_ID = ?";
PreparedStatement preparedStatement = null;
@@ -174,8 +176,10 @@ public class CredentialsDAO extends ParentDAO {
preparedStatement.setString(2, credential.getPortalUserName());
preparedStatement.setTimestamp(3, new Timestamp(new java.util.Date().getTime()));
- preparedStatement.setString(4, gatewayId);
- preparedStatement.setString(5, credential.getToken());
+ preparedStatement.setString(4, credential.getDescription());
+ preparedStatement.setString(5, gatewayId);
+ preparedStatement.setString(6, credential.getToken());
+
preparedStatement.executeUpdate();
@@ -227,6 +231,7 @@ public class CredentialsDAO extends ParentDAO {
certificateCredential.setPortalUserName(resultSet.getString("PORTAL_USER_ID"));
certificateCredential.setCertificateRequestedTime(resultSet.getTimestamp("TIME_PERSISTED"));
+ certificateCredential.setDescription(resultSet.getString("DESCRIPTION"));
return certificateCredential;
}
@@ -314,6 +319,7 @@ public class CredentialsDAO extends ParentDAO {
certificateCredential.setPortalUserName(resultSet.getString("PORTAL_USER_ID"));
certificateCredential.setCertificateRequestedTime(resultSet.getTimestamp("TIME_PERSISTED"));
+ certificateCredential.setDescription(resultSet.getString("DESCRIPTION"));
credentialList.add(certificateCredential);
}
@@ -363,6 +369,7 @@ public class CredentialsDAO extends ParentDAO {
certificateCredential.setPortalUserName(resultSet.getString("PORTAL_USER_ID"));
certificateCredential.setCertificateRequestedTime(resultSet.getTimestamp("TIME_PERSISTED"));
+ certificateCredential.setDescription(resultSet.getString("DESCRIPTION"));
credentialList.add(certificateCredential);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcc44af3/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
index 703ee7d..e160910 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
@@ -23,7 +23,6 @@ package org.apache.airavata.credential.store.store.impl.db;
import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
import org.apache.airavata.common.utils.DBUtil;
import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
import org.apache.airavata.credential.store.store.CredentialStoreException;
@@ -54,6 +53,7 @@ public class SSHCredentialTest {
String token = TokenGenerator.generateToken(gatewayId, null);
sshCredential.setToken(token);
sshCredential.setPortalUserName("phasta");
+ sshCredential.setDescription("dummy creds for testing");
FileInputStream privateKeyStream = new FileInputStream(privateKeyPath);
File filePri = new File(privateKeyPath);
byte[] bFilePri = new byte[(int) filePri.length()];
[15/30] airavata git commit: Adding SSHCredentialSummary model &
adding desc field to SSHCredential
Posted by sh...@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/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 {
[07/30] airavata git commit: adding method to get all ssh pub key
Summaries
Posted by sh...@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/218870c9
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/218870c9
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/218870c9
Branch: refs/heads/develop
Commit: 218870c9da84ff5ce6cc8a7bfa6dfaa34a025553
Parents: efed295
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 18:27:52 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Mon Oct 10 18:27:52 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/218870c9/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/218870c9/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);
[13/30] airavata git commit: Implementing API level changes
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c31cfa60/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 77a2c9d..0b12271 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
@@ -297,6 +297,25 @@ public class Airavata {
*/
public Map<String,String> getAllGatewaySSHPubKeys(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 Keys of the 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.
+ *
+ * @return publicKey
+ *
+ *
+ *
+ * @param authzToken
+ * @param gatewayId
+ */
+ 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;
+
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;
/**
@@ -2892,6 +2911,8 @@ public class Airavata {
public void getAllGatewaySSHPubKeys(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ 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 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;
@@ -3850,6 +3871,39 @@ public class Airavata {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGatewaySSHPubKeys failed: unknown result");
}
+ 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
+ {
+ send_getAllGatewaySSHPubKeysSummary(authzToken, gatewayId);
+ return recv_getAllGatewaySSHPubKeysSummary();
+ }
+
+ public void send_getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.thrift.TException
+ {
+ getAllGatewaySSHPubKeysSummary_args args = new getAllGatewaySSHPubKeysSummary_args();
+ args.setAuthzToken(authzToken);
+ args.setGatewayId(gatewayId);
+ sendBase("getAllGatewaySSHPubKeysSummary", args);
+ }
+
+ public List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> recv_getAllGatewaySSHPubKeysSummary() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+ {
+ getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result();
+ receiveBase(result, "getAllGatewaySSHPubKeysSummary");
+ 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, "getAllGatewaySSHPubKeysSummary 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);
@@ -9897,6 +9951,41 @@ 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 {
+ checkReady();
+ getAllGatewaySSHPubKeysSummary_call method_call = new getAllGatewaySSHPubKeysSummary_call(authzToken, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getAllGatewaySSHPubKeysSummary_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private org.apache.airavata.model.security.AuthzToken authzToken;
+ private String gatewayId;
+ public getAllGatewaySSHPubKeysSummary_call(org.apache.airavata.model.security.AuthzToken authzToken, 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.authzToken = authzToken;
+ 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("getAllGatewaySSHPubKeysSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getAllGatewaySSHPubKeysSummary_args args = new getAllGatewaySSHPubKeysSummary_args();
+ args.setAuthzToken(authzToken);
+ args.setGatewayId(gatewayId);
+ 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_getAllGatewaySSHPubKeysSummary();
+ }
+ }
+
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);
@@ -15404,6 +15493,7 @@ public class Airavata {
processMap.put("registerPwdCredential", new registerPwdCredential());
processMap.put("getSSHPubKey", new getSSHPubKey());
processMap.put("getAllGatewaySSHPubKeys", new getAllGatewaySSHPubKeys());
+ processMap.put("getAllGatewaySSHPubKeysSummary", new getAllGatewaySSHPubKeysSummary());
processMap.put("getAllGatewayPWDCredentials", new getAllGatewayPWDCredentials());
processMap.put("deleteSSHPubKey", new deleteSSHPubKey());
processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -16091,6 +16181,34 @@ public class Airavata {
}
}
+ public static class getAllGatewaySSHPubKeysSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllGatewaySSHPubKeysSummary_args> {
+ public getAllGatewaySSHPubKeysSummary() {
+ super("getAllGatewaySSHPubKeysSummary");
+ }
+
+ public getAllGatewaySSHPubKeysSummary_args getEmptyArgsInstance() {
+ return new getAllGatewaySSHPubKeysSummary_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getAllGatewaySSHPubKeysSummary_result getResult(I iface, getAllGatewaySSHPubKeysSummary_args args) throws org.apache.thrift.TException {
+ getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result();
+ try {
+ result.success = iface.getAllGatewaySSHPubKeysSummary(args.authzToken, args.gatewayId);
+ } 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");
@@ -20570,6 +20688,7 @@ public class Airavata {
processMap.put("registerPwdCredential", new registerPwdCredential());
processMap.put("getSSHPubKey", new getSSHPubKey());
processMap.put("getAllGatewaySSHPubKeys", new getAllGatewaySSHPubKeys());
+ processMap.put("getAllGatewaySSHPubKeysSummary", new getAllGatewaySSHPubKeysSummary());
processMap.put("getAllGatewayPWDCredentials", new getAllGatewayPWDCredentials());
processMap.put("deleteSSHPubKey", new deleteSSHPubKey());
processMap.put("deletePWDCredential", new deletePWDCredential());
@@ -22001,20 +22120,20 @@ public class Airavata {
}
}
- public static class getAllGatewayPWDCredentials<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayPWDCredentials_args, Map<String,String>> {
- public getAllGatewayPWDCredentials() {
- super("getAllGatewayPWDCredentials");
+ public static class getAllGatewaySSHPubKeysSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewaySSHPubKeysSummary_args, List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>> {
+ public getAllGatewaySSHPubKeysSummary() {
+ super("getAllGatewaySSHPubKeysSummary");
}
- public getAllGatewayPWDCredentials_args getEmptyArgsInstance() {
- return new getAllGatewayPWDCredentials_args();
+ public getAllGatewaySSHPubKeysSummary_args getEmptyArgsInstance() {
+ return new getAllGatewaySSHPubKeysSummary_args();
}
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ 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<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getAllGatewayPWDCredentials_result result = new getAllGatewayPWDCredentials_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>>() {
+ public void onComplete(List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary> o) {
+ getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22027,7 +22146,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getAllGatewayPWDCredentials_result result = new getAllGatewayPWDCredentials_result();
+ getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22063,27 +22182,26 @@ public class Airavata {
return false;
}
- public void start(I iface, getAllGatewayPWDCredentials_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getAllGatewayPWDCredentials(args.authzToken, args.gatewayId,resultHandler);
+ public void start(I iface, getAllGatewaySSHPubKeysSummary_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary>> resultHandler) throws TException {
+ iface.getAllGatewaySSHPubKeysSummary(args.authzToken, args.gatewayId,resultHandler);
}
}
- public static class deleteSSHPubKey<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSSHPubKey_args, Boolean> {
- public deleteSSHPubKey() {
- super("deleteSSHPubKey");
+ public static class getAllGatewayPWDCredentials<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGatewayPWDCredentials_args, Map<String,String>> {
+ public getAllGatewayPWDCredentials() {
+ super("getAllGatewayPWDCredentials");
}
- public deleteSSHPubKey_args getEmptyArgsInstance() {
- return new deleteSSHPubKey_args();
+ public getAllGatewayPWDCredentials_args getEmptyArgsInstance() {
+ return new getAllGatewayPWDCredentials_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteSSHPubKey_result result = new deleteSSHPubKey_result();
+ return new AsyncMethodCallback<Map<String,String>>() {
+ public void onComplete(Map<String,String> o) {
+ getAllGatewayPWDCredentials_result result = new getAllGatewayPWDCredentials_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22095,7 +22213,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteSSHPubKey_result result = new deleteSSHPubKey_result();
+ getAllGatewayPWDCredentials_result result = new getAllGatewayPWDCredentials_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22131,25 +22249,25 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteSSHPubKey_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteSSHPubKey(args.authzToken, args.airavataCredStoreToken, args.gatewayId,resultHandler);
+ public void start(I iface, getAllGatewayPWDCredentials_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
+ iface.getAllGatewayPWDCredentials(args.authzToken, args.gatewayId,resultHandler);
}
}
- public static class deletePWDCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePWDCredential_args, Boolean> {
- public deletePWDCredential() {
- super("deletePWDCredential");
+ public static class deleteSSHPubKey<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSSHPubKey_args, Boolean> {
+ public deleteSSHPubKey() {
+ super("deleteSSHPubKey");
}
- public deletePWDCredential_args getEmptyArgsInstance() {
- return new deletePWDCredential_args();
+ public deleteSSHPubKey_args getEmptyArgsInstance() {
+ return new deleteSSHPubKey_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) {
- deletePWDCredential_result result = new deletePWDCredential_result();
+ deleteSSHPubKey_result result = new deleteSSHPubKey_result();
result.success = o;
result.setSuccessIsSet(true);
try {
@@ -22163,7 +22281,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deletePWDCredential_result result = new deletePWDCredential_result();
+ deleteSSHPubKey_result result = new deleteSSHPubKey_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22199,26 +22317,27 @@ public class Airavata {
return false;
}
- public void start(I iface, deletePWDCredential_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deletePWDCredential(args.authzToken, args.airavataCredStoreToken, args.gatewayId,resultHandler);
+ public void start(I iface, deleteSSHPubKey_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteSSHPubKey(args.authzToken, args.airavataCredStoreToken, args.gatewayId,resultHandler);
}
}
- public static class createProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createProject_args, String> {
- public createProject() {
- super("createProject");
+ public static class deletePWDCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePWDCredential_args, Boolean> {
+ public deletePWDCredential() {
+ super("deletePWDCredential");
}
- public createProject_args getEmptyArgsInstance() {
- return new createProject_args();
+ public deletePWDCredential_args getEmptyArgsInstance() {
+ return new deletePWDCredential_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- createProject_result result = new createProject_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deletePWDCredential_result result = new deletePWDCredential_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22230,78 +22349,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- createProject_result result = new createProject_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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
- result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
- result.setAeIsSet(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, createProject_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.createProject(args.authzToken, args.gatewayId, args.project,resultHandler);
- }
- }
-
- public static class updateProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateProject_args, Void> {
- public updateProject() {
- super("updateProject");
- }
-
- public updateProject_args getEmptyArgsInstance() {
- return new updateProject_args();
- }
-
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- updateProject_result result = new updateProject_result();
- 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;
- updateProject_result result = new updateProject_result();
+ deletePWDCredential_result result = new deletePWDCredential_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22317,16 +22365,6 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
- else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
- result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
- result.setPnfeIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
- result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
- result.setAeIsSet(true);
- msg = result;
- }
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
@@ -22347,25 +22385,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateProject_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateProject(args.authzToken, args.projectId, args.updatedProject,resultHandler);
+ public void start(I iface, deletePWDCredential_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deletePWDCredential(args.authzToken, args.airavataCredStoreToken, args.gatewayId,resultHandler);
}
}
- public static class getProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getProject_args, org.apache.airavata.model.workspace.Project> {
- public getProject() {
- super("getProject");
+ public static class createProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createProject_args, String> {
+ public createProject() {
+ super("createProject");
}
- public getProject_args getEmptyArgsInstance() {
- return new getProject_args();
+ public createProject_args getEmptyArgsInstance() {
+ return new createProject_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.workspace.Project> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.workspace.Project>() {
- public void onComplete(org.apache.airavata.model.workspace.Project o) {
- getProject_result result = new getProject_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ createProject_result result = new createProject_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22378,7 +22416,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getProject_result result = new getProject_result();
+ createProject_result result = new createProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22394,11 +22432,6 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
- else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
- result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
- result.setPnfeIsSet(true);
- msg = result;
- }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -22424,27 +22457,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getProject_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Project> resultHandler) throws TException {
- iface.getProject(args.authzToken, args.projectId,resultHandler);
+ public void start(I iface, createProject_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.createProject(args.authzToken, args.gatewayId, args.project,resultHandler);
}
}
- public static class deleteProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteProject_args, Boolean> {
- public deleteProject() {
- super("deleteProject");
+ public static class updateProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateProject_args, Void> {
+ public updateProject() {
+ super("updateProject");
}
- public deleteProject_args getEmptyArgsInstance() {
- return new deleteProject_args();
+ public updateProject_args getEmptyArgsInstance() {
+ return new updateProject_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteProject_result result = new deleteProject_result();
- result.success = o;
- result.setSuccessIsSet(true);
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ updateProject_result result = new updateProject_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22456,7 +22487,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteProject_result result = new deleteProject_result();
+ updateProject_result result = new updateProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22502,25 +22533,25 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteProject_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteProject(args.authzToken, args.projectId,resultHandler);
+ public void start(I iface, updateProject_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateProject(args.authzToken, args.projectId, args.updatedProject,resultHandler);
}
}
- public static class getUserProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserProjects_args, List<org.apache.airavata.model.workspace.Project>> {
- public getUserProjects() {
- super("getUserProjects");
+ public static class getProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getProject_args, org.apache.airavata.model.workspace.Project> {
+ public getProject() {
+ super("getProject");
}
- public getUserProjects_args getEmptyArgsInstance() {
- return new getUserProjects_args();
+ public getProject_args getEmptyArgsInstance() {
+ return new getProject_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.workspace.Project> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>>() {
- public void onComplete(List<org.apache.airavata.model.workspace.Project> o) {
- getUserProjects_result result = new getUserProjects_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.workspace.Project>() {
+ public void onComplete(org.apache.airavata.model.workspace.Project o) {
+ getProject_result result = new getProject_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22533,7 +22564,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getUserProjects_result result = new getUserProjects_result();
+ getProject_result result = new getProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22549,6 +22580,11 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
+ else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(true);
+ msg = result;
+ }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -22574,26 +22610,27 @@ public class Airavata {
return false;
}
- public void start(I iface, getUserProjects_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> resultHandler) throws TException {
- iface.getUserProjects(args.authzToken, args.gatewayId, args.userName, args.limit, args.offset,resultHandler);
+ public void start(I iface, getProject_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Project> resultHandler) throws TException {
+ iface.getProject(args.authzToken, args.projectId,resultHandler);
}
}
- public static class searchProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchProjects_args, List<org.apache.airavata.model.workspace.Project>> {
- public searchProjects() {
- super("searchProjects");
+ public static class deleteProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteProject_args, Boolean> {
+ public deleteProject() {
+ super("deleteProject");
}
- public searchProjects_args getEmptyArgsInstance() {
- return new searchProjects_args();
+ public deleteProject_args getEmptyArgsInstance() {
+ return new deleteProject_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>>() {
- public void onComplete(List<org.apache.airavata.model.workspace.Project> o) {
- searchProjects_result result = new searchProjects_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteProject_result result = new deleteProject_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -22605,7 +22642,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- searchProjects_result result = new searchProjects_result();
+ deleteProject_result result = new deleteProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22621,6 +22658,11 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
+ else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(true);
+ msg = result;
+ }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -22646,25 +22688,25 @@ public class Airavata {
return false;
}
- public void start(I iface, searchProjects_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> resultHandler) throws TException {
- iface.searchProjects(args.authzToken, args.gatewayId, args.userName, args.filters, args.limit, args.offset,resultHandler);
+ public void start(I iface, deleteProject_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteProject(args.authzToken, args.projectId,resultHandler);
}
}
- public static class searchExperiments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchExperiments_args, List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> {
- public searchExperiments() {
- super("searchExperiments");
+ public static class getUserProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserProjects_args, List<org.apache.airavata.model.workspace.Project>> {
+ public getUserProjects() {
+ super("getUserProjects");
}
- public searchExperiments_args getEmptyArgsInstance() {
- return new searchExperiments_args();
+ public getUserProjects_args getEmptyArgsInstance() {
+ return new getUserProjects_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>>() {
- public void onComplete(List<org.apache.airavata.model.experiment.ExperimentSummaryModel> o) {
- searchExperiments_result result = new searchExperiments_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>>() {
+ public void onComplete(List<org.apache.airavata.model.workspace.Project> o) {
+ getUserProjects_result result = new getUserProjects_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22677,7 +22719,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- searchExperiments_result result = new searchExperiments_result();
+ getUserProjects_result result = new getUserProjects_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22718,25 +22760,25 @@ public class Airavata {
return false;
}
- public void start(I iface, searchExperiments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> resultHandler) throws TException {
- iface.searchExperiments(args.authzToken, args.gatewayId, args.userName, args.filters, args.limit, args.offset,resultHandler);
+ public void start(I iface, getUserProjects_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> resultHandler) throws TException {
+ iface.getUserProjects(args.authzToken, args.gatewayId, args.userName, args.limit, args.offset,resultHandler);
}
}
- public static class getExperimentStatistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentStatistics_args, org.apache.airavata.model.experiment.ExperimentStatistics> {
- public getExperimentStatistics() {
- super("getExperimentStatistics");
+ public static class searchProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchProjects_args, List<org.apache.airavata.model.workspace.Project>> {
+ public searchProjects() {
+ super("searchProjects");
}
- public getExperimentStatistics_args getEmptyArgsInstance() {
- return new getExperimentStatistics_args();
+ public searchProjects_args getEmptyArgsInstance() {
+ return new searchProjects_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics>() {
- public void onComplete(org.apache.airavata.model.experiment.ExperimentStatistics o) {
- getExperimentStatistics_result result = new getExperimentStatistics_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>>() {
+ public void onComplete(List<org.apache.airavata.model.workspace.Project> o) {
+ searchProjects_result result = new searchProjects_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22749,7 +22791,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getExperimentStatistics_result result = new getExperimentStatistics_result();
+ searchProjects_result result = new searchProjects_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22790,25 +22832,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getExperimentStatistics_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> resultHandler) throws TException {
- iface.getExperimentStatistics(args.authzToken, args.gatewayId, args.fromTime, args.toTime,resultHandler);
+ public void start(I iface, searchProjects_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Project>> resultHandler) throws TException {
+ iface.searchProjects(args.authzToken, args.gatewayId, args.userName, args.filters, args.limit, args.offset,resultHandler);
}
}
- public static class getExperimentsInProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentsInProject_args, List<org.apache.airavata.model.experiment.ExperimentModel>> {
- public getExperimentsInProject() {
- super("getExperimentsInProject");
+ public static class searchExperiments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchExperiments_args, List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> {
+ public searchExperiments() {
+ super("searchExperiments");
}
- public getExperimentsInProject_args getEmptyArgsInstance() {
- return new getExperimentsInProject_args();
+ public searchExperiments_args getEmptyArgsInstance() {
+ return new searchExperiments_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>>() {
- public void onComplete(List<org.apache.airavata.model.experiment.ExperimentModel> o) {
- getExperimentsInProject_result result = new getExperimentsInProject_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>>() {
+ public void onComplete(List<org.apache.airavata.model.experiment.ExperimentSummaryModel> o) {
+ searchExperiments_result result = new searchExperiments_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22821,7 +22863,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getExperimentsInProject_result result = new getExperimentsInProject_result();
+ searchExperiments_result result = new searchExperiments_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22837,11 +22879,6 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
- else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
- result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
- result.setPnfeIsSet(true);
- msg = result;
- }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -22867,25 +22904,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getExperimentsInProject_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws TException {
- iface.getExperimentsInProject(args.authzToken, args.projectId, args.limit, args.offset,resultHandler);
+ public void start(I iface, searchExperiments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> resultHandler) throws TException {
+ iface.searchExperiments(args.authzToken, args.gatewayId, args.userName, args.filters, args.limit, args.offset,resultHandler);
}
}
- public static class getUserExperiments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserExperiments_args, List<org.apache.airavata.model.experiment.ExperimentModel>> {
- public getUserExperiments() {
- super("getUserExperiments");
+ public static class getExperimentStatistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentStatistics_args, org.apache.airavata.model.experiment.ExperimentStatistics> {
+ public getExperimentStatistics() {
+ super("getExperimentStatistics");
}
- public getUserExperiments_args getEmptyArgsInstance() {
- return new getUserExperiments_args();
+ public getExperimentStatistics_args getEmptyArgsInstance() {
+ return new getExperimentStatistics_args();
}
- public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>>() {
- public void onComplete(List<org.apache.airavata.model.experiment.ExperimentModel> o) {
- getUserExperiments_result result = new getUserExperiments_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics>() {
+ public void onComplete(org.apache.airavata.model.experiment.ExperimentStatistics o) {
+ getExperimentStatistics_result result = new getExperimentStatistics_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22898,7 +22935,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getUserExperiments_result result = new getUserExperiments_result();
+ getExperimentStatistics_result result = new getExperimentStatistics_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22939,25 +22976,25 @@ public class Airavata {
return false;
}
- public void start(I iface, getUserExperiments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws TException {
- iface.getUserExperiments(args.authzToken, args.gatewayId, args.userName, args.limit, args.offset,resultHandler);
+ public void start(I iface, getExperimentStatistics_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> resultHandler) throws TException {
+ iface.getExperimentStatistics(args.authzToken, args.gatewayId, args.fromTime, args.toTime,resultHandler);
}
}
- public static class createExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createExperiment_args, String> {
- public createExperiment() {
- super("createExperiment");
+ public static class getExperimentsInProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentsInProject_args, List<org.apache.airavata.model.experiment.ExperimentModel>> {
+ public getExperimentsInProject() {
+ super("getExperimentsInProject");
}
- public createExperiment_args getEmptyArgsInstance() {
- return new createExperiment_args();
+ public getExperimentsInProject_args getEmptyArgsInstance() {
+ return new getExperimentsInProject_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- createExperiment_result result = new createExperiment_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>>() {
+ public void onComplete(List<org.apache.airavata.model.experiment.ExperimentModel> o) {
+ getExperimentsInProject_result result = new getExperimentsInProject_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -22970,7 +23007,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- createExperiment_result result = new createExperiment_result();
+ getExperimentsInProject_result result = new getExperimentsInProject_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -22986,6 +23023,11 @@ public class Airavata {
result.setAseIsSet(true);
msg = result;
}
+ else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(true);
+ msg = result;
+ }
else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
@@ -23011,27 +23053,26 @@ public class Airavata {
return false;
}
- public void start(I iface, createExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.createExperiment(args.authzToken, args.gatewayId, args.experiment,resultHandler);
+ public void start(I iface, getExperimentsInProject_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws TException {
+ iface.getExperimentsInProject(args.authzToken, args.projectId, args.limit, args.offset,resultHandler);
}
}
- public static class deleteExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteExperiment_args, Boolean> {
- public deleteExperiment() {
- super("deleteExperiment");
+ public static class getUserExperiments<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserExperiments_args, List<org.apache.airavata.model.experiment.ExperimentModel>> {
+ public getUserExperiments() {
+ super("getUserExperiments");
}
- public deleteExperiment_args getEmptyArgsInstance() {
- return new deleteExperiment_args();
+ public getUserExperiments_args getEmptyArgsInstance() {
+ return new getUserExperiments_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteExperiment_result result = new deleteExperiment_result();
+ return new AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>>() {
+ public void onComplete(List<org.apache.airavata.model.experiment.ExperimentModel> o) {
+ getUserExperiments_result result = new getUserExperiments_result();
result.success = o;
- result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23043,7 +23084,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- deleteExperiment_result result = new deleteExperiment_result();
+ getUserExperiments_result result = new getUserExperiments_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -23084,25 +23125,25 @@ public class Airavata {
return false;
}
- public void start(I iface, deleteExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteExperiment(args.authzToken, args.experimentId,resultHandler);
+ public void start(I iface, getUserExperiments_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws TException {
+ iface.getUserExperiments(args.authzToken, args.gatewayId, args.userName, args.limit, args.offset,resultHandler);
}
}
- public static class getExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperiment_args, org.apache.airavata.model.experiment.ExperimentModel> {
- public getExperiment() {
- super("getExperiment");
+ public static class createExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createExperiment_args, String> {
+ public createExperiment() {
+ super("createExperiment");
}
- public getExperiment_args getEmptyArgsInstance() {
- return new getExperiment_args();
+ public createExperiment_args getEmptyArgsInstance() {
+ return new createExperiment_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
- public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
- getExperiment_result result = new getExperiment_result();
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ createExperiment_result result = new createExperiment_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -23115,17 +23156,12 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getExperiment_result result = new getExperiment_result();
+ createExperiment_result result = new createExperiment_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.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(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);
@@ -23161,26 +23197,27 @@ public class Airavata {
return false;
}
- public void start(I iface, getExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
- iface.getExperiment(args.authzToken, args.airavataExperimentId,resultHandler);
+ public void start(I iface, createExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.createExperiment(args.authzToken, args.gatewayId, args.experiment,resultHandler);
}
}
- public static class getDetailedExperimentTree<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getDetailedExperimentTree_args, org.apache.airavata.model.experiment.ExperimentModel> {
- public getDetailedExperimentTree() {
- super("getDetailedExperimentTree");
+ public static class deleteExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteExperiment_args, Boolean> {
+ public deleteExperiment() {
+ super("deleteExperiment");
}
- public getDetailedExperimentTree_args getEmptyArgsInstance() {
- return new getDetailedExperimentTree_args();
+ public deleteExperiment_args getEmptyArgsInstance() {
+ return new deleteExperiment_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
- public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
- getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteExperiment_result result = new deleteExperiment_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23192,17 +23229,12 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ deleteExperiment_result result = new deleteExperiment_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.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(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);
@@ -23238,25 +23270,26 @@ public class Airavata {
return false;
}
- public void start(I iface, getDetailedExperimentTree_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
- iface.getDetailedExperimentTree(args.authzToken, args.airavataExperimentId,resultHandler);
+ public void start(I iface, deleteExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteExperiment(args.authzToken, args.experimentId,resultHandler);
}
}
- public static class updateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperiment_args, Void> {
- public updateExperiment() {
- super("updateExperiment");
+ public static class getExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperiment_args, org.apache.airavata.model.experiment.ExperimentModel> {
+ public getExperiment() {
+ super("getExperiment");
}
- public updateExperiment_args getEmptyArgsInstance() {
- return new updateExperiment_args();
+ public getExperiment_args getEmptyArgsInstance() {
+ return new getExperiment_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- updateExperiment_result result = new updateExperiment_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
+ public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
+ getExperiment_result result = new getExperiment_result();
+ result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23268,7 +23301,7 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateExperiment_result result = new updateExperiment_result();
+ getExperiment_result result = new getExperiment_result();
if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
result.setIreIsSet(true);
@@ -23314,25 +23347,26 @@ public class Airavata {
return false;
}
- public void start(I iface, updateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateExperiment(args.authzToken, args.airavataExperimentId, args.experiment,resultHandler);
+ public void start(I iface, getExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
+ iface.getExperiment(args.authzToken, args.airavataExperimentId,resultHandler);
}
}
- public static class updateExperimentConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperimentConfiguration_args, Void> {
- public updateExperimentConfiguration() {
- super("updateExperimentConfiguration");
+ public static class getDetailedExperimentTree<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getDetailedExperimentTree_args, org.apache.airavata.model.experiment.ExperimentModel> {
+ public getDetailedExperimentTree() {
+ super("getDetailedExperimentTree");
}
- public updateExperimentConfiguration_args getEmptyArgsInstance() {
- return new updateExperimentConfiguration_args();
+ public getDetailedExperimentTree_args getEmptyArgsInstance() {
+ return new getDetailedExperimentTree_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
+ return new AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel>() {
+ public void onComplete(org.apache.airavata.model.experiment.ExperimentModel o) {
+ getDetailedExperimentTree_result result = new getDetailedExperimentTree_result();
+ result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23344,8 +23378,28 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
- if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ getDetailedExperimentTree_result result = new getDetailedExperimentTree_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.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -23370,25 +23424,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateExperimentConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateExperimentConfiguration(args.authzToken, args.airavataExperimentId, args.userConfiguration,resultHandler);
+ public void start(I iface, getDetailedExperimentTree_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws TException {
+ iface.getDetailedExperimentTree(args.authzToken, args.airavataExperimentId,resultHandler);
}
}
- public static class updateResourceScheduleing<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateResourceScheduleing_args, Void> {
- public updateResourceScheduleing() {
- super("updateResourceScheduleing");
+ public static class updateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperiment_args, Void> {
+ public updateExperiment() {
+ super("updateExperiment");
}
- public updateResourceScheduleing_args getEmptyArgsInstance() {
- return new updateResourceScheduleing_args();
+ public updateExperiment_args getEmptyArgsInstance() {
+ return new updateExperiment_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
- updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ updateExperiment_result result = new updateExperiment_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23400,8 +23454,28 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- updateResourceScheduleing_result result = new updateResourceScheduleing_result();
- if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ updateExperiment_result result = new updateExperiment_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.ExperimentNotFoundException) {
+ result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
+ result.setEnfIsSet(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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -23426,27 +23500,25 @@ public class Airavata {
return false;
}
- public void start(I iface, updateResourceScheduleing_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateResourceScheduleing(args.authzToken, args.airavataExperimentId, args.resourceScheduling,resultHandler);
+ public void start(I iface, updateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateExperiment(args.authzToken, args.airavataExperimentId, args.experiment,resultHandler);
}
}
- public static class validateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, validateExperiment_args, Boolean> {
- public validateExperiment() {
- super("validateExperiment");
+ public static class updateExperimentConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateExperimentConfiguration_args, Void> {
+ public updateExperimentConfiguration() {
+ super("updateExperimentConfiguration");
}
- public validateExperiment_args getEmptyArgsInstance() {
- return new validateExperiment_args();
+ public updateExperimentConfiguration_args getEmptyArgsInstance() {
+ return new updateExperimentConfiguration_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- validateExperiment_result result = new validateExperiment_result();
- result.success = o;
- result.setSuccessIsSet(true);
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23458,28 +23530,8 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- validateExperiment_result result = new validateExperiment_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.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ updateExperimentConfiguration_result result = new updateExperimentConfiguration_result();
+ if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -23504,25 +23556,25 @@ public class Airavata {
return false;
}
- public void start(I iface, validateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.validateExperiment(args.authzToken, args.airavataExperimentId,resultHandler);
+ public void start(I iface, updateExperimentConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateExperimentConfiguration(args.authzToken, args.airavataExperimentId, args.userConfiguration,resultHandler);
}
}
- public static class launchExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, launchExperiment_args, Void> {
- public launchExperiment() {
- super("launchExperiment");
+ public static class updateResourceScheduleing<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateResourceScheduleing_args, Void> {
+ public updateResourceScheduleing() {
+ super("updateResourceScheduleing");
}
- public launchExperiment_args getEmptyArgsInstance() {
- return new launchExperiment_args();
+ public updateResourceScheduleing_args getEmptyArgsInstance() {
+ return new updateResourceScheduleing_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
- launchExperiment_result result = new launchExperiment_result();
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -23534,28 +23586,8 @@ public class Airavata {
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- launchExperiment_result result = new launchExperiment_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.ExperimentNotFoundException) {
- result.enf = (org.apache.airavata.model.error.ExperimentNotFoundException) e;
- result.setEnfIsSet(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 if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+ updateResourceScheduleing_result result = new updateResourceScheduleing_result();
+ if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
result.setAeIsSet(true);
msg = result;
@@ -23580,26 +23612,27 @@ public class Airavata {
return false;
}
- public void start(I iface, launchExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.launchExperiment(args.authzToken, args.airavataExperimentId, args.gatewayId,resultHandler);
+ public void start(I iface, updateResourceScheduleing_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.updateResourceScheduleing(args.authzToken, args.airavataExperimentId, args.resourceScheduling,resultHandler);
}
}
- public static class getExperimentStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getExperimentStatus_args, org.apache.airavata.model.status.ExperimentStatus> {
- public getExperimentStatus() {
- super("getExperimentStatus");
+ public static class validateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, validateExperiment_args, Boolean> {
+ public validateExperiment() {
+ super("validateExperiment");
}
- public getExperimentStatus_args getEmptyArgsInstance() {
- return new getExperimentStatus_args();
+ public validateExperiment_args getEmptyArgsInstance() {
+ return new validateExperiment_args();
}
- public AsyncMethodCallback<org.apache.airavata.model.status.ExperimentStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.status.ExperimentStatus>() {
- public void onComplete(org.apache.airavata.model.status.ExperimentStatus o) {
- getExperimentStatus_result result = new getExperimentStatus_result();
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ validateExperiment_result result = new validateExperiment_result();
result.success = o;
+ result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.T
<TRUNCATED>
[14/30] airavata git commit: Implementing API level changes
Posted by sh...@apache.org.
Implementing API level changes
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/c31cfa60
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/c31cfa60
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/c31cfa60
Branch: refs/heads/develop
Commit: c31cfa60cd5263f80bb78ef865a44f4adb53a9f0
Parents: 6632b1a
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Oct 10 18:33:41 2016 -0400
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Wed Oct 12 11:30:42 2016 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 31 +
.../java/org/apache/airavata/api/Airavata.java | 12720 +++++++++--------
.../credentialsummary/CredentialSummary.java | 826 ++
.../store/datamodel/CertificateCredential.java | 2 +-
.../store/datamodel/CommunityUser.java | 2 +-
.../store/datamodel/PasswordCredential.java | 2 +-
.../exception/CredentialStoreException.java | 2 +-
.../airavata-apis/airavata_api.thrift | 20 +
.../component-cpis/credential-store-cpi.thrift | 7 +-
.../credential_summary.thrift | 32 +
.../resource_catalog_models.thrift | 3 +-
11 files changed, 7968 insertions(+), 5679 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/c31cfa60/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..9441119 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
@@ -33,6 +33,7 @@ import org.apache.airavata.credential.store.client.CredentialStoreClientFactory;
import org.apache.airavata.credential.store.cpi.CredentialStoreService;
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.exception.CredentialStoreException;
import org.apache.airavata.messaging.core.MessageContext;
import org.apache.airavata.messaging.core.MessagingFactory;
@@ -50,6 +51,7 @@ import org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescr
import org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile;
import org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference;
import org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference;
+import org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary;
import org.apache.airavata.model.application.io.InputDataObjectType;
import org.apache.airavata.model.application.io.OutputDataObjectType;
import org.apache.airavata.model.commons.airavata_commonsConstants;
@@ -486,6 +488,35 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
@SecurityCheck
+ public List<CredentialSummary> getAllGatewaySSHPubKeysSummary(AuthzToken authzToken, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
+ try {
+ List<CredentialSummary> allCredentialSummaries = new ArrayList<>();
+ if (csClient == null){
+ csClient = getCredentialStoreServiceClient();
+ }
+ List<SSHCredentialSummary> sshSummaryList = csClient.getAllGatewaySSHCredentialSummary(gatewayId);
+ for(SSHCredentialSummary key : sshSummaryList){
+ CredentialSummary summary = new CredentialSummary();
+ summary.setGatewayId(key.getGatewayId());
+ summary.setUsername(key.getUsername());
+ summary.setPublicKey(key.getPublicKey());
+ summary.setDescription(key.getDescription());
+ summary.setPersistedTime(key.getPersistedTime());
+ allCredentialSummaries.add(summary);
+ }
+ logger.debug("Airavata retrieved all SSH pub keys summaries for gateway Id : " + gatewayId);
+ return allCredentialSummaries;
+ }catch (Exception e){
+ logger.error("Error occurred while retrieving SSH public keys summaries for gateway : " + gatewayId , e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error occurred while retrieving SSH public keys summaries for gateway : " + gatewayId + ". More info : " + e.getMessage());
+ throw exception;
+ }
+ }
+
+ @Override
+ @SecurityCheck
public Map<String, String> getAllGatewayPWDCredentials(AuthzToken authzToken, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
if (csClient == null){
[19/30] airavata git commit: removing add and delete method for
SSHCredentialSummary, serverhandler implemented got get method
Posted by sh...@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/develop
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);
[12/30] airavata git commit: Implementing API level changes
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c31cfa60/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/credentialsummary/CredentialSummary.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/credentialsummary/CredentialSummary.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/credentialsummary/CredentialSummary.java
new file mode 100644
index 0000000..5f3fc82
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/credentialsummary/CredentialSummary.java
@@ -0,0 +1,826 @@
+/**
+ * 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.model.appcatalog.credentialsummary;
+
+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 CredentialSummary implements org.apache.thrift.TBase<CredentialSummary, CredentialSummary._Fields>, java.io.Serializable, Cloneable, Comparable<CredentialSummary> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CredentialSummary");
+
+ 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 DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new CredentialSummaryStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new CredentialSummaryTupleSchemeFactory());
+ }
+
+ private String gatewayId; // required
+ private String username; // required
+ private String publicKey; // optional
+ private long persistedTime; // optional
+ private 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"),
+ DESCRIPTION((short)5, "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: // 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.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.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(CredentialSummary.class, metaDataMap);
+ }
+
+ public CredentialSummary() {
+ }
+
+ public CredentialSummary(
+ String gatewayId,
+ String username)
+ {
+ this();
+ this.gatewayId = gatewayId;
+ this.username = username;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public CredentialSummary(CredentialSummary 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.isSetDescription()) {
+ this.description = other.description;
+ }
+ }
+
+ public CredentialSummary deepCopy() {
+ return new CredentialSummary(this);
+ }
+
+ @Override
+ public void clear() {
+ this.gatewayId = null;
+ this.username = null;
+ this.publicKey = null;
+ setPersistedTimeIsSet(false);
+ this.persistedTime = 0;
+ this.description = null;
+ }
+
+ public String getGatewayId() {
+ return this.gatewayId;
+ }
+
+ public void setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
+ }
+
+ 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 void setUsername(String username) {
+ this.username = username;
+ }
+
+ 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 void setPublicKey(String publicKey) {
+ this.publicKey = publicKey;
+ }
+
+ 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 void setPersistedTime(long persistedTime) {
+ this.persistedTime = persistedTime;
+ setPersistedTimeIsSet(true);
+ }
+
+ 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 getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ 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 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 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 DESCRIPTION:
+ return isSetDescription();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof CredentialSummary)
+ return this.equals((CredentialSummary)that);
+ return false;
+ }
+
+ public boolean equals(CredentialSummary 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_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_description = true && (isSetDescription());
+ list.add(present_description);
+ if (present_description)
+ list.add(description);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(CredentialSummary 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(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("CredentialSummary(");
+ 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 (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 (!isSetGatewayId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetUsername()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' is unset! 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 CredentialSummaryStandardSchemeFactory implements SchemeFactory {
+ public CredentialSummaryStandardScheme getScheme() {
+ return new CredentialSummaryStandardScheme();
+ }
+ }
+
+ private static class CredentialSummaryStandardScheme extends StandardScheme<CredentialSummary> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, CredentialSummary 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: // 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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, CredentialSummary 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.description != null) {
+ if (struct.isSetDescription()) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class CredentialSummaryTupleSchemeFactory implements SchemeFactory {
+ public CredentialSummaryTupleScheme getScheme() {
+ return new CredentialSummaryTupleScheme();
+ }
+ }
+
+ private static class CredentialSummaryTupleScheme extends TupleScheme<CredentialSummary> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, CredentialSummary 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.isSetDescription()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetPublicKey()) {
+ oprot.writeString(struct.publicKey);
+ }
+ if (struct.isSetPersistedTime()) {
+ oprot.writeI64(struct.persistedTime);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, CredentialSummary 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(3);
+ 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.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/c31cfa60/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 77a85d4..b41a4ad 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
@@ -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 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/c31cfa60/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 457cad6..f963726 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
@@ -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 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/c31cfa60/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 c488315..6710c96 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
@@ -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 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/c31cfa60/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 48ea94c..b55c84e 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-08-09")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-10")
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/c31cfa60/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 54bd588..9195209 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -36,6 +36,7 @@ include "../data-models/app-catalog-models/application_io_models.thrift"
include "../data-models/app-catalog-models/application_deployment_model.thrift"
include "../data-models/app-catalog-models/application_interface_model.thrift"
include "../data-models/resource-catalog-models/compute_resource_model.thrift"
+include "../data-models/resource-catalog-models/credential_summary.thrift"
include "../data-models/resource-catalog-models/storage_resource_model.thrift"
include "../data-models/resource-catalog-models/gateway_resource_profile_model.thrift"
include "../data-models/resource-catalog-models/user_resource_profile_model.thrift"
@@ -345,6 +346,25 @@ service Airavata {
2: airavata_errors.AiravataClientException ace,
3: airavata_errors.AiravataSystemException ase)
+ /**
+ *
+ * Get all Public Keys of the 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.
+ *
+ * @return publicKey
+ *
+ **/
+ list<credential_summary.CredentialSummary> getAllGatewaySSHPubKeysSummary (1: required security_model.AuthzToken authzToken,
+ 2: required string gatewayId)
+ 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)
http://git-wip-us.apache.org/repos/asf/airavata/blob/c31cfa60/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 c1b4d85..915804f 100644
--- a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
+++ b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift
@@ -41,9 +41,6 @@ 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);
@@ -66,12 +63,12 @@ service CredentialStoreService {
map<string,string> getAllSSHKeysForGateway (1: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException);
+ list<credential_store_data_models.SSHCredentialSummary> getAllGatewaySSHCredentialSummary (1: required string gatewayId) 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);
- 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/c31cfa60/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift
new file mode 100644
index 0000000..c7aaa89
--- /dev/null
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace java org.apache.airavata.model.appcatalog.credentialsummary
+namespace php Airavata.Model.AppCatalog.CredetialSummary
+namespace cpp apache.airavata.model.appcatalog.credentialsummary
+namespace py apache.airavata.model.appcatalog.credentialsummary
+
+struct CredentialSummary {
+ 1: required string gatewayId,
+ 2: required string username,
+ 3: optional string publicKey,
+ 4: optional i64 persistedTime,
+ 5: optional string description
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/c31cfa60/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift
index da4a340..3b144eb 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift
@@ -21,4 +21,5 @@
include "compute_resource_model.thrift"
include "storage_resource_model.thrift"
include "gateway_resource_profile_model.thrift"
-include "user_resource_profile_model.thrift"
\ No newline at end of file
+include "user_resource_profile_model.thrift"
+include "credential_summary.thrift"
\ No newline at end of file