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

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

public class PathBasedAuthorizer
extends java.lang.Object
implements Authorizer


Constructor Summary
PathBasedAuthorizer(Authorizer authorizer, javax.sql.DataSource dataSource)
           
 
Method Summary
 java.lang.String[] getAllowedRolesForResource(java.lang.String resourcePath, java.lang.String action)
          Returns all roles who are authorized to perform an action on a resource
 java.lang.String[] getAllowedUsersForResource(java.lang.String resourcePath, java.lang.String action)
          Returns all users who are authorized to perform an action on a resource
 java.lang.String[] getDeniedRolesForResource(java.lang.String resourcePath, java.lang.String action)
          Returns all roles who are authorized to perform an action on a resource
 java.lang.String[] getDeniedUsersForResource(java.lang.String resourcePath, 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 resourcePath, 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 resourcePath, 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

PathBasedAuthorizer

public PathBasedAuthorizer(Authorizer authorizer,
                           javax.sql.DataSource dataSource)
Method Detail

isUserAuthorized

public boolean isUserAuthorized(java.lang.String userName,
                                java.lang.String resourcePath,
                                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

isRoleAuthorized

public boolean isRoleAuthorized(java.lang.String roleName,
                                java.lang.String resourcePath,
                                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

getAllowedUsersForResource

public java.lang.String[] getAllowedUsersForResource(java.lang.String resourcePath,
                                                     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 resourcePath,
                                                    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 resourcePath,
                                                     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 resourcePath,
                                                    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.