@@ -132,15 +132,15 @@ public int countUserAffiliations(JID jid) throws NodeStoreException {
132132 }
133133
134134 @ Override
135- public ResultSet <NodeAffiliation > getNodeAffiliations (String nodeId )
135+ public ResultSet <NodeAffiliation > getNodeAffiliations (String nodeId , boolean isOwnerModerator )
136136 throws NodeStoreException {
137- return nodeStore .getNodeAffiliations (nodeId );
137+ return nodeStore .getNodeAffiliations (nodeId , isOwnerModerator );
138138 }
139139
140140 @ Override
141- public ResultSet <NodeAffiliation > getNodeAffiliations (String nodeId ,
141+ public ResultSet <NodeAffiliation > getNodeAffiliations (String nodeId , boolean isOwnerModerator ,
142142 String afterItemId , int maxItemsToReturn ) throws NodeStoreException {
143- return nodeStore .getNodeAffiliations (nodeId , afterItemId ,
143+ return nodeStore .getNodeAffiliations (nodeId , isOwnerModerator , afterItemId ,
144144 maxItemsToReturn );
145145 }
146146
@@ -150,8 +150,8 @@ public ArrayList<JID> getNodeOwners(String node) throws NodeStoreException {
150150 }
151151
152152 @ Override
153- public int countNodeAffiliations (String nodeId ) throws NodeStoreException {
154- return nodeStore .countNodeAffiliations (nodeId );
153+ public int countNodeAffiliations (String nodeId , boolean isOwnerModerator ) throws NodeStoreException {
154+ return nodeStore .countNodeAffiliations (nodeId , isOwnerModerator );
155155 }
156156
157157 @ Override
@@ -185,21 +185,23 @@ public int countUserSubscriptions(JID user) throws NodeStoreException {
185185 }
186186
187187 @ Override
188- public ResultSet <NodeSubscription > getNodeSubscriptions (String nodeId )
189- throws NodeStoreException {
190- return nodeStore .getNodeSubscriptions (nodeId );
188+ public ResultSet <NodeSubscription > getNodeSubscriptions (String nodeId ,
189+ boolean isOwnerModerator ) throws NodeStoreException {
190+ return nodeStore .getNodeSubscriptions (nodeId , isOwnerModerator );
191191 }
192192
193193 @ Override
194194 public ResultSet <NodeSubscription > getNodeSubscriptions (String nodeId ,
195- JID afterItemId , int maxItemsToReturn ) throws NodeStoreException {
196- return nodeStore .getNodeSubscriptions (nodeId , afterItemId ,
197- maxItemsToReturn );
195+ boolean isOwnerModerator , JID afterItemId , int maxItemsToReturn )
196+ throws NodeStoreException {
197+ return nodeStore .getNodeSubscriptions (nodeId , isOwnerModerator ,
198+ afterItemId , maxItemsToReturn );
198199 }
199200
200201 @ Override
201- public int countNodeSubscriptions (String nodeId ) throws NodeStoreException {
202- return nodeStore .countNodeSubscriptions (nodeId );
202+ public int countNodeSubscriptions (String nodeId , boolean isOwnerModerator )
203+ throws NodeStoreException {
204+ return nodeStore .countNodeSubscriptions (nodeId , isOwnerModerator );
203205 }
204206
205207 @ Override
@@ -258,7 +260,7 @@ public boolean isCachedNode(String nodeId) throws NodeStoreException {
258260 @ Override
259261 public boolean nodeHasSubscriptions (String nodeId )
260262 throws NodeStoreException {
261- return (nodeStore .countNodeSubscriptions (nodeId ) > 0 );
263+ return (nodeStore .countNodeSubscriptions (nodeId , false ) > 0 );
262264 }
263265
264266 public boolean isCachedJID (JID jid ) throws NodeStoreException {
@@ -366,7 +368,7 @@ public ResultSet<NodeSubscription> getNodeSubscriptionListeners(
366368 String nodeId ) throws NodeStoreException {
367369 return nodeStore .getNodeSubscriptionListeners (nodeId );
368370 }
369-
371+
370372 @ Override
371373 public ResultSet <NodeSubscription > getNodeSubscriptionListeners ()
372374 throws NodeStoreException {
@@ -431,28 +433,31 @@ public int getFirehoseItemCount(boolean isAdmin) throws NodeStoreException {
431433 @ Override
432434 public Affiliations getDefaultNodeAffiliation (String nodeId )
433435 throws NodeStoreException {
434- String affiliationString = getNodeConfValue (nodeId , Conf .DEFAULT_AFFILIATION );
435-
436- if (affiliationString != null ) {
436+ String affiliationString = getNodeConfValue (nodeId ,
437+ Conf .DEFAULT_AFFILIATION );
438+
439+ if (affiliationString != null ) {
437440 try {
438441 return Affiliations .valueOf (affiliationString );
439- }
440- catch ( IllegalArgumentException e ) {
441- logger . error ( "Invalid default affiliation stored for node " + nodeId + ": " + affiliationString , e );
442+ } catch ( IllegalArgumentException e ) {
443+ logger . error ( "Invalid default affiliation stored for node "
444+ + nodeId + ": " + affiliationString , e );
442445 }
443446 }
444-
447+
445448 return Affiliations .member ;
446449 }
447450
448451 @ Override
449452 public CloseableIterator <NodeItem > performSearch (JID searcher ,
450- List content , JID author , int page , int rpp ) throws NodeStoreException {
453+ List content , JID author , int page , int rpp )
454+ throws NodeStoreException {
451455 return nodeStore .performSearch (searcher , content , author , page , rpp );
452456 }
453457
454458 @ Override
455- public ResultSet <NodeItem > getUserItems (JID userJid ) throws NodeStoreException {
459+ public ResultSet <NodeItem > getUserItems (JID userJid )
460+ throws NodeStoreException {
456461 return nodeStore .getUserItems (userJid );
457462 }
458463
@@ -481,5 +486,4 @@ public ResultSet<NodeThread> getNodeThreads(String node, String afterId,
481486 public int countNodeThreads (String node ) throws NodeStoreException {
482487 return nodeStore .countNodeThreads (node );
483488 }
484-
485489}
0 commit comments