edu.ucsb.adl.middleware
Interface MetadataServiceGatekeeper

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

public interface MetadataServiceGatekeeper

The interface between the ADL metadata service and the gatekeeper that controls access to the service. The ADL metadata service creates the gatekeeper by dynamically loading the gatekeeper class and calling the following class method:

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

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

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

Revision 1.2 2003/05/09 22:13:38 gjanee
Added support for arbitrary, per-collection and per-holding metadata views. Specifically, changed the view argument data type from an enumeration to a string. Added method viewsServiceAllowed.

Revision 1.1 1999/08/24 17:01:36 gjanee
Initial revision

Author:
Greg Janée
Alexandria Digital Library

Method Summary
 void destroy()
          Frees any resources held by the gatekeeper.
 boolean metadataServiceAllowed(javax.servlet.ServletRequest request, java.lang.String view)
          Returns true if the request is authorized, that is, if the client is allowed to view metadata reports of type view irrespective of collection and holding.
 boolean viewsServiceAllowed(javax.servlet.ServletRequest request)
          Returns true if the request is authorized, that is, if the client is allowed to retrieve supported view lists irrespective of collection and holding.
 

Method Detail

metadataServiceAllowed

public boolean metadataServiceAllowed(javax.servlet.ServletRequest request,
                                      java.lang.String view)
                               throws MiddlewareException
Returns true if the request is authorized, that is, if the client is allowed to view metadata reports of type view irrespective of collection and holding. This method must be multithread-safe.

Parameters:
request - The full request.
view - The metadata view requested, e.g., "adl:bucket".
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:
MetadataService

viewsServiceAllowed

public boolean viewsServiceAllowed(javax.servlet.ServletRequest request)
                            throws MiddlewareException
Returns true if the request is authorized, that is, if the client is allowed to retrieve supported view lists irrespective of collection and holding. This method must be multithread-safe.

Parameters:
request - The full request.
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:
MetadataService

destroy

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