| Package | Description |
|---|---|
| dmv.spring.demo.model.entity |
Persistence layer entities
|
| dmv.spring.demo.model.entity.security |
Security related entities
|
| dmv.spring.demo.model.repository |
Persistence layer interfaces
|
| dmv.spring.demo.model.repository.jdbc |
JDBC implementors of Persistence layer interfaces
|
| dmv.spring.demo.rest.controller |
Rest Controller
|
| dmv.spring.demo.rest.controller.apidocs |
Swagger (API documenting tool) at Controller level
|
| dmv.spring.demo.rest.representation |
DTO or entity representational objects
|
| dmv.spring.demo.rest.representation.assembler |
DTO assemblers
|
| dmv.spring.demo.security |
Security layer package
|
| Constructor and Description |
|---|
User(User user)
Creates a shallow copy instance of given User
|
| Modifier and Type | Class and Description |
|---|---|
class |
CustomUserDetails
Creates a wrapper for internal
User object to conform
to UserDetails interface, to be used within Authentication Context. |
| Constructor and Description |
|---|
CustomUserDetails(User user)
Create new instance of
UserDetails object with
given User details. |
| Modifier and Type | Method and Description |
|---|---|
User |
UserRepository.create(User user)
Store new user on persistence layer.
|
User |
UserRepository.findByEmail(String email)
Find user by e-mail address.
|
User |
UserRepository.findById(Long id)
Find user by its unique identifier.
|
User |
CredentialsRepository.getCredentials(String email)
Find user by email address and return all details, including password.
|
User |
UserRepository.update(User user)
Update existing user (found by id) with given
user details (password and email fields are omitted,
these are different operations).
|
| Modifier and Type | Method and Description |
|---|---|
Set<User> |
RoleRepository.getUsers(Role role)
Return all users that share given Role, or an empty Set if no such users.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CredentialsRepository.changeEmail(User user,
String newEmail)
Change existing user's email address.
|
void |
CredentialsRepository.changePassword(User user,
String newPassword)
Change existing user's password with the new one.
|
User |
UserRepository.create(User user)
Store new user on persistence layer.
|
void |
UserRepository.delete(User user)
Delete existing user (found by id) from persistence layer
|
User |
UserRepository.update(User user)
Update existing user (found by id) with given
user details (password and email fields are omitted,
these are different operations).
|
| Modifier and Type | Field and Description |
|---|---|
static org.springframework.jdbc.core.RowMapper<User> |
Mappers.USER_AUTH_MAPPER
Map
User fields with Password |
static org.springframework.jdbc.core.RowMapper<User> |
Mappers.USER_MAPPER
Map
User fields without Password |
| Modifier and Type | Method and Description |
|---|---|
User |
UserRepositoryJDBC.create(User user) |
User |
UserRepositoryJDBC.findByEmail(String email) |
User |
UserRepositoryJDBC.findById(Long id) |
User |
CredentialsRepositoryJDBC.getCredentials(String email) |
User |
UserRepositoryJDBC.update(User user) |
| Modifier and Type | Method and Description |
|---|---|
Set<User> |
RoleRepositoryJDBC.getUsers(Role role) |
| Modifier and Type | Method and Description |
|---|---|
void |
CredentialsRepositoryJDBC.changeEmail(User user,
String newEmail) |
void |
CredentialsRepositoryJDBC.changePassword(User user,
String newPassword) |
User |
UserRepositoryJDBC.create(User user) |
void |
UserRepositoryJDBC.delete(User user) |
User |
UserRepositoryJDBC.update(User user) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<UserDTO> |
UserRestController.createUser(User user,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.util.UriComponentsBuilder uriBuilder) |
org.springframework.http.ResponseEntity<UserDTO> |
UserRestController.updateUser(Long userId,
User user,
javax.servlet.http.HttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<UserDTO> |
UserRestApiDocs.createUser(User user,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.util.UriComponentsBuilder uriBuilder) |
org.springframework.http.ResponseEntity<UserDTO> |
UserRestApiDocs.updateUser(Long userId,
User user,
javax.servlet.http.HttpServletRequest request) |
| Constructor and Description |
|---|
UserDTO(User user,
Set<RoleLinkResource> roles) |
| Modifier and Type | Method and Description |
|---|---|
UserLinkResource |
UserLinkResourceAsm.toResource(User user) |
UserDTO |
UserDTOAsm.toResource(User user) |
| Modifier and Type | Method and Description |
|---|---|
String |
CredentialsService.getHashedPassword(User user)
Return a string with hashed representation of password.
|
String |
CustomCredentialsService.getHashedPassword(User user) |
boolean |
CredentialsService.isProtected(User user)
Is this user protected from being removed or modified?
|
boolean |
CustomCredentialsService.isProtected(User user) |