com.atlassian.confluence.hosted.search.lucene.filter
Class SpaceGroupFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by com.atlassian.confluence.hosted.search.lucene.filter.SpaceGroupFilter
All Implemented Interfaces:
java.io.Serializable

public class SpaceGroupFilter
extends org.apache.lucene.search.Filter

Filter that filters on the current user's SpaceGroups. This filter returns all results for system and confluence administrators.

See Also:
Serialized Form

Constructor Summary
SpaceGroupFilter(SpaceGroupManager spaceGroupManager, PermissionManager permisssManager)
           
 
Method Summary
 java.util.BitSet bits(org.apache.lucene.index.IndexReader reader)
          Returns a bitset that filters documents by the space groups the current user belongs to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpaceGroupFilter

public SpaceGroupFilter(SpaceGroupManager spaceGroupManager,
                        PermissionManager permisssManager)
Method Detail

bits

public java.util.BitSet bits(org.apache.lucene.index.IndexReader reader)
                      throws java.io.IOException
Returns a bitset that filters documents by the space groups the current user belongs to. If the current user does not belong to any space groups, an empty bit set is returned. If the current user is a Confluence or System admin, a bitSet of all 1's (meaning all documents) is returned, regardless of whether this admin belongs to any space groups.

Specified by:
bits in class org.apache.lucene.search.Filter
Parameters:
reader - the index reader
Returns:
a bitset of matching documents
Throws:
java.io.IOException


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.