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

DataBiosphere / consent / #6326

13 Aug 2025 02:12PM UTC coverage: 83.338% (-0.004%) from 83.342%
#6326

push

web-flow
DT-1634, DT-1621: Add ECM url as a service level configuration (#2639)

2 of 3 new or added lines in 1 file covered. (66.67%)

10919 of 13102 relevant lines covered (83.34%)

0.83 hits per line

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

80.95
/src/main/java/org/broadinstitute/consent/http/configurations/ServicesConfiguration.java
1
package org.broadinstitute.consent.http.configurations;
2

3
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4
import jakarta.validation.constraints.NotNull;
5
import java.net.URLEncoder;
6
import java.nio.charset.Charset;
7

8
@JsonIgnoreProperties(ignoreUnknown = true)
9
public class ServicesConfiguration {
1✔
10

11
  public static final String RESOURCE_TYPES_PATH = "api/config/v1/resourceTypes";
12
  public static final String REGISTER_SELF_INFO_PATH = "register/user/v2/self/info";
13
  public static final String REGISTER_SELF_DIAGNOSTICS_PATH = "register/user/v2/self/diagnostics";
14
  public static final String REGISTER_SELF_PATH = "register/user/v2/self";
15
  public static final String TOS_TEXT_PATH = "termsOfService/v1/docs";
16
  public static final String TOS_SELF_PATH = "api/termsOfService/v1/user/self";
17
  public static final String ACCEPT_TOS_PATH = "api/termsOfService/v1/user/self/accept";
18
  public static final String REJECT_TOS_PATH = "api/termsOfService/v1/user/self/reject";
19
  public static final String SAM_V1_USER_EMAIL = "api/users/v1";
20
  // nosemgrep
21
  public static final String BROAD_ZENDESK_URL = "https://broadinstitute.zendesk.com";
22

23
  @NotNull
24
  private String ontologyURL;
25

26
  @NotNull
27
  private String localURL;
28

29
  @NotNull
30
  private String samUrl;
31

32
  @NotNull
33
  private String ecmUrl;
34

35
  /**
36
   * This represents the max time we'll wait for an external status check to return. If it does not
37
   * return, we assume a degradation in the overall service. This can be overridden in local
38
   * configs.
39
   */
40
  private Integer timeoutSeconds = 10;
1✔
41

42
  /**
43
   * This represents the thread pool size for making external status checks. This can be overridden
44
   * in local configs.
45
   */
46
  private Integer poolSize = 10;
1✔
47

48
  /**
49
   * This represents the time we maintain a cache of the response of an external status check. In
50
   * practice, status checks hit the server every second, sometimes more often. None of our external
51
   * status checks are critical for minimal system operation which gives us the flexibility to rely
52
   * on a cached version of the response for a short period of time. This can be overridden in local
53
   * configs.
54
   */
55
  private Integer cacheExpireMinutes = 1;
1✔
56

57
  private boolean activateSupportNotifications = false;
1✔
58

59

60
  public String getOntologyURL() {
61
    return ontologyURL;
1✔
62
  }
63

64
  public void setOntologyURL(String ontologyURL) {
65
    this.ontologyURL = ontologyURL;
1✔
66
  }
1✔
67

68
  public String getLocalURL() {
69
    return localURL;
1✔
70
  }
71

72
  public void setLocalURL(String localURL) {
73
    this.localURL = localURL;
1✔
74
  }
1✔
75

76
  public String getMatchURL_v4() {
77
    return getOntologyURL() + "match/v4";
1✔
78
  }
79

80
  public String getSamUrl() {
81
    return samUrl;
1✔
82
  }
83

84
  public void setSamUrl(String samUrl) {
85
    this.samUrl = samUrl;
1✔
86
  }
1✔
87

88
  public String getEcmUrl() {
NEW
89
    return ecmUrl;
×
90
  }
91

92
  public void setEcmUrl(String ecmUrl) {
93
    this.ecmUrl = ecmUrl;
1✔
94
  }
1✔
95

96
  public String getV1ResourceTypesUrl() {
97
    return getSamUrl() + RESOURCE_TYPES_PATH;
1✔
98
  }
99

100
  public String getRegisterUserV2SelfInfoUrl() {
101
    return getSamUrl() + REGISTER_SELF_INFO_PATH;
1✔
102
  }
103

104
  public String getV2SelfDiagnosticsUrl() {
105
    return getSamUrl() + REGISTER_SELF_DIAGNOSTICS_PATH;
1✔
106
  }
107

108
  public String postRegisterUserV2SelfUrl() {
109
    return getSamUrl() + REGISTER_SELF_PATH;
1✔
110
  }
111

112
  public String getToSTextUrl() {
113
    return getSamUrl() + TOS_TEXT_PATH;
1✔
114
  }
115

116
  public String getSelfTosUrl() {
117
    return getSamUrl() + TOS_SELF_PATH;
1✔
118
  }
119

120
  public String acceptTosUrl() {
121
    return getSamUrl() + ACCEPT_TOS_PATH;
1✔
122
  }
123

124
  public String rejectTosUrl() {
125
    return getSamUrl() + REJECT_TOS_PATH;
1✔
126
  }
127

128
  public String getV1UserUrl(String email) {
129
    String encoded = URLEncoder.encode(email, Charset.defaultCharset());
1✔
130
    return getSamUrl() + SAM_V1_USER_EMAIL + "/" + encoded;
1✔
131
  }
132

133
  public String postSupportRequestUrl() {
134
    return BROAD_ZENDESK_URL + "/api/v2/requests.json";
×
135
  }
136

137
  public String postSupportUploadUrl() {
138
    return BROAD_ZENDESK_URL + "/api/v2/uploads?filename=Attachment";
×
139
  }
140

141
  public boolean isActivateSupportNotifications() {
142
    return activateSupportNotifications;
×
143
  }
144

145
  public void setActivateSupportNotifications(boolean activateSupportNotifications) {
146
    this.activateSupportNotifications = activateSupportNotifications;
×
147
  }
×
148

149
  public Integer getTimeoutSeconds() {
150
    return timeoutSeconds;
1✔
151
  }
152

153
  public void setTimeoutSeconds(Integer timeoutSeconds) {
154
    this.timeoutSeconds = timeoutSeconds;
1✔
155
  }
1✔
156

157
  public Integer getPoolSize() {
158
    return poolSize;
1✔
159
  }
160

161
  public void setPoolSize(Integer poolSize) {
162
    this.poolSize = poolSize;
×
163
  }
×
164

165
  public Integer getCacheExpireMinutes() {
166
    return cacheExpireMinutes;
1✔
167
  }
168

169
  public void setCacheExpireMinutes(Integer cacheExpireMinutes) {
170
    this.cacheExpireMinutes = cacheExpireMinutes;
1✔
171
  }
1✔
172
}
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