Package de.trustable.ca3s.core.web.rest
Class RequestAttributeResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.RequestAttributeResource
-
@RestController @RequestMapping("/api") public class RequestAttributeResource extends ObjectREST controller for managingRequestAttribute.
-
-
Constructor Summary
Constructors Constructor Description RequestAttributeResource(RequestAttributeService requestAttributeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<RequestAttribute>createRequestAttribute(@Valid RequestAttribute requestAttribute)POST /request-attributes: Create a new requestAttribute.org.springframework.http.ResponseEntity<Void>deleteRequestAttribute(Long id)DELETE /request-attributes/:id: delete the "id" requestAttribute.List<RequestAttribute>getAllRequestAttributes()GET /request-attributes: get all the requestAttributes.org.springframework.http.ResponseEntity<RequestAttribute>getRequestAttribute(Long id)GET /request-attributes/:id: get the "id" requestAttribute.org.springframework.http.ResponseEntity<RequestAttribute>updateRequestAttribute(@Valid RequestAttribute requestAttribute)PUT /request-attributes: Updates an existing requestAttribute.
-
-
-
Constructor Detail
-
RequestAttributeResource
public RequestAttributeResource(RequestAttributeService requestAttributeService)
-
-
Method Detail
-
createRequestAttribute
@PostMapping("/request-attributes") public org.springframework.http.ResponseEntity<RequestAttribute> createRequestAttribute(@Valid @RequestBody @Valid RequestAttribute requestAttribute) throws URISyntaxExceptionPOST /request-attributes: Create a new requestAttribute.- Parameters:
requestAttribute- the requestAttribute to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new requestAttribute, or with status400 (Bad Request)if the requestAttribute has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateRequestAttribute
@PutMapping("/request-attributes") public org.springframework.http.ResponseEntity<RequestAttribute> updateRequestAttribute(@Valid @RequestBody @Valid RequestAttribute requestAttribute) throws URISyntaxExceptionPUT /request-attributes: Updates an existing requestAttribute.- Parameters:
requestAttribute- the requestAttribute to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated requestAttribute, or with status400 (Bad Request)if the requestAttribute is not valid, or with status500 (Internal Server Error)if the requestAttribute couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllRequestAttributes
@GetMapping("/request-attributes") public List<RequestAttribute> getAllRequestAttributes()GET /request-attributes: get all the requestAttributes.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of requestAttributes in body.
-
getRequestAttribute
@GetMapping("/request-attributes/{id}") public org.springframework.http.ResponseEntity<RequestAttribute> getRequestAttribute(@PathVariable Long id)GET /request-attributes/:id: get the "id" requestAttribute.- Parameters:
id- the id of the requestAttribute to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the requestAttribute, or with status404 (Not Found).
-
deleteRequestAttribute
@DeleteMapping("/request-attributes/{id}") public org.springframework.http.ResponseEntity<Void> deleteRequestAttribute(@PathVariable Long id)DELETE /request-attributes/:id: delete the "id" requestAttribute.- Parameters:
id- the id of the requestAttribute to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-