edu.ucsb.adl.middleware
Class IdentifiersService

java.lang.Object
  |
  +--edu.ucsb.adl.middleware.IdentifiersService

public final class IdentifiersService
extends java.lang.Object

The ADL identifiers service. Conceptually, this service returns the identifiers of all items in a collection.

This class reads the following properties from the main middleware configuration file:

identifiers.gatekeeper.class
The fully-qualified name of the service-level gatekeeper class, e.g., "edu.ucsb.adl.middleware.IPAddressGatekeeper".
identifiers.gatekeeper.argument
The service-level gatekeeper's startup parameter.
collection_directory
The pathname of the directory in which collection-specific configuration files are stored, e.g., "/export/middleware/config/collections". If the pathname is not absolute, it is interpreted relative to the directory containing the main middleware configuration file.
If the value of the collection_directory property is D, then in loading collection C this class reads the following properties from the collection-specific middleware configuration file D/C/drivers.conf:
identifiers.driver.class
For collection C, the fully-qualified name of the driver class, e.g., "edu.ucsb.adl.bucket99.IdentifiersDriver".
identifiers.driver.gatekeeper.class
For collection C, the fully-qualified name of the driver-level gatekeeper class.
identifiers.driver.gatekeeper.argument
For collection C, the driver-level gatekeeper's startup parameter.
In all of the above configuration files, property values may be indirectly specified using the notation @P where P is the name of another property (see ExtendedProperties for more information). The main middleware configuration file serves as a properties default for the collection-specific configuration files.

Version:
$Header: /export/home/gjanee/middleware/edu/ucsb/adl/middleware/RCS/IdentifiersService.java,v 1.1 2006/06/22 19:40:01 gjanee Exp $

$Log: IdentifiersService.java,v $ Revision 1.1 2006/06/22 19:40:01 gjanee Initial revision

Author:
Greg Janée
Alexandria Digital Library

Method Summary
static edu.ucsb.adl.middleware.IdentifiersService createService(java.lang.String configurationFile)
          Creates an IdentifiersService.
 void destroy()
          Decrements the reference count.
 java.util.Vector performIdentifiersService(javax.servlet.ServletRequest request, java.lang.String collection)
          Performs the ADL identifiers service.
 void unloadCollection(java.lang.String collection)
          Unloads a collection (i.e., the driver and gatekeeper for a collection) from the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createService

public static edu.ucsb.adl.middleware.IdentifiersService createService(java.lang.String configurationFile)
                                                                throws InternalErrorException
Creates an IdentifiersService. If a service already exists for the configuration file, the extant service's reference count is incremented and it is returned instead.

Parameters:
configurationFile - The filename of a main middleware configuration file.
Throws:
InternalErrorException - If the initialization of the service fails.

performIdentifiersService

public java.util.Vector performIdentifiersService(javax.servlet.ServletRequest request,
                                                  java.lang.String collection)
                                           throws MiddlewareException
Performs the ADL identifiers service. This method is multithread-safe.

Parameters:
request - The full request.
collection - The collection name, e.g., "adl_catalog".
Returns:
A vector of string identifiers.
Throws:
BadRequestException - If either of the arguments is invalid.
NoAuthorizationException - If the request is valid but not allowed.
InternalErrorException - If the request cannot otherwise be completed.
MiddlewareException

unloadCollection

public void unloadCollection(java.lang.String collection)
Unloads a collection (i.e., the driver and gatekeeper for a collection) from the service. If the collection has not yet been loaded or has already been unloaded, this method does nothing.

Parameters:
collection - The name of the collection, e.g., "adl_catalog".

destroy

public void destroy()
Decrements the reference count. When the reference count drops to zero, all resources held by the service are freed.