Joaquín Reñé
2025-10-07 146a0fb8b0e90f9196e569152f649baf60d6cc8f
securis/src/main/java/net/curisit/securis/ioc/RequestsModule.java
....@@ -1,3 +1,6 @@
1
+/*
2
+* Copyright @ 2013 CurisTEC, S.A.S. All Rights Reserved.
3
+*/
14 package net.curisit.securis.ioc;
25
36 import net.curisit.securis.services.ApiResource;
....@@ -11,28 +14,42 @@
1114
1215 import com.google.inject.AbstractModule;
1316
17
+/**
18
+* RequestsModule
19
+* <p>
20
+* Guice module that binds JAX-RS resource classes so they can be
21
+* injected and discovered by the DI container.
22
+* <p>
23
+* Notes:
24
+* - Currently binds resources explicitly. TODO indicates a future
25
+* improvement to bind dynamically via reflection / classpath scanning.
26
+*
27
+* @author JRA
28
+* Last reviewed by JRA on Oct 7, 2025.
29
+*/
1430 public class RequestsModule extends AbstractModule {
1531
32
+ /**
33
+ * configure<p>
34
+ * Register resource types in the injector.
35
+ */
1636 @Override
1737 protected void configure() {
1838 // TODO Securis: Make the bind using reflection dynamically
19
-
2039 bind(BasicServices.class);
2140 bind(UserResource.class);
22
-
2341 bind(ApplicationResource.class);
2442 bind(LicenseTypeResource.class);
2543 bind(OrganizationResource.class);
2644 bind(ApiResource.class);
2745 bind(LicenseResource.class);
2846 bind(PackResource.class);
29
-
3047 }
3148
49
+ // Example provider (kept commented for reference)
3250 // @Provides
3351 // @RequestScoped
3452 // public User provideUser() {
35
- // return ResteasyProviderFactory.getContextData(User.class);
53
+ // return ResteasyProviderFactory.getContextData(User.class);
3654 // }
37
-
3855 }