public interface RoleRepository
extends org.neo4j.kernel.lifecycle.Lifecycle
| Modifier and Type | Method and Description |
|---|---|
void |
assertValidRoleName(String roleName)
Asserts whether the given role name is valid or not.
|
void |
clear()
Clears all cached role data.
|
void |
create(RoleRecord role)
Create a role, given that the roles token is unique.
|
boolean |
delete(RoleRecord role)
Deletes a role.
|
Set<String> |
getAllRoleNames() |
org.neo4j.server.security.auth.ListSnapshot<RoleRecord> |
getPersistedSnapshot()
Returns a snapshot of the current persisted role repository
|
RoleRecord |
getRoleByName(String roleName) |
Set<String> |
getRoleNamesByUsername(String username) |
int |
numberOfRoles() |
void |
removeUserFromAllRoles(String username) |
void |
setRoles(org.neo4j.server.security.auth.ListSnapshot<RoleRecord> roles)
Replaces the roles in the repository with the given roles.
|
void |
update(RoleRecord existingRole,
RoleRecord updatedRole)
Update a role, given that the role token is unique.
|
static boolean |
validate(List<org.neo4j.kernel.impl.security.User> users,
List<RoleRecord> roles) |
RoleRecord getRoleByName(String roleName)
void clear()
void create(RoleRecord role) throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException, IOException
role - the new role objectorg.neo4j.kernel.api.exceptions.InvalidArgumentsException - if the role name is not valid or the role name already existsIOExceptionvoid setRoles(org.neo4j.server.security.auth.ListSnapshot<RoleRecord> roles) throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException, IOException
roles - the new rolesorg.neo4j.kernel.api.exceptions.InvalidArgumentsException - if any role name is not validIOException - if the underlying storage for roles failsvoid update(RoleRecord existingRole, RoleRecord updatedRole) throws org.neo4j.server.security.auth.exception.ConcurrentModificationException, IOException
existingRole - the existing role object, which must match the current state in this repositoryupdatedRole - the updated role objectorg.neo4j.server.security.auth.exception.ConcurrentModificationException - if the existingRole does not match the current state in the repositoryIOExceptionboolean delete(RoleRecord role) throws IOException
role - the role to deleteIOExceptionint numberOfRoles()
void assertValidRoleName(String roleName) throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException
roleName - the role name to be tested.org.neo4j.kernel.api.exceptions.InvalidArgumentsException - if the role name was invalid.void removeUserFromAllRoles(String username) throws org.neo4j.server.security.auth.exception.ConcurrentModificationException, IOException
org.neo4j.server.security.auth.exception.ConcurrentModificationExceptionIOExceptionorg.neo4j.server.security.auth.ListSnapshot<RoleRecord> getPersistedSnapshot() throws IOException
IOExceptionstatic boolean validate(List<org.neo4j.kernel.impl.security.User> users, List<RoleRecord> roles)
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.