import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.isomorphic.datasource.BasicDataSource;
import com.isomorphic.datasource.DSRequest;
import com.isomorphic.datasource.DSResponse;


public class MultiUploadDetailServlet extends BasicDataSource {
	public DSResponse executeAdd(DSRequest req) throws Exception {  
        Map createdRecord = createRecord(req.getValues());  
        return new DSResponse(createdRecord);  
    }  
  
    public DSResponse executeFetch(DSRequest req) throws Exception {  
        List records = fetchRecords(req.getCriteria());  
        return new DSResponse(records);  
    }  
  
    public DSResponse executeRemove(DSRequest req) throws Exception {  
        Map removedRecord = removeRecord(req.getValues());  
        return new DSResponse(removedRecord);  
    }  
  
    public DSResponse executeUpdate(DSRequest req) throws Exception {  
        Map updatedRecord = updateRecord(req.getValues());  
        return new DSResponse(updatedRecord);  
    }  
    
    private Map createRecord (Map values) {  
        System.out.println("Create file Called!");
        return values;  
    }  
  
    private List fetchRecords (Map criteria) {  
    	
    	System.out.println("Fetch files called!");
    	
        return new ArrayList<>();  
    }  
  
    private Map removeRecord (Map values) {  
    	System.out.println("Delete file called!");
        return values;
    }
    
    private Map updateRecord (Map values) {  
    	System.out.println("Update file called!");
        return values;
    }  
}
