org.glite.data.catalog.service.fas
Interface FASBase

All Superinterfaces:
ServiceBase
All Known Subinterfaces:
FAS, FileCatalog, FiremanCatalog, MetadataCatalog, MetadataSchema, ReplicaCatalog

public interface FASBase
extends ServiceBase

The middleware level API for File Access (or Authorization) Service.

Stereotype:
simple-interface

Method Summary
 void checkPermission(java.lang.String[] items, Perm perm)
          Checks if the current user has the required permission bits on the specified items.
 PermissionEntry[] getPermission(java.lang.String[] items)
          Retrieves all set permissions for any kind of item (GUID, LFN or SchemaName).
 void setPermission(PermissionEntry[] permissions)
          Sets full set of permissions {BasicPermission,ACL} for a given item (GUID, LFN or SchemaName).
 
Methods inherited from interface org.glite.data.catalog.service.ServiceBase
getInterfaceVersion, getSchemaVersion, getServiceMetadata, getVersion
 

Method Detail

setPermission

public void setPermission(PermissionEntry[] permissions)
                   throws InternalException,
                          AuthorizationException,
                          NotExistsException,
                          InvalidArgumentException
Sets full set of permissions {BasicPermission,ACL} for a given item (GUID, LFN or SchemaName).

Parameters:
permissions - - list of {item, permission} pairs. The PermissionEntry object takes the item and a list of ACLs. This method sets the full permission, replacing all existing ACLs.
Throws:
AuthorizationException - No access right to update the permissions.
NotExistsException - The item does not exist.
InvalidArgumentException - Some part of the argument is invalid.
InternalException -

Semantic description of the method:
The following steps are performed for each entry:

getPermission

public PermissionEntry[] getPermission(java.lang.String[] items)
                                throws InternalException,
                                       AuthorizationException,
                                       NotExistsException,
                                       InvalidArgumentException
Retrieves all set permissions for any kind of item (GUID, LFN or SchemaName).

Parameters:
items - list of items we want permission for
Returns:
returns item with corresponding permission
Throws:
AuthorizationException - No access right to get the permission information.
NotExistsException - The item does not exist.
InvalidArgumentException - Some part of the argument is invalid.
InternalException -

Semantic description of the method:
The following steps are performed for each entry:
  • Check format of item (depends on the context);
    if it is invalid, throws InvalidArgumentException.
  • Check if item exists;
    if it does not exist, throws NotExistsException.
  • Check LIST permission on the item;
    if permission is not granted, throws AuthorizationException.
  • Query permission details from the catalog and add it to the list to be returned.

checkPermission

public void checkPermission(java.lang.String[] items,
                            Perm perm)
                     throws InternalException,
                            AuthorizationException
Checks if the current user has the required permission bits on the specified items.

Parameters:
items - list of items we want to check permission of
perm - the permission bits to be checked against
Throws:
AuthorizationException - No access right to check permission information
InternalException -

Semantic description of the method:
The following steps are performed for each item entry:
  • Check PERMISSION permission on the item;
    if permission is not granted, throws AuthorizationException.
  • Check required permission bits on the item;
    if any of the permission bits is not verified, throws AuthorizationException.


Copyright © 2004 EU-EGEE