org.wso2.registry.utils
Class AuthorizationUtils
java.lang.Object
org.wso2.registry.utils.AuthorizationUtils
public class AuthorizationUtils
- extends java.lang.Object
Field Summary |
static org.apache.commons.logging.Log |
log
|
Method Summary |
static boolean |
authorize(java.lang.String resourceID,
java.lang.String action)
|
static void |
copyAuthorizations(java.lang.String sourceID,
java.lang.String targetID)
|
static java.lang.String |
getAuthorizationPath(java.lang.String resourcePath)
Path of a resource given to the Registry interface may contain extensions
to refer metadata about resources. |
static void |
populateUserStore(UserRealm realm)
Populates all necessary users, roles and authorizations related user store. |
static void |
setRootAuthorizations(java.lang.String rootID,
UserRealm systemRealm)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final org.apache.commons.logging.Log log
AuthorizationUtils
public AuthorizationUtils()
authorize
public static boolean authorize(java.lang.String resourceID,
java.lang.String action)
throws RegistryException
- Throws:
RegistryException
copyAuthorizations
public static void copyAuthorizations(java.lang.String sourceID,
java.lang.String targetID)
throws RegistryException
- Throws:
RegistryException
setRootAuthorizations
public static void setRootAuthorizations(java.lang.String rootID,
UserRealm systemRealm)
throws RegistryException
- Throws:
RegistryException
populateUserStore
public static void populateUserStore(UserRealm realm)
throws UserStoreException
- Populates all necessary users, roles and authorizations related user store. Note that the
authorizations related to resource store is not populated by this method.
- Parameters:
realm
- Realm for which data has to be populated
- Throws:
UserStoreException
getAuthorizationPath
public static java.lang.String getAuthorizationPath(java.lang.String resourcePath)
- Path of a resource given to the Registry interface may contain extensions
to refer metadata about resources. But we always store the authorization
for resources against the pure resource path, stored in the ARTIFACTS
table. This methods extracts that pure resource path from a given path.
- Parameters:
resourcePath
- A path string, which may contain extensions
- Returns:
- pure resource path for the given path
Copyright © 2007 Apache Web Services Project. All Rights Reserved.