|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PermissionManager
API for managing permissions in Stardog
| Method Summary | |
|---|---|
void |
addRolePerm(String theRolename,
ActionType theActionType,
SecurityResourceType theResourceType,
String theResourceName)
Grants a permission to a role. |
void |
addUserPerm(String theUsername,
ActionType theActionType,
SecurityResourceType theResourceType,
String theResourceName)
Grants a permission to a user. |
void |
deleteRolePerm(String theRolename,
ActionType theActionType,
SecurityResourceType theResourceType,
String theResourceName)
Revokes a permission from a role. |
void |
deleteUserPerm(String theUsername,
ActionType theActionType,
SecurityResourceType theResourceType,
String theResourceName)
Revokes a permission from a user. |
Collection<String> |
getEffectiveUserPerms(String theUsername)
Return the effective permissions, explicit and inferred, for the specified user |
Collection<String> |
getRolePerms(String theRole)
Return the permissions associated with the specified role |
Collection<String> |
getUserPerms(String theUsername)
Gets the current user permissions (explicit only) |
| Method Detail |
|---|
void addRolePerm(String theRolename,
ActionType theActionType,
SecurityResourceType theResourceType,
String theResourceName)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.ResourceExistsException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theRolename - the name of the role to which the permission should be addedtheActionType - the name of the action that should be permittedtheResourceType - the type of the resource to which this permission will be applicabletheResourceName - the name of a specific resource to which this permission should be applicable (use SecurityUtil.ALL_RESOURCE
for permissions that should apply to all resources of given type)
ResourceNotFoundException - if the resource referenced in the operation does not exist
ResourceExistsException - if there is already such a permission for this role
StardogAuthorizationException - if the current user is not authorized to grant the permission
StardogSecurityException - if the operation should fail for any other reason
void deleteRolePerm(String theRolename,
ActionType theActionType,
SecurityResourceType theResourceType,
String theResourceName)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theRolename - the name of the role from which the permission should be removedtheActionType - the name of the action that should no longer be permittedtheResourceType - the type of the resource to which this permission was applicabletheResourceName - the name of a specific resource to which this permission was applicable
(use SecurityUtil#ALL_RESOURCE for permissions that apply to all resources of given type)
ResourceNotFoundException - if the resource referenced in the operation does not exist or the role does not have the permission
StardogAuthorizationException - if the current user is not authorized to revoke the permission
StardogSecurityException - if the operation should fail for any other reason
void addUserPerm(String theUsername,
ActionType theActionType,
SecurityResourceType theResourceType,
String theResourceName)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.ResourceExistsException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUsername - the name of the user to whom the permission should be addedtheActionType - the name of the action that should be permittedtheResourceType - the type of the resource to which this permission will be applicabletheResourceName - the name of a specific resource to which this permission should be applicable (use SecurityUtil.ALL_RESOURCE
for permissions that should apply to all resources of given type)
ResourceNotFoundException - if the resource referenced in the operation does not exist
ResourceExistsException - if there is already such a permission for this user
StardogAuthorizationException - if the current user is not authorized to grant the permission
StardogSecurityException - if the operation should fail for any other reason
void deleteUserPerm(String theUsername,
ActionType theActionType,
SecurityResourceType theResourceType,
String theResourceName)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUsername - the name of the user from whom the permission should be revokedtheActionType - the name of the action that no longer should be permittedtheResourceType - the type of the resource to which this permission was applicabletheResourceName - the name of a specific resource to which this permission was applicable
(use SecurityUtil#ALL_RESOURCE for permissions that apply to all resources of given type)
ResourceNotFoundException - if the resource referenced in the operation does not exist (or the user does not have the permission to be revoked)
StardogAuthorizationException - if the current user is not authorized to revoke the permission
StardogSecurityException - if the operation should fail for any other reason
Collection<String> getUserPerms(String theUsername)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUsername - the user name whose permissions should be retrieved
ResourceNotFoundException - if there is no user with the specified name
StardogAuthorizationException - if the current user does not have a permission to retrieve the permission information for the specified user
StardogSecurityException - if the operation should fail for any other reason
Collection<String> getEffectiveUserPerms(String theUsername)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUsername - the user
StardogSecurityException - if the operation should fail for any other reason
ResourceNotFoundException - if the user is not found
StardogAuthorizationException - if the current user cannot perform this operation
Collection<String> getRolePerms(String theRole)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theRole - the name of the role
StardogSecurityException - if the operation should fail for any other reason
ResourceNotFoundException - if the role is not found
StardogAuthorizationException - if the current user cannot perform the operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||