|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.kfs.module.endow.document.EndowmentAccountingLineParserBase
public class EndowmentAccountingLineParserBase
| Field Summary | |
|---|---|
protected static String[] |
DEFAULT_FORMAT
|
| Constructor Summary | |
|---|---|
EndowmentAccountingLineParserBase()
|
|
| Method Summary | |
|---|---|
protected String[] |
chooseFormat(Class<? extends EndowmentAccountingLine> accountingLineClass)
Gets the accounting line format. |
String |
getExpectedEndowmentAccountingLineFormatAsString(Class<? extends EndowmentAccountingLine> accountingLineClass)
|
protected Class |
getSourceEndowmentAccountingLineClass(EndowmentAccountingLinesDocument accountingDocument)
Given a document, determines what class the source lines of that document uses |
String[] |
getSourceEndowmentAccountingLineFormat()
|
protected Class |
getTargetEndowmentAccountingLineClass(EndowmentAccountingLinesDocument accountingDocument)
Given a document, determines what class that document uses for target accounting lines |
String[] |
getTargetEndowmentAccountingLineFormat()
|
protected List<EndowmentAccountingLine> |
importAccountingLines(String fileName,
InputStream stream,
EndowmentAccountingLinesDocument transactionalDocument,
boolean isSource)
Calls the appropriate parseAccountingLine method |
List |
importSourceEndowmentAccountingLines(String fileName,
InputStream stream,
EndowmentAccountingLinesDocument document)
Generates a list of SourceEndowmentAccountingLine from the inputStream |
List |
importTargetEndowmentAccountingLines(String fileName,
InputStream stream,
EndowmentAccountingLinesDocument document)
Generates a list of TargetEndowmentAccountingLine from the inputStream |
protected Map<String,String> |
parseAccountingLine(Class<? extends EndowmentAccountingLine> accountingLineClass,
String lineToParse)
Parses the csv line |
SourceEndowmentAccountingLine |
parseSourceEndowmentAccountingLine(EndowmentAccountingLinesDocument transactionalDocument,
String sourceAccountingLineString)
Parses a comma delimited string into an SourceEndowmentAccountingLine by populating the attributes found in the
getSourceAccountingLineFormat() |
TargetEndowmentAccountingLine |
parseTargetEndowmentAccountingLine(EndowmentAccountingLinesDocument transactionalDocument,
String targetAccountingLineString)
Parses a comma delimited string into an TargetEndowmentAccountingLine by populating the attributes found in the
getTargetAccountingLineFormat() |
protected void |
performCustomSourceAccountingLinePopulation(Map<String,String> attributeValueMap,
SourceEndowmentAccountingLine sourceAccountingLine,
String accountingLineAsString)
Should be overriden by documents to perform any additional SourceAccountingLine population |
protected void |
performCustomTargetAccountingLinePopulation(Map<String,String> attributeValueMap,
TargetEndowmentAccountingLine targetAccountingLine,
String accountingLineAsString)
Should be overridden by documents to perform any additional TargetAccountingLine attribute population |
protected EndowmentAccountingLine |
populateAccountingLine(EndowmentAccountingLinesDocument transactionalDocument,
Class<? extends EndowmentAccountingLine> accountingLineClass,
String accountingLineAsString,
Map<String,String> attributeValueMap,
Integer sequenceNumber)
Populates a source/target line with values |
protected void |
putCommonAttributesInMap(Map<String,String> attributeValueMap,
EndowmentAccountingLinesDocument document,
Integer sequenceNumber)
Places fields common to both source/target endowment accounting lines in the attribute map |
protected String |
retrieveAttributeLabel(Class clazz,
String attributeName)
Retrieves label for given attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String[] DEFAULT_FORMAT
| Constructor Detail |
|---|
public EndowmentAccountingLineParserBase()
| Method Detail |
|---|
public String[] getSourceEndowmentAccountingLineFormat()
getSourceEndowmentAccountingLineFormat in interface EndowmentAccountingLineParserSourceEndowmentAccountingLine attribute formatEndowmentAccountingLineParser.getSourceEndowmentAccountingLineFormat()public String[] getTargetEndowmentAccountingLineFormat()
getTargetEndowmentAccountingLineFormat in interface EndowmentAccountingLineParserTargetEndowmentAccountingLine attribute formatEndowmentAccountingLineParser.getTargetEndowmentAccountingLineFormat()public String getExpectedEndowmentAccountingLineFormatAsString(Class<? extends EndowmentAccountingLine> accountingLineClass)
getExpectedEndowmentAccountingLineFormatAsString in interface EndowmentAccountingLineParserString[] attribute format with each attribute separated by a comma.EndowmentAccountingLineParser.getExpectedEndowmentAccountingLineFormatAsString(java.lang.Class)
public SourceEndowmentAccountingLine parseSourceEndowmentAccountingLine(EndowmentAccountingLinesDocument transactionalDocument,
String sourceAccountingLineString)
EndowmentAccountingLineParserSourceEndowmentAccountingLine by populating the attributes found in the
getSourceAccountingLineFormat()
parseSourceEndowmentAccountingLine in interface EndowmentAccountingLineParserEndowmentAccountingLineParser.parseSourceEndowmentAccountingLine(org.kuali.kfs.module.endow.document.EndowmentAccountingLinesDocument,
java.lang.String)protected Class getSourceEndowmentAccountingLineClass(EndowmentAccountingLinesDocument accountingDocument)
accountingDocument - the document to find the class of the source lines for
public TargetEndowmentAccountingLine parseTargetEndowmentAccountingLine(EndowmentAccountingLinesDocument transactionalDocument,
String targetAccountingLineString)
EndowmentAccountingLineParserTargetEndowmentAccountingLine by populating the attributes found in the
getTargetAccountingLineFormat()
parseTargetEndowmentAccountingLine in interface EndowmentAccountingLineParserEndowmentAccountingLineParser.parseTargetEndowmentAccountingLine(org.kuali.kfs.module.endow.document.EndowmentAccountingLinesDocument,
java.lang.String)protected Class getTargetEndowmentAccountingLineClass(EndowmentAccountingLinesDocument accountingDocument)
accountingDocument - the document to determine the target accounting line class for
protected EndowmentAccountingLine populateAccountingLine(EndowmentAccountingLinesDocument transactionalDocument,
Class<? extends EndowmentAccountingLine> accountingLineClass,
String accountingLineAsString,
Map<String,String> attributeValueMap,
Integer sequenceNumber)
transactionalDocument - accountingLineClass - accountingLineAsString - attributeValueMap - sequenceNumber -
protected void putCommonAttributesInMap(Map<String,String> attributeValueMap,
EndowmentAccountingLinesDocument document,
Integer sequenceNumber)
attributeValueMap - document - sequenceNumber -
protected Map<String,String> parseAccountingLine(Class<? extends EndowmentAccountingLine> accountingLineClass,
String lineToParse)
accountingLineClass - lineToParse -
protected void performCustomSourceAccountingLinePopulation(Map<String,String> attributeValueMap,
SourceEndowmentAccountingLine sourceAccountingLine,
String accountingLineAsString)
SourceAccountingLine population
attributeValueMap - sourceAccountingLine - accountingLineAsString -
protected void performCustomTargetAccountingLinePopulation(Map<String,String> attributeValueMap,
TargetEndowmentAccountingLine targetAccountingLine,
String accountingLineAsString)
TargetAccountingLine attribute population
attributeValueMap - targetAccountingLine - accountingLineAsString -
protected List<EndowmentAccountingLine> importAccountingLines(String fileName,
InputStream stream,
EndowmentAccountingLinesDocument transactionalDocument,
boolean isSource)
stream - transactionalDocument - isSource -
public final List importSourceEndowmentAccountingLines(String fileName,
InputStream stream,
EndowmentAccountingLinesDocument document)
EndowmentAccountingLineParserSourceEndowmentAccountingLine from the inputStream
importSourceEndowmentAccountingLines in interface EndowmentAccountingLineParserSourceEndowmentAccountingLinesEndowmentAccountingLineParser.importSourceEndowmentAccountingLines(java.lang.String,
java.io.InputStream, org.kuali.kfs.module.endow.document.EndowmentAccountingLinesDocument)
public final List importTargetEndowmentAccountingLines(String fileName,
InputStream stream,
EndowmentAccountingLinesDocument document)
EndowmentAccountingLineParserTargetEndowmentAccountingLine from the inputStream
importTargetEndowmentAccountingLines in interface EndowmentAccountingLineParserTargetEndowmentAccountingLinesEndowmentAccountingLineParser.importTargetEndowmentAccountingLines(java.lang.String,
java.io.InputStream, org.kuali.kfs.module.endow.document.EndowmentAccountingLinesDocument)
protected String retrieveAttributeLabel(Class clazz,
String attributeName)
clazz - attributeName -
protected String[] chooseFormat(Class<? extends EndowmentAccountingLine> accountingLineClass)
accountingLineClass -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||