org.ogf.saga.permissions
Interface Permissions<T>

All Superinterfaces:
Async
All Known Subinterfaces:
Directory, File, Job, JobSelf, LogicalDirectory, LogicalFile, NSDirectory, NSEntry, RPC, StreamServer

public interface Permissions<T>
extends Async

This interface describes methods to query and set permissions. The generic type T specifies the object type implementing the permissions. The permissions are described in the Permission enumeration class.


Method Summary
 String getGroup()
          Gets the group id of the entity.
 Task<T,String> getGroup(TaskMode mode)
          Creates a task that obtains the group id of the entity.
 String getOwner()
          Gets the owner id of the entity.
 Task<T,String> getOwner(TaskMode mode)
          Creates a task that obtains the owner id of the entity.
 void permissionsAllow(String id, int permissions)
          Allows the specified permissions for the specified id.
 Task<T,Void> permissionsAllow(TaskMode mode, String id, int permissions)
          Creates a task that enables the specified permissions for the specified id.
 boolean permissionsCheck(String id, int permissions)
          Determines if the specified permissions are enabled for the specified id.
 Task<T,Boolean> permissionsCheck(TaskMode mode, String id, int permissions)
          Creates a task that determines if the specified permissions are enabled for the specified id.
 void permissionsDeny(String id, int permissions)
          Denies the specified permissions for the specified id.
 Task<T,Void> permissionsDeny(TaskMode mode, String id, int permissions)
          Creates a task that disables the specified permissions for the specified id.
 

Method Detail

permissionsAllow

void permissionsAllow(String id,
                      int permissions)
                      throws NotImplementedException,
                             AuthenticationFailedException,
                             AuthorizationFailedException,
                             PermissionDeniedException,
                             BadParameterException,
                             TimeoutException,
                             NoSuccessException
Allows the specified permissions for the specified id. An id of "*" enables the permissions for all.

Parameters:
id - the id.
permissions - the permissions to enable.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown when the given id is unknown or not supported.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

permissionsDeny

void permissionsDeny(String id,
                     int permissions)
                     throws NotImplementedException,
                            AuthenticationFailedException,
                            AuthorizationFailedException,
                            PermissionDeniedException,
                            BadParameterException,
                            TimeoutException,
                            NoSuccessException
Denies the specified permissions for the specified id. An id of "*" disables the permissions for all.

Parameters:
id - the id.
permissions - the permissions to disable.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown when the given id is unknown or not supported.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

permissionsCheck

boolean permissionsCheck(String id,
                         int permissions)
                         throws NotImplementedException,
                                AuthenticationFailedException,
                                AuthorizationFailedException,
                                PermissionDeniedException,
                                BadParameterException,
                                TimeoutException,
                                NoSuccessException
Determines if the specified permissions are enabled for the specified id. An id of "*" queries the permissions for all.

Parameters:
id - the id.
permissions - the permissions to query.
Returns:
true if the specified permissions are enabled for the specified id.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown when the given id is unknown or not supported.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

getOwner

String getOwner()
                throws NotImplementedException,
                       AuthenticationFailedException,
                       AuthorizationFailedException,
                       PermissionDeniedException,
                       TimeoutException,
                       NoSuccessException
Gets the owner id of the entity.

Returns:
the id of the owner.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

getGroup

String getGroup()
                throws NotImplementedException,
                       AuthenticationFailedException,
                       AuthorizationFailedException,
                       PermissionDeniedException,
                       TimeoutException,
                       NoSuccessException
Gets the group id of the entity.

Returns:
the id of the group.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

permissionsAllow

Task<T,Void> permissionsAllow(TaskMode mode,
                              String id,
                              int permissions)
                              throws NotImplementedException
Creates a task that enables the specified permissions for the specified id. An id of "*" enables the permissions for all.

Parameters:
mode - determines the initial state of the task.
id - the id.
permissions - the permissions to enable.
Returns:
the task object.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

permissionsDeny

Task<T,Void> permissionsDeny(TaskMode mode,
                             String id,
                             int permissions)
                             throws NotImplementedException
Creates a task that disables the specified permissions for the specified id. An id of "*" disables the permissions for all.

Parameters:
mode - determines the initial state of the task.
id - the id.
permissions - the permissions to disable.
Returns:
the task object.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

permissionsCheck

Task<T,Boolean> permissionsCheck(TaskMode mode,
                                 String id,
                                 int permissions)
                                 throws NotImplementedException
Creates a task that determines if the specified permissions are enabled for the specified id. An id of "*" queries the permissions for all.

Parameters:
mode - determines the initial state of the task.
id - the id.
permissions - the permissions to query.
Returns:
the task object.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

getOwner

Task<T,String> getOwner(TaskMode mode)
                        throws NotImplementedException
Creates a task that obtains the owner id of the entity.

Parameters:
mode - determines the initial state of the task.
Returns:
the task object.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

getGroup

Task<T,String> getGroup(TaskMode mode)
                        throws NotImplementedException
Creates a task that obtains the group id of the entity.

Parameters:
mode - determines the initial state of the task.
Returns:
the task object.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.


Copyright © 2014 Open Grid Forum. All rights reserved.