forked from RedHatInsights/notifications-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
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
8 changed files
with
117 additions
and
42 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...-email/src/main/java/com/redhat/cloud/notifications/connector/email/model/bop/Emails.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,27 @@ | ||
package com.redhat.cloud.notifications.connector.email.model.bop; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* Represents the payload to be sent to BOP/MBOP. | ||
*/ | ||
public class Emails { | ||
|
||
@JsonProperty("emails") | ||
private final Set<Email> emails; | ||
|
||
public Emails() { | ||
this.emails = new HashSet<>(); | ||
} | ||
|
||
public void addEmail(final Email email) { | ||
this.emails.add(email); | ||
} | ||
|
||
Set<Email> getEmails() { | ||
return emails; | ||
} | ||
} |
19 changes: 8 additions & 11 deletions
19
...main/java/com/redhat/cloud/notifications/connector/email/model/bop/SendEmailsRequest.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 |
---|---|---|
@@ -1,25 +1,22 @@ | ||
package com.redhat.cloud.notifications.connector.email.model.bop; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAutoDetect; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY; | ||
|
||
/** | ||
* Represents the payload to be sent to BOP/MBOP. | ||
*/ | ||
@JsonAutoDetect(fieldVisibility = ANY) | ||
public class SendEmailsRequest { | ||
|
||
private final Set<Email> emails = new HashSet<>(); | ||
private final boolean skipUsersResolution; | ||
|
||
public SendEmailsRequest(boolean skipUsersResolution) { | ||
this.skipUsersResolution = skipUsersResolution; | ||
} | ||
|
||
public Set<Email> getEmails() { | ||
return emails; | ||
} | ||
private final boolean skipUsersResolution = true; | ||
|
||
public boolean isSkipUsersResolution() { | ||
return skipUsersResolution; | ||
public void addEmail(Email email) { | ||
emails.add(email); | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
engine/src/main/java/com/redhat/cloud/notifications/processors/email/Emails.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,24 @@ | ||
package com.redhat.cloud.notifications.processors.email; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public class Emails { | ||
|
||
@JsonProperty("emails") | ||
private final Set<Email> emails; | ||
|
||
Emails() { | ||
this.emails = new HashSet<>(); | ||
} | ||
|
||
void addEmail(final Email email) { | ||
this.emails.add(email); | ||
} | ||
|
||
Set<Email> getEmails() { | ||
return emails; | ||
} | ||
} |
19 changes: 8 additions & 11 deletions
19
engine/src/main/java/com/redhat/cloud/notifications/processors/email/SendEmailsRequest.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 |
---|---|---|
@@ -1,22 +1,19 @@ | ||
package com.redhat.cloud.notifications.processors.email; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAutoDetect; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY; | ||
|
||
@JsonAutoDetect(fieldVisibility = ANY) | ||
public class SendEmailsRequest { | ||
|
||
private final Set<Email> emails = new HashSet<>(); | ||
private final boolean skipUsersResolution; | ||
|
||
public SendEmailsRequest(boolean skipUsersResolution) { | ||
this.skipUsersResolution = skipUsersResolution; | ||
} | ||
|
||
public Set<Email> getEmails() { | ||
return emails; | ||
} | ||
private final boolean skipUsersResolution = true; | ||
|
||
public boolean isSkipUsersResolution() { | ||
return skipUsersResolution; | ||
public void addEmail(Email email) { | ||
emails.add(email); | ||
} | ||
} |
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