com.metamatrix.platform.security.authorization.spi.jdbc
Class JDBCAuthorizationReader

java.lang.Object
  extended by com.metamatrix.platform.security.authorization.spi.jdbc.JDBCAuthorizationReader

public class JDBCAuthorizationReader
extends java.lang.Object

Since:
4.2

Constructor Summary
JDBCAuthorizationReader()
           
 
Method Summary
static java.util.Set getPermissionsForPolicy(AuthorizationPolicyID policyID, java.sql.Connection jdbcConnection)
          Find and create all AuthorizationPermissionsImpl known to a policy.
static AuthorizationPolicy getPolicy(AuthorizationPolicyID policyID, java.sql.Connection jdbcConnection)
          Locate the policy that has the specified ID.
static java.util.Set getRoleNamesForPrincipal(MetaMatrixPrincipalName principal, java.sql.Connection jdbcConnection)
          Returns the Set of roles for the specified principal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCAuthorizationReader

public JDBCAuthorizationReader()
Method Detail

getRoleNamesForPrincipal

public static java.util.Set getRoleNamesForPrincipal(MetaMatrixPrincipalName principal,
                                                     java.sql.Connection jdbcConnection)
                                              throws AuthorizationSourceConnectionException,
                                                     AuthorizationSourceException
Returns the Set of roles for the specified principal

Parameters:
principals - MetaMatrixPrincipalNames of a principal and any group memberships for which roles are sought
jdbcConnection - is the Connection to use to read the roles.
Returns:
The Set of role for the principal, possibly empty, never null.
Throws:
AuthorizationSourceConnectionException - if there is an connection or communication error with the data source, signifying that the method should be retried with a different connection.
AuthorizationSourceException - if there is an unspecified or unknown error with the data source.

getPolicy

public static AuthorizationPolicy getPolicy(AuthorizationPolicyID policyID,
                                            java.sql.Connection jdbcConnection)
                                     throws AuthorizationSourceConnectionException,
                                            AuthorizationSourceException
Locate the policy that has the specified ID. Any ID that is invalid is simply ignored. specified policies

Parameters:
policyID - the ID of the policy to be obtained
Returns:
the policy that correspond to the specified ID
Throws:
AuthorizationSourceConnectionException - if there is an connection or communication error with the data source, signifying that the method should be retried with a different connection.
AuthorizationSourceException - if there is an unspecified or unknown error with the data source.

getPermissionsForPolicy

public static java.util.Set getPermissionsForPolicy(AuthorizationPolicyID policyID,
                                                    java.sql.Connection jdbcConnection)
                                             throws AuthorizationSourceConnectionException,
                                                    AuthorizationSourceException
Find and create all AuthorizationPermissionsImpl known to a policy.

Parameters:
policyID - The policy indentifier.
Returns:
The set of all permissions that belong to the given policy.
Throws:
AuthorizationSourceConnectionException
AuthorizationSourceException


Copyright © 2009. All Rights Reserved.