org.wso2.carbon.um.ws.api
Class WSAuthorizationManager

java.lang.Object
  extended by org.wso2.carbon.um.ws.api.WSAuthorizationManager
All Implemented Interfaces:
org.wso2.carbon.user.api.AuthorizationManager

public class WSAuthorizationManager
extends Object
implements org.wso2.carbon.user.core.AuthorizationManager


Constructor Summary
WSAuthorizationManager(String serverUrl, String cookie, org.apache.axis2.context.ConfigurationContext configCtxt)
           
 
Method Summary
 void authorizeRole(String roleName, String resourceId, String action)
           
 void authorizeUser(String userName, String resourceId, String action)
           
 void clearResourceAuthorizations(String resourceId)
           
 void clearRoleActionOnAllResources(String roleName, String action)
           
 void clearRoleAuthorization(String roleName)
           
 void clearRoleAuthorization(String roleName, String resourceId, String action)
           
 void clearUserAuthorization(String userName)
           
 void clearUserAuthorization(String userName, String resourceId, String action)
           
 void denyRole(String roleName, String resourceId, String action)
           
 void denyUser(String userName, String resourceId, String action)
           
 String[] getAllowedRolesForResource(String resourceId, String action)
           
 String[] getAllowedUIResourcesForUser(String userName, String permissionRootPath)
           
 String[] getDeniedRolesForResource(String resourceId, String action)
           
 String[] getExplicitlyAllowedUsersForResource(String resourceId, String action)
           
 String[] getExplicitlyDeniedUsersForResource(String resourceId, String action)
           
 int getTenantId()
           
 boolean isRoleAuthorized(String roleName, String resourceId, String action)
           
 boolean isUserAuthorized(String userName, String resourceId, String action)
           
 String[] normalizeRoles(String[] roles)
           
 void resetPermissionOnUpdateRole(String roleName, String newRoleName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSAuthorizationManager

public WSAuthorizationManager(String serverUrl,
                              String cookie,
                              org.apache.axis2.context.ConfigurationContext configCtxt)
                       throws org.wso2.carbon.user.core.UserStoreException
Throws:
org.wso2.carbon.user.core.UserStoreException
Method Detail

authorizeRole

public void authorizeRole(String roleName,
                          String resourceId,
                          String action)
                   throws org.wso2.carbon.user.core.UserStoreException
Specified by:
authorizeRole in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

authorizeUser

public void authorizeUser(String userName,
                          String resourceId,
                          String action)
                   throws org.wso2.carbon.user.core.UserStoreException
Specified by:
authorizeUser in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

clearResourceAuthorizations

public void clearResourceAuthorizations(String resourceId)
                                 throws org.wso2.carbon.user.core.UserStoreException
Specified by:
clearResourceAuthorizations in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

clearRoleActionOnAllResources

public void clearRoleActionOnAllResources(String roleName,
                                          String action)
                                   throws org.wso2.carbon.user.core.UserStoreException
Specified by:
clearRoleActionOnAllResources in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

clearRoleAuthorization

public void clearRoleAuthorization(String roleName,
                                   String resourceId,
                                   String action)
                            throws org.wso2.carbon.user.core.UserStoreException
Specified by:
clearRoleAuthorization in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

clearRoleAuthorization

public void clearRoleAuthorization(String roleName)
                            throws org.wso2.carbon.user.core.UserStoreException
Specified by:
clearRoleAuthorization in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

clearUserAuthorization

public void clearUserAuthorization(String userName,
                                   String resourceId,
                                   String action)
                            throws org.wso2.carbon.user.core.UserStoreException
Specified by:
clearUserAuthorization in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

clearUserAuthorization

public void clearUserAuthorization(String userName)
                            throws org.wso2.carbon.user.core.UserStoreException
Specified by:
clearUserAuthorization in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

denyRole

public void denyRole(String roleName,
                     String resourceId,
                     String action)
              throws org.wso2.carbon.user.core.UserStoreException
Specified by:
denyRole in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

denyUser

public void denyUser(String userName,
                     String resourceId,
                     String action)
              throws org.wso2.carbon.user.core.UserStoreException
Specified by:
denyUser in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

getAllowedRolesForResource

public String[] getAllowedRolesForResource(String resourceId,
                                           String action)
                                    throws org.wso2.carbon.user.core.UserStoreException
Specified by:
getAllowedRolesForResource in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

getAllowedUIResourcesForUser

public String[] getAllowedUIResourcesForUser(String userName,
                                             String permissionRootPath)
                                      throws org.wso2.carbon.user.core.UserStoreException
Specified by:
getAllowedUIResourcesForUser in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

getDeniedRolesForResource

public String[] getDeniedRolesForResource(String resourceId,
                                          String action)
                                   throws org.wso2.carbon.user.core.UserStoreException
Specified by:
getDeniedRolesForResource in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

getExplicitlyAllowedUsersForResource

public String[] getExplicitlyAllowedUsersForResource(String resourceId,
                                                     String action)
                                              throws org.wso2.carbon.user.core.UserStoreException
Specified by:
getExplicitlyAllowedUsersForResource in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

getExplicitlyDeniedUsersForResource

public String[] getExplicitlyDeniedUsersForResource(String resourceId,
                                                    String action)
                                             throws org.wso2.carbon.user.core.UserStoreException
Specified by:
getExplicitlyDeniedUsersForResource in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

isRoleAuthorized

public boolean isRoleAuthorized(String roleName,
                                String resourceId,
                                String action)
                         throws org.wso2.carbon.user.core.UserStoreException
Specified by:
isRoleAuthorized in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

isUserAuthorized

public boolean isUserAuthorized(String userName,
                                String resourceId,
                                String action)
                         throws org.wso2.carbon.user.core.UserStoreException
Specified by:
isUserAuthorized in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

resetPermissionOnUpdateRole

public void resetPermissionOnUpdateRole(String roleName,
                                        String newRoleName)
                                 throws org.wso2.carbon.user.core.UserStoreException
Specified by:
resetPermissionOnUpdateRole in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

getTenantId

public int getTenantId()
                throws org.wso2.carbon.user.core.UserStoreException
Specified by:
getTenantId in interface org.wso2.carbon.user.api.AuthorizationManager
Throws:
org.wso2.carbon.user.core.UserStoreException

normalizeRoles

public String[] normalizeRoles(String[] roles)


Copyright © 2015 WSO2. All rights reserved.