Class AlgorithmRestrictionResource


  • @RestController
    @RequestMapping("/api")
    public class AlgorithmRestrictionResource
    extends Object
    REST controller for managing AlgorithmRestriction.
    • Method Detail

      • createAlgorithmRestriction

        @PostMapping("/algorithm-restrictions")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public org.springframework.http.ResponseEntity<AlgorithmRestriction> createAlgorithmRestriction​(@Valid @RequestBody
                                                                                                        @Valid AlgorithmRestriction algorithmRestriction)
                                                                                                 throws URISyntaxException
        POST /algorithm-restrictions : Create a new algorithmRestriction.
        Parameters:
        algorithmRestriction - the algorithmRestriction to create.
        Returns:
        the ResponseEntity with status 201 (Created) and with body the new algorithmRestriction, or with status 400 (Bad Request) if the algorithmRestriction has already an ID.
        Throws:
        URISyntaxException - if the Location URI syntax is incorrect.
      • updateAlgorithmRestriction

        @PutMapping("/algorithm-restrictions/{id}")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public org.springframework.http.ResponseEntity<AlgorithmRestriction> updateAlgorithmRestriction​(@PathVariable(value="id",required=false)
                                                                                                        Long id,
                                                                                                        @Valid @RequestBody
                                                                                                        @Valid AlgorithmRestriction algorithmRestriction)
                                                                                                 throws URISyntaxException
        PUT /algorithm-restrictions/:id : Updates an existing algorithmRestriction.
        Parameters:
        id - the id of the algorithmRestriction to save.
        algorithmRestriction - the algorithmRestriction to update.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the updated algorithmRestriction, or with status 400 (Bad Request) if the algorithmRestriction is not valid, or with status 500 (Internal Server Error) if the algorithmRestriction couldn't be updated.
        Throws:
        URISyntaxException - if the Location URI syntax is incorrect.
      • getAllAlgorithmRestrictions

        @GetMapping("/algorithm-restrictions")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public List<AlgorithmRestriction> getAllAlgorithmRestrictions()
        GET /algorithm-restrictions : get all the algorithmRestrictions.
        Returns:
        the ResponseEntity with status 200 (OK) and the list of algorithmRestrictions in body.
      • getAlgorithmRestriction

        @GetMapping("/algorithm-restrictions/{id}")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public org.springframework.http.ResponseEntity<AlgorithmRestriction> getAlgorithmRestriction​(@PathVariable
                                                                                                     Long id)
        GET /algorithm-restrictions/:id : get the "id" algorithmRestriction.
        Parameters:
        id - the id of the algorithmRestriction to retrieve.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the algorithmRestriction, or with status 404 (Not Found).
      • deleteAlgorithmRestriction

        @DeleteMapping("/algorithm-restrictions/{id}")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public org.springframework.http.ResponseEntity<Void> deleteAlgorithmRestriction​(@PathVariable
                                                                                        Long id)
        DELETE /algorithm-restrictions/:id : delete the "id" algorithmRestriction.
        Parameters:
        id - the id of the algorithmRestriction to delete.
        Returns:
        the ResponseEntity with status 204 (NO_CONTENT).