Package de.trustable.ca3s.core.web.rest
Class CAConnectorConfigResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.CAConnectorConfigResource
-
@RestController @RequestMapping("/api") public class CAConnectorConfigResource extends ObjectREST controller for managingCAConnectorConfig.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPLAIN_SECRET_PLACEHOLDER
-
Constructor Summary
Constructors Constructor Description CAConnectorConfigResource(CAConnectorConfigService cAConnectorConfigService, ProtectedContentUtil protUtil, ProtectedContentRepository protContentRepository, CAConnectorConfigRepository caConfigRepository, CaConnectorAdapter caConnectorAdapter, AuditService auditService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<CAConnectorConfig>createCAConnectorConfig(@Valid CAConnectorConfig cAConnectorConfig)POST /ca-connector-configs: Create a new cAConnectorConfig.org.springframework.http.ResponseEntity<Void>deleteCAConnectorConfig(Long id)DELETE /ca-connector-configs/:id: delete the "id" cAConnectorConfig.List<CAConnectorConfig>getAllCAConnectorConfigs()GET /ca-connector-configs: get all the cAConnectorConfigs.org.springframework.http.ResponseEntity<CAConnectorConfig>getCAConnectorConfig(Long id)GET /ca-connector-configs/:id: get the "id" cAConnectorConfig.List<CAConnectorStatus>getCAConnectorStatus()GET /ca-connector-configs/status: get all elements able to create a certificate.org.springframework.http.ResponseEntity<CAConnectorConfig>updateCAConnectorConfig(@Valid CAConnectorConfig cAConnectorConfig)PUT /ca-connector-configs: Updates an existing cAConnectorConfig.
-
-
-
Field Detail
-
PLAIN_SECRET_PLACEHOLDER
public static final String PLAIN_SECRET_PLACEHOLDER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CAConnectorConfigResource
public CAConnectorConfigResource(CAConnectorConfigService cAConnectorConfigService, ProtectedContentUtil protUtil, ProtectedContentRepository protContentRepository, CAConnectorConfigRepository caConfigRepository, CaConnectorAdapter caConnectorAdapter, AuditService auditService)
-
-
Method Detail
-
createCAConnectorConfig
@PostMapping("/ca-connector-configs") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CAConnectorConfig> createCAConnectorConfig(@Valid @RequestBody @Valid CAConnectorConfig cAConnectorConfig) throws URISyntaxExceptionPOST /ca-connector-configs: Create a new cAConnectorConfig.- Parameters:
cAConnectorConfig- the cAConnectorConfig to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new cAConnectorConfig, or with status400 (Bad Request)if the cAConnectorConfig has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateCAConnectorConfig
@Transactional @PutMapping("/ca-connector-configs") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CAConnectorConfig> updateCAConnectorConfig(@Valid @RequestBody @Valid CAConnectorConfig cAConnectorConfig) throws URISyntaxExceptionPUT /ca-connector-configs: Updates an existing cAConnectorConfig.- Parameters:
cAConnectorConfig- the cAConnectorConfig to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated cAConnectorConfig, or with status400 (Bad Request)if the cAConnectorConfig is not valid, or with status500 (Internal Server Error)if the cAConnectorConfig couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getCAConnectorStatus
@GetMapping("/ca-connector-configs/status") @PreAuthorize("isAuthenticated()") public List<CAConnectorStatus> getCAConnectorStatus()GET /ca-connector-configs/status: get all elements able to create a certificate.- Returns:
- list of
CAStatus.
-
getAllCAConnectorConfigs
@GetMapping("/ca-connector-configs") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public List<CAConnectorConfig> getAllCAConnectorConfigs()GET /ca-connector-configs: get all the cAConnectorConfigs.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of cAConnectorConfigs in body.
-
getCAConnectorConfig
@GetMapping("/ca-connector-configs/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CAConnectorConfig> getCAConnectorConfig(@PathVariable Long id)GET /ca-connector-configs/:id: get the "id" cAConnectorConfig.- Parameters:
id- the id of the cAConnectorConfig to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the cAConnectorConfig, or with status404 (Not Found).
-
deleteCAConnectorConfig
@DeleteMapping("/ca-connector-configs/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<Void> deleteCAConnectorConfig(@PathVariable Long id)DELETE /ca-connector-configs/:id: delete the "id" cAConnectorConfig.- Parameters:
id- the id of the cAConnectorConfig to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-