Skip navigation links
org.identityconnectors.flatfile.extension
Interface FlatFileParser
-
public interface FlatFileParser
Interface which needs to be implemented by all custom parsers
Method Summary |
void |
parse(java.io.File flatFile, FlatFileRecordHandler recordHandler, ParserConfig config)
Implementation of this interface should contain all the logic for parsing the given flatFile. |
parse
void parse(java.io.File flatFile,
FlatFileRecordHandler recordHandler,
ParserConfig config)
throws java.lang.Exception
- Implementation of this interface should contain all the logic for parsing the given flatFile. For every record read/parsed from this file, a
FlatFileRecord
instance needs to be created and passed back to the connector using the FlatFileRecordHandler.handle(FlatFileRecord)
method of FlatFileRecordHandler
The record being passed to handler should have passed the filter criteria mentioned by ParserConfig's getFilter()
. The ParserConfig's getSchema()
can be used to find the attributes to fetch from the flat file using FlatFileSchema#getAttributesToGet()
, to find the multi valued attributes using FlatFileSchema.getMultiValueFields()
, to find the mandatory fields FlatFileSchema.getMandatoryAttrs()
which can be used while parsing the file
-
- Parameters:
flatFile
- the file to be parsed
recordHandler
- handler to pass a single record (in form of FlatFileRecord
) back to the connector
config
- configuration parameters needed to parse the file
- Throws:
java.lang.Exception
- exception if any, thrown by the parser to the connector
Skip navigation links
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.