usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [3/3] usergrid git commit: Added target and filter builder.
Date Thu, 01 Oct 2015 23:03:29 GMT
Added target and filter builder.


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

Branch: refs/heads/export-feature
Commit: ade6e7881af79730ad8732ef655087bd843405c9
Parents: 2c54c32
Author: George Reyes <grey@apache.org>
Authored: Thu Oct 1 16:03:24 2015 -0700
Committer: George Reyes <grey@apache.org>
Committed: Thu Oct 1 16:03:24 2015 -0700

----------------------------------------------------------------------
 .../management/export/MockS3ExportFilterIT.java | 30 +++++++++++++++-----
 1 file changed, 23 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/ade6e788/stack/services/src/test/java/org/apache/usergrid/management/export/MockS3ExportFilterIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/export/MockS3ExportFilterIT.java
b/stack/services/src/test/java/org/apache/usergrid/management/export/MockS3ExportFilterIT.java
index e46bf32..3fe537d 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/export/MockS3ExportFilterIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/export/MockS3ExportFilterIT.java
@@ -221,7 +221,7 @@ public class MockS3ExportFilterIT extends AbstractServiceIT {
         return payload;
     }
 
-    public HashMap<String, Object> targetBuilder() {
+    public Map<String, Object> targetBuilder() {
         HashMap<String, Object> payload = new HashMap<String, Object>();
         Map<String, Object> target = new HashMap<String, Object>();
         Map<String, Object> storage_info = new HashMap<String, Object>();
@@ -237,30 +237,46 @@ public class MockS3ExportFilterIT extends AbstractServiceIT {
     }
 
 
-    public HashMap<String, Object> filterBuilder(Query query,Set<String> applicationNames,Set<String>
collectionNames,
+    public Map filterBuilder(Query query,Set<String> applicationNames,Set<String>
collectionNames,
                                                 Set<String> connectionNames){
         Map<String, Object> filters = new HashMap<>();
         if(query != null)
             filters.put( "ql", query.toString());
 
         if(applicationNames != null) {
+            ArrayList<String> appNameList = new ArrayList<>(  );
             for ( String appName : applicationNames ) {
-                filters.put( "apps", < put array of garbage here>)
+                appNameList.add( appName );
             }
+            filters.put( "apps", appNameList);
         }
         if(collectionNames != null) {
+            ArrayList<String> collectionNamesList = new ArrayList<>(  );
             for ( String colName : collectionNames ) {
-                filters.put( "collections", < put array of garbage here>)
+                collectionNamesList.add( colName );
             }
+            filters.put( "collections",collectionNamesList);
         }
         if(connectionNames != null) {
-            for ( String  connectionNames  : connectionNames ) {
-                filters.put( "connections", < put array of garbage here>)
+            ArrayList<String> connectionNamesList = new ArrayList<>(  );
+            for ( String  connectName  : connectionNames ) {
+                connectionNamesList.add( connectName );
             }
+            filters.put( "connections", connectionNamesList);
+
         }
 
-        return 
+        return filters;
+
+    }
+
+    public Map payloadBuilder(Query query,Set<String> applicationNames,Set<String>
collectionNames,
+                              Set<String> connectionNames){
+        Map target = targetBuilder();
+        Map filter = filterBuilder(query,applicationNames,collectionNames,connectionNames);
+
 
+        
 
     }
 


Mime
View raw message