org.sakaiproject.api.common.authorization
Interface AuthorizationManager

All Known Implementing Classes:
AuthorizationManagerImpl

public interface AuthorizationManager

TODO: The old AuthorizationManager had a composite key consisting of agentId, functionId, and NodeId. This seems a bit limiting but also simplifies the implementation. If we do not create this composite key, we may run into trouble with ordering of query results and no significance.

Since:
Sakai 2.0
Version:
$Id: AuthorizationManager.java 632 2005-07-14 21:22:50Z janderse@umich.edu $
Author:
Lance Speelmon , Jarrod Lannan

Method Summary
 Authorization createAuthorization(String agentUuid, String permissionsUuid, String nodeUuid)
           
 Authorization createAuthorization(String agentUuid, String permissionsUuid, String nodeUuid, Date effectiveDate, Date expirationDate)
           
 void deleteAuthorization(Authorization authorization)
          Delete Authorization.
 Authorization getAuthorization(String uuid)
          Retrieve an Authorization by UUID.
 boolean isAuthorized(PermissionsManager permissionsManager, Permissions permissions, String nodeUuid)
          Since no AgentUuid is passed, the currently logged in user will be used.
 boolean isAuthorized(String agentUuid, PermissionsManager permissionsManager, Permissions permissions, String nodeUuid)
          The combination of functionType and signficantBits create the "what".
 void saveAuthorization(Authorization authorization)
          Persist Authorization.
 

Method Detail

createAuthorization

public Authorization createAuthorization(String agentUuid,
                                         String permissionsUuid,
                                         String nodeUuid)

createAuthorization

public Authorization createAuthorization(String agentUuid,
                                         String permissionsUuid,
                                         String nodeUuid,
                                         Date effectiveDate,
                                         Date expirationDate)

getAuthorization

public Authorization getAuthorization(String uuid)
Retrieve an Authorization by UUID.

Parameters:
uuid -
Returns:

saveAuthorization

public void saveAuthorization(Authorization authorization)
Persist Authorization.

Parameters:
authorization -

deleteAuthorization

public void deleteAuthorization(Authorization authorization)
Delete Authorization.

Parameters:
authorization -

isAuthorized

public boolean isAuthorized(PermissionsManager permissionsManager,
                            Permissions permissions,
                            String nodeUuid)
Since no AgentUuid is passed, the currently logged in user will be used. The combination of functionType and signficantBits create the "what".

Parameters:
permissionsManager - The PermissionsManager that will be queried by AuthorizationManager.
permissions - The "function".
nodeUuid - The "where".
Returns:
TRUE if the Agent is authorized; FALSE if Agent is not authorized.

isAuthorized

public boolean isAuthorized(String agentUuid,
                            PermissionsManager permissionsManager,
                            Permissions permissions,
                            String nodeUuid)
The combination of functionType and signficantBits create the "what".

Parameters:
agentUuid - The "who".
permissionsManager - The PermissionsManager that will be queried by AuthorizationManager.
permissions - The "function".
nodeUuid - The "where".
Returns:
TRUE if the Agent is authorized; FALSE if Agent is not authorized.