public interface ImportHandler<DTO extends ImportedFileDTO,D extends ImportedFileData,IF extends ImportedFile>
| Modifier and Type | Method and Description |
|---|---|
void |
finishImport(ImportedFile importedFile)
Executes some processing when import has finished
|
java.util.List<java.lang.String> |
getAllowedImportFields(ImportedFile importedFile)
Returns a list of the allowed fields to be imported
|
D |
getData(ImportedFile importedFile)
Returns the data associated to an import
|
java.lang.Class<IF> |
getEntityClass()
Returns the main entity of the import
|
java.util.List<java.lang.String> |
getKeywordFields()
Returns a list of field names that can be used to search for imported lines
|
java.util.List<ImportField> |
getSearchImportedLineFields()
Returns the list of fields that will be used to show
the information of import lines.
|
java.lang.Object |
instantiateContext()
Returns an import context that will be used in the validation and processing of each import line.
|
IF |
newEntity(DTO dto)
Returns a new entity based on a dto
|
java.lang.Long |
processImportedLine(ImportedLine importedLine,
java.lang.Object context)
Imports an entity with the information in the imported line and returns the new entity id.
|
org.cyclos.impl.utils.validation.Validator |
resolveValidator(DTO dto)
Returns a new validator for the import.
|
void |
validateImportedLine(ImportedLine importedLine,
java.lang.Object context)
Validates the imported line
|
void finishImport(ImportedFile importedFile)
java.util.List<java.lang.String> getAllowedImportFields(ImportedFile importedFile)
D getData(ImportedFile importedFile)
java.lang.Class<IF> getEntityClass()
java.util.List<java.lang.String> getKeywordFields()
java.util.List<ImportField> getSearchImportedLineFields()
java.lang.Object instantiateContext()
java.lang.Long processImportedLine(ImportedLine importedLine, java.lang.Object context)
org.cyclos.impl.utils.validation.Validator resolveValidator(DTO dto)
void validateImportedLine(ImportedLine importedLine, java.lang.Object context) throws ValidationException
ValidationException