public interface AuthModule
Modifier and Type | Method and Description |
---|---|
void |
changeSecurity(String token,
String nodePath,
Map<String,Integer> grantUsers,
Map<String,Integer> revokeUsers,
Map<String,Integer> grantRoles,
Map<String,Integer> revokeRoles,
boolean recursive)
Change several security permissions in the same call.
|
Map<String,Integer> |
getGrantedRoles(String token,
String nodePath)
Get roles permissions from am item (document or folder).
|
Map<String,Integer> |
getGrantedUsers(String token,
String nodePath)
Get user permissions from am item (document or folder).
|
String |
getMail(String token,
String user)
Retrieves the mail from an user.
|
String |
getName(String token,
String user)
Retrieves the name from an user.
|
List<String> |
getRoles(String token)
Retrieves a list of repository roles.
|
List<String> |
getRolesByUser(String token,
String user)
Retrieves a list of roles by user.
|
List<String> |
getUsers(String token)
Retrieves a list of repository users
|
List<String> |
getUsersByRole(String token,
String role)
Retrieves a list of users by role.
|
void |
grantRole(String token,
String nodePath,
String role,
int permissions,
boolean recursive)
Grant role permissions for a node.
|
void |
grantUser(String token,
String nodePath,
String user,
int permissions,
boolean recursive)
Add user permissions to a node.
|
void |
login()
Logins into the repository.
|
String |
login(String user,
String password) |
void |
logout(String token)
Log out from the repository.
|
void |
revokeRole(String token,
String nodePath,
String role,
int permissions,
boolean recursive)
Revoke role permissions from a node.
|
void |
revokeUser(String token,
String nodePath,
String user,
int permissions,
boolean recursive)
Revoke user permissions from a node.
|
void login() throws RepositoryException, DatabaseException
RepositoryException
DatabaseException
String login(String user, String password) throws AccessDeniedException, RepositoryException, DatabaseException
void logout(String token) throws RepositoryException, DatabaseException
RepositoryException
DatabaseException
void grantUser(String token, String nodePath, String user, int permissions, boolean recursive) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
nodePath
- The complete path to the node.user
- User name which permissions are changed.permissions
- A mask with the permissions to be added.recursive
- recursive – If the nodePath indicated a folder,
the permissions can be applied recursively.PathNotFoundException
- If the node defined by nodePath do not exists.AccessDeniedException
- If the authorization information is not valid.RepositoryException
- If there is any error accessing to the repository.DatabaseException
void revokeUser(String token, String nodePath, String user, int permissions, boolean recursive) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
nodePath
- The complete path to the node.user
- User name which permissions are changed.permissions
- A mask with the permissions to be removed.recursive
- If the nodePath indicates a folder, the
permissions can be revoked recursively.PathNotFoundException
- If the node defined by nodePath do not exists.AccessDeniedException
- If the authorization information is not valid.RepositoryException
- If there is any error accessing to the repository.DatabaseException
Map<String,Integer> getGrantedUsers(String token, String nodePath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
nodePath
- The complete path to the node.PathNotFoundException
- If the node defined by nodePath do not exists.AccessDeniedException
- If the authorization information is not valid.RepositoryException
- If there is any error accessing to the repository.DatabaseException
void grantRole(String token, String nodePath, String role, int permissions, boolean recursive) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
nodePath
- The complete path to the node.role
- Role name which permissions are changed.permissions
- A mask with the permissions to be added.recursive
- If the nodePath indicates a folder, the permissions can
be applied recursively.PathNotFoundException
- If the node defined by nodePath do not exists.AccessDeniedException
- If the authorization information is not valid.RepositoryException
- If there is any error accessing to the repository.DatabaseException
void revokeRole(String token, String nodePath, String role, int permissions, boolean recursive) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
nodePath
- The complete path to the node.role
- Role name which permissions are changed.permissions
- A mask with the permissions to be removed.recursive
- If the nodePath indicates a folder, the
permissions can be applied recursively.PathNotFoundException
- If the node defined by nodePath do not exists.AccessDeniedException
- If the authorization information is not valid.RepositoryException
- If there is any error accessing to the repository.DatabaseException
Map<String,Integer> getGrantedRoles(String token, String nodePath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
nodePath
- The complete path to the node.PathNotFoundException
- If the node defined by nodePath do not exists.AccessDeniedException
- If the authorization information is not valid.RepositoryException
- If there is any error accessing to the repository.DatabaseException
List<String> getUsers(String token) throws PrincipalAdapterException
RepositoryException
- If there is any error retrieving the users list.PrincipalAdapterException
List<String> getRoles(String token) throws PrincipalAdapterException
RepositoryException
- If there is any error retrieving the roles list.PrincipalAdapterException
List<String> getUsersByRole(String token, String role) throws PrincipalAdapterException
RepositoryException
- If there is any error retrieving the user list.PrincipalAdapterException
List<String> getRolesByUser(String token, String user) throws PrincipalAdapterException
RepositoryException
- If there is any error retrieving the roles list.PrincipalAdapterException
String getMail(String token, String user) throws PrincipalAdapterException
users
- The user id.RepositoryException
- If there is any error retrieving the mail.PrincipalAdapterException
String getName(String token, String user) throws PrincipalAdapterException
users
- The user id.RepositoryException
- If there is any error retrieving the mail.PrincipalAdapterException
void changeSecurity(String token, String nodePath, Map<String,Integer> grantUsers, Map<String,Integer> revokeUsers, Map<String,Integer> grantRoles, Map<String,Integer> revokeRoles, boolean recursive) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
Copyright © 2015. All Rights Reserved.