package uk.ac.ebi.spot.goci.curation.service.batchloader;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import uk.ac.ebi.spot.goci.curation.model.BatchUploadError;
import uk.ac.ebi.spot.goci.curation.model.batchloader.BatchUploadRow;
import uk.ac.ebi.spot.goci.model.Association;
import uk.ac.ebi.spot.goci.model.Study;

import java.io.IOException;
import java.util.Collection;

/**
 * Created by emma on 21/03/2016.
 *
 * @author emma
 *         <p>
 *         Upload, error check and create persistance obejects that can be saved in DB from a batch of SNPs from a .xlsx
 *         spreadsheet. Note that the spreadsheet must be of .xlsx format!
 *         <p>
 *         Created from code originally written by Dani. Adapted to fit with new curation system.
 */
public interface AssociationBatchLoaderService {

    Collection<BatchUploadError> processFile(String fileName, Study study) throws InvalidFormatException, IOException;

    Collection<Association> processFileRows(Collection<BatchUploadRow> batchUploadRows);

    Collection<BatchUploadError> checkUploadForErrors(Collection<BatchUploadRow> batchUploadRows);

    void saveAssociations(Collection<Association> associations, Study study);
}

@@ -161,16 +161,28 @@
 n.model.
+batchloader.
 BatchUpl
@@ -867,21 +867,19 @@
 chUpload
-Error
+Row
 %3E proces
@@ -1226,11 +1226,50 @@
  study);
+%0A%0A    void deleteFile(String fileName);
 %0A%7D%0A

Add new method to delete file