public interface UserRepository
| Modifier and Type | Method and Description |
|---|---|
void |
create(User user)
Create a user, given that the users token is unique.
|
User |
findByName(String name) |
User |
findByToken(String token) |
boolean |
isValidName(String name)
Utility for API consumers to tell if #save() will accept a given username
|
boolean |
isValidToken(String token)
Utility for API consumers to tell if #save() will accept a given token
|
int |
numberOfUsers() |
void |
update(User existingUser,
User updatedUser)
Update a user, given that the users token is unique.
|
void create(User user) throws IllegalUsernameException, IllegalTokenException, IOException
user - the new user objectIllegalUsernameException - if the username is not validIllegalTokenException - if the users token is invalid or already in useIOExceptionvoid update(User existingUser, User updatedUser) throws IllegalTokenException, ConcurrentModificationException, IOException
existingUser - the existing user object, which must match the current state in this repositoryupdatedUser - the updated user objectIllegalTokenException - if the user token is invalid or already in useConcurrentModificationException - if the existingUser does not match the current state in the repositoryIOExceptionint numberOfUsers()
boolean isValidName(String name)
boolean isValidToken(String token)
Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.