|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.utils.AuthorizationUtils
public class AuthorizationUtils
Set of utilities related to authorization functionality.
Constructor Summary | |
---|---|
AuthorizationUtils()
|
Method Summary | |
---|---|
static void |
addAuthorizeRoleListener(int executionId,
java.lang.String path,
java.lang.String permission,
java.lang.String executeAction)
Adds listener to intercept authorizeRole and clearRoleActionOnAllResources operations. |
static void |
addAuthorizeRoleListener(int executionId,
java.lang.String path,
java.lang.String permission,
java.lang.String executeAction,
java.lang.String[] actions)
Adds listener to intercept authorizeRole and clearRoleActionOnAllResources operations. |
static boolean |
authorize(java.lang.String resourcePath,
java.lang.String action)
Method to authorize a given resource path for a given action. |
static void |
clearAuthorizations(java.lang.String resourcePath)
Method to clear authorizations for a given resource path. |
static void |
copyAuthorizations(java.lang.String sourcePath,
java.lang.String targetPath)
Method to copy authorizations from one path to another. |
static void |
denyAnonAuthorization(java.lang.String path,
org.wso2.carbon.user.core.UserRealm userRealm)
Deprecated. |
static java.lang.String |
getAuthorizationPath(java.lang.String resourcePath)
Path of a resource given to the Registry interface may contain extensions to refer meta data about resources. |
static void |
populateUserStore(org.wso2.carbon.user.core.UserRealm realm)
Deprecated. |
static void |
setAnonAuthorization(java.lang.String path,
org.wso2.carbon.user.core.UserRealm userRealm)
Deprecated. |
static void |
setRootAuthorizations(java.lang.String rootPath,
org.wso2.carbon.user.core.UserRealm userRealm)
Method to set authorizations to the root path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthorizationUtils()
Method Detail |
---|
public static boolean authorize(java.lang.String resourcePath, java.lang.String action) throws RegistryException
resourcePath
- the resource path.action
- the action.
RegistryException
- if the operation failed.@Deprecated public static void setAnonAuthorization(java.lang.String path, org.wso2.carbon.user.core.UserRealm userRealm) throws RegistryException
path
- the resource path.userRealm
- the user realm
RegistryException
- if the operation failed.public static void clearAuthorizations(java.lang.String resourcePath) throws RegistryException
resourcePath
- the resource path.
RegistryException
- if the operation failed.public static void copyAuthorizations(java.lang.String sourcePath, java.lang.String targetPath) throws RegistryException
sourcePath
- the source path (where to copy from)targetPath
- the target path (where to copy to)
RegistryException
- if the operation failed.@Deprecated public static void denyAnonAuthorization(java.lang.String path, org.wso2.carbon.user.core.UserRealm userRealm) throws RegistryException
path
- the path.userRealm
- the user realm to use.
RegistryException
- if the operation failed.public static void setRootAuthorizations(java.lang.String rootPath, org.wso2.carbon.user.core.UserRealm userRealm) throws RegistryException
rootPath
- the root path.userRealm
- the user realm to use.
RegistryException
- if the operation failed.@Deprecated public static void populateUserStore(org.wso2.carbon.user.core.UserRealm realm) throws org.wso2.carbon.user.core.UserStoreException
realm
- Realm for which data has to be populated
org.wso2.carbon.user.core.UserStoreException
- if the operation failed.public static java.lang.String getAuthorizationPath(java.lang.String resourcePath)
resourcePath
- A path string, which may contain extensions
public static void addAuthorizeRoleListener(int executionId, java.lang.String path, java.lang.String permission, java.lang.String executeAction, java.lang.String[] actions)
executionId
- an identifier which determines the order in which this listener is
called.path
- the path to which authorizations should be granted on the repository.permission
- the corresponding UI permissionexecuteAction
- the execute action used by the User Management bundleactions
- the actions which we authorize this role for the given pathAuthorizationManager.authorizeRole(String, String, String)
,
AuthorizationManager.clearRoleActionOnAllResources(String,
String)
public static void addAuthorizeRoleListener(int executionId, java.lang.String path, java.lang.String permission, java.lang.String executeAction)
executionId
- an identifier which determines the order in which this listener is
called.path
- the path to which authorizations should be granted on the repository.permission
- the corresponding UI permissionexecuteAction
- the execute action used by the User Management bundleAuthorizationManager.authorizeRole(String, String, String)
,
AuthorizationManager.clearRoleActionOnAllResources(String,
String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |