class KeysApiController implements KeysApi {

    @Override
    @PreAuthorize("hasAuthority('VIEW_KEYS')")
    public ResponseEntity<List<PossibleAction>> getPossibleActionsForKey(String keyId) {
        try {
            EnumSet<PossibleActionEnum> actions = keyService.getPossibleActionsForKey(keyId);
            return new ResponseEntity<>(possibleActionConverter.convert(actions), HttpStatus.OK);
        } catch (KeyNotFoundException e) {
            throw new ResourceNotFoundException(e);
        }
    }

    @Autowired public  KeysApiController(KeyService keyService,
            KeyConverter keyConverter,
            ClientConverter clientConverter,
            TokenCertificateService tokenCertificateService,
            ServerConfService serverConfService,
            CsrFilenameCreator csrFilenameCreator,
            PossibleActionConverter possibleActionConverter);

}