• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DataBiosphere / consent / #5275

23 Aug 2024 03:02PM UTC coverage: 77.59% (+0.4%) from 77.22%
#5275

push

web-flow
DCJ-626: Code Cleanup (#2382)

1 of 1 new or added line in 1 file covered. (100.0%)

15 existing lines in 3 files now uncovered.

10082 of 12994 relevant lines covered (77.59%)

0.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.98
/src/main/java/org/broadinstitute/consent/http/ConsentModule.java
1
package org.broadinstitute.consent.http;
2

3
import com.google.inject.AbstractModule;
4
import com.google.inject.Inject;
5
import com.google.inject.Provides;
6
import io.dropwizard.client.JerseyClientBuilder;
7
import io.dropwizard.core.Configuration;
8
import io.dropwizard.core.setup.Environment;
9
import io.dropwizard.jdbi3.JdbiFactory;
10
import jakarta.ws.rs.client.Client;
11
import org.broadinstitute.consent.http.authentication.OAuthAuthenticator;
12
import org.broadinstitute.consent.http.cloudstore.GCSService;
13
import org.broadinstitute.consent.http.configurations.ConsentConfiguration;
14
import org.broadinstitute.consent.http.db.AcknowledgementDAO;
15
import org.broadinstitute.consent.http.db.CounterDAO;
16
import org.broadinstitute.consent.http.db.DAOContainer;
17
import org.broadinstitute.consent.http.db.DaaDAO;
18
import org.broadinstitute.consent.http.db.DacDAO;
19
import org.broadinstitute.consent.http.db.DarCollectionDAO;
20
import org.broadinstitute.consent.http.db.DarCollectionSummaryDAO;
21
import org.broadinstitute.consent.http.db.DataAccessRequestDAO;
22
import org.broadinstitute.consent.http.db.DatasetAssociationDAO;
23
import org.broadinstitute.consent.http.db.DatasetDAO;
24
import org.broadinstitute.consent.http.db.ElectionDAO;
25
import org.broadinstitute.consent.http.db.FileStorageObjectDAO;
26
import org.broadinstitute.consent.http.db.InstitutionDAO;
27
import org.broadinstitute.consent.http.db.LibraryCardDAO;
28
import org.broadinstitute.consent.http.db.MailMessageDAO;
29
import org.broadinstitute.consent.http.db.MatchDAO;
30
import org.broadinstitute.consent.http.db.OidcAuthorityDAO;
31
import org.broadinstitute.consent.http.db.SamDAO;
32
import org.broadinstitute.consent.http.db.StudyDAO;
33
import org.broadinstitute.consent.http.db.UserDAO;
34
import org.broadinstitute.consent.http.db.UserPropertyDAO;
35
import org.broadinstitute.consent.http.db.UserRoleDAO;
36
import org.broadinstitute.consent.http.db.VoteDAO;
37
import org.broadinstitute.consent.http.mail.SendGridAPI;
38
import org.broadinstitute.consent.http.mail.freemarker.FreeMarkerTemplateHelper;
39
import org.broadinstitute.consent.http.service.AcknowledgementService;
40
import org.broadinstitute.consent.http.service.CounterService;
41
import org.broadinstitute.consent.http.service.DaaService;
42
import org.broadinstitute.consent.http.service.DacService;
43
import org.broadinstitute.consent.http.service.DarCollectionService;
44
import org.broadinstitute.consent.http.service.DataAccessRequestService;
45
import org.broadinstitute.consent.http.service.DatasetRegistrationService;
46
import org.broadinstitute.consent.http.service.DatasetService;
47
import org.broadinstitute.consent.http.service.ElasticSearchService;
48
import org.broadinstitute.consent.http.service.ElectionService;
49
import org.broadinstitute.consent.http.service.EmailService;
50
import org.broadinstitute.consent.http.service.FileStorageObjectService;
51
import org.broadinstitute.consent.http.service.InstitutionService;
52
import org.broadinstitute.consent.http.service.LibraryCardService;
53
import org.broadinstitute.consent.http.service.MatchService;
54
import org.broadinstitute.consent.http.service.MetricsService;
55
import org.broadinstitute.consent.http.service.NihService;
56
import org.broadinstitute.consent.http.service.OidcService;
57
import org.broadinstitute.consent.http.service.OntologyService;
58
import org.broadinstitute.consent.http.service.ResearcherService;
59
import org.broadinstitute.consent.http.service.SupportRequestService;
60
import org.broadinstitute.consent.http.service.UseRestrictionConverter;
61
import org.broadinstitute.consent.http.service.UserService;
62
import org.broadinstitute.consent.http.service.VoteService;
63
import org.broadinstitute.consent.http.service.dao.DaaServiceDAO;
64
import org.broadinstitute.consent.http.service.dao.DacServiceDAO;
65
import org.broadinstitute.consent.http.service.dao.DarCollectionServiceDAO;
66
import org.broadinstitute.consent.http.service.dao.DataAccessRequestServiceDAO;
67
import org.broadinstitute.consent.http.service.dao.DatasetServiceDAO;
68
import org.broadinstitute.consent.http.service.dao.NihServiceDAO;
69
import org.broadinstitute.consent.http.service.dao.UserServiceDAO;
70
import org.broadinstitute.consent.http.service.dao.VoteServiceDAO;
71
import org.broadinstitute.consent.http.service.ontology.ElasticSearchSupport;
72
import org.broadinstitute.consent.http.service.sam.SamService;
73
import org.broadinstitute.consent.http.util.HttpClientUtil;
74
import org.broadinstitute.consent.http.util.gson.GsonUtil;
75
import org.jdbi.v3.core.Jdbi;
76
import org.jdbi.v3.gson2.Gson2Config;
77
import org.jdbi.v3.gson2.Gson2Plugin;
78
import org.jdbi.v3.guava.GuavaPlugin;
79
import org.jdbi.v3.sqlobject.SqlObjectPlugin;
80

81
public class ConsentModule extends AbstractModule {
82

83
  @Inject
84
  private final ConsentConfiguration config;
85
  @Inject
86
  private final Environment environment;
87

88
  private final Client client;
89
  private final Jdbi jdbi;
90
  private final CounterDAO counterDAO;
91
  private final ElectionDAO electionDAO;
92
  private final VoteDAO voteDAO;
93
  private final StudyDAO studyDAO;
94
  private final DatasetDAO datasetDAO;
95
  private final DatasetAssociationDAO datasetAssociationDAO;
96
  private final DaaDAO daaDAO;
97
  private final DacDAO dacDAO;
98
  private final UserDAO userDAO;
99
  private final UserRoleDAO userRoleDAO;
100
  private final MatchDAO matchDAO;
101
  private final MailMessageDAO mailMessageDAO;
102
  private final UserPropertyDAO userPropertyDAO;
103
  private final DataAccessRequestDAO dataAccessRequestDAO;
104
  private final DarCollectionDAO darCollectionDAO;
105
  private final DarCollectionSummaryDAO darCollectionSummaryDAO;
106
  private final InstitutionDAO institutionDAO;
107
  private final LibraryCardDAO libraryCardDAO;
108
  private final FileStorageObjectDAO fileStorageObjectDAO;
109
  private final AcknowledgementDAO acknowledgementDAO;
110

111
  public static final String DB_ENV = "postgresql";
112

113
  ConsentModule(ConsentConfiguration consentConfiguration, Environment environment) {
1✔
114
    this.config = consentConfiguration;
1✔
115
    this.environment = environment;
1✔
116
    this.client = new JerseyClientBuilder(environment)
1✔
117
        .using(config.getJerseyClientConfiguration())
1✔
118
        .build(this.getClass().getName());
1✔
119

120
    this.jdbi = new JdbiFactory().build(environment, config.getDataSourceFactory(), DB_ENV);
1✔
121
    jdbi.installPlugin(new SqlObjectPlugin());
1✔
122
    jdbi.installPlugin(new Gson2Plugin());
1✔
123
    jdbi.installPlugin(new GuavaPlugin());
1✔
124
    jdbi.getConfig().get(Gson2Config.class).setGson(GsonUtil.buildGson());
1✔
125

126
    this.counterDAO = this.jdbi.onDemand(CounterDAO.class);
1✔
127
    this.electionDAO = this.jdbi.onDemand(ElectionDAO.class);
1✔
128
    this.voteDAO = this.jdbi.onDemand(VoteDAO.class);
1✔
129
    this.studyDAO = this.jdbi.onDemand(StudyDAO.class);
1✔
130
    this.datasetDAO = this.jdbi.onDemand(DatasetDAO.class);
1✔
131
    this.datasetAssociationDAO = this.jdbi.onDemand(DatasetAssociationDAO.class);
1✔
132
    this.daaDAO = this.jdbi.onDemand(DaaDAO.class);
1✔
133
    this.dacDAO = this.jdbi.onDemand(DacDAO.class);
1✔
134
    this.userDAO = this.jdbi.onDemand(UserDAO.class);
1✔
135
    this.userRoleDAO = this.jdbi.onDemand(UserRoleDAO.class);
1✔
136
    this.matchDAO = this.jdbi.onDemand(MatchDAO.class);
1✔
137
    this.mailMessageDAO = this.jdbi.onDemand(MailMessageDAO.class);
1✔
138
    this.userPropertyDAO = this.jdbi.onDemand(UserPropertyDAO.class);
1✔
139
    this.dataAccessRequestDAO = this.jdbi.onDemand(DataAccessRequestDAO.class);
1✔
140
    this.darCollectionDAO = this.jdbi.onDemand(DarCollectionDAO.class);
1✔
141
    this.darCollectionSummaryDAO = this.jdbi.onDemand(DarCollectionSummaryDAO.class);
1✔
142
    this.institutionDAO = this.jdbi.onDemand((InstitutionDAO.class));
1✔
143
    this.libraryCardDAO = this.jdbi.onDemand((LibraryCardDAO.class));
1✔
144
    this.fileStorageObjectDAO = this.jdbi.onDemand((FileStorageObjectDAO.class));
1✔
145
    this.acknowledgementDAO = this.jdbi.onDemand((AcknowledgementDAO.class));
1✔
146
  }
1✔
147

148
  @Override
149
  protected void configure() {
150
    bind(Configuration.class).toInstance(config);
1✔
151
    bind(Environment.class).toInstance(environment);
1✔
152
  }
1✔
153

154
  @Provides
155
  public DAOContainer providesDAOContainer() {
156
    DAOContainer container = new DAOContainer();
1✔
157
    container.setCounterDAO(providesCounterDAO());
1✔
158
    container.setDacDAO(providesDacDAO());
1✔
159
    container.setDataAccessRequestDAO(providesDataAccessRequestDAO());
1✔
160
    container.setDarCollectionDAO(providesDARCollectionDAO());
1✔
161
    container.setDarCollectionSummaryDAO(providesDarCollectionSummaryDAO());
1✔
162
    container.setDatasetAssociationDAO(providesDatasetAssociationDAO());
1✔
163
    container.setDatasetDAO(providesDatasetDAO());
1✔
164
    container.setElectionDAO(providesElectionDAO());
1✔
165
    container.setMailMessageDAO(providesMailMessageDAO());
1✔
166
    container.setMatchDAO(providesMatchDAO());
1✔
167
    container.setUserPropertyDAO(providesUserPropertyDAO());
1✔
168
    container.setUserDAO(providesUserDAO());
1✔
169
    container.setUserRoleDAO(providesUserRoleDAO());
1✔
170
    container.setVoteDAO(providesVoteDAO());
1✔
171
    container.setStudyDAO(providesStudyDAO());
1✔
172
    container.setInstitutionDAO(providesInstitutionDAO());
1✔
173
    container.setFileStorageObjectDAO(providesFileStorageObjectDAO());
1✔
174
    container.setAcknowledgementDAO(providesAcknowledgementDAO());
1✔
175
    return container;
1✔
176
  }
177

178
  @Provides
179
  Client providesClient() {
180
    return client;
1✔
181
  }
182

183
  @Provides
184
  HttpClientUtil providesHttpClientUtil() {
185
    return new HttpClientUtil(config.getServicesConfiguration());
1✔
186
  }
187

188
  @Provides
189
  Jdbi providesJdbi() {
190
    return jdbi;
1✔
191
  }
192

193
  @Provides
194
  UseRestrictionConverter providesUseRestrictionConverter() {
195
    return new UseRestrictionConverter(providesClient(), config.getServicesConfiguration());
1✔
196
  }
197

198
  @Provides
199
  OntologyService providesOntologyService() {
200
    return new OntologyService(providesClient(), config.getServicesConfiguration());
1✔
201
  }
202

203
  @Provides
204
  OAuthAuthenticator providesOAuthAuthenticator() {
205
    return new OAuthAuthenticator(providesSamService());
1✔
206
  }
207

208
  @Provides
209
  DarCollectionService providesDarCollectionService() {
210
    return new DarCollectionService(
1✔
211
        providesDARCollectionDAO(),
1✔
212
        providesDarCollectionServiceDAO(),
1✔
213
        providesDatasetDAO(),
1✔
214
        providesElectionDAO(),
1✔
215
        providesDataAccessRequestDAO(),
1✔
216
        providesEmailService(),
1✔
217
        providesVoteDAO(),
1✔
218
        providesMatchDAO(),
1✔
219
        providesDarCollectionSummaryDAO()
1✔
220
    );
221
  }
222

223
  @Provides
224
  FileStorageObjectService providesFileStorageObjectService() {
225
    return new FileStorageObjectService(
×
226
        providesFileStorageObjectDAO(),
×
227
        providesGCSService()
×
228
    );
229
  }
230

231
  @Provides
232
  GCSService providesGCSService() {
233
    return new GCSService(config.getCloudStoreConfiguration());
1✔
234
  }
235

236
  @Provides
237
  CounterDAO providesCounterDAO() {
238
    return counterDAO;
1✔
239
  }
240

241
  @Provides
242
  CounterService providesCounterService() {
243
    return new CounterService(providesCounterDAO());
1✔
244
  }
245

246
  @Provides
247
  DataAccessRequestService providesDataAccessRequestService() {
248
    return new DataAccessRequestService(
1✔
249
        providesCounterService(),
1✔
250
        providesDAOContainer(),
1✔
251
        providesDacService(),
1✔
252
        providesDataAccessRequestServiceDAO(),
1✔
253
        providesUseRestrictionConverter()
1✔
254
    );
255
  }
256

257
  @Provides
258
  DatasetServiceDAO providesDatasetServiceDAO() {
259
    return new DatasetServiceDAO(
1✔
260
        jdbi,
261
        providesDatasetDAO(),
1✔
262
        providesStudyDAO());
1✔
263
  }
264

265
  @Provides
266
  DatasetService providesDatasetService() {
267
    return new DatasetService(
1✔
268
        providesDatasetDAO(),
1✔
269
        providesDaaDAO(),
1✔
270
        providesDacDAO(),
1✔
271
        providesEmailService(),
1✔
272
        providesOntologyService(),
1✔
273
        providesStudyDAO(),
1✔
274
        providesDatasetServiceDAO(),
1✔
275
        providesUserDAO());
1✔
276
  }
277

278
  @Provides
279
  ElectionService providesElectionService() {
280
    return new ElectionService(
1✔
281
        providesElectionDAO()
1✔
282
    );
283
  }
284

285
  @Provides
286
  FreeMarkerTemplateHelper providesFreeMarkerTemplateHelper() {
287
    return new FreeMarkerTemplateHelper(config.getFreeMarkerConfiguration());
1✔
288
  }
289

290
  @Provides
291
  EmailService providesEmailService() {
292
    return new EmailService(
1✔
293
        providesDARCollectionDAO(),
1✔
294
        providesVoteDAO(),
1✔
295
        providesElectionDAO(),
1✔
296
        providesUserDAO(),
1✔
297
        providesMailMessageDAO(),
1✔
298
        providesDatasetDAO(),
1✔
299
        providesDacDAO(),
1✔
300
        providesSendGridAPI(),
1✔
301
        providesFreeMarkerTemplateHelper(),
1✔
302
        config.getServicesConfiguration().getLocalURL()
1✔
303
    );
304
  }
305

306
  @Provides
307
  SendGridAPI providesSendGridAPI() {
308
    return new SendGridAPI(
1✔
309
        config.getMailConfiguration(),
1✔
310
        providesUserDAO());
1✔
311
  }
312

313
  @Provides
314
  DataAccessRequestDAO providesDataAccessRequestDAO() {
315
    return dataAccessRequestDAO;
1✔
316
  }
317

318
  @Provides
319
  DarCollectionDAO providesDARCollectionDAO() {
320
    return darCollectionDAO;
1✔
321
  }
322

323
  @Provides
324
  DarCollectionSummaryDAO providesDarCollectionSummaryDAO() {
325
    return darCollectionSummaryDAO;
1✔
326
  }
327

328
  @Provides
329
  DarCollectionServiceDAO providesDarCollectionServiceDAO() {
330
    return new DarCollectionServiceDAO(
1✔
331
        providesDatasetDAO(),
1✔
332
        providesElectionDAO(),
1✔
333
        providesJdbi(),
1✔
334
        providesUserDAO());
1✔
335
  }
336

337
  @Provides
338
  DataAccessRequestServiceDAO providesDataAccessRequestServiceDAO() {
339
    return new DataAccessRequestServiceDAO(
1✔
340
        providesDataAccessRequestDAO(),
1✔
341
        providesJdbi(),
1✔
342
        providesDARCollectionDAO()
1✔
343
    );
344
  }
345

346
  @Provides
347
  ElectionDAO providesElectionDAO() {
348
    return electionDAO;
1✔
349
  }
350

351
  @Provides
352
  VoteDAO providesVoteDAO() {
353
    return voteDAO;
1✔
354
  }
355

356
  @Provides
357
  StudyDAO providesStudyDAO() {
358
    return studyDAO;
1✔
359
  }
360

361
  @Provides
362
  VoteServiceDAO providesVoteServiceDAO() {
363
    return new VoteServiceDAO(
1✔
364
        providesJdbi(),
1✔
365
        providesVoteDAO());
1✔
366
  }
367

368
  @Provides
369
  VoteService providesVoteService() {
370
    return new VoteService(
1✔
371
        providesUserDAO(),
1✔
372
        providesDARCollectionDAO(),
1✔
373
        providesDataAccessRequestDAO(),
1✔
374
        providesDatasetDAO(),
1✔
375
        providesElectionDAO(),
1✔
376
        providesEmailService(),
1✔
377
        providesElasticSearchService(),
1✔
378
        providesUseRestrictionConverter(),
1✔
379
        providesVoteDAO(),
1✔
380
        providesVoteServiceDAO());
1✔
381
  }
382

383
  @Provides
384
  DatasetDAO providesDatasetDAO() {
385
    return datasetDAO;
1✔
386
  }
387

388
  @Provides
389
  DatasetAssociationDAO providesDatasetAssociationDAO() {
390
    return datasetAssociationDAO;
1✔
391
  }
392

393
  @Provides
394
  DaaServiceDAO providesDaaServiceDAO() {
395
    return new DaaServiceDAO(
1✔
396
        providesJdbi(),
1✔
397
        providesDaaDAO(),
1✔
398
        providesFileStorageObjectDAO());
1✔
399
  }
400

401
  @Provides
402
  DacServiceDAO providesDacServiceDAO() {
403
    return new DacServiceDAO(
1✔
404
        providesJdbi());
1✔
405
  }
406

407
  @Provides
408
  DaaDAO providesDaaDAO() {
409
    return daaDAO;
1✔
410
  }
411

412
  @Provides
413
  DacDAO providesDacDAO() {
414
    return dacDAO;
1✔
415
  }
416

417
  @Provides
418
  DaaService providesDaaService() {
419
    return new DaaService(
1✔
420
        providesDaaServiceDAO(),
1✔
421
        providesDaaDAO(),
1✔
422
        providesGCSService(),
1✔
423
        providesEmailService(),
1✔
424
        providesUserService(),
1✔
425
        providesInstitutionDAO(),
1✔
426
        providesDacDAO());
1✔
427
  }
428

429
  @Provides
430
  DacService providesDacService() {
431
    return new DacService(
1✔
432
        providesDacDAO(),
1✔
433
        providesUserDAO(),
1✔
434
        providesDatasetDAO(),
1✔
435
        providesElectionDAO(),
1✔
436
        providesDataAccessRequestDAO(),
1✔
437
        providesVoteService(),
1✔
438
        providesDaaService(),
1✔
439
        providesDacServiceDAO());
1✔
440
  }
441

442
  @Provides
443
  ElasticSearchService providesElasticSearchService() {
444
    return new ElasticSearchService(
1✔
445
        ElasticSearchSupport.createRestClient(config.getElasticSearchConfiguration()),
1✔
446
        config.getElasticSearchConfiguration(),
1✔
447
        providesDacDAO(),
1✔
448
        providesDataAccessRequestDAO(),
1✔
449
        providesUserDAO(),
1✔
450
        providesOntologyService(),
1✔
451
        providesInstitutionDAO(),
1✔
452
        providesDatasetDAO(),
1✔
453
        providesStudyDAO()
1✔
454
    );
455
  }
456

457
  @Provides
458
  UserDAO providesUserDAO() {
459
    return userDAO;
1✔
460
  }
461

462
  @Provides
463
  UserRoleDAO providesUserRoleDAO() {
464
    return userRoleDAO;
1✔
465
  }
466

467
  @Provides
468
  MatchService providesMatchService() {
469
    return new MatchService(
1✔
470
        providesClient(),
1✔
471
        config.getServicesConfiguration(),
1✔
472
        providesMatchDAO(),
1✔
473
        providesDataAccessRequestDAO(),
1✔
474
        providesDatasetDAO(),
1✔
475
        providesUseRestrictionConverter());
1✔
476
  }
477

478
  @Provides
479
  MatchDAO providesMatchDAO() {
480
    return matchDAO;
1✔
481
  }
482

483
  @Provides
484
  MailMessageDAO providesMailMessageDAO() {
485
    return mailMessageDAO;
1✔
486
  }
487

488
  @Provides
489
  MetricsService providesMetricsService() {
490
    return new MetricsService(
1✔
491
        providesDacService(),
1✔
492
        providesDatasetDAO(),
1✔
493
        providesDataAccessRequestDAO(),
1✔
494
        providesDARCollectionDAO(),
1✔
495
        providesMatchDAO(),
1✔
496
        providesElectionDAO()
1✔
497
    );
498
  }
499

500
  @Provides
501
  UserPropertyDAO providesUserPropertyDAO() {
502
    return userPropertyDAO;
1✔
503
  }
504

505
  @Provides
506
  InstitutionDAO providesInstitutionDAO() {
507
    return institutionDAO;
1✔
508
  }
509

510
  @Provides
511
  FileStorageObjectDAO providesFileStorageObjectDAO() {
512
    return fileStorageObjectDAO;
1✔
513
  }
514

515
  @Provides
516
  LibraryCardDAO providesLibraryCardDAO() {
517
    return libraryCardDAO;
1✔
518
  }
519

520
  @Provides
521
  AcknowledgementDAO providesAcknowledgementDAO() {
522
    return acknowledgementDAO;
1✔
523
  }
524

525
  @Provides
526
  InstitutionService providesInstitutionService() {
527
    return new InstitutionService(providesInstitutionDAO(), providesUserDAO());
1✔
528
  }
529

530
  @Provides
531
  LibraryCardService providesLibraryCardService() {
532
    return new LibraryCardService(
1✔
533
        providesLibraryCardDAO(),
1✔
534
        providesInstitutionDAO(),
1✔
535
        providesUserDAO());
1✔
536
  }
537

538
  @Provides
539
  AcknowledgementService providesAcknowledgementService() {
540
    return new AcknowledgementService(
1✔
541
        providesAcknowledgementDAO()
1✔
542
    );
543
  }
544

545
  @Provides
546
  DatasetRegistrationService providesDatasetRegistrationService() {
547
    return new DatasetRegistrationService(
1✔
548
        providesDatasetDAO(),
1✔
549
        providesDacDAO(),
1✔
550
        providesDatasetServiceDAO(),
1✔
551
        providesGCSService(),
1✔
552
        providesElasticSearchService(),
1✔
553
        providesStudyDAO(),
1✔
554
        providesEmailService()
1✔
555
    );
556
  }
557

558
  @Provides
559
  UserServiceDAO providesUserServiceDAO() {
560
    return new UserServiceDAO(
1✔
561
        providesJdbi(),
1✔
562
        providesUserDAO(),
1✔
563
        providesUserRoleDAO()
1✔
564
    );
565
  }
566

567
  @Provides
568
  UserService providesUserService() {
569
    return new UserService(
1✔
570
        providesUserDAO(),
1✔
571
        providesUserPropertyDAO(),
1✔
572
        providesUserRoleDAO(),
1✔
573
        providesVoteDAO(),
1✔
574
        providesDatasetAssociationDAO(),
1✔
575
        providesInstitutionDAO(),
1✔
576
        providesLibraryCardDAO(),
1✔
577
        providesAcknowledgementDAO(),
1✔
578
        providesFileStorageObjectDAO(),
1✔
579
        providesSamDAO(),
1✔
580
        providesUserServiceDAO(),
1✔
581
        providesDaaDAO(),
1✔
582
        providesEmailService());
1✔
583
  }
584

585
  @Provides
586
  ResearcherService providesResearcherService() {
587
    return new ResearcherService(
1✔
588
        providesUserPropertyDAO(),
1✔
589
        providesUserDAO()
1✔
590
    );
591
  }
592

593
  @Provides
594
  NihService providesNihService() {
595
    return new NihService(
1✔
596
        providesResearcherService(),
1✔
597
        providesUserDAO(),
1✔
598
        providesNIHServiceDAO());
1✔
599
  }
600

601
  @Provides
602
  NihServiceDAO providesNIHServiceDAO() {
603
    return new NihServiceDAO(jdbi);
1✔
604
  }
605

606
  @Provides
607
  SamService providesSamService() {
608
    return new SamService(providesSamDAO());
1✔
609
  }
610

611
  @Provides
612
  SamDAO providesSamDAO() {
613
    return new SamDAO(providesHttpClientUtil(), config.getServicesConfiguration());
1✔
614
  }
615

616
  @Provides
617
  OidcAuthorityDAO providesOidcAuthorityDAO() {
618
    return new OidcAuthorityDAO(providesHttpClientUtil(), config.getOidcConfiguration());
1✔
619
  }
620

621
  @Provides
622
  OidcService providesOidcService() {
623
    return new OidcService(providesOidcAuthorityDAO(), config.getOidcConfiguration());
1✔
624
  }
625

626
  @Provides
627
  SupportRequestService providesSupportRequestService() {
UNCOV
628
    return new SupportRequestService(config.getServicesConfiguration(), providesInstitutionDAO(),
×
UNCOV
629
        providesUserDAO());
×
630
  }
631
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc