edu.ucsb.adl.middleware
Interface QueryDriverGatekeeper

All Known Implementing Classes:
BasicPasswordGatekeeper, CombinationGatekeeper, ConstantGatekeeper, IPAddressGatekeeper

public interface QueryDriverGatekeeper

The interface between the ADL query service and gatekeepers that control access to the drivers that implement the service on behalf of collections. The ADL query service creates the gatekeeper for a driver by dynamically loading the gatekeeper class and calling the following class method:

public static QueryDriverGatekeeper createGatekeeper (
    ExtendedProperties propertyList, String argument)
Gatekeeper startup parameters can be obtained from propertyList. argument is an additional, gatekeeper- and/or collection-specific startup parameter.

Version:
$Header: /export/home/gjanee/middleware/edu/ucsb/adl/middleware/RCS/QueryDriverGatekeeper.java,v 1.2 2004/09/21 18:22:27 gjanee Exp $

$Log: QueryDriverGatekeeper.java,v $ Revision 1.2 2004/09/21 18:22:27 gjanee
Minor documentation change.

Revision 1.1 1999/10/25 20:50:17 gjanee
Initial revision

Author:
Greg Janée
Alexandria Digital Library

Method Summary
 void destroy()
          Frees any resources held by the gatekeeper.
 boolean queryDriverAllowed(javax.servlet.ServletRequest request, java.lang.String collection, edu.ucsb.adl.middleware.Query query)
          Returns true if the request is authorized, that is, if the client is allowed to submit the given query to the collection.
 

Method Detail

queryDriverAllowed

public boolean queryDriverAllowed(javax.servlet.ServletRequest request,
                                  java.lang.String collection,
                                  edu.ucsb.adl.middleware.Query query)
                           throws MiddlewareException
Returns true if the request is authorized, that is, if the client is allowed to submit the given query to the collection. The gatekeeper can assume that collection names the collection for which the gatekeeper was created. This method must be multithread-safe.

Parameters:
request - The full request.
collection - The collection name, e.g., "adl_catalog".
query - The query.
Returns:
true if the request is authorized.
Throws:
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareException
See Also:
QueryService

destroy

public void destroy()
Frees any resources held by the gatekeeper.