public class FileUserRepository extends org.neo4j.kernel.lifecycle.LifecycleAdapter implements UserRepository
| Constructor and Description |
|---|
FileUserRepository(Path file,
org.neo4j.logging.LogProvider logProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(User user)
Create a user, given that the users token is unique.
|
boolean |
delete(User user)
Deletes a user.
|
User |
findByName(String name) |
boolean |
isValidName(String name)
Utility for API consumers to tell if #save() will accept a given username
|
int |
numberOfUsers() |
void |
start() |
void |
update(User existingUser,
User updatedUser)
Update a user, given that the users token is unique.
|
public FileUserRepository(Path file, org.neo4j.logging.LogProvider logProvider)
public User findByName(String name)
findByName in interface UserRepositorypublic void start()
throws Throwable
start in interface org.neo4j.kernel.lifecycle.Lifecyclestart in class org.neo4j.kernel.lifecycle.LifecycleAdapterThrowablepublic void create(User user) throws IllegalUsernameException, IOException
UserRepositorycreate in interface UserRepositoryuser - the new user objectIllegalUsernameException - if the username is not validIOExceptionpublic void update(User existingUser, User updatedUser) throws ConcurrentModificationException, IOException
UserRepositoryupdate in interface UserRepositoryexistingUser - the existing user object, which must match the current state in this repositoryupdatedUser - the updated user objectConcurrentModificationException - if the existingUser does not match the current state in the repositoryIOExceptionpublic boolean delete(User user) throws IOException
UserRepositorydelete in interface UserRepositoryuser - the user to deleteIOExceptionpublic int numberOfUsers()
numberOfUsers in interface UserRepositorypublic boolean isValidName(String name)
UserRepositoryisValidName in interface UserRepositoryCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.