com.atlassian.confluence.search.lucene.filter
Class ContentPermissionsFilter

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

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

Lucene Filter that filters out indexed documents the user is not permitted to search on or to see as a search result.

See Also:
Serialized Form

Field Summary
static org.apache.log4j.Category log
           
 
Constructor Summary
ContentPermissionsFilter(com.atlassian.user.User user, Iterable<String> groupNames)
          Create a Lucene Filter that includes only pages that the user has permissions to see.
ContentPermissionsFilter(com.atlassian.user.User user, com.atlassian.user.search.page.Pager<com.atlassian.user.Group> groups)
          Deprecated. since 3.5
 
Method Summary
 BitSet bits(org.apache.lucene.index.IndexReader reader)
           
 boolean equals(Object o)
           
 int hashCode()
           
 
Methods inherited from class org.apache.lucene.search.Filter
getDocIdSet
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Category log
Constructor Detail

ContentPermissionsFilter

@Deprecated
public ContentPermissionsFilter(com.atlassian.user.User user,
                                           com.atlassian.user.search.page.Pager<com.atlassian.user.Group> groups)
Deprecated. since 3.5

Create a Lucene Filter that includes only pages that the user has permissions to see. This should be equivalent to the pages that have no ContentPermissions or whose ContentPermissions are fulfilled by this user.

Parameters:
user - the user performing the search
groups - list of Groups the user belongs to.

ContentPermissionsFilter

public ContentPermissionsFilter(com.atlassian.user.User user,
                                Iterable<String> groupNames)
Create a Lucene Filter that includes only pages that the user has permissions to see. This should be equivalent to the pages that have no ContentPermissions or whose ContentPermissions are fulfilled by this user.

Parameters:
user - the user performing the search
groupNames - list of strings representing the groups the user belongs to.
Method Detail

bits

public BitSet bits(org.apache.lucene.index.IndexReader reader)
            throws IOException
Overrides:
bits in class org.apache.lucene.search.Filter
Throws:
IOException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2003-2012 Atlassian. All Rights Reserved.