View Javadoc
1   package org.kuali.ole.sys.batch;
2   
3   import java.util.List;
4   
5   /**
6    * Contract of methods for the configuration element which specifies how to parse a flat file
7    */
8   public interface FlatFileSpecification {
9       /**
10       * @return a List of the specifications for all objects which will be parsed into during the course of
11       * this flat file parse
12       */
13  	public List<FlatFileObjectSpecification> getObjectSpecifications();
14  
15  	/**
16  	 * Retrieves the FlatFilePrefixObjectSpecification specifically associated with a given class
17  	 * @param businessObjectClass the class of a business object which will be parsed into
18  	 * @return the corresponding FlatFilePrefixObjectSpecification configuration object
19  	 */
20  	public FlatFileObjectSpecification getObjectSpecification(Class<?> businessObjectClass);
21  
22  	/**
23  	 * Determines the Class of the business object that the given line should be parsed into
24  	 * @param line the current line of the flat file parser being parsed
25  	 * @return the Class of the business object that the given line will be parsed into
26  	 */
27  	public Class<?> determineClassForLine(String line);
28  
29  	/**
30  	 * Parses the current line of the flat file into a business object
31  	 * @param parseSpecification the specification explaining how to parse the line into the business object
32  	 * @param lineToParse the current line being parsed
33  	 * @param parseIntoObject the target object to parse into
34  	 * @param lineNumber the current line number
35  	 */
36  	public void parseLineIntoObject(
37  			FlatFileObjectSpecification parseSpecification, String lineToParse,
38  			Object parseIntoObject, int lineNumber);
39  }