org.wso2.registry.jdbc.realm.pathbased
Class PathBasedAccessControlAdmin

java.lang.Object
  extended by org.wso2.registry.jdbc.realm.pathbased.PathBasedAccessControlAdmin
All Implemented Interfaces:
AccessControlAdmin, Authorizer

public class PathBasedAccessControlAdmin
extends java.lang.Object
implements AccessControlAdmin


Constructor Summary
PathBasedAccessControlAdmin(AccessControlAdmin coreACA, javax.sql.DataSource dataSource)
           
 
Method Summary
 void authorizeRole(java.lang.String roleName, java.lang.String resourceId, java.lang.String action)
          Grant access to role
 void authorizeUser(java.lang.String userName, java.lang.String resourceId, java.lang.String action)
          Grant access to user.
 void clearResourceAuthorizations(java.lang.String resourceId)
          Clears all authorizations on a Role
 void clearRoleAuthorization(java.lang.String roleName, java.lang.String resourceId, java.lang.String action)
          Removes granted access from Role
 void clearUserAuthorization(java.lang.String userName, java.lang.String resourceId, java.lang.String action)
          Removes granted access from user
 void copyAuthorizations(java.lang.String fromResourceId, java.lang.String toResourceId)
          Duplicates granted/denied access
 void denyRole(java.lang.String roleName, java.lang.String resourceId, java.lang.String action)
          Deny access to role
 void denyUser(java.lang.String userName, java.lang.String resourceId, java.lang.String action)
          Deny access to user
 java.lang.String[] getAllowedRolesForResource(java.lang.String resourceId, java.lang.String action)
          Returns all roles who are authorized to perform an action on a resource
 java.lang.String[] getAllowedUsersForResource(java.lang.String resourceId, java.lang.String action)
          Returns all users who are authorized to perform an action on a resource
 java.lang.String[] getDeniedRolesForResource(java.lang.String resourceId, java.lang.String action)
          Returns all roles who are authorized to perform an action on a resource
 java.lang.String[] getDeniedUsersForResource(java.lang.String resourceId, java.lang.String action)
          Returns all users who are authorized to perform an action on a resource
 boolean isRoleAuthorized(java.lang.String roleName, java.lang.String resourceId, java.lang.String action)
          Checks wheather an role is authorized to perfrom an action on a resource
 boolean isUserAuthorized(java.lang.String userName, java.lang.String resourceId, java.lang.String action)
          Checks wheather an user is authorized to perfrom an action on a resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathBasedAccessControlAdmin

public PathBasedAccessControlAdmin(AccessControlAdmin coreACA,
                                   javax.sql.DataSource dataSource)
Method Detail

clearUserAuthorization

public void clearUserAuthorization(java.lang.String userName,
                                   java.lang.String resourceId,
                                   java.lang.String action)
                            throws UserStoreException
Description copied from interface: AccessControlAdmin
Removes granted access from user

Specified by:
clearUserAuthorization in interface AccessControlAdmin
Throws:
UserStoreException

denyUser

public void denyUser(java.lang.String userName,
                     java.lang.String resourceId,
                     java.lang.String action)
              throws UserStoreException
Description copied from interface: AccessControlAdmin
Deny access to user

Specified by:
denyUser in interface AccessControlAdmin
Throws:
UserStoreException

clearRoleAuthorization

public void clearRoleAuthorization(java.lang.String roleName,
                                   java.lang.String resourceId,
                                   java.lang.String action)
                            throws UserStoreException
Description copied from interface: AccessControlAdmin
Removes granted access from Role

Specified by:
clearRoleAuthorization in interface AccessControlAdmin
Throws:
UserStoreException

denyRole

public void denyRole(java.lang.String roleName,
                     java.lang.String resourceId,
                     java.lang.String action)
              throws UserStoreException
Description copied from interface: AccessControlAdmin
Deny access to role

Specified by:
denyRole in interface AccessControlAdmin
Throws:
UserStoreException

authorizeRole

public void authorizeRole(java.lang.String roleName,
                          java.lang.String resourceId,
                          java.lang.String action)
                   throws UserStoreException
Description copied from interface: AccessControlAdmin
Grant access to role

Specified by:
authorizeRole in interface AccessControlAdmin
Throws:
UserStoreException

clearResourceAuthorizations

public void clearResourceAuthorizations(java.lang.String resourceId)
                                 throws UserStoreException
Description copied from interface: AccessControlAdmin
Clears all authorizations on a Role

Specified by:
clearResourceAuthorizations in interface AccessControlAdmin
Throws:
UserStoreException

copyAuthorizations

public void copyAuthorizations(java.lang.String fromResourceId,
                               java.lang.String toResourceId)
                        throws UserStoreException
Description copied from interface: AccessControlAdmin
Duplicates granted/denied access

Specified by:
copyAuthorizations in interface AccessControlAdmin
Throws:
UserStoreException

authorizeUser

public void authorizeUser(java.lang.String userName,
                          java.lang.String resourceId,
                          java.lang.String action)
                   throws UserStoreException
Description copied from interface: AccessControlAdmin
Grant access to user.

Specified by:
authorizeUser in interface AccessControlAdmin
Throws:
UserStoreException

isRoleAuthorized

public boolean isRoleAuthorized(java.lang.String roleName,
                                java.lang.String resourceId,
                                java.lang.String action)
                         throws UserStoreException
Description copied from interface: Authorizer
Checks wheather an role is authorized to perfrom an action on a resource

Specified by:
isRoleAuthorized in interface Authorizer
Throws:
UserStoreException

isUserAuthorized

public boolean isUserAuthorized(java.lang.String userName,
                                java.lang.String resourceId,
                                java.lang.String action)
                         throws UserStoreException
Description copied from interface: Authorizer
Checks wheather an user is authorized to perfrom an action on a resource

Specified by:
isUserAuthorized in interface Authorizer
Throws:
UserStoreException

getAllowedUsersForResource

public java.lang.String[] getAllowedUsersForResource(java.lang.String resourceId,
                                                     java.lang.String action)
                                              throws UserStoreException
Description copied from interface: Authorizer
Returns all users who are authorized to perform an action on a resource

Specified by:
getAllowedUsersForResource in interface Authorizer
Throws:
UserStoreException

getDeniedUsersForResource

public java.lang.String[] getDeniedUsersForResource(java.lang.String resourceId,
                                                    java.lang.String action)
                                             throws UserStoreException
Description copied from interface: Authorizer
Returns all users who are authorized to perform an action on a resource

Specified by:
getDeniedUsersForResource in interface Authorizer
Throws:
UserStoreException

getAllowedRolesForResource

public java.lang.String[] getAllowedRolesForResource(java.lang.String resourceId,
                                                     java.lang.String action)
                                              throws UserStoreException
Description copied from interface: Authorizer
Returns all roles who are authorized to perform an action on a resource

Specified by:
getAllowedRolesForResource in interface Authorizer
Throws:
UserStoreException

getDeniedRolesForResource

public java.lang.String[] getDeniedRolesForResource(java.lang.String resourceId,
                                                    java.lang.String action)
                                             throws UserStoreException
Description copied from interface: Authorizer
Returns all roles who are authorized to perform an action on a resource

Specified by:
getDeniedRolesForResource in interface Authorizer
Throws:
UserStoreException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.