Regain 2.1.0-STABLE API

net.sf.regain.search.access
Interface SearchAccessController


public interface SearchAccessController

Identifies the groups a user has reading rights for.

This interface is a part of the access control system that ensures that only those documents are shown in the search results that the user is allowed to read.

Author:
Tilman Schneider, STZ-IDA an der FH Karlsruhe
See Also:
CrawlerAccessController

Method Summary
 String[] getUserGroups(PageRequest request)
          Gets the groups the current user has reading rights for.
 void init(Properties config)
          Initializes the SearchAccessController.
 

Method Detail

init

void init(Properties config)
          throws RegainException
Initializes the SearchAccessController.

This method is called once right after the SearchAccessController instance was created.

Parameters:
config - The configuration.
Throws:
RegainException - If loading the config failed.

getUserGroups

String[] getUserGroups(PageRequest request)
                       throws RegainException
Gets the groups the current user has reading rights for.

Note: The group array must not be null and the group names must not contain whitespace.

Note: For backwards compability, when this method returns null, ALL groups are allowed. Return a non-existing group to restrict access to nothing.

Parameters:
request - The page request to use for identifying the user.
Returns:
The groups of the current user.
Throws:
RegainException - If getting the groups failed.

Regain 2.1.0-STABLE API

Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info