|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserManager
API for managing users in Stardog.
| Method Summary | |
|---|---|
void |
addUser(String theUsername,
boolean theSuperuser)
Deprecated. use addUser(String, boolean, char[]) this method will use the provide username as the initial password |
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. |
| Method Detail |
|---|
@Deprecated
void addUser(String theUsername,
boolean theSuperuser)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceExistsException,
com.clarkparsia.stardog.security.StardogAuthorizationException
addUser(String, boolean, char[]) this method will use the provide username as the initial password
theUsername - the username of the new usertheSuperuser - true, if the new user should be a super user; false, otherwise
ResourceExistsException - if there is already a user with that name
StardogAuthorizationException - if the current user does not have a permission to create the new user
StardogSecurityException - if the operation should fail for any other reason
void addUser(String theUsername,
boolean theSuperuser,
char[] thePassword)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceExistsException,
com.clarkparsia.stardog.security.IllegalPasswordException,
com.clarkparsia.stardog.security.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 user
ResourceExistsException - if there is already a user with that name
StardogAuthorizationException - if the current user does not have a permission to create the new user
IllegalPasswordException - if the password is invalid
StardogSecurityException - if the operation should fail for any other reason
void deleteUser(String theUsername)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.OperationNotSupportedException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUsername - the user to be removed.
ResourceNotFoundException - if there is no such username
OperationNotSupportedException - 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 user
StardogSecurityException - if the operation should fail for any other reason
Collection<String> getAllUsers()
throws com.clarkparsia.stardog.security.StardogSecurityException
StardogSecurityException - if the operation should fail for any other reason
void changePassword(String theUsername,
char[] theNewPassword)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException,
IllegalArgumentException,
com.clarkparsia.stardog.security.IllegalPasswordException
theUsername - the name of the user whose password should be changedtheNewPassword - the new password for the user
ResourceNotFoundException - if there is no user with the specified name
StardogAuthorizationException - if the current user does not have the permission to change the password for the specified user
StardogSecurityException - if the operation should fail for any other reason
IllegalArgumentException - if the password is empty
IllegalPasswordException - if the password is invalid
Collection<String> getUserRoles(String theUsername)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUsername - the user name whose roles should be retrieved
ResourceNotFoundException - if there is no user with the specified name
StardogAuthorizationException - if the current user does not have the permission to retrieve the roles of the specified user
StardogSecurityException - if the operation should fail for any other reason
void setUserRoles(String theUserName,
Collection<String> theRoles)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.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 exist
StardogAuthorizationException - if the current user does not have the permission to set the roles for the specified user
StardogSecurityException - if the operation should fail for any other reason
void addUserRole(String theUserName,
String theRole)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUserName - the user nametheRoles - a new role for the user
ResourceNotFoundException - if one of the resources (username or role name) does not exist
StardogAuthorizationException - if the current user does not have the permission to set the roles for the specified user
StardogSecurityException - if the operation should fail for any other reason
void deleteUserRole(String theUserName,
String theRole)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUserName - the user nametheRoles - the role name
ResourceNotFoundException - if one of the resources (username or role name) does not exist
StardogAuthorizationException - if the current user does not have the permission to set the roles for the specified user
StardogSecurityException - if the operation should fail for any other reason
boolean isSuperUser(String theUsername)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUsername - the username to be checked
ResourceNotFoundException - if there is no such user name
StardogAuthorizationException - if the current user does not have the permission to perform this operation
StardogSecurityException - if the operation should fail for any other reason
boolean isUserEnabled(String theUsername)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.StardogAuthorizationException
theUsername - the username to be checked
ResourceNotFoundException - if there is no such user name
StardogAuthorizationException - if the current user does not have the permission to perform this operation
StardogSecurityException - if the operation should fail for any other reason
void setUserEnabled(String theUsername,
boolean theEnabled)
throws com.clarkparsia.stardog.security.StardogSecurityException,
com.clarkparsia.stardog.security.ResourceNotFoundException,
com.clarkparsia.stardog.security.OperationNotSupportedException,
com.clarkparsia.stardog.security.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 disabled
ResourceNotFoundException - if there is no such user name
OperationNotSupportedException - if the operation would disable the last super user
StardogAuthorizationException - if the current user does not have the permission to perform this operation
StardogSecurityException - if the operation should fail for any other reason
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||