-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DST-16098 Send Domain Event when username is changed #797
Conversation
src/main/java/uk/co/bconline/ndelius/model/notification/SnsMessageRequest.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/co/bconline/ndelius/service/impl/DomainEventServiceImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/co/bconline/ndelius/service/impl/DomainEventServiceImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/co/bconline/ndelius/service/impl/DomainEventServiceImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/co/bconline/ndelius/service/impl/DomainEventServiceImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/co/bconline/ndelius/service/impl/DomainEventServiceImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/co/bconline/ndelius/service/impl/DomainEventServiceImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/co/bconline/ndelius/service/impl/UserEntryServiceImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple more minor things after seeing the changes - but looks good.
Might be worth adding a test for this too? To check that a domain event entity is saved when we rename someone - you should be able to add it to the existing userCanBeRenamed
test.
import static java.util.Optional.ofNullable; | ||
|
||
@Component | ||
public class DomainEventTransformer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete this class now?
public void save(String existingUsername, UserEntry user) throws JsonProcessingException | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - could we annotate insertDomainEvent
with @SneakyThrows
so that we don't have to declare this exception all the way up?
public void save(String existingUsername, UserEntry user) throws JsonProcessingException | |
{ | |
public void save(String existingUsername, UserEntry user) | |
{ |
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class DomainEvent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete this now too?
Send Domain Event when username is changed