Interface RegisterMapper
public interface RegisterMapper
Mapper interface for converting between a User entity and register/login DTO's
- Since:
- 19.4.24
- Version:
- 1.0
- Author:
- Yasin M.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RegisterMapper
Implementation instance of the mapper -
Method Summary
Modifier and TypeMethodDescriptionMaps User entity to DTOtoEntity
(RegisterRequest request, Role role, String encodedPassword) Maps User register DTO to entity
-
Field Details
-
INSTANCE
Implementation instance of the mapper
-
-
Method Details
-
toEntity
Maps User register DTO to entity- Parameters:
request
- DTOrole
- User roleencodedPassword
- Encoded password- Returns:
- Mapped user entity
-
toDTO
Maps User entity to DTO- Parameters:
user
- User entityaccessToken
- Access JWT tokenrefreshToken
- Refresh JWT token- Returns:
- Mapped DTO
-