Class ProtectedContentResource


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

    • Method Detail

      • createProtectedContent

        @PostMapping("/protected-contents")
        public org.springframework.http.ResponseEntity<ProtectedContent> createProtectedContent​(@Valid @RequestBody
                                                                                                @Valid ProtectedContent protectedContent)
                                                                                         throws URISyntaxException
        POST /protected-contents : Create a new protectedContent.
        Parameters:
        protectedContent - the protectedContent to create.
        Returns:
        the ResponseEntity with status 201 (Created) and with body the new protectedContent, or with status 400 (Bad Request) if the protectedContent has already an ID.
        Throws:
        URISyntaxException - if the Location URI syntax is incorrect.
      • updateProtectedContent

        @PutMapping("/protected-contents")
        public org.springframework.http.ResponseEntity<ProtectedContent> updateProtectedContent​(@Valid @RequestBody
                                                                                                @Valid ProtectedContent protectedContent)
                                                                                         throws URISyntaxException
        PUT /protected-contents : Updates an existing protectedContent.
        Parameters:
        protectedContent - the protectedContent to update.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the updated protectedContent, or with status 400 (Bad Request) if the protectedContent is not valid, or with status 500 (Internal Server Error) if the protectedContent couldn't be updated.
        Throws:
        URISyntaxException - if the Location URI syntax is incorrect.
      • getAllProtectedContents

        @GetMapping("/protected-contents")
        public List<ProtectedContent> getAllProtectedContents()
        GET /protected-contents : get all the protectedContents.
        Returns:
        the ResponseEntity with status 200 (OK) and the list of protectedContents in body.
      • getProtectedContent

        @GetMapping("/protected-contents/{id}")
        public org.springframework.http.ResponseEntity<ProtectedContent> getProtectedContent​(@PathVariable
                                                                                             Long id)
        GET /protected-contents/:id : get the "id" protectedContent.
        Parameters:
        id - the id of the protectedContent to retrieve.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the protectedContent, or with status 404 (Not Found).
      • deleteProtectedContent

        @DeleteMapping("/protected-contents/{id}")
        public org.springframework.http.ResponseEntity<Void> deleteProtectedContent​(@PathVariable
                                                                                    Long id)
        DELETE /protected-contents/:id : delete the "id" protectedContent.
        Parameters:
        id - the id of the protectedContent to delete.
        Returns:
        the ResponseEntity with status 204 (NO_CONTENT).