use of edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractFile in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractServiceImpl method loadConcurStandardAccountingExtractFile.
private ConcurStandardAccountingExtractFile loadConcurStandardAccountingExtractFile(String standardAccountingExtractFileName) {
ConcurStandardAccountingExtractFile concurStandardAccountingExtractFile;
File standardAccountingExtractFile = new File(standardAccountingExtractFileName);
List parsed = (List) batchInputFileService.parse(batchInputFileType, safelyLoadFileBytes(standardAccountingExtractFile));
if (parsed == null || parsed.size() != 1) {
LOG.error("parseStandardAccoutingExtractFileToStandardAccountingExtractFile, Unable to parse the file into exactly 1 POJO");
throw new ValidationException("parseStandardAccoutingExtractFileToStandardAccountingExtractFile, did not parse the file into exactly 1 parse file ");
}
concurStandardAccountingExtractFile = (ConcurStandardAccountingExtractFile) parsed.get(0);
concurStandardAccountingExtractFile.setOriginalFileName(standardAccountingExtractFile.getName());
return concurStandardAccountingExtractFile;
}
use of edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractFile in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractCreateCollectorFileServiceImplTest method assertCollectorFileIsNotGenerated.
protected void assertCollectorFileIsNotGenerated(String fixtureName) throws Exception {
ConcurStandardAccountingExtractBatchReportData reportData = new ConcurStandardAccountingExtractBatchReportData();
ConcurStandardAccountingExtractFile saeFileContents = new ConcurStandardAccountingExtractFile();
saeFileContents.setOriginalFileName(fixtureName + GeneralLedgerConstants.BatchFileSystem.TEXT_EXTENSION);
String collectorFilePath = collectorFileService.buildCollectorFile(saeFileContents, reportData);
assertTrue("A Collector file should not have been created", StringUtils.isBlank(collectorFilePath));
}
Aggregations