-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
231 additions
and
61 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
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,19 @@ | ||
package com.shareNwork.domain; | ||
|
||
import java.util.Map; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class EmailData { | ||
|
||
private String emailType; | ||
private String mailTo; | ||
private Map<String, String> emailTemplateVariables; | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/com/shareNwork/domain/constants/EmailType.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,22 @@ | ||
package com.shareNwork.domain.constants; | ||
|
||
public enum EmailType { | ||
|
||
OPENROTA_INVITATION("openRotaInvitation"), | ||
INVITATION_EXPIRATION("invitationExpiration"), | ||
NEW_ACCESS_REQ("newAccessReq"), | ||
ACCESS_REQ_STATUS("accessReqStatus"), | ||
NEW_RESOURCE_REQ("newResourceReq"), | ||
RESOURCE_REQUEST_STATUS("resourceRequestStatus"), | ||
PROJECT_CLOSURE_DUE_REMINDER("projectClosureDueReminder"), | ||
PROJECT_CLOSURE_REMINDER("projectClosureReminder"); | ||
|
||
private final String value; | ||
EmailType(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String value() { | ||
return this.value; | ||
} | ||
} |
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,26 @@ | ||
package com.shareNwork.proxy; | ||
|
||
import java.util.List; | ||
|
||
import javax.ws.rs.POST; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.core.Response; | ||
|
||
import com.shareNwork.domain.EmailData; | ||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; | ||
|
||
@Path("/mailer") | ||
@Produces(MediaType.APPLICATION_JSON) | ||
@RegisterRestClient(baseUri = "http://localhost:8082") | ||
public interface MailerProxy { | ||
|
||
@POST | ||
@Path("/mail") | ||
Response sendEmail(EmailData emailData); | ||
|
||
@POST | ||
@Path("/multi-mail") | ||
Response sendMultipleEmail(List<EmailData> emailDataList); | ||
} |
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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/shareNwork/service/ReminderSchedulers.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,10 @@ | ||
package com.shareNwork.service; | ||
|
||
public interface ReminderSchedulers { | ||
|
||
void invitationExpireReminder(); | ||
|
||
void projectClosureDueReminder(); | ||
|
||
void ProjectCompletionReminder(); | ||
} |
Oops, something went wrong.