1 package org.kuali.ole.sys.batch; 2 3 import java.util.List; 4 5 /** 6 * Contract of methods required by the flat file parser to track the parent/child tree while parsing 7 */ 8 public interface FlatFileParseTracker { 9 /** 10 * Initializes a new FlatFileParseTracker 11 * @param flatFileSpecification the FlatFileSpecificationBase instance which will determine which object should be instantiated for a given line 12 * @param specifications the specifications for all objects that will be parsed into, to build a parent/child map out of 13 */ 14 public void initialize(FlatFileSpecification flatFileClassIdentifier); 15 16 /** 17 * Determines which class should be parsed into and returns an instance of that 18 * @param lineToParse the line which is going to be parsed 19 * @return the object to parse into 20 */ 21 public abstract Object getObjectToParseInto(String lineToParse); 22 23 /** 24 * Called when a line has completed parsing. Throws an exception if a proper parent 25 * is not found for the line being parsed 26 */ 27 public abstract void completeLineParse(); 28 29 /** 30 * @return the List of parsed parent objects 31 */ 32 public abstract List<Object> getParsedObjects(); 33 }