Class RDNResource


  • @RestController
    @RequestMapping("/api")
    public class RDNResource
    extends Object
    REST controller for managing RDN.
    • Constructor Detail

      • RDNResource

        public RDNResource​(RDNService rDNService)
    • Method Detail

      • createRDN

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

        @PutMapping("/rdns")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public org.springframework.http.ResponseEntity<RDN> updateRDN​(@RequestBody
                                                                      RDN rDN)
                                                               throws URISyntaxException
        PUT /rdns : Updates an existing rDN.
        Parameters:
        rDN - the rDN to update.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the updated rDN, or with status 400 (Bad Request) if the rDN is not valid, or with status 500 (Internal Server Error) if the rDN couldn't be updated.
        Throws:
        URISyntaxException - if the Location URI syntax is incorrect.
      • getAllRDNS

        @GetMapping("/rdns")
        @PreAuthorize("hasRole(\"ROLE_ADMIN\")")
        public List<RDN> getAllRDNS()
        GET /rdns : get all the rDNS.
        Returns:
        the ResponseEntity with status 200 (OK) and the list of rDNS in body.
      • getRDN

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

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