class BackupsApiController implements BackupsApi {

    @Override
    @PreAuthorize("hasAuthority('BACKUP_CONFIGURATION')")
    @AuditEventMethod(event = UPLOAD_BACKUP)
    public ResponseEntity<Backup> uploadBackup(Boolean ignoreWarnings, MultipartFile file) {
        try {
            BackupFile backupFile = backupService.uploadBackup(ignoreWarnings, file.getOriginalFilename(),
                    file.getBytes());
            return new ResponseEntity<>(backupConverter.convert(backupFile), HttpStatus.CREATED);
        } catch (InvalidFilenameException | UnhandledWarningsException | InvalidBackupFileException e) {
            throw new BadRequestException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    @Autowired public  BackupsApiController(BackupService backupService,
            RestoreService restoreService, BackupConverter backupConverter,
            TokenService tokenService);

}