Package de.trustable.ca3s.core.web.rest
Class RequestProxyConfigResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.RequestProxyConfigResource
-
@RestController @RequestMapping("/api") public class RequestProxyConfigResource extends ObjectREST controller for managingRequestProxyConfig.
-
-
Constructor Summary
Constructors Constructor Description RequestProxyConfigResource(RequestProxyConfigService requestProxyConfigService, JWSService jwsService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<RequestProxyConfig>createRequestProxyConfig(@Valid RequestProxyConfig requestProxyConfig)POST /request-proxy-configs: Create a new requestProxyConfig.org.springframework.http.ResponseEntity<Void>deleteRequestProxyConfig(Long id)DELETE /request-proxy-configs/:id: delete the "id" requestProxyConfig.List<RequestProxyConfig>getAllRequestProxyConfigs()GET /request-proxy-configs: get all the requestProxyConfigs.org.springframework.http.ResponseEntity<RequestProxyConfig>getRequestProxyConfig(Long id)GET /request-proxy-configs/:id: get the "id" requestProxyConfig.org.springframework.http.ResponseEntity<RemoteRequestProxyConfigView>postRequestProxyConfig(@Valid String body, String accept, Long requestProxyId)GET /request-proxy-configs/remote-config/:id: get the "id" requestProxyConfig.org.springframework.http.ResponseEntity<RequestProxyConfig>updateRequestProxyConfig(@Valid RequestProxyConfig requestProxyConfig)PUT /request-proxy-configs: Updates an existing requestProxyConfig.
-
-
-
Constructor Detail
-
RequestProxyConfigResource
public RequestProxyConfigResource(RequestProxyConfigService requestProxyConfigService, JWSService jwsService)
-
-
Method Detail
-
createRequestProxyConfig
@PostMapping("/request-proxy-configs") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") @Transactional public org.springframework.http.ResponseEntity<RequestProxyConfig> createRequestProxyConfig(@Valid @RequestBody @Valid RequestProxyConfig requestProxyConfig) throws URISyntaxExceptionPOST /request-proxy-configs: Create a new requestProxyConfig.- Parameters:
requestProxyConfig- the requestProxyConfig to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new requestProxyConfig, or with status400 (Bad Request)if the requestProxyConfig has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateRequestProxyConfig
@PutMapping("/request-proxy-configs") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") @Transactional public org.springframework.http.ResponseEntity<RequestProxyConfig> updateRequestProxyConfig(@Valid @RequestBody @Valid RequestProxyConfig requestProxyConfig) throws URISyntaxExceptionPUT /request-proxy-configs: Updates an existing requestProxyConfig.- Parameters:
requestProxyConfig- the requestProxyConfig to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated requestProxyConfig, or with status400 (Bad Request)if the requestProxyConfig is not valid, or with status500 (Internal Server Error)if the requestProxyConfig couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllRequestProxyConfigs
@GetMapping("/request-proxy-configs") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public List<RequestProxyConfig> getAllRequestProxyConfigs()GET /request-proxy-configs: get all the requestProxyConfigs.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of requestProxyConfigs in body.
-
getRequestProxyConfig
@GetMapping("/request-proxy-configs/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<RequestProxyConfig> getRequestProxyConfig(@PathVariable Long id)GET /request-proxy-configs/:id: get the "id" requestProxyConfig.- Parameters:
id- the id of the requestProxyConfig to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the requestProxyConfig, or with status404 (Not Found).
-
postRequestProxyConfig
@PostMapping("/request-proxy-configs/remote-config/{requestProxyId}") @Transactional public org.springframework.http.ResponseEntity<RemoteRequestProxyConfigView> postRequestProxyConfig(@Valid @RequestBody @Valid String body, @RequestHeader(value="Accept",required=false) String accept, @PathVariable Long requestProxyId)GET /request-proxy-configs/remote-config/:id: get the "id" requestProxyConfig.- Parameters:
requestProxyId- the id of the requestProxyConfig to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the requestProxyConfig, or with status404 (Not Found).
-
deleteRequestProxyConfig
@DeleteMapping("/request-proxy-configs/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") @Transactional public org.springframework.http.ResponseEntity<Void> deleteRequestProxyConfig(@PathVariable Long id)DELETE /request-proxy-configs/:id: delete the "id" requestProxyConfig.- Parameters:
id- the id of the requestProxyConfig to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-