usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [37/50] [abbrv] git commit: add comments for all devices query
Date Mon, 20 Oct 2014 13:47:05 GMT
add comments for all devices query


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

Branch: refs/heads/two-dot-o-events
Commit: 955b5870adda07a5af76712323bff2d1e8a49dde
Parents: 09faf5b
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Fri Oct 17 17:03:39 2014 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Fri Oct 17 17:03:39 2014 -0600

----------------------------------------------------------------------
 .../usergrid/services/notifications/NotificationsService.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/955b5870/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
b/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
index d63ef7d..f98ebfc 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/NotificationsService.java
@@ -176,7 +176,11 @@ public class NotificationsService extends AbstractCollectionService {
             org.apache.usergrid.persistence.index.query.Query query = sp.getQuery();
             if (query == null) {
                 query = new Query();
-                query.addIdentifier(sp.getIdentifier());
+                if(!sp.isName() ||
+                        (collection == "devices" && sp.isName() && !sp.getName().equals("notifications")))
{
+                        //look for queries to /devices;ql=/notifications
+                    query.addIdentifier(sp.getIdentifier());
+                }
             }
             query.setLimit(PAGE);
             query.setCollection(collection);


Mime
View raw message