-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
email event listeners and update names of data files (#47)
- Loading branch information
1 parent
74bb92b
commit 59804ca
Showing
21 changed files
with
124 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
commons/src/main/java/io/flowinquiry/modules/teams/service/event/NewTeamCreatedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.flowinquiry.modules.teams.service.event; | ||
|
||
import io.flowinquiry.modules.teams.service.dto.TeamDTO; | ||
import lombok.Getter; | ||
import org.springframework.context.ApplicationEvent; | ||
|
||
@Getter | ||
public class NewTeamCreatedEvent extends ApplicationEvent { | ||
private final TeamDTO team; | ||
|
||
public NewTeamCreatedEvent(Object source, TeamDTO team) { | ||
super(source); | ||
this.team = team; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../main/java/io/flowinquiry/modules/teams/service/listener/NewTeamCreatedEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.flowinquiry.modules.teams.service.listener; | ||
|
||
import io.flowinquiry.modules.teams.service.event.NewTeamRequestCreatedEvent; | ||
import org.springframework.context.event.EventListener; | ||
import org.springframework.scheduling.annotation.Async; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Component | ||
public class NewTeamCreatedEventListener { | ||
|
||
@Async("auditLogExecutor") | ||
@Transactional | ||
@EventListener | ||
public void onNewTeamCreated(NewTeamRequestCreatedEvent event) { | ||
|
||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...io/flowinquiry/modules/teams/service/listener/NewTeamRequestCreatedMailEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.flowinquiry.modules.teams.service.listener; | ||
|
||
import io.flowinquiry.config.FlowInquiryProperties; | ||
import io.flowinquiry.modules.collab.service.MailService; | ||
import io.flowinquiry.modules.teams.service.dto.TeamRequestDTO; | ||
import io.flowinquiry.modules.teams.service.event.NewTeamRequestCreatedEvent; | ||
import org.springframework.context.event.EventListener; | ||
import org.springframework.scheduling.annotation.Async; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Component | ||
public class NewTeamRequestCreatedMailEventListener { | ||
|
||
private final MailService mailService; | ||
private final FlowInquiryProperties flowInquiryProperties; | ||
|
||
public NewTeamRequestCreatedMailEventListener(MailService mailService, FlowInquiryProperties flowInquiryProperties) { | ||
this.mailService = mailService; | ||
this.flowInquiryProperties = flowInquiryProperties; | ||
} | ||
|
||
@Async("auditLogExecutor") | ||
@Transactional | ||
@EventListener | ||
public void onNewTeamRequestCreated(NewTeamRequestCreatedEvent event) { | ||
TeamRequestDTO teamRequestDTO = event.getTeamRequest(); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...io/flowinquiry/modules/teams/service/listener/NewUserAddedIntoTeamEmailEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.flowinquiry.modules.teams.service.listener; | ||
|
||
import io.flowinquiry.modules.teams.service.event.NewUsersAddedIntoTeamEvent; | ||
import org.springframework.context.event.EventListener; | ||
import org.springframework.scheduling.annotation.Async; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Component | ||
public class NewUserAddedIntoTeamEmailEventListener { | ||
|
||
@Async("auditLogExecutor") | ||
@EventListener | ||
@Transactional | ||
public void onNewUsersAddedIntoTeam(NewUsersAddedIntoTeamEvent event) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../io/flowinquiry/modules/teams/service/listener/RemoveUserOutOfTeamEmailEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.flowinquiry.modules.teams.service.listener; | ||
|
||
import io.flowinquiry.modules.teams.service.event.RemoveUserOutOfTeamEvent; | ||
import org.springframework.context.event.EventListener; | ||
import org.springframework.scheduling.annotation.Async; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Component | ||
public class RemoveUserOutOfTeamEmailEventListener { | ||
|
||
@Async("auditLogExecutor") | ||
@EventListener | ||
@Transactional | ||
public void onRemoveUserOutOfTeam(RemoveUserOutOfTeamEvent event) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.