Esri Geoportal Server
1.0

com.esri.gpt.catalog.lucene
Class AclFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by com.esri.gpt.catalog.lucene.AclFilter
All Implemented Interfaces:
Serializable

public class AclFilter
extends Filter

A filter that provides access control at a document level.

See Also:
Serialized Form

Constructor Summary
AclFilter(String fieldName, String[] userPrincipals)
          Constructs with a field name and a list of principal strings associated with the current user.
 
Method Summary
 DocIdSet getDocIdSet(IndexReader reader)
          Applies the filter and returns a DocIdSet of matching documents.
 String getFieldName()
          Gets the ACL field name.
 long getTimeMillis()
          Gets the execution time.
 String[] getUserPrincipals()
          Gets the array of ACL principals associated with the active user.
protected  void setTimeMillis(long millis)
          Sets the execution time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AclFilter

public AclFilter(String fieldName,
                 String[] userPrincipals)
Constructs with a field name and a list of principal strings associated with the current user.

Parameters:
fieldName - - the ACL field name
userPrincipals - the user principal strings
Method Detail

getFieldName

public String getFieldName()
Gets the ACL field name.

Returns:
the field name

getTimeMillis

public long getTimeMillis()
Gets the execution time.

Returns:
the execution time (in milliseconds)

setTimeMillis

protected void setTimeMillis(long millis)
Sets the execution time.

Parameters:
millis - the execution time (in milliseconds)

getUserPrincipals

public String[] getUserPrincipals()
Gets the array of ACL principals associated with the active user.

Returns:
the array of principals

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Applies the filter and returns a DocIdSet of matching documents.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - the index reader
Returns:
the DocIdSet (documents that are visible to the supplied user principals)
Throws:
IOException - if an exception is encountered while reading the index

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.