mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
refactor(ses): rename SesController to SesSendController (#3837)
The controller kept its generic name while it held every v2 endpoint. After the per-domain split it serves only the three /v2/email/outbound-* routes, so the name now says what it holds. Pure rename: no endpoint, path, status or body changes. Drop two leftovers from the days when this was the only SES v2 controller. The ten domain controllers opened their Javadoc with "split out of SesController", which the rename would have made misleading, since those endpoints were never send endpoints, and which documented history git already records while coupling ten files to one class for nothing else. This class claimed to follow LambdaController in throwing AwsExceptions directly, but it catches and remaps them in three places, LambdaController documents no such pattern, and AwsExceptionMapper is a global provider that covers every JAX-RS resource anyway. Add the class Javadoc the split left missing. SesSendController records which three endpoints it keeps and why the send path stayed behind the facade. SesService had no class Javadoc at all; it now states the survival rule that decides what lives on the facade, the categories that rule leaves behind, and that its name is historical rather than a claim to own SES as a whole.
This commit is contained in:
1 parent
00e94d84f0
commit
1d009b9614
14 files changed
+68
-41
No files matched your search
+4
-4
@@ -39,8 +39,8 @@ class SesV2ControllerRegistrationTest {
|
||||
@Test
|
||||
void everyV2EmailResourceClassIsRegisteredOnTheSesDescriptor() throws Exception {
|
||||
List<Class<?>> v2Controllers = v2EmailResourceClasses();
|
||||
assertTrue(v2Controllers.contains(SesController.class),
|
||||
"scan must at least find SesController; found " + v2Controllers);
|
||||
assertTrue(v2Controllers.contains(SesSendController.class),
|
||||
"scan must at least find SesSendController; found " + v2Controllers);
|
||||
|
||||
List<String> unregistered = new ArrayList<>();
|
||||
for (Class<?> controller : v2Controllers) {
|
||||
@@ -66,10 +66,10 @@ class SesV2ControllerRegistrationTest {
|
||||
}
|
||||
|
||||
private List<Class<?>> v2EmailResourceClasses() throws Exception {
|
||||
URI codeSource = SesController.class.getProtectionDomain().getCodeSource()
|
||||
URI codeSource = SesSendController.class.getProtectionDomain().getCodeSource()
|
||||
.getLocation().toURI();
|
||||
Path classesDir = Path.of(codeSource);
|
||||
String packagePrefix = SesController.class.getPackageName() + ".";
|
||||
String packagePrefix = SesSendController.class.getPackageName() + ".";
|
||||
List<Class<?>> found = new ArrayList<>();
|
||||
try (Stream<Path> paths = Files.walk(classesDir)) {
|
||||
List<Path> classFiles = paths.filter(p -> p.toString().endsWith(".class")).toList();
|
||||
|
||||
Reference in new issue
Block a user