001/* 002 * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Thomas Roger 018 */ 019 020package org.nuxeo.ecm.csv.core; 021 022import org.nuxeo.ecm.csv.core.CSVImportLog.Status; 023import org.nuxeo.ecm.core.api.CoreSession; 024 025import java.io.File; 026import java.util.List; 027 028/** 029 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a> 030 * @since 5.7 031 */ 032public interface CSVImporter { 033 034 String launchImport(CoreSession session, String parentPath, File csvFile, String csvFileName, 035 CSVImporterOptions options); 036 037 CSVImportStatus getImportStatus(String id); 038 039 List<CSVImportLog> getImportLogs(String id); 040 041 List<CSVImportLog> getImportLogs(String id, Status... status); 042 043 List<CSVImportLog> getLastImportLogs(String id, int max); 044 045 default List<CSVImportLog> getLastImportLogs(String id, int max, Status... status) { 046 return null; 047 } 048 049 CSVImportResult getImportResult(String id); 050}