Interface ImportCockpitMediaService
-
- All Known Implementing Classes:
DefaultImportCockpitMediaService
public interface ImportCockpitMediaServiceProvides service methods for Import Cockpit medias.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImpExMediaModelcreateMediaFromFile(java.lang.String filePackageName)Give the supplied filename (full file path), this method will create and return anImpExMediaModel.CSVReadercreateMediaReader(ImportCockpitInputMediaModel media)Creates a media reader for the source file.java.util.List<SourceColumnModel>getSourceColumnData(ImportCockpitCronJobModel icCronJobModel)Given the suppliedImportCockpitCronJobModel, this method will return all the the data for each field(column) as a List ofSourceColumnModel.java.util.List<java.lang.String>getSourceColumnNames(ImportCockpitInputMediaModel media)Retrieves the source column names/labels of the uploaded source file.booleanvalidateInputFile(ImportCockpitInputMediaModel inputMedia)Validates theImportCockpitInputMediaModel(CSV format) that is to be assigned to anImportCockpitCronJobModel.
-
-
-
Method Detail
-
createMediaReader
CSVReader createMediaReader(ImportCockpitInputMediaModel media) throws JaloBusinessException, java.io.UnsupportedEncodingException
Creates a media reader for the source file.- Parameters:
media- CSV source file uploaded to the cron job- Returns:
- reader for CSV files
- Throws:
JaloBusinessExceptionjava.io.UnsupportedEncodingException
-
validateInputFile
boolean validateInputFile(ImportCockpitInputMediaModel inputMedia)
Validates theImportCockpitInputMediaModel(CSV format) that is to be assigned to anImportCockpitCronJobModel.- Parameters:
inputMedia- -ImportCockpitInputMediaModel- Returns:
- true if the
ImportCockpitInputMediaModelis valid false otherwise.
-
getSourceColumnNames
java.util.List<java.lang.String> getSourceColumnNames(ImportCockpitInputMediaModel media)
Retrieves the source column names/labels of the uploaded source file.- Parameters:
media- of typeImportCockpitInputMediaModel.- Returns:
- list of column names/labels (String).
-
getSourceColumnData
java.util.List<SourceColumnModel> getSourceColumnData(ImportCockpitCronJobModel icCronJobModel)
Given the suppliedImportCockpitCronJobModel, this method will return all the the data for each field(column) as a List ofSourceColumnModel.- Parameters:
icCronJobModel- the cron job of typeImportCockpitCronJobModelto retrieve the the source column data from.- Returns:
- srcColumnModelList - List of
SourceColumnModels that represents the data stored in the source used for mapping.
-
createMediaFromFile
ImpExMediaModel createMediaFromFile(java.lang.String filePackageName) throws java.io.FileNotFoundException
Give the supplied filename (full file path), this method will create and return anImpExMediaModel.- Parameters:
filePackageName- - A String representing the location of the file that will be used to create anImpExMediaModel.- Returns:
- impExMediaModel an
ImpExMediaModel - Throws:
java.io.FileNotFoundException- - Occurs when the file (as per filename) is not found.
-
-