public interface UserManager
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(String theUsername,
boolean theSuperuser,
char[] thePassword)
Adds a new user.
|
void |
addUserRole(String theUserName,
String theRole)
Assigns a role to a user.
|
void |
changePassword(String theUsername,
char[] theNewPassword)
Changes the password for the user.
|
void |
deleteUser(String theUsername)
Removes an existing user.
|
void |
deleteUserRole(String theUserName,
String theRole)
Unassigns a role from a user.
|
Collection<String> |
getAllUsers()
Gets the names of all users in the system that the authenticated user is allowed to see.
|
Collection<String> |
getUserRoles(String theUsername)
Retrieves all roles of the specified user.
|
boolean |
isSuperUser(String theUsername)
Checks whether the specified user is a super user
|
boolean |
isUserEnabled(String theUsername)
Checks whether the specified user is enabled
|
void |
setUserEnabled(String theUsername,
boolean theEnabled)
Enables/disables the user.
|
void |
setUserRoles(String theUserName,
Collection<String> theRoles)
Changes the user roles.
|
void addUser(String theUsername, boolean theSuperuser, char[] thePassword) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceExistsException, com.complexible.stardog.security.IllegalPasswordException, StardogAuthorizationException
theUsername - the username of the new usertheSuperuser - true, if the new user should be a super user; false, otherwisethePassword - the initial password for the userResourceExistsException - if there is already a user with that nameStardogAuthorizationException - if the current user does not have a permission to create the new userIllegalPasswordException - if the password is invalidStardogSecurityException - if the operation should fail for any other reasonvoid deleteUser(String theUsername) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, com.complexible.stardog.security.OperationNotSupportedException, StardogAuthorizationException
theUsername - the user to be removed.ResourceNotFoundException - if there is no such usernameOperationNotSupportedException - if the operation is not supported for this user (e.g., it is the last active super user in the system).StardogAuthorizationException - if the current user does not have a permission to remove the userStardogSecurityException - if the operation should fail for any other reasonCollection<String> getAllUsers() throws com.complexible.stardog.security.StardogSecurityException
StardogSecurityException - if the operation should fail for any other reasonvoid changePassword(String theUsername, char[] theNewPassword) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, StardogAuthorizationException, IllegalArgumentException, com.complexible.stardog.security.IllegalPasswordException
theUsername - the name of the user whose password should be changedtheNewPassword - the new password for the userResourceNotFoundException - if there is no user with the specified nameStardogAuthorizationException - if the current user does not have the permission to change the password for the specified userStardogSecurityException - if the operation should fail for any other reasonIllegalArgumentException - if the password is emptyIllegalPasswordException - if the password is invalidCollection<String> getUserRoles(String theUsername) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, StardogAuthorizationException
theUsername - the user name whose roles should be retrievedResourceNotFoundException - if there is no user with the specified nameStardogAuthorizationException - if the current user does not have the permission to retrieve the roles of the specified userStardogSecurityException - if the operation should fail for any other reasonvoid setUserRoles(String theUserName, Collection<String> theRoles) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, StardogAuthorizationException
theUserName - the user name whose roles should be changedtheRoles - a new set of roles for the user (this set will replace the existing set of roles for the user)ResourceNotFoundException - if one of the resources (username or role name) does not existStardogAuthorizationException - if the current user does not have the permission to set the roles for the specified userStardogSecurityException - if the operation should fail for any other reasonvoid addUserRole(String theUserName, String theRole) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, StardogAuthorizationException
theUserName - the user nametheRole - a new role for the userResourceNotFoundException - if one of the resources (username or role name) does not existStardogAuthorizationException - if the current user does not have the permission to set the roles for the specified userStardogSecurityException - if the operation should fail for any other reasonvoid deleteUserRole(String theUserName, String theRole) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, StardogAuthorizationException
theUserName - the user nametheRole - the role nameResourceNotFoundException - if one of the resources (username or role name) does not existStardogAuthorizationException - if the current user does not have the permission to set the roles for the specified userStardogSecurityException - if the operation should fail for any other reasonboolean isSuperUser(String theUsername) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, StardogAuthorizationException
theUsername - the username to be checkedResourceNotFoundException - if there is no such user nameStardogAuthorizationException - if the current user does not have the permission to perform this operationStardogSecurityException - if the operation should fail for any other reasonboolean isUserEnabled(String theUsername) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, StardogAuthorizationException
theUsername - the username to be checkedResourceNotFoundException - if there is no such user nameStardogAuthorizationException - if the current user does not have the permission to perform this operationStardogSecurityException - if the operation should fail for any other reasonvoid setUserEnabled(String theUsername, boolean theEnabled) throws com.complexible.stardog.security.StardogSecurityException, com.complexible.stardog.security.ResourceNotFoundException, com.complexible.stardog.security.OperationNotSupportedException, StardogAuthorizationException
theUsername - the name of the user to be enabled/disabledtheEnabled - true if the user is to become a enabled (active); false if the user should become disabledResourceNotFoundException - if there is no such user nameOperationNotSupportedException - if the operation would disable the last super userStardogAuthorizationException - if the current user does not have the permission to perform this operationStardogSecurityException - if the operation should fail for any other reasonCopyright © 2010-2016 Stardog Union. All Rights Reserved.