X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fric%2Fportal%2Fdashboard%2Fcontroller%2FAnrXappController.java;h=ae6845bb71d075be08703dafcc2d8d5458bd8ca0;hb=425ca107bd805dda906b62fc2b03a6f3c815b8a1;hp=55b42124dc9fc35f344816ab44bfbe41fea369a5;hpb=3f812ea25d352ec33d07f5ffa4c2aa2a77e8e793;p=portal%2Fric-dashboard.git diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java index 55b42124..ae6845bb 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/AnrXappController.java @@ -50,8 +50,13 @@ import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.ApiOperation; /** - * Provides methods to contact the ANR xApp which manages a Neighbor Cell - * Relation Table (NCRT). + * Proxies calls from the front end to the ANR xApp, which manages a Neighbor + * Cell Relation Table (NCRT). + * + * If a method throws RestClientResponseException, it is handled by + * {@link CustomResponseEntityExceptionHandler#handleProxyMethodException(Exception, org.springframework.web.context.request.WebRequest)} + * which returns status 502. All other exceptions are handled by Spring which + * returns status 500. */ @Configuration @RestController @@ -72,10 +77,6 @@ public class AnrXappController { // Path parameters public static final String PP_SERVING = "servingcells"; public static final String PP_NEIGHBOR = "neighborcells"; - // Query parameters - public static final String QP_NODEB = "ggnodeb"; - public static final String QP_SERVING = "servingCellNrcgi"; - public static final String QP_NEIGHBOR = "neighborCellNrpci"; // Populated by the autowired constructor private final HealthApi healthApi; @@ -129,12 +130,12 @@ public class AnrXappController { @GetMapping(NCRT_METHOD) @Secured({ DashboardConstants.ROLE_ADMIN, DashboardConstants.ROLE_STANDARD }) public NeighborCellRelationTable getNcrt( // - @RequestParam(name = QP_NODEB, required = false) String ggnbId, // - @RequestParam(name = QP_SERVING, required = false) String servingCellNrcgi, // - @RequestParam(name = QP_NEIGHBOR, required = false) String neighborCellNrpci) { - logger.debug("getNcrt: ggnbid {}, servingCellNrpci {}, neighborCellNrcgi {}", ggnbId, servingCellNrcgi, + @RequestParam(required = false) String ggnodeb, // + @RequestParam(required = false) String servingCellNrcgi, // + @RequestParam(required = false) String neighborCellNrpci) { + logger.debug("getNcrt: ggnbid {}, servingCellNrpci {}, neighborCellNrcgi {}", ggnodeb, servingCellNrcgi, neighborCellNrpci); - return ncrtApi.getNcrt(ggnbId, servingCellNrcgi, neighborCellNrpci); + return ncrtApi.getNcrt(ggnodeb, servingCellNrcgi, neighborCellNrpci); } // /ncrt/servingcells/{servCellNrcgi}/neighborcells/{neighCellNrpci} :