Package de.trustable.ca3s.core.web.rest
Class TimedElementNotificationResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.TimedElementNotificationResource
-
@RestController @RequestMapping("/api") public class TimedElementNotificationResource extends ObjectREST controller for managingTimedElementNotification.
-
-
Constructor Summary
Constructors Constructor Description TimedElementNotificationResource(TimedElementNotificationService timedElementNotificationService, TimedElementNotificationRepository timedElementNotificationRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<TimedElementNotification>createTimedElementNotification(@Valid TimedElementNotification timedElementNotification)POST /timed-element-notifications: Create a new timedElementNotification.org.springframework.http.ResponseEntity<Void>deleteTimedElementNotification(Long id)DELETE /timed-element-notifications/:id: delete the "id" timedElementNotification.List<TimedElementNotification>getAllTimedElementNotifications()GET /timed-element-notifications: get all the timedElementNotifications.org.springframework.http.ResponseEntity<TimedElementNotification>getTimedElementNotification(Long id)GET /timed-element-notifications/:id: get the "id" timedElementNotification.org.springframework.http.ResponseEntity<TimedElementNotification>updateTimedElementNotification(Long id, @Valid TimedElementNotification timedElementNotification)PUT /timed-element-notifications/:id: Updates an existing timedElementNotification.
-
-
-
Constructor Detail
-
TimedElementNotificationResource
public TimedElementNotificationResource(TimedElementNotificationService timedElementNotificationService, TimedElementNotificationRepository timedElementNotificationRepository)
-
-
Method Detail
-
createTimedElementNotification
@PostMapping("/timed-element-notifications") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<TimedElementNotification> createTimedElementNotification(@Valid @RequestBody @Valid TimedElementNotification timedElementNotification) throws URISyntaxExceptionPOST /timed-element-notifications: Create a new timedElementNotification.- Parameters:
timedElementNotification- the timedElementNotification to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new timedElementNotification, or with status400 (Bad Request)if the timedElementNotification has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateTimedElementNotification
@PutMapping("/timed-element-notifications/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<TimedElementNotification> updateTimedElementNotification(@PathVariable(value="id",required=false) Long id, @Valid @RequestBody @Valid TimedElementNotification timedElementNotification) throws URISyntaxExceptionPUT /timed-element-notifications/:id: Updates an existing timedElementNotification.- Parameters:
id- the id of the timedElementNotification to save.timedElementNotification- the timedElementNotification to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated timedElementNotification, or with status400 (Bad Request)if the timedElementNotification is not valid, or with status500 (Internal Server Error)if the timedElementNotification couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllTimedElementNotifications
@GetMapping("/timed-element-notifications") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public List<TimedElementNotification> getAllTimedElementNotifications()GET /timed-element-notifications: get all the timedElementNotifications.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of timedElementNotifications in body.
-
getTimedElementNotification
@GetMapping("/timed-element-notifications/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<TimedElementNotification> getTimedElementNotification(@PathVariable Long id)GET /timed-element-notifications/:id: get the "id" timedElementNotification.- Parameters:
id- the id of the timedElementNotification to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the timedElementNotification, or with status404 (Not Found).
-
deleteTimedElementNotification
@DeleteMapping("/timed-element-notifications/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<Void> deleteTimedElementNotification(@PathVariable Long id)DELETE /timed-element-notifications/:id: delete the "id" timedElementNotification.- Parameters:
id- the id of the timedElementNotification to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-