Interface CsvService
-
- All Known Implementing Classes:
CsvServiceImpl
public interface CsvService
Reads and creates Classification Rules defined as CSV.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
createCSV(List<Rule> rules)
Creates a CSV string from the given rules.CsvImportResult
parseCSV(Group group, InputStream inputStream, boolean hasHeader)
Parses the given CSV stream into rules.
-
-
-
Method Detail
-
parseCSV
CsvImportResult parseCSV(Group group, InputStream inputStream, boolean hasHeader) throws CSVImportException
Parses the given CSV stream into rules.- Parameters:
inputStream
- The inputstream to read the CSV from.hasHeader
- If defined, the csv defined by the inputStream has an header, and this is skipped (not considered as a Rule).- Returns:
- The list of rules. Only returns, if ALL rules are valid, otherwise the CSVImportException is thrown.
- Throws:
CSVImportException
- is thrown when parsing the CSV fails.
-
-