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

DataBiosphere / consent / #5486

11 Dec 2024 07:00PM UTC coverage: 79.013% (-0.09%) from 79.101%
#5486

push

web-flow
DT-982: Remove unused SO Support feature (#2435)

1 of 2 new or added lines in 2 files covered. (50.0%)

6 existing lines in 2 files now uncovered.

10233 of 12951 relevant lines covered (79.01%)

0.79 hits per line

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

98.4
/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.DatasetDAO;
23
import org.broadinstitute.consent.http.db.DraftDAO;
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.DraftFileStorageService;
48
import org.broadinstitute.consent.http.service.DraftService;
49
import org.broadinstitute.consent.http.service.ElasticSearchService;
50
import org.broadinstitute.consent.http.service.ElectionService;
51
import org.broadinstitute.consent.http.service.EmailService;
52
import org.broadinstitute.consent.http.service.FileStorageObjectService;
53
import org.broadinstitute.consent.http.service.InstitutionService;
54
import org.broadinstitute.consent.http.service.LibraryCardService;
55
import org.broadinstitute.consent.http.service.MatchService;
56
import org.broadinstitute.consent.http.service.MetricsService;
57
import org.broadinstitute.consent.http.service.NihService;
58
import org.broadinstitute.consent.http.service.OidcService;
59
import org.broadinstitute.consent.http.service.OntologyService;
60
import org.broadinstitute.consent.http.service.ResearcherService;
61
import org.broadinstitute.consent.http.service.SupportRequestService;
62
import org.broadinstitute.consent.http.service.UseRestrictionConverter;
63
import org.broadinstitute.consent.http.service.UserService;
64
import org.broadinstitute.consent.http.service.VoteService;
65
import org.broadinstitute.consent.http.service.dao.DaaServiceDAO;
66
import org.broadinstitute.consent.http.service.dao.DacServiceDAO;
67
import org.broadinstitute.consent.http.service.dao.DarCollectionServiceDAO;
68
import org.broadinstitute.consent.http.service.dao.DataAccessRequestServiceDAO;
69
import org.broadinstitute.consent.http.service.dao.DatasetServiceDAO;
70
import org.broadinstitute.consent.http.service.dao.NihServiceDAO;
71
import org.broadinstitute.consent.http.service.dao.UserServiceDAO;
72
import org.broadinstitute.consent.http.service.dao.VoteServiceDAO;
73
import org.broadinstitute.consent.http.service.ontology.ElasticSearchSupport;
74
import org.broadinstitute.consent.http.service.sam.SamService;
75
import org.broadinstitute.consent.http.util.HttpClientUtil;
76
import org.broadinstitute.consent.http.util.gson.GsonUtil;
77
import org.jdbi.v3.core.Jdbi;
78
import org.jdbi.v3.gson2.Gson2Config;
79
import org.jdbi.v3.gson2.Gson2Plugin;
80
import org.jdbi.v3.guava.GuavaPlugin;
81
import org.jdbi.v3.sqlobject.SqlObjectPlugin;
82

83
public class ConsentModule extends AbstractModule {
84

85
  public static final String DB_ENV = "postgresql";
86
  @Inject
87
  private final ConsentConfiguration config;
88
  @Inject
89
  private final Environment environment;
90
  private final Client client;
91
  private final Jdbi jdbi;
92
  private final CounterDAO counterDAO;
93
  private final ElectionDAO electionDAO;
94
  private final VoteDAO voteDAO;
95
  private final StudyDAO studyDAO;
96
  private final DatasetDAO datasetDAO;
97
  private final DaaDAO daaDAO;
98
  private final DacDAO dacDAO;
99
  private final UserDAO userDAO;
100
  private final UserRoleDAO userRoleDAO;
101
  private final MatchDAO matchDAO;
102
  private final MailMessageDAO mailMessageDAO;
103
  private final UserPropertyDAO userPropertyDAO;
104
  private final DataAccessRequestDAO dataAccessRequestDAO;
105
  private final DarCollectionDAO darCollectionDAO;
106
  private final DarCollectionSummaryDAO darCollectionSummaryDAO;
107
  private final InstitutionDAO institutionDAO;
108
  private final LibraryCardDAO libraryCardDAO;
109
  private final FileStorageObjectDAO fileStorageObjectDAO;
110
  private final AcknowledgementDAO acknowledgementDAO;
111
  private final DraftDAO draftDAO;
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.daaDAO = this.jdbi.onDemand(DaaDAO.class);
1✔
132
    this.dacDAO = this.jdbi.onDemand(DacDAO.class);
1✔
133
    this.userDAO = this.jdbi.onDemand(UserDAO.class);
1✔
134
    this.userRoleDAO = this.jdbi.onDemand(UserRoleDAO.class);
1✔
135
    this.matchDAO = this.jdbi.onDemand(MatchDAO.class);
1✔
136
    this.mailMessageDAO = this.jdbi.onDemand(MailMessageDAO.class);
1✔
137
    this.userPropertyDAO = this.jdbi.onDemand(UserPropertyDAO.class);
1✔
138
    this.dataAccessRequestDAO = this.jdbi.onDemand(DataAccessRequestDAO.class);
1✔
139
    this.darCollectionDAO = this.jdbi.onDemand(DarCollectionDAO.class);
1✔
140
    this.darCollectionSummaryDAO = this.jdbi.onDemand(DarCollectionSummaryDAO.class);
1✔
141
    this.institutionDAO = this.jdbi.onDemand((InstitutionDAO.class));
1✔
142
    this.libraryCardDAO = this.jdbi.onDemand((LibraryCardDAO.class));
1✔
143
    this.fileStorageObjectDAO = this.jdbi.onDemand((FileStorageObjectDAO.class));
1✔
144
    this.acknowledgementDAO = this.jdbi.onDemand((AcknowledgementDAO.class));
1✔
145
    this.draftDAO = this.jdbi.onDemand(DraftDAO.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.setDatasetDAO(providesDatasetDAO());
1✔
163
    container.setElectionDAO(providesElectionDAO());
1✔
164
    container.setMailMessageDAO(providesMailMessageDAO());
1✔
165
    container.setMatchDAO(providesMatchDAO());
1✔
166
    container.setUserPropertyDAO(providesUserPropertyDAO());
1✔
167
    container.setUserDAO(providesUserDAO());
1✔
168
    container.setUserRoleDAO(providesUserRoleDAO());
1✔
169
    container.setVoteDAO(providesVoteDAO());
1✔
170
    container.setStudyDAO(providesStudyDAO());
1✔
171
    container.setInstitutionDAO(providesInstitutionDAO());
1✔
172
    container.setFileStorageObjectDAO(providesFileStorageObjectDAO());
1✔
173
    container.setAcknowledgementDAO(providesAcknowledgementDAO());
1✔
174
    return container;
1✔
175
  }
176

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

387
  @Provides
388
  DaaServiceDAO providesDaaServiceDAO() {
389
    return new DaaServiceDAO(
1✔
390
        providesJdbi(),
1✔
391
        providesDaaDAO(),
1✔
392
        providesFileStorageObjectDAO());
1✔
393
  }
394

395
  @Provides
396
  DacServiceDAO providesDacServiceDAO() {
397
    return new DacServiceDAO(
1✔
398
        providesJdbi());
1✔
399
  }
400

401
  @Provides
402
  DaaDAO providesDaaDAO() {
403
    return daaDAO;
1✔
404
  }
405

406
  @Provides
407
  DacDAO providesDacDAO() {
408
    return dacDAO;
1✔
409
  }
410

411
  @Provides
412
  DaaService providesDaaService() {
413
    return new DaaService(
1✔
414
        providesDaaServiceDAO(),
1✔
415
        providesDaaDAO(),
1✔
416
        providesGCSService(),
1✔
417
        providesEmailService(),
1✔
418
        providesUserService(),
1✔
419
        providesInstitutionDAO(),
1✔
420
        providesDacDAO());
1✔
421
  }
422

423
  @Provides
424
  DacService providesDacService() {
425
    return new DacService(
1✔
426
        providesDacDAO(),
1✔
427
        providesUserDAO(),
1✔
428
        providesDatasetDAO(),
1✔
429
        providesElectionDAO(),
1✔
430
        providesDataAccessRequestDAO(),
1✔
431
        providesVoteService(),
1✔
432
        providesDaaService(),
1✔
433
        providesDacServiceDAO());
1✔
434
  }
435

436
  @Provides
437
  ElasticSearchService providesElasticSearchService() {
438
    return new ElasticSearchService(
1✔
439
        ElasticSearchSupport.createRestClient(config.getElasticSearchConfiguration()),
1✔
440
        config.getElasticSearchConfiguration(),
1✔
441
        providesDacDAO(),
1✔
442
        providesDataAccessRequestDAO(),
1✔
443
        providesUserDAO(),
1✔
444
        providesOntologyService(),
1✔
445
        providesInstitutionDAO(),
1✔
446
        providesDatasetDAO(),
1✔
447
        providesStudyDAO()
1✔
448
    );
449
  }
450

451
  @Provides
452
  UserDAO providesUserDAO() {
453
    return userDAO;
1✔
454
  }
455

456
  @Provides
457
  UserRoleDAO providesUserRoleDAO() {
458
    return userRoleDAO;
1✔
459
  }
460

461
  @Provides
462
  MatchService providesMatchService() {
463
    return new MatchService(
1✔
464
        providesClient(),
1✔
465
        config.getServicesConfiguration(),
1✔
466
        providesMatchDAO(),
1✔
467
        providesDataAccessRequestDAO(),
1✔
468
        providesDatasetDAO(),
1✔
469
        providesUseRestrictionConverter());
1✔
470
  }
471

472
  @Provides
473
  MatchDAO providesMatchDAO() {
474
    return matchDAO;
1✔
475
  }
476

477
  @Provides
478
  MailMessageDAO providesMailMessageDAO() {
479
    return mailMessageDAO;
1✔
480
  }
481

482
  @Provides
483
  MetricsService providesMetricsService() {
484
    return new MetricsService(
1✔
485
        providesDacService(),
1✔
486
        providesDatasetDAO(),
1✔
487
        providesDataAccessRequestDAO(),
1✔
488
        providesDARCollectionDAO(),
1✔
489
        providesMatchDAO(),
1✔
490
        providesElectionDAO()
1✔
491
    );
492
  }
493

494
  @Provides
495
  UserPropertyDAO providesUserPropertyDAO() {
496
    return userPropertyDAO;
1✔
497
  }
498

499
  @Provides
500
  InstitutionDAO providesInstitutionDAO() {
501
    return institutionDAO;
1✔
502
  }
503

504
  @Provides
505
  FileStorageObjectDAO providesFileStorageObjectDAO() {
506
    return fileStorageObjectDAO;
1✔
507
  }
508

509
  @Provides
510
  LibraryCardDAO providesLibraryCardDAO() {
511
    return libraryCardDAO;
1✔
512
  }
513

514
  @Provides
515
  AcknowledgementDAO providesAcknowledgementDAO() {
516
    return acknowledgementDAO;
1✔
517
  }
518

519
  @Provides
520
  InstitutionService providesInstitutionService() {
521
    return new InstitutionService(providesInstitutionDAO(), providesUserDAO());
1✔
522
  }
523

524
  @Provides
525
  LibraryCardService providesLibraryCardService() {
526
    return new LibraryCardService(
1✔
527
        providesLibraryCardDAO(),
1✔
528
        providesInstitutionDAO(),
1✔
529
        providesUserDAO());
1✔
530
  }
531

532
  @Provides
533
  AcknowledgementService providesAcknowledgementService() {
534
    return new AcknowledgementService(
1✔
535
        providesAcknowledgementDAO()
1✔
536
    );
537
  }
538

539
  @Provides
540
  DatasetRegistrationService providesDatasetRegistrationService() {
541
    return new DatasetRegistrationService(
1✔
542
        providesDatasetDAO(),
1✔
543
        providesDacDAO(),
1✔
544
        providesDatasetServiceDAO(),
1✔
545
        providesGCSService(),
1✔
546
        providesElasticSearchService(),
1✔
547
        providesStudyDAO(),
1✔
548
        providesEmailService()
1✔
549
    );
550
  }
551

552
  @Provides
553
  UserServiceDAO providesUserServiceDAO() {
554
    return new UserServiceDAO(
1✔
555
        providesJdbi(),
1✔
556
        providesUserDAO(),
1✔
557
        providesUserRoleDAO()
1✔
558
    );
559
  }
560

561
  @Provides
562
  UserService providesUserService() {
563
    return new UserService(
1✔
564
        providesUserDAO(),
1✔
565
        providesUserPropertyDAO(),
1✔
566
        providesUserRoleDAO(),
1✔
567
        providesVoteDAO(),
1✔
568
        providesInstitutionDAO(),
1✔
569
        providesLibraryCardDAO(),
1✔
570
        providesAcknowledgementDAO(),
1✔
571
        providesFileStorageObjectDAO(),
1✔
572
        providesSamDAO(),
1✔
573
        providesUserServiceDAO(),
1✔
574
        providesDaaDAO(),
1✔
575
        providesEmailService(),
1✔
576
        providesDraftService());
1✔
577
  }
578

579
  @Provides
580
  ResearcherService providesResearcherService() {
581
    return new ResearcherService(
1✔
582
        providesUserPropertyDAO(),
1✔
583
        providesUserDAO()
1✔
584
    );
585
  }
586

587
  @Provides
588
  NihService providesNihService() {
589
    return new NihService(
1✔
590
        providesResearcherService(),
1✔
591
        providesUserDAO(),
1✔
592
        providesNIHServiceDAO());
1✔
593
  }
594

595
  @Provides
596
  NihServiceDAO providesNIHServiceDAO() {
597
    return new NihServiceDAO(jdbi);
1✔
598
  }
599

600
  @Provides
601
  SamService providesSamService() {
602
    return new SamService(providesSamDAO());
1✔
603
  }
604

605
  @Provides
606
  SamDAO providesSamDAO() {
607
    return new SamDAO(providesHttpClientUtil(), config.getServicesConfiguration());
1✔
608
  }
609

610
  @Provides
611
  OidcAuthorityDAO providesOidcAuthorityDAO() {
612
    return new OidcAuthorityDAO(providesHttpClientUtil(), config.getOidcConfiguration());
1✔
613
  }
614

615
  @Provides
616
  OidcService providesOidcService() {
617
    return new OidcService(providesOidcAuthorityDAO(), config.getOidcConfiguration());
1✔
618
  }
619

620
  @Provides
621
  SupportRequestService providesSupportRequestService() {
NEW
622
    return new SupportRequestService(config.getServicesConfiguration());
×
623
  }
624

625
  @Provides
626
  DraftDAO providesDraftDAO() {
627
    return draftDAO;
1✔
628
  }
629

630
  @Provides
631
  DraftFileStorageService providesDraftFileStorageService() {
632
    return new DraftFileStorageService(providesJdbi(), providesGCSService(),
1✔
633
        providesFileStorageObjectDAO());
1✔
634
  }
635

636
  @Provides
637
  DraftService providesDraftService() {
638
    return new DraftService(providesJdbi(), providesDraftDAO(),
1✔
639
        providesDraftFileStorageService());
1✔
640
  }
641
}
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