|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.ucsb.adl.middleware.CombinationGatekeeper
A gatekeeper that implements all gatekeeper interfaces and that bases authorization on a boolean combination of one or more other gatekeepers.
$Log: CombinationGatekeeper.java,v $
Revision 1.7 2006/06/22 18:49:45 gjanee
Added support for the identifiers service.
Revision 1.6 2004/09/21 22:37:14 gjanee
Rewrite to use class ExtendedProperties.
Revision 1.5 2003/05/09 22:52:59 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 methods
viewsServiceAllowed and
viewsDriverAllowed.
Revision 1.4 2001/09/05 04:00:23 gjanee
Changed the type of the baseUrl argument of method
referenceServiceAllowed from URL to
String to support the rmi
pseudo-protocol.
Revision 1.3 2001/09/04 18:53:57 gjanee
Added support for UnloadServiceGatekeeper,
ReferenceServiceGatekeeper, and
UnreferenceServiceGatekeeper.
Revision 1.2 2000/05/19 21:05:36 gjanee
Added support for GenericGatekeeper.
Revision 1.1 2000/04/04 18:13:57 gjanee
Initial revision
| Method Summary | |
boolean |
cancelServiceAllowed(javax.servlet.ServletRequest request,
edu.ucsb.adl.middleware.ResultAccumulator accumulator)
Returns true if the request is authorized, that
is, if the client is allowed to destroy the given result
accumulator. |
boolean |
collectionDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String collection)
Returns true if the request is authorized, that
is, if the client is allowed to view the collection-level
metadata for a collection. |
boolean |
collectionServiceAllowed(javax.servlet.ServletRequest request)
Returns true if the request is authorized, that
is, if the client is allowed to view collection-level metadata. |
boolean |
configurationServiceAllowed(javax.servlet.ServletRequest request)
Returns true if the request is authorized, that
is, if the client is allowed to view the configuration of the
ADL middleware server. |
static edu.ucsb.adl.middleware.CombinationGatekeeper |
createGatekeeper(edu.ucsb.adl.middleware.ExtendedProperties propertyList,
java.lang.String expression)
Creates a CombinationGatekeeper. |
void |
destroy()
Frees all resources held by the gatekeeper. |
boolean |
genericAccessAllowed(javax.servlet.ServletRequest request)
Returns true if access is allowed irrespective of
the service being invoked or the collection being operated
upon. |
boolean |
identifiersDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String collection)
Returns true if the request is authorized, that
is, if the client is allowed to obtain the identifiers of all
items in the collection. |
boolean |
identifiersServiceAllowed(javax.servlet.ServletRequest request)
Returns true if the request is authorized, that
is, if the client is allowed to obtain the identifiers of all
items in collections. |
boolean |
metadataDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String view,
java.lang.String collection,
java.lang.String holding)
Returns true if the request is authorized, that
is, if the client is allowed to view the requested view of the
metadata for the requested holding. |
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 |
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
given collection. |
boolean |
queryServiceAllowed(javax.servlet.ServletRequest request,
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. |
boolean |
referenceServiceAllowed(javax.servlet.ServletRequest request,
java.lang.String baseUrl,
java.lang.String collection)
Returns true if the request is authorized, that
is, if the client is allowed to reference the specified remote
collection. |
boolean |
resultsServiceAllowed(javax.servlet.ServletRequest request,
edu.ucsb.adl.middleware.ResultSet set)
Returns true if the request is authorized, that
is, if the client is allowed to access the specified result
set. |
boolean |
statusServiceAllowed(javax.servlet.ServletRequest request)
Returns true if the request is authorized, that
is, if the client is allowed to view the status of the ADL
middleware server. |
boolean |
unloadServiceAllowed(javax.servlet.ServletRequest request,
java.lang.String collection)
Returns true if the request is authorized, that
is, if the client is allowed to unload the specified collection
from the middleware. |
boolean |
unreferenceServiceAllowed(javax.servlet.ServletRequest request,
java.lang.String collection)
Returns true if the request is authorized, that
is, if the client is allowed to unreference the specified
remote collection. |
boolean |
viewsDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String collection,
java.lang.String holding)
Returns true if the request is authorized, that
is, if the client is allowed to retrieve the supported view
list for the requested 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static edu.ucsb.adl.middleware.CombinationGatekeeper createGatekeeper(edu.ucsb.adl.middleware.ExtendedProperties propertyList,
java.lang.String expression)
throws InternalErrorException
CombinationGatekeeper.
propertyList - A property list.expression - A postfix expression that describes a boolean combination of
one or more other gatekeepers. Syntactically, the expression
should consist of tokens separated by white space. A token may
be either a boolean operator (AND,
OR, or NOT) or an operand indicated
by a property name prefix, P. In the latter case,
property P.class in
propertyList should be the fully-qualified name of
a gatekeeper class and property P.argument
should be the gatekeeper's startup parameter. The specified
gatekeeper(s) are created by this method.
CombinationGatekeeper.
InternalErrorException - If any error is encountered.
public boolean metadataServiceAllowed(javax.servlet.ServletRequest request,
java.lang.String view)
throws MiddlewareException
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.
metadataServiceAllowed in interface MetadataServiceGatekeeperrequest - The full request.view - The metadata view requested, e.g., "adl:bucket".
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionMetadataService
public boolean viewsServiceAllowed(javax.servlet.ServletRequest request)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to retrieve supported view lists
irrespective of collection and holding.
viewsServiceAllowed in interface MetadataServiceGatekeeperrequest - The full request.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionMetadataService
public boolean metadataDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String view,
java.lang.String collection,
java.lang.String holding)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to view the requested view of the
metadata for the requested holding.
metadataDriverAllowed in interface MetadataDriverGatekeeperrequest - The full request.view - The metadata view requested, e.g., "adl:bucket".collection - The collection name, e.g., "adl_catalog".holding - The holding identifier.
true if the request is authorized.
BadRequestException - If request or holding are not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionMetadataService
public boolean viewsDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String collection,
java.lang.String holding)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to retrieve the supported view
list for the requested holding.
viewsDriverAllowed in interface MetadataDriverGatekeeperrequest - The full request.collection - The collection name, e.g., "adl_catalog".holding - The holding identifier.
true if the request is authorized.
BadRequestException - If request or holding are not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionMetadataService
public boolean queryServiceAllowed(javax.servlet.ServletRequest request,
edu.ucsb.adl.middleware.Query query)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to submit the given query.
queryServiceAllowed in interface QueryServiceGatekeeperrequest - The full request.query - The query.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionQueryService
public boolean queryDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String collection,
edu.ucsb.adl.middleware.Query query)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to submit the given query to the
given collection.
queryDriverAllowed in interface QueryDriverGatekeeperrequest - The full request.collection - The collection name, e.g., "adl_catalog".query - The query.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionQueryService
public boolean resultsServiceAllowed(javax.servlet.ServletRequest request,
edu.ucsb.adl.middleware.ResultSet set)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to access the specified result
set.
resultsServiceAllowed in interface ResultsServiceGatekeeperrequest - The full request.set - The result set in question.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionResultsService
public boolean statusServiceAllowed(javax.servlet.ServletRequest request)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to view the status of the ADL
middleware server.
statusServiceAllowed in interface StatusServiceGatekeeperrequest - The full request.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionStatusService
public boolean cancelServiceAllowed(javax.servlet.ServletRequest request,
edu.ucsb.adl.middleware.ResultAccumulator accumulator)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to destroy the given result
accumulator.
cancelServiceAllowed in interface CancelServiceGatekeeperrequest - The full request.accumulator - The result accumulator in question.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionCancelService
public boolean configurationServiceAllowed(javax.servlet.ServletRequest request)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to view the configuration of the
ADL middleware server.
configurationServiceAllowed in interface ConfigurationServiceGatekeeperrequest - The full request.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionConfigurationService
public boolean collectionServiceAllowed(javax.servlet.ServletRequest request)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to view collection-level metadata.
collectionServiceAllowed in interface CollectionServiceGatekeeperrequest - The full request.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionCollectionService
public boolean collectionDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String collection)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to view the collection-level
metadata for a collection.
collectionDriverAllowed in interface CollectionDriverGatekeeperrequest - The full request.collection - The collection name, e.g., "adl_catalog".
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionCollectionService
public boolean genericAccessAllowed(javax.servlet.ServletRequest request)
throws MiddlewareException
true if access is allowed irrespective of
the service being invoked or the collection being operated
upon.
genericAccessAllowed in interface GenericGatekeeperrequest - The full request.
true if access is allowed.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareException
public boolean unloadServiceAllowed(javax.servlet.ServletRequest request,
java.lang.String collection)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to unload the specified collection
from the middleware.
unloadServiceAllowed in interface UnloadServiceGatekeeperrequest - The full request.collection - The collection name, e.g., "adl_catalog".
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionUnloadService
public boolean referenceServiceAllowed(javax.servlet.ServletRequest request,
java.lang.String baseUrl,
java.lang.String collection)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to reference the specified remote
collection.
referenceServiceAllowed in interface ReferenceServiceGatekeeperrequest - The full request.baseUrl - The remote middleware server's base URL, e.g.,
"rmi://host.com/edu/ucsb/adl/middleware/" or
"http://host.com/servlet/".collection - The remote collection name, e.g., "adl_catalog".
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionReferenceService
public boolean unreferenceServiceAllowed(javax.servlet.ServletRequest request,
java.lang.String collection)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to unreference the specified
remote collection.
unreferenceServiceAllowed in interface UnreferenceServiceGatekeeperrequest - The full request.collection - The local collection name, e.g., "adl_catalog".
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionUnreferenceService
public boolean identifiersServiceAllowed(javax.servlet.ServletRequest request)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to obtain the identifiers of all
items in collections.
identifiersServiceAllowed in interface IdentifiersServiceGatekeeperrequest - The full request.
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionIdentifiersService
public boolean identifiersDriverAllowed(javax.servlet.ServletRequest request,
java.lang.String collection)
throws MiddlewareException
true if the request is authorized, that
is, if the client is allowed to obtain the identifiers of all
items in the collection.
identifiersDriverAllowed in interface IdentifiersDriverGatekeeperrequest - The full request.collection - The collection name, e.g., "adl_catalog".
true if the request is authorized.
BadRequestException - If request is not valid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareExceptionIdentifiersServicepublic void destroy()
destroy in interface MetadataServiceGatekeeper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||