class BackupsApiController implements BackupsApi {

    @Override
    @PreAuthorize("hasAuthority('BACKUP_CONFIGURATION')")
    public ResponseEntity<Resource> downloadBackup(String filename) {
        byte[] backupFile = null;
        try {
            backupFile = backupService.readBackupFile(filename);
        } catch (BackupFileNotFoundException e) {
            throw new ResourceNotFoundException(e);
        }
        return ApiUtil.createAttachmentResourceResponse(backupFile, filename);
    }

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

}