public interface ImportHandler<DTO extends ImportedFileDTO,D extends ImportedFileData,IF extends ImportedFile,E extends SimpleEntity>
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
fieldName(ImportedLine line,
java.lang.String field,
java.lang.String id)
Returns the field display name for the given field and id
|
void |
finishImport(IF importedFile)
Executes some processing when import has finished
|
java.util.List<java.lang.String> |
getAllowedImportFields(IF importedFile)
Returns a list of the allowed fields to be imported
|
D |
getData(IF importedFile)
Returns the data associated to an import
|
java.lang.Class<E> |
getEntityClass()
Returns the class of the imported entity
|
java.lang.Class<IF> |
getImportedFileClass()
Returns the imported file class
|
ImportType |
getImportType()
Returns the type of imports handled by this class
|
java.util.List<java.lang.String> |
getKeywordFields()
Returns a list of field names that can be used to search for imported lines
|
java.util.Set<java.lang.String> |
getRequiredFields()
Return the minimum required fields to make the importation works.
|
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 |
newImportedFile(DTO dto)
Instantiates an
ImportedFile a new entity based on a dto |
E |
processImportedLine(ImportedLine importedLine,
java.lang.Object context)
Imports an entity with the information in the imported line and returns the imported entity.
|
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
|
java.lang.String fieldName(ImportedLine line, java.lang.String field, java.lang.String id)
void finishImport(IF importedFile)
java.util.List<java.lang.String> getAllowedImportFields(IF importedFile)
java.lang.Class<E> getEntityClass()
java.lang.Class<IF> getImportedFileClass()
ImportType getImportType()
java.util.List<java.lang.String> getKeywordFields()
java.util.Set<java.lang.String> getRequiredFields()
java.util.List<ImportField> getSearchImportedLineFields()
java.lang.Object instantiateContext()
IF newImportedFile(DTO dto)
ImportedFile a new entity based on a dtoE 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