uk.org.ogsadai.service.authorization
Interface AccessAuthorizer

All Known Implementing Classes:
NullAuthorizer, SimpleFileAuthorizer

public interface AccessAuthorizer

An authorization interface which authorizes access to resources and activities within a given security context.

Implementations of this interface must provide a constructor AccessAuthorizer(java.lang.String). This constructor is expected by the factory which creates the class by reflection. The string is specified by the service administrator at start up time. It may contain configuration information specific to the authorizer class, for example the location of a configuration file.

Author:
The OGSA-DAI Team.

Method Summary
 boolean authorizeActivity(java.lang.String resourceID, Activity activity, SecurityContext context)
          Authorizes access for the given activity and resource in the specified security context.
 boolean authorizeResource(java.lang.String resourceID, SecurityContext context)
          Authorizes access to the given resource within the specified security context.
 

Method Detail

authorizeResource

public boolean authorizeResource(java.lang.String resourceID,
                                 SecurityContext context)
Authorizes access to the given resource within the specified security context.

Parameters:
resourceID - resource to be accessed
context - security context of the request
Returns:
boolean indicating whether the resource can be accessed within the given security context.

authorizeActivity

public boolean authorizeActivity(java.lang.String resourceID,
                                 Activity activity,
                                 SecurityContext context)
Authorizes access for the given activity and resource in the specified security context.

Parameters:
resourceID - resource identifier
activity - activity object to be accessed
context - context of the request
Returns:
boolean value indicating whether access has been granted or denied.