You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/10/16 22:25:59 UTC
[17/51] [abbrv] airavata git commit: adding search criteria as a new
struct
http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/thrift_models/sharing_cpi.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_cpi.thrift b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
index 3b26a27..02a7768 100644
--- a/modules/sharing-registry/thrift_models/sharing_cpi.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_cpi.thrift
@@ -73,8 +73,7 @@ service GovRegistryService {
bool updateEntity(1: required sharing_models.Entity entity) throws (1: sharing_models.SharingRegistryException gre)
bool deleteEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException gre)
sharing_models.Entity getEntity(1: required string entityId) throws (1: sharing_models.SharingRegistryException gre)
- list<sharing_models.Entity> searchEntities(1: required string userId, 2: required string entityTypeId, 3: required map<sharing_models.EntitySearchFields,
- string> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.SharingRegistryException gre)
+ list<sharing_models.Entity> searchEntities(1: required string userId, 2: required string entityTypeId, 3: required list<sharing_models.SearchCriteria> filters, 4: required i32 offset, 5: required i32 limit) throws (1: sharing_models.SharingRegistryException gre)
list<sharing_models.User> getListOfSharedUsers(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
list<sharing_models.UserGroup> getListOfSharedGroups(1: required string entityId, 2: required string permissionTypeId) throws (1: sharing_models.SharingRegistryException gre)
http://git-wip-us.apache.org/repos/asf/airavata/blob/bff76559/modules/sharing-registry/thrift_models/sharing_models.thrift
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/thrift_models/sharing_models.thrift b/modules/sharing-registry/thrift_models/sharing_models.thrift
index 8e78143..79bb564 100644
--- a/modules/sharing-registry/thrift_models/sharing_models.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_models.thrift
@@ -78,12 +78,27 @@ struct EntityType {
6: optional i64 updatedTime
}
-enum EntitySearchFields {
+enum EntitySearchField {
NAME,
DESCRIPTION,
- FULL_TEXT
+ FULL_TEXT,
+ PRRENT_ENTITY_ID,
+ CREATED_TIME,
+ UPDATED_TIME
}
+enum SearchCondition {
+ EQUAL,
+ LIKE,
+ GTE,
+ LTE
+}
+
+struct SearchCriteria {
+ 1: optional EntitySearchField searchField,
+ 2: optional string value,
+ 3: optional SearchCondition searchCondition
+}
struct Entity {
1: optional string entityId = DO_NOT_SET_AT_CLIENTS_ID,