001/* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.ole.select.service; 017 018import org.apache.struts.upload.FormFile; 019import org.kuali.ole.select.businessobject.BibInfoBean; 020import org.kuali.ole.select.businessobject.OleLoadFailureRecords; 021import org.kuali.ole.select.businessobject.OleLoadSumRecords; 022 023import java.io.Serializable; 024import java.math.BigDecimal; 025import java.util.List; 026import java.util.Map; 027 028 029public interface BatchLoadService extends Serializable { 030 031 //public Properties loadPropertiesFromClassPath(String classPath); 032 033 public List<BibInfoBean> getBibInfoBeanList(String xmlString); 034 035 public void saveFailureRecord(List<BibInfoBean> bibFailureRecordsList, Integer loadSumId, BigDecimal errorId); 036 037 public void saveSuccessRecord(OleLoadSumRecords oleLoadSumRecords, int dupRecords, int poSucRecords, int sucRecords, String batchDescription, BigDecimal batchLoadProfile, String fileName); 038 039 public boolean fileSizeValidation(Long fileSize); 040 041 public List getDocIsbnList(List bibIsbnList); 042 043 public int getNoOfDupIsbnRecords(List testList, List bibList); 044 045 public List<BibInfoBean> getIsbnFailureRecordsList(List isbnList, List<BibInfoBean> bibInfoBeanList); 046 047 public List<BibInfoBean> getVendorPoNumberFailureRecordsList(List vendorNumberList, List<BibInfoBean> bibInfoBeanList); 048 049 public OleLoadSumRecords getOleLoadSumRecords(Map loadRecordsMap); 050 051 public List<OleLoadFailureRecords> getOleFailureRecordsList(Map loadRecordsMap); 052 053 public List getVendorPoNumberList(List<BibInfoBean> bibInfoBeanList); 054 055 public List<BibInfoBean> getRequisitionFailureRecords(List reqList, List<BibInfoBean> bibInfoBeanList); 056 057 //public List<BibInfoBean> getPoFailureRecords(List reqList,List<BibInfoBean> bibInfoBeanList); 058 059 public String getDestinationPath(); 060 061 public void foundAllDuplicateRecords(List<BibInfoBean> bibInfoBeanList, List<BibInfoBean> reqFailureList, List<BibInfoBean> titleFailureList, List<BibInfoBean> isbnDupFailureList, List<BibInfoBean> vendorPoNumberDupFailureList, List bibIsbnList); 062 063 public Long getFileSize(FormFile upLoadFile); 064 065 public int getDupRecordsCount(List<BibInfoBean> reqFailureList, List<BibInfoBean> titleFailureList, List<BibInfoBean> isbnDupFailureList, List<BibInfoBean> vendorPoNumberDupFailureList); 066 067 public void saveAllFailureRecords(List<BibInfoBean> isbnFailureList, List<BibInfoBean> vendorPoNumberFailureList, List<BibInfoBean> reqFailureList, List<BibInfoBean> titleFailureList, List<BibInfoBean> vendorPoNumberDupFailureList, int acqLoadSumId); 068 069 public List<BibInfoBean> getBibFailureRecordsList(List<BibInfoBean> isbnFailureList, List<BibInfoBean> vendorPoNumberFailureList, List<BibInfoBean> reqFailureList, List<BibInfoBean> titleFailureList, List<BibInfoBean> vendorPoNumberDupFailureList); 070 071 public void createReqIdTextFile(List reqList, Integer acqSumId); 072 073 public void createErrorMrkFile(String failureRawData, Integer acqSumId); 074 075 public List getPOList(String loadSumId); 076 077 public List getBibIDList(String loadSumId); 078}