mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
refactor(ses): drop the tenant-free suppression overloads from SesService (#3860)
The four short signatures of putSuppressedDestination, getSuppressedDestination, deleteSuppressedDestination and listSuppressedDestinations only passed null as the TenantName to the tenant-aware version, which then forwarded straight to SesSuppressionService. The v2 controller always passes a TenantName, so nothing in src/main called them; the only callers were tests seeding or reading suppression entries. SesSuppressionService already exposes those exact three-argument signatures, so the tests reach it through the builder accessor instead, the way SesSuppressionServiceTest already did. They keep the facade for what is actually facade behavior: sendEmail and resolveSuppressionReason. Retitle the suppression section and fold its two comment paragraphs into one. The heading still claimed "account attributes + list" although the account attributes moved to SesSuppressionService in the store split and are read and written by the v2 controller; only the tenant-routed list operations remain. Also squash the four runs of consecutive blank lines in the file, including the one the earlier inspection cleanup left before the Templates section comment.
This commit is contained in:
1 parent
6e53c5275a
commit
938eca1fe9
4 files changed
+27
-47
No files matched your search
@@ -613,8 +613,6 @@ public class SesService {
|
||||
return cs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ──────────────────────────── Templates ────────────────────────────
|
||||
|
||||
// Email templates live in SesTemplateService, which the v2 controller and the v1 handler call
|
||||
@@ -1053,7 +1051,6 @@ public class SesService {
|
||||
suppressionService.getAccountSuppressionAttributes(region).getSuppressedReasons());
|
||||
}
|
||||
|
||||
|
||||
public List<Tag> listResourceTags(String arn, String region) {
|
||||
ResourceRef ref = parseSesArn(arn);
|
||||
requireCallerAccount(ref);
|
||||
@@ -1172,31 +1169,13 @@ public class SesService {
|
||||
resource.substring(0, slash), resource.substring(slash + 1));
|
||||
}
|
||||
|
||||
// ──────────────────── Suppression (account attributes + list) ────────────────────
|
||||
// Storage lives in SesSuppressionService; the account attributes are read and written by the v2
|
||||
// controller directly, the list operations below keep the tenant routing here, and the send
|
||||
// filters (collectSuppressedReasons / resolveSuppressionReason) read entries back through it.
|
||||
|
||||
// A TenantName routes each suppression-list operation to that tenant's own list (fully separate
|
||||
// from the account list on AWS); the reason/address validation still runs first, matching the
|
||||
// probed precedence where request validation precedes tenant existence.
|
||||
|
||||
public void putSuppressedDestination(String region, String emailAddress, String reason) {
|
||||
putSuppressedDestination(region, emailAddress, reason, null);
|
||||
}
|
||||
|
||||
public SuppressedDestination getSuppressedDestination(String region, String emailAddress) {
|
||||
return getSuppressedDestination(region, emailAddress, null);
|
||||
}
|
||||
|
||||
public void deleteSuppressedDestination(String region, String emailAddress) {
|
||||
deleteSuppressedDestination(region, emailAddress, null);
|
||||
}
|
||||
|
||||
public List<SuppressedDestination> listSuppressedDestinations(String region,
|
||||
List<String> reasonFilters) {
|
||||
return listSuppressedDestinations(region, reasonFilters, null);
|
||||
}
|
||||
// ──────────────────────────── Suppression list ────────────────────────────
|
||||
// Storage lives in SesSuppressionService, and the account-level attributes are read and
|
||||
// written by the v2 controller through it directly. What stays here is the tenant routing: a
|
||||
// TenantName sends the operation to that tenant's own list, which is fully separate from the
|
||||
// account list on AWS, and the reason and address validation still runs first, matching the
|
||||
// probed precedence where request validation precedes tenant existence. The send filters
|
||||
// (collectSuppressedReasons, resolveSuppressionReason) read entries back through the service.
|
||||
|
||||
public void putSuppressedDestination(String region, String emailAddress, String reason,
|
||||
String tenantName) {
|
||||
@@ -1352,7 +1331,6 @@ public class SesService {
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter out recipients whose effective suppression reason is non-null. Returns a new
|
||||
* list containing only the addresses that should reach the SMTP relay, mirroring AWS
|
||||
@@ -1411,8 +1389,6 @@ public class SesService {
|
||||
return effective.contains(entry.getReason()) ? entry.getReason() : null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String sendTemplatedEmail(String source, List<String> toAddresses, List<String> ccAddresses,
|
||||
List<String> bccAddresses, List<String> replyToAddresses,
|
||||
String returnPath, String templateName, JsonNode templateData,
|
||||
|
||||
Reference in new issue
Block a user