You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2017/04/20 18:30:23 UTC
airavata git commit: adding searchByName data products in registry
catalog
Repository: airavata
Updated Branches:
refs/heads/develop 2afa065f9 -> 803d5ea89
adding searchByName data products in registry catalog
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/803d5ea8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/803d5ea8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/803d5ea8
Branch: refs/heads/develop
Commit: 803d5ea891c4871281f592192684990e6a264778
Parents: 2afa065
Author: scnakandala <su...@gmail.com>
Authored: Thu Apr 20 14:21:45 2017 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Apr 20 14:21:45 2017 -0400
----------------------------------------------------------------------
.../apache/airavata/gfac/cpi/GfacService.java | 2 +-
.../orchestrator/cpi/OrchestratorService.java | 3 +-
.../service/handler/RegistryServerHandler.java | 17 +-
.../airavata/registry/api/RegistryService.java | 1948 +++++++++++++++---
.../component-cpis/registry-api.thrift | 4 +
5 files changed, 1721 insertions(+), 253 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/803d5ea8/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
index 534bc79..3494253 100644
--- a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.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-12-19")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class GfacService {
public interface Iface {
http://git-wip-us.apache.org/repos/asf/airavata/blob/803d5ea8/modules/orchestrator/orchestrator-client/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-client/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java b/modules/orchestrator/orchestrator-client/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java
index 5fc74e2..88cec37 100644
--- a/modules/orchestrator/orchestrator-client/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java
+++ b/modules/orchestrator/orchestrator-client/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java
@@ -33,7 +33,6 @@ 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;
@@ -51,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-12-19")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class OrchestratorService {
public interface Iface {
http://git-wip-us.apache.org/repos/asf/airavata/blob/803d5ea8/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
index 68e5123..6a27574 100644
--- a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
+++ b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
@@ -20,7 +20,6 @@
*/
package org.apache.airavata.registry.api.service.handler;
-import com.sun.org.apache.bcel.internal.generic.DUP;
import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.utils.AiravataUtils;
import org.apache.airavata.common.utils.ServerSettings;
@@ -1961,6 +1960,22 @@ public class RegistryServerHandler implements RegistryService.Iface {
}
@Override
+ public List<DataProductModel> searchDataProductsByName(String gatewayId, String userId, String productName, int limit, int offset) throws RegistryServiceException, TException {
+ try {
+ dataCatalog = RegistryFactory.getReplicaCatalog();
+ List<DataProductModel> dataProductModels = dataCatalog.searchDataProductsByName(gatewayId, userId, productName, limit, offset);
+ return dataProductModels;
+ } catch (RegistryException e) {
+ String msg = "Error in searching the data products for name " + productName + ".";
+ logger.error(msg, e);
+ RegistryServiceException exception = new RegistryServiceException();
+ exception.setMessage(msg + " More info : " + e.getMessage());
+ throw exception;
+ }
+ }
+
+
+ @Override
public String registerReplicaLocation(DataReplicaLocationModel replicaLocationModel) throws RegistryServiceException, TException {
try {
dataCatalog = RegistryFactory.getReplicaCatalog();
http://git-wip-us.apache.org/repos/asf/airavata/blob/803d5ea8/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java b/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
index fd4db42..7203b76 100644
--- a/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
+++ b/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
@@ -2440,6 +2440,8 @@ public class RegistryService {
public List<org.apache.airavata.model.data.replica.DataProductModel> getChildDataProducts(String productUri) throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException;
+ public List<org.apache.airavata.model.data.replica.DataProductModel> searchDataProductsByName(String gatewayId, String userId, String productName, int limit, int offset) throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException;
+
}
public interface AsyncIface {
@@ -2738,6 +2740,8 @@ public class RegistryService {
public void getChildDataProducts(String productUri, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void searchDataProductsByName(String gatewayId, String userId, String productName, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -6715,6 +6719,33 @@ public class RegistryService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getChildDataProducts failed: unknown result");
}
+ public List<org.apache.airavata.model.data.replica.DataProductModel> searchDataProductsByName(String gatewayId, String userId, String productName, int limit, int offset) throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException {
+ send_searchDataProductsByName(gatewayId, userId, productName, limit, offset);
+ return recv_searchDataProductsByName();
+ }
+
+ public void send_searchDataProductsByName(String gatewayId, String userId, String productName, int limit, int offset) throws org.apache.thrift.TException {
+ searchDataProductsByName_args args = new searchDataProductsByName_args();
+ args.setGatewayId(gatewayId);
+ args.setUserId(userId);
+ args.setProductName(productName);
+ args.setLimit(limit);
+ args.setOffset(offset);
+ sendBase("searchDataProductsByName", args);
+ }
+
+ public List<org.apache.airavata.model.data.replica.DataProductModel> recv_searchDataProductsByName() throws org.apache.airavata.registry.api.exception.RegistryServiceException, org.apache.thrift.TException {
+ searchDataProductsByName_result result = new searchDataProductsByName_result();
+ receiveBase(result, "searchDataProductsByName");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.rse != null) {
+ throw result.rse;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchDataProductsByName failed: unknown result");
+ }
+
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -11773,6 +11804,51 @@ public class RegistryService {
}
}
+ public void searchDataProductsByName(String gatewayId, String userId, String productName, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ searchDataProductsByName_call method_call = new searchDataProductsByName_call(gatewayId, userId, productName, limit, offset, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class searchDataProductsByName_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String gatewayId;
+ private String userId;
+ private String productName;
+ private int limit;
+ private int offset;
+
+ public searchDataProductsByName_call(String gatewayId, String userId, String productName, int limit, int offset, 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;
+ this.productName = productName;
+ this.limit = limit;
+ this.offset = offset;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("searchDataProductsByName", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ searchDataProductsByName_args args = new searchDataProductsByName_args();
+ args.setGatewayId(gatewayId);
+ args.setUserId(userId);
+ args.setProductName(productName);
+ args.setLimit(limit);
+ args.setOffset(offset);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<org.apache.airavata.model.data.replica.DataProductModel> getResult() throws org.apache.airavata.registry.api.exception.RegistryServiceException, 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_searchDataProductsByName();
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -11933,6 +12009,7 @@ public class RegistryService {
processMap.put("registerReplicaLocation", new registerReplicaLocation());
processMap.put("getParentDataProduct", new getParentDataProduct());
processMap.put("getChildDataProducts", new getChildDataProducts());
+ processMap.put("searchDataProductsByName", new searchDataProductsByName());
return processMap;
}
@@ -15544,6 +15621,30 @@ public class RegistryService {
}
}
+ public static class searchDataProductsByName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, searchDataProductsByName_args> {
+ public searchDataProductsByName() {
+ super("searchDataProductsByName");
+ }
+
+ public searchDataProductsByName_args getEmptyArgsInstance() {
+ return new searchDataProductsByName_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public searchDataProductsByName_result getResult(I iface, searchDataProductsByName_args args) throws org.apache.thrift.TException {
+ searchDataProductsByName_result result = new searchDataProductsByName_result();
+ try {
+ result.success = iface.searchDataProductsByName(args.gatewayId, args.userId, args.productName, args.limit, args.offset);
+ } catch (org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
+ result.rse = rse;
+ }
+ return result;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -15704,6 +15805,7 @@ public class RegistryService {
processMap.put("registerReplicaLocation", new registerReplicaLocation());
processMap.put("getParentDataProduct", new getParentDataProduct());
processMap.put("getChildDataProducts", new getChildDataProducts());
+ processMap.put("searchDataProductsByName", new searchDataProductsByName());
return processMap;
}
@@ -24201,275 +24303,78 @@ public class RegistryService {
}
}
- }
-
- public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAPIVersion_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAPIVersion_argsTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- 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) {
- 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 static class searchDataProductsByName<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, searchDataProductsByName_args, List<org.apache.airavata.model.data.replica.DataProductModel>> {
+ public searchDataProductsByName() {
+ super("searchDataProductsByName");
}
- public short getThriftFieldId() {
- return _thriftId;
+ public searchDataProductsByName_args getEmptyArgsInstance() {
+ return new searchDataProductsByName_args();
}
- public String getFieldName() {
- return _fieldName;
- }
- }
- 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
- }
-
- public getAPIVersion_args() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAPIVersion_args(getAPIVersion_args other) {
- }
-
- public getAPIVersion_args deepCopy() {
- return new getAPIVersion_args(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- 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) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAPIVersion_args)
- return this.equals((getAPIVersion_args)that);
- return false;
- }
-
- public boolean equals(getAPIVersion_args that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(getAPIVersion_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- 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("getAPIVersion_args(");
- boolean first = true;
-
- 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 getAPIVersion_argsStandardSchemeFactory implements SchemeFactory {
- public getAPIVersion_argsStandardScheme getScheme() {
- return new getAPIVersion_argsStandardScheme();
- }
- }
-
- private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_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) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ public AsyncMethodCallback<List<org.apache.airavata.model.data.replica.DataProductModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<org.apache.airavata.model.data.replica.DataProductModel>>() {
+ public void onComplete(List<org.apache.airavata.model.data.replica.DataProductModel> o) {
+ searchDataProductsByName_result result = new searchDataProductsByName_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();
}
- 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, getAPIVersion_args struct) throws org.apache.thrift.TException {
- struct.validate();
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory {
- public getAPIVersion_argsTupleScheme getScheme() {
- return new getAPIVersion_argsTupleScheme();
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ searchDataProductsByName_result result = new searchDataProductsByName_result();
+ if (e instanceof org.apache.airavata.registry.api.exception.RegistryServiceException) {
+ result.rse = (org.apache.airavata.registry.api.exception.RegistryServiceException) e;
+ result.setRseIsSet(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();
+ }
+ };
}
- }
- private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ protected boolean isOneway() {
+ return false;
}
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ public void start(I iface, searchDataProductsByName_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.data.replica.DataProductModel>> resultHandler) throws TException {
+ iface.searchDataProductsByName(args.gatewayId, args.userId, args.productName, args.limit, args.offset, resultHandler);
}
}
}
- public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+ public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
- 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 RSE_FIELD_DESC = new org.apache.thrift.protocol.TField("rse", 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 getAPIVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new getAPIVersion_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getAPIVersion_argsTupleSchemeFactory());
}
- public String success; // required
- public org.apache.airavata.registry.api.exception.RegistryServiceException rse; // 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"),
- RSE((short)1, "rse");
+;
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -24484,10 +24389,263 @@ public class RegistryService {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // RSE
- return RSE;
+ 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;
+ }
+ }
+ 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);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ }
+
+ public getAPIVersion_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_args(getAPIVersion_args other) {
+ }
+
+ public getAPIVersion_args deepCopy() {
+ return new getAPIVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ 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) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_args)
+ return this.equals((getAPIVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ 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("getAPIVersion_args(");
+ boolean first = true;
+
+ 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 getAPIVersion_argsStandardSchemeFactory implements SchemeFactory {
+ public getAPIVersion_argsStandardScheme getScheme() {
+ return new getAPIVersion_argsStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_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) {
+ 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, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory {
+ public getAPIVersion_argsTupleScheme getScheme() {
+ return new getAPIVersion_argsTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_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 RSE_FIELD_DESC = new org.apache.thrift.protocol.TField("rse", 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 getAPIVersion_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory());
+ }
+
+ public String success; // required
+ public org.apache.airavata.registry.api.exception.RegistryServiceException rse; // 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"),
+ RSE((short)1, "rse");
+
+ 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: // RSE
+ return RSE;
default:
return null;
}
@@ -159613,4 +159771,1296 @@ public class RegistryService {
}
+ public static class searchDataProductsByName_args implements org.apache.thrift.TBase<searchDataProductsByName_args, searchDataProductsByName_args._Fields>, java.io.Serializable, Cloneable, Comparable<searchDataProductsByName_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("searchDataProductsByName_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 org.apache.thrift.protocol.TField PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("productName", org.apache.thrift.protocol.TType.STRING, (short) 3);
+ private static final org.apache.thrift.protocol.TField LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("limit", org.apache.thrift.protocol.TType.I32, (short) 4);
+ private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I32, (short) 5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+
+ static {
+ schemes.put(StandardScheme.class, new searchDataProductsByName_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new searchDataProductsByName_argsTupleSchemeFactory());
+ }
+
+ public String gatewayId; // required
+ public String userId; // required
+ public String productName; // required
+ public int limit; // required
+ public int offset; // 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"),
+ PRODUCT_NAME((short) 3, "productName"),
+ LIMIT((short) 4, "limit"),
+ OFFSET((short) 5, "offset");
+
+ 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;
+ case 3: // PRODUCT_NAME
+ return PRODUCT_NAME;
+ case 4: // LIMIT
+ return LIMIT;
+ case 5: // OFFSET
+ return OFFSET;
+ 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 __LIMIT_ISSET_ID = 0;
+ private static final int __OFFSET_ISSET_ID = 1;
+ 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.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)));
+ tmpMap.put(_Fields.PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("productName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.LIMIT, new org.apache.thrift.meta_data.FieldMetaData("limit", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(searchDataProductsByName_args.class, metaDataMap);
+ }
+
+ public searchDataProductsByName_args() {
+ }
+
+ public searchDataProductsByName_args(
+ String gatewayId,
+ String userId,
+ String productName,
+ int limit,
+ int offset) {
+ this();
+ this.gatewayId = gatewayId;
+ this.userId = userId;
+ this.productName = productName;
+ this.limit = limit;
+ setLimitIsSet(true);
+ this.offset = offset;
+ setOffsetIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public searchDataProductsByName_args(searchDataProductsByName_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetGatewayId()) {
+ this.gatewayId = other.gatewayId;
+ }
+ if (other.isSetUserId()) {
+ this.userId = other.userId;
+ }
+ if (other.isSetProductName()) {
+ this.productName = other.productName;
+ }
+ this.limit = other.limit;
+ this.offset = other.offset;
+ }
+
+ public searchDataProductsByName_args deepCopy() {
+ return new searchDataProductsByName_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.gatewayId = null;
+ this.userId = null;
+ this.productName = null;
+ setLimitIsSet(false);
+ this.limit = 0;
+ setOffsetIsSet(false);
+ this.offset = 0;
+ }
+
+ public String getGatewayId() {
+ return this.gatewayId;
+ }
+
+ public searchDataProductsByName_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 searchDataProductsByName_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 String getProductName() {
+ return this.productName;
+ }
+
+ public searchDataProductsByName_args setProductName(String productName) {
+ this.productName = productName;
+ return this;
+ }
+
+ public void unsetProductName() {
+ this.productName = null;
+ }
+
+ /**
+ * Returns true if field productName is set (has been assigned a value) and false otherwise
+ */
+ public boolean isSetProductName() {
+ return this.productName != null;
+ }
+
+ public void setProductNameIsSet(boolean value) {
+ if (!value) {
+ this.productName = null;
+ }
+ }
+
+ public int getLimit() {
+ return this.limit;
+ }
+
+ public searchDataProductsByName_args setLimit(int limit) {
+ this.limit = limit;
+ setLimitIsSet(true);
+ return this;
+ }
+
+ public void unsetLimit() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMIT_ISSET_ID);
+ }
+
+ /**
+ * Returns true if field limit is set (has been assigned a value) and false otherwise
+ */
+ public boolean isSetLimit() {
+ return EncodingUtils.testBit(__isset_bitfield, __LIMIT_ISSET_ID);
+ }
+
+ public void setLimitIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMIT_ISSET_ID, value);
+ }
+
+ public int getOffset() {
+ return this.offset;
+ }
+
+ public searchDataProductsByName_args setOffset(int offset) {
+ this.offset = offset;
+ setOffsetIsSet(true);
+ return this;
+ }
+
+ public void unsetOffset() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OFFSET_ISSET_ID);
+ }
+
+ /**
+ * Returns true if field offset is set (has been assigned a value) and false otherwise
+ */
+ public boolean isSetOffset() {
+ return EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID);
+ }
+
+ public void setOffsetIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value);
+ }
+
+ 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;
+
+ case PRODUCT_NAME:
+ if (value == null) {
+ unsetProductName();
+ } else {
+ setProductName((String) value);
+ }
+ break;
+
+ case LIMIT:
+ if (value == null) {
+ unsetLimit();
+ } else {
+ setLimit((Integer) value);
+ }
+ break;
+
+ case OFFSET:
+ if (value == null) {
+ unsetOffset();
+ } else {
+ setOffset((Integer) value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case GATEWAY_ID:
+ return getGatewayId();
+
+ case USER_ID:
+ return getUserId();
+
+ case PRODUCT_NAME:
+ return getProductName();
+
+ case LIMIT:
+ return getLimit();
+
+ case OFFSET:
+ return getOffset();
+
+ }
+ 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();
+ case PRODUCT_NAME:
+ return isSetProductName();
+ case LIMIT:
+ return isSetLimit();
+ case OFFSET:
+ return isSetOffset();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof searchDataProductsByName_args)
+ return this.equals((searchDataProductsByName_args) that);
+ return false;
+ }
+
+ public boolean equals(searchDataProductsByName_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;
+ }
+
+ boolean this_present_productName = true && this.isSetProductName();
+ boolean that_present_productName = true && that.isSetProductName();
+ if (this_present_productName || that_present_productName) {
+ if (!(this_present_productName && that_present_productName))
+ return false;
+ if (!this.productName.equals(that.productName))
+ return false;
+ }
+
+ boolean this_present_limit = true;
+ boolean that_present_limit = true;
+ if (this_present_limit || that_present_limit) {
+ if (!(this_present_limit && that_present_limit))
+ return false;
+ if (this.limit != that.limit)
+ return false;
+ }
+
+ boolean this_present_offset = true;
+ boolean that_present_offset = true;
+ if (this_present_offset || that_present_offset) {
+ if (!(this_present_offset && that_present_offset))
+ return false;
+ if (this.offset != that.offset)
+ 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);
+
+ boolean present_productName = true && (isSetProductName());
+ list.add(present_productName);
+ if (present_productName)
+ list.add(productName);
+
+ boolean present_limit = true;
+ list.add(present_limit);
+ if (present_limit)
+ list.add(limit);
+
+ boolean present_offset = true;
+ list.add(present_offset);
+ if (present_offset)
+ list.add(offset);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(searchDataProductsByName_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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetProductName()).compareTo(other.isSetProductName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetProductName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productName, other.productName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLimit()).compareTo(other.isSetLimit());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLimit()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limit, other.limit);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOffset()).compareTo(other.isSetOffset());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOffset()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset);
+ 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("searchDataProductsByName_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;
+ if (!first) sb.append(", ");
+ sb.append("productName:");
+ if (this.productName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.productName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("limit:");
+ sb.append(this.limit);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("offset:");
+ sb.append(this.offset);
+ 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());
+ }
+ if (productName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'productName' was not present! Struct: " + toString());
+ }
+ // alas, we cannot check 'limit' because it's a primitive and you chose the non-beans generator.
+ // alas, we cannot check 'offset' because it's a primitive and you chose the non-beans generator.
+ // 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 searchDataProductsByName_argsStandardSchemeFactory implements SchemeFactory {
+ public searchDataProductsByName_argsStandardScheme getScheme() {
+ return new searchDataProductsByName_argsStandardScheme();
+ }
+ }
+
+ private static class searchDataProductsByName_argsStandardScheme extends StandardScheme<searchDataProductsByName_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, searchDataProductsByName_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;
+ case 3: // PRODUCT_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.productName = iprot.readString();
+ struct.setProductNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // LIMIT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.limit = iprot.readI32();
+ struct.setLimitIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // OFFSET
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.offset = iprot.readI32();
+ struct.setOffsetIsSet(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
+ if (!struct.isSetLimit()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'limit' was not found in serialized data! Struct: " + toString());
+ }
+ if (!struct.isSetOffset()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'offset' was not found in serialized data! Struct: " + toString());
+ }
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, searchDataProductsByName_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();
+ }
+ if (struct.productName != null) {
+ oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
+ oprot.writeString(struct.productName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(LIMIT_FIELD_DESC);
+ oprot.writeI32(struct.limit);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(OFFSET_FIELD_DESC);
+ oprot.writeI32(struct.offset);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class searchDataProductsByName_argsTupleSchemeFactory implements SchemeFactory {
+ public searchDataProductsByName_argsTupleScheme getScheme() {
+ return new searchDataProductsByName_argsTupleScheme();
+ }
+ }
+
+ private static class searchDataProductsByName_argsTupleScheme extends TupleScheme<searchDataProductsByName_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, searchDataProductsByName_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.userId);
+ oprot.writeString(struct.productName);
+ oprot.writeI32(struct.limit);
+ oprot.writeI32(struct.offset);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, searchDataProductsByName_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);
+ struct.productName = iprot.readString();
+ struct.setProductNameIsSet(true);
+ struct.limit = iprot.readI32();
+ struct.setLimitIsSet(true);
+ struct.offset = iprot.readI32();
+ struct.setOffsetIsSet(true);
+ }
+ }
+
+ }
+
+ public static class searchDataProductsByName_result implements org.apache.thrift.TBase<searchDataProductsByName_result, searchDataProductsByName_result._Fields>, java.io.Serializable, Cloneable, Comparable<searchDataProductsByName_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("searchDataProductsByName_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 RSE_FIELD_DESC = new org.apache.thrift.protocol.TField("rse", 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 searchDataProductsByName_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new searchDataProductsByName_resultTupleSchemeFactory());
+ }
+
+ public List<org.apache.airavata.model.data.replica.DataProductModel> success; // required
+ public org.apache.airavata.registry.api.exception.RegistryServiceException rse; // 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"),
+ RSE((short) 1, "rse");
+
+ 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: // RSE
+ return RSE;
+ 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.model.data.replica.DataProductModel.class))));
+ tmpMap.put(_Fields.RSE, new org.apache.thrift.meta_data.FieldMetaData("rse", 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(searchDataProductsByName_result.class, metaDataMap);
+ }
+
+ public searchDataProductsByName_result() {
+ }
+
+ public searchDataProductsByName_result(
+ List<org.apache.airavata.model.data.replica.DataProductModel> success,
+ org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
+ this();
+ this.success = success;
+ this.rse = rse;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public searchDataProductsByName_result(searchDataProductsByName_result other) {
+ if (other.isSetSuccess()) {
+ List<org.apache.airavata.model.data.replica.DataProductModel> __this__success = new ArrayList<org.apache.airavata.model.data.replica.DataProductModel>(other.success.size());
+ for (org.apache.airavata.model.data.replica.DataProductModel other_element : other.success) {
+ __this__success.add(new org.apache.airavata.model.data.replica.DataProductModel(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetRse()) {
+ this.rse = new org.apache.airavata.registry.api.exception.RegistryServiceException(other.rse);
+ }
+ }
+
+ public searchDataProductsByName_result deepCopy() {
+ return new searchDataProductsByName_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.rse = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<org.apache.airavata.model.data.replica.DataProductModel> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(org.apache.airavata.model.data.replica.DataProductModel elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<org.apache.airavata.model.data.replica.DataProductModel>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<org.apache.airavata.model.data.replica.DataProductModel> getSuccess() {
+ return this.success;
+ }
+
+ public searchDataProductsByName_result setSuccess(List<org.apache.airavata.model.data.replica.DataProductModel> 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.registry.api.exception.RegistryServiceException getRse() {
+ return this.rse;
+ }
+
+ public searchDataProductsByName_result setRse(org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
+ this.rse = rse;
+ return this;
+ }
+
+ public void unsetRse() {
+ this.rse = null;
+ }
+
+ /**
+ * Returns true if field rse is set (has been assigned a value) and false otherwise
+ */
+ public boolean isSetRse() {
+ return this.rse != null;
+ }
+
+ public void setRseIsSet(boolean value) {
+ if (!value) {
+ this.rse = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<org.apache.airavata.model.data.replica.DataProductModel>) value);
+ }
+ break;
+
+ case RSE:
+ if (value == null) {
+ unsetRse();
+ } else {
+ setRse((org.apache.airavata.registry.api.exception.RegistryServiceException) value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case RSE:
+ return getRse();
+
+ }
+ 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 RSE:
+ return isSetRse();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof searchDataProductsByName_result)
+ return this.equals((searchDataProductsByName_result) that);
+ return false;
+ }
+
+ public boolean equals(searchDataProductsByName_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_rse = true && this.isSetRse();
+ boolean that_present_rse = true && that.isSetRse();
+ if (this_present_rse || that_present_rse) {
+ if (!(this_present_rse && that_present_rse))
+ return false;
+ if (!this.rse.equals(that.rse))
+ 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_rse = true && (isSetRse());
+ list.add(present_rse);
+ if (present_rse)
+ list.add(rse);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(searchDataProductsByName_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(isSetRse()).compareTo(other.isSetRse());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRse()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rse, other.rse);
+ 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("searchDataProductsByName_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("rse:");
+ if (this.rse == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rse);
+ }
+ 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 searchDataProductsByName_resultStandardSchemeFactory implements SchemeFactory {
+ public searchDataProductsByName_resultStandardScheme getScheme() {
+ return new searchDataProductsByName_resultStandardScheme();
+ }
+ }
+
+ private static class searchDataProductsByName_resultStandardScheme extends StandardScheme<searchDataProductsByName_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, searchDataProductsByName_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 _list322 = iprot.readListBegin();
+ struct.success = new ArrayList<org.apache.airavata.model.data.replica.DataProductModel>(_list322.size);
+ org.apache.airavata.model.data.replica.DataProductModel _elem323;
+ for (int _i324 = 0; _i324 < _list322.size; ++_i324) {
+ _elem323 = new org.apache.airavata.model.data.replica.DataProductModel();
+ _elem323.read(iprot);
+ struct.success.add(_elem323);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // RSE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.rse = new org.apache.airavata.registry.api.exception.RegistryServiceException();
+ struct.rse.read(iprot);
+ struct.setRseIsSet(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, searchDataProductsByName_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.model.data.replica.DataProductModel _iter325 : struct.success) {
+ _iter325.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.rse != null) {
+ oprot.writeFieldBegin(RSE_FIELD_DESC);
+ struct.rse.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class searchDataProductsByName_resultTupleSchemeFactory implements SchemeFactory {
+ public searchDataProductsByName_resultTupleScheme getScheme() {
+ return new searchDataProductsByName_resultTupleScheme();
+ }
+ }
+
+ private static class searchDataProductsByName_resultTupleScheme extends TupleScheme<searchDataProductsByName_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, searchDataProductsByName_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetRse()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (org.apache.airavata.model.data.replica.DataProductModel _iter326 : struct.success) {
+ _iter326.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetRse()) {
+ struct.rse.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, searchDataProductsByName_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 _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<org.apache.airavata.model.data.replica.DataProductModel>(_list327.size);
+ org.apache.airavata.model.data.replica.DataProductModel _elem328;
+ for (int _i329 = 0; _i329 < _list327.size; ++_i329) {
+ _elem328 = new org.apache.airavata.model.data.replica.DataProductModel();
+ _elem328.read(iprot);
+ struct.success.add(_elem328);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.rse = new org.apache.airavata.registry.api.exception.RegistryServiceException();
+ struct.rse.read(iprot);
+ struct.setRseIsSet(true);
+ }
+ }
+ }
+
+ }
+
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/803d5ea8/thrift-interface-descriptions/component-cpis/registry-api.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/component-cpis/registry-api.thrift b/thrift-interface-descriptions/component-cpis/registry-api.thrift
index 3cb6874..004919a 100644
--- a/thrift-interface-descriptions/component-cpis/registry-api.thrift
+++ b/thrift-interface-descriptions/component-cpis/registry-api.thrift
@@ -2434,4 +2434,8 @@ service RegistryService {
list<replica_catalog_models.DataProductModel> getChildDataProducts(1: required string productUri)
throws (1: registry_api_errors.RegistryServiceException rse)
+ list<replica_catalog_models.DataProductModel> searchDataProductsByName(1: required string gatewayId,
+ 2: required string userId, 3: required string productName, 4: required i32 limit, 5: required i32 offset)
+ throws (1: registry_api_errors.RegistryServiceException rse)
+
}
\ No newline at end of file