Package de.trustable.ca3s.core.web.rest
Class ProtectedContentResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.ProtectedContentResource
-
@RestController @RequestMapping("/api") public class ProtectedContentResource extends ObjectREST controller for managingProtectedContent.
-
-
Constructor Summary
Constructors Constructor Description ProtectedContentResource(ProtectedContentService protectedContentService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<ProtectedContent>createProtectedContent(@Valid ProtectedContent protectedContent)POST /protected-contents: Create a new protectedContent.org.springframework.http.ResponseEntity<Void>deleteProtectedContent(Long id)DELETE /protected-contents/:id: delete the "id" protectedContent.List<ProtectedContent>getAllProtectedContents()GET /protected-contents: get all the protectedContents.org.springframework.http.ResponseEntity<ProtectedContent>getProtectedContent(Long id)GET /protected-contents/:id: get the "id" protectedContent.org.springframework.http.ResponseEntity<ProtectedContent>updateProtectedContent(@Valid ProtectedContent protectedContent)PUT /protected-contents: Updates an existing protectedContent.
-
-
-
Constructor Detail
-
ProtectedContentResource
public ProtectedContentResource(ProtectedContentService protectedContentService)
-
-
Method Detail
-
createProtectedContent
@PostMapping("/protected-contents") public org.springframework.http.ResponseEntity<ProtectedContent> createProtectedContent(@Valid @RequestBody @Valid ProtectedContent protectedContent) throws URISyntaxExceptionPOST /protected-contents: Create a new protectedContent.- Parameters:
protectedContent- the protectedContent to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new protectedContent, or with status400 (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 URISyntaxExceptionPUT /protected-contents: Updates an existing protectedContent.- Parameters:
protectedContent- the protectedContent to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated protectedContent, or with status400 (Bad Request)if the protectedContent is not valid, or with status500 (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
ResponseEntitywith status200 (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
ResponseEntitywith status200 (OK)and with body the protectedContent, or with status404 (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
ResponseEntitywith status204 (NO_CONTENT).
-
-