X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=webapp-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fportal%2Fnonrtric%2Fcontrolpanel%2Fcontroller%2FEnrichmentController.java;h=57019cead728f76f2c67a4e5fb5af8df8bd29c23;hb=714fa4fa439de489c7ddec02a46ac8d2543ec7f2;hp=0037c332b9d84f00562ea92138992a5ff94d3d1b;hpb=6b4c6ef963e37ebdff26337cd90684e3e2ff2a6c;p=portal%2Fnonrtric-controlpanel.git diff --git a/webapp-backend/src/main/java/org/oransc/portal/nonrtric/controlpanel/controller/EnrichmentController.java b/webapp-backend/src/main/java/org/oransc/portal/nonrtric/controlpanel/controller/EnrichmentController.java index 0037c33..57019ce 100644 --- a/webapp-backend/src/main/java/org/oransc/portal/nonrtric/controlpanel/controller/EnrichmentController.java +++ b/webapp-backend/src/main/java/org/oransc/portal/nonrtric/controlpanel/controller/EnrichmentController.java @@ -40,10 +40,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.security.access.annotation.Secured; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -66,7 +64,6 @@ public class EnrichmentController { // Publish paths in constants so tests are easy to write public static final String CONTROLLER_PATH = ControlPanelConstants.ENDPOINT_PREFIX + "/enrichment"; // Endpoints - public static final String VERSION_METHOD = ControlPanelConstants.VERSION_METHOD; public static final String EI_TYPES = "eitypes"; public static final String EI_PRODUCERS = "eiproducers"; public static final String EI_JOBS = "eijobs"; @@ -84,44 +81,8 @@ public class EnrichmentController { logger.debug("enrichment: configured with client type {}", eiProducerApi.getClass().getName()); } - /* - * The fields are defined in the Enrichment Control Typescript interface. - */ - @ApiOperation(value = "Get the EI type identifiers") - @GetMapping(EI_TYPES) - @Secured({ControlPanelConstants.ROLE_ADMIN, ControlPanelConstants.ROLE_STANDARD}) - public ResponseEntity getAllEiTypeIds() { - logger.debug("getAllEiTypeIds"); - return this.eiProducerApi.getAllEiTypeIds(); - } - - @ApiOperation(value = "Get an individual EI type") - @GetMapping(EI_TYPES + "/{" + EI_TYPE_ID + "}") - @Secured({ControlPanelConstants.ROLE_ADMIN, ControlPanelConstants.ROLE_STANDARD}) - public ResponseEntity getEiType(@PathVariable(EI_TYPE_ID) String eiTypeId) { - logger.debug("getEiType {}", eiTypeId); - return this.eiProducerApi.getEiType(eiTypeId); - } - - @ApiOperation(value = "Get an individual EI producer") - @GetMapping(EI_PRODUCERS + "/{" + EI_PRODUCER_ID + "}") - @Secured({ControlPanelConstants.ROLE_ADMIN, ControlPanelConstants.ROLE_STANDARD}) - public ResponseEntity getEiProducer(@PathVariable(EI_PRODUCER_ID) String eiProducerId) { - logger.debug("getEiProducer {}", eiProducerId); - return this.eiProducerApi.getEiProducer(eiProducerId); - } - - @ApiOperation(value = "Get the EI job definitions for one EI producer") - @GetMapping(EI_PRODUCERS + "/{" + EI_PRODUCER_ID + "}/" + EI_JOBS) - @Secured({ControlPanelConstants.ROLE_ADMIN, ControlPanelConstants.ROLE_STANDARD}) - public ResponseEntity getEiJobsForOneEiProducer(@PathVariable(EI_PRODUCER_ID) String eiProducerId) { - logger.debug("getEiJobsForOneEiProducer {}", eiProducerId); - return this.eiProducerApi.getEiJobsForOneEiProducer(eiProducerId); - } - @ApiOperation(value = "Get the EI job definitions for one EI producer") @GetMapping(EI_JOBS) - @Secured({ControlPanelConstants.ROLE_ADMIN, ControlPanelConstants.ROLE_STANDARD}) public ResponseEntity> getEiJobs() { logger.debug("getEiJobs"); ResponseEntity response = this.eiProducerApi.getAllEiProducerIds(); @@ -146,7 +107,6 @@ public class EnrichmentController { @ApiOperation(value = "Get EI producers") @GetMapping(EI_PRODUCERS) - @Secured({ControlPanelConstants.ROLE_ADMIN, ControlPanelConstants.ROLE_STANDARD}) public ResponseEntity> getEiProducers() { logger.debug("getEiProducers"); ResponseEntity response = this.eiProducerApi.getAllEiProducerIds(); @@ -180,12 +140,4 @@ public class EnrichmentController { return JsonParser.parseString(statusResponse.getBody()).getAsJsonObject().get("operational_state") .getAsString(); } - - @ApiOperation(value = "Get the status of an EI producer") - @GetMapping(EI_PRODUCERS + "/{" + EI_PRODUCER_ID + "}/" + STATUS) - @Secured({ControlPanelConstants.ROLE_ADMIN, ControlPanelConstants.ROLE_STANDARD}) - public ResponseEntity getEiProducerStatus(@PathVariable(EI_PRODUCER_ID) String eiProducerId) { - logger.debug("getEiProducerStatus {}", eiProducerId); - return this.eiProducerApi.getEiProducerStatus(eiProducerId); - } }