Skip to content

Commit 5f4a119

Browse files
authored
Rename spreadsheet-config-server into study-config-server (#125)
Signed-off-by: David BRAQUART <[email protected]>
1 parent 3c49b9d commit 5f4a119

File tree

6 files changed

+17
-51
lines changed

6 files changed

+17
-51
lines changed

src/main/java/org/gridsuite/gateway/GatewayConfig.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ public RouteLocator myRoutes(RouteLocatorBuilder builder, ApplicationContext con
5353
.route(p -> context.getBean(VoltageInitServer.class).getRoute(p))
5454
.route(p -> context.getBean(ShortCircuitServer.class).getRoute(p))
5555
.route(p -> context.getBean(StateEstimationOrchestratorServer.class).getRoute(p))
56-
.route(p -> context.getBean(SpreadsheetConfigServer.class).getRoute(p))
57-
.route(p -> context.getBean(SpreadsheetConfigCollection.class).getRoute(p))
56+
.route(p -> context.getBean(StudyConfigServer.class).getRoute(p))
5857
.build();
5958
}
6059
}

src/main/java/org/gridsuite/gateway/ServiceURIsConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ public class ServiceURIsConfig {
111111
@Value("${gridsuite.services.state-estimation-orchestrator-server.base-uri:http://state-estimation-orchestrator-server/}")
112112
String stateEstimationOrchestratorServerBaseUri;
113113

114-
@Value("${gridsuite.services.spreadsheet-config-server.base-uri:http://spreadsheet-config-server/}")
115-
String spreadsheetConfigServerBaseUri;
114+
@Value("${gridsuite.services.study-config-server.base-uri:http://study-config-server/}")
115+
String studyConfigServerBaseUri;
116116

117117
@Value("${gridsuite.services.user-identity-server.base-uri:http://user-identity-server/}")
118118
String userIdentityServerBaseUri;

src/main/java/org/gridsuite/gateway/endpoints/SpreadsheetConfigCollection.java

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/main/java/org/gridsuite/gateway/endpoints/SpreadsheetConfigServer.java renamed to src/main/java/org/gridsuite/gateway/endpoints/StudyConfigServer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
import org.springframework.stereotype.Component;
1212

1313
/**
14-
* @author Achour BERRAHMA <achour.berrahma at rte-france.com>
14+
* @author David BRAQUART <david.braquart at rte-france.com>
1515
*/
1616
@RequiredArgsConstructor
17-
@Component(value = SpreadsheetConfigServer.ENDPOINT_NAME)
18-
public class SpreadsheetConfigServer implements EndPointServer {
17+
@Component(value = StudyConfigServer.ENDPOINT_NAME)
18+
public class StudyConfigServer implements EndPointServer {
1919

20-
public static final String ENDPOINT_NAME = "spreadsheet-config";
20+
public static final String ENDPOINT_NAME = "study-config";
2121

2222
private final ServiceURIsConfig servicesURIsConfig;
2323

2424
@Override
2525
public String getEndpointBaseUri() {
26-
return servicesURIsConfig.getSpreadsheetConfigServerBaseUri();
26+
return servicesURIsConfig.getStudyConfigServerBaseUri();
2727
}
2828

2929
@Override

src/main/resources/application-local.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ gridsuite:
6363
shortcircuit-server:
6464
base-uri: http://localhost:5031
6565
state-estimation-server:
66-
base-uri: http://localhost:5040
66+
base-uri: http://localhost:6040
6767
state-estimation-orchestrator-server:
6868
base-uri: http://localhost:5041
69-
spreadsheet-config-server:
69+
study-config-server:
7070
base-uri: http://localhost:5035
7171
user-identity-server:
7272
base-uri: http://localhost:5034

src/test/java/org/gridsuite/gateway/ElementAccessControlTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"gridsuite.services.filter-server.base-uri=http://localhost:${wiremock.server.port}",
4848
"gridsuite.services.user-admin-server.base-uri=http://localhost:${wiremock.server.port}",
4949
"gridsuite.services.sensitivity-analysis-server.base-uri=http://localhost:${wiremock.server.port}",
50-
"gridsuite.services.spreadsheet-config-server.base-uri=http://localhost:${wiremock.server.port}",
50+
"gridsuite.services.study-config-server.base-uri=http://localhost:${wiremock.server.port}",
5151
}
5252
)
5353
@AutoConfigureWireMock(port = 0)
@@ -211,37 +211,37 @@ void testGetElements() {
211211
.willReturn(aResponse()));
212212

213213
webClient
214-
.get().uri(String.format("spreadsheet-config/v1/spreadsheet-configs/%s", uuid))
214+
.get().uri(String.format("study-config/v1/spreadsheet-configs/%s", uuid))
215215
.header("Authorization", "Bearer " + tokenUser1)
216216
.exchange()
217217
.expectStatus().isOk();
218218

219219
webClient
220-
.get().uri(String.format("spreadsheet-config/v1/spreadsheet-config-collections/%s", uuid))
220+
.get().uri(String.format("study-config/v1/spreadsheet-config-collections/%s", uuid))
221221
.header("Authorization", "Bearer " + tokenUser1)
222222
.exchange()
223223
.expectStatus().isOk();
224224

225225
webClient
226-
.get().uri(String.format("spreadsheet-config/v1/spreadsheet-configs/%s", uuid))
226+
.get().uri(String.format("study-config/v1/spreadsheet-configs/%s", uuid))
227227
.header("Authorization", "Bearer " + tokenUser2)
228228
.exchange()
229229
.expectStatus().isNotFound();
230230

231231
webClient
232-
.get().uri(String.format("spreadsheet-config/v1/spreadsheet-config-collections/%s", uuid))
232+
.get().uri(String.format("study-config/v1/spreadsheet-config-collections/%s", uuid))
233233
.header("Authorization", "Bearer " + tokenUser2)
234234
.exchange()
235235
.expectStatus().isNotFound();
236236

237237
webClient
238-
.get().uri("spreadsheet-config/v1/spreadsheet-configs/invalid-uuid")
238+
.get().uri("study-config/v1/spreadsheet-configs/invalid-uuid")
239239
.header("Authorization", "Bearer " + tokenUser1)
240240
.exchange()
241241
.expectStatus().isNotFound();
242242

243243
webClient
244-
.get().uri("spreadsheet-config/v1/spreadsheet-config-collections/invalid-uuid")
244+
.get().uri("study-config/v1/spreadsheet-config-collections/invalid-uuid")
245245
.header("Authorization", "Bearer " + tokenUser1)
246246
.exchange()
247247
.expectStatus().isNotFound();

0 commit comments

Comments
 (0)