Class TokenImportHandlerImpl

    • Field Detail

      • REQUIRED_HEADERS

        protected static final Set<String> REQUIRED_HEADERS
    • Constructor Detail

      • TokenImportHandlerImpl

        public TokenImportHandlerImpl()
    • Method Detail

      • getAllowedImportFieldsPredicate

        public Predicate<String> getAllowedImportFieldsPredicate​(TokenImportedFile importedFile)
        Description copied from interface: ImportHandler
        Returns a predicate that evaluates true for a field allowed to be imported
      • getEntityClass

        public Class<Token> getEntityClass()
        Description copied from interface: ImportHandler
        Returns the class of the imported entity
      • getImportType

        public ImportType getImportType()
        Description copied from interface: ImportHandler
        Returns the type of imports handled by this class
      • getKeywordFields

        public List<String> getKeywordFields()
        Description copied from interface: ImportHandler
        Returns a list of field names that can be used to search for imported lines
      • getMissingRequiredFields

        public Set<String> getMissingRequiredFields​(TokenImportedFile importedFile,
                                                    List<String> headers)
        Description copied from interface: ImportHandler
        Return the fields that are required and are not present in the given headers.
      • getSearchImportedLineFields

        public List<ImportField> getSearchImportedLineFields()
        Description copied from interface: ImportHandler
        Returns the list of fields that will be used to show the information of import lines.
      • instantiateContext

        public Object instantiateContext()
        Description copied from interface: ImportHandler
        Returns an import context that will be used in the validation and processing of each import line.
      • processImportedLine

        public Token processImportedLine​(ImportedLine importedLine,
                                         Object processContext)
        Description copied from interface: ImportHandler
        Imports an entity with the information in the imported line and returns the imported entity.
      • validateImportedLine

        public void validateImportedLine​(ImportedLine importedLine,
                                         Object context)
        Description copied from interface: ImportHandler
        Validates the imported line