Skip to content

Commit 1e9146b

Browse files
authored
Put back CaseImportServer endpoints (#121)
Signed-off-by: Etienne Homer <[email protected]>
1 parent 0a0bfe3 commit 1e9146b

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public RouteLocator myRoutes(RouteLocatorBuilder builder, ApplicationContext con
3535
.route(p -> context.getBean(CaseServer.class).getRoute(p))
3636
.route(p -> context.getBean(StudyNotificationServer.class).getRoute(p))
3737
.route(p -> context.getBean(DirectoryNotificationServer.class).getRoute(p))
38+
.route(p -> context.getBean(CaseImportServer.class).getRoute(p))
3839
.route(p -> context.getBean(ContingencyServer.class).getRoute(p))
3940
.route(p -> context.getBean(ConfigServer.class).getRoute(p))
4041
.route(p -> context.getBean(ConfigNotificationServer.class).getRoute(p))
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
Copyright (c) 2023, RTE (http://www.rte-france.com)
3+
This Source Code Form is subject to the terms of the Mozilla Public
4+
License, v. 2.0. If a copy of the MPL was not distributed with this
5+
file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
*/
7+
package org.gridsuite.gateway.endpoints;
8+
9+
import org.gridsuite.gateway.ServiceURIsConfig;
10+
import org.springframework.stereotype.Component;
11+
12+
/**
13+
* @author Abdelsalem Hedhili <abdelsalem.hedhili at rte-france.com>
14+
*/
15+
@Component(value = CaseImportServer.ENDPOINT_NAME)
16+
public class CaseImportServer implements EndPointServer {
17+
18+
public static final String ENDPOINT_NAME = "case-import";
19+
20+
private final ServiceURIsConfig servicesURIsConfig;
21+
22+
public CaseImportServer(ServiceURIsConfig servicesURIsConfig) {
23+
this.servicesURIsConfig = servicesURIsConfig;
24+
}
25+
26+
@Override
27+
public String getEndpointBaseUri() {
28+
return servicesURIsConfig.getCaseImportServerBaseUri();
29+
}
30+
31+
@Override
32+
public String getEndpointName() {
33+
return ENDPOINT_NAME;
34+
}
35+
}

0 commit comments

Comments
 (0)