1 /* 2 * Copyright 2006-2009 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.ole.gl.batch.service; 17 18 import java.sql.Date; 19 20 import org.kuali.ole.gl.batch.CollectorBatch; 21 import org.kuali.ole.gl.businessobject.OriginEntryFull; 22 import org.kuali.ole.gl.businessobject.OriginEntryInformation; 23 import org.kuali.ole.gl.report.CollectorReportData; 24 import org.kuali.ole.gl.service.impl.ScrubberStatus; 25 26 27 public interface ScrubberProcess { 28 29 /** 30 * Scrub this single group read only. This will only output the scrubber report. It won't output any other groups. 31 * 32 * @param group the origin entry group that should be scrubbed 33 * @param the document number of any specific entries to scrub 34 */ 35 public void scrubGroupReportOnly(String fileName, String documentNumber); 36 37 /** 38 * Scrubs all entries in all groups and documents. 39 */ 40 public void scrubEntries(); 41 42 /** 43 * Scrubs the origin entry and ID billing details if the given batch. Store all scrubber output into the collectorReportData 44 * parameter. NOTE: DO NOT CALL ANY OF THE scrub* METHODS OF THIS CLASS AFTER CALLING THIS METHOD FOR EVERY UNIQUE INSTANCE OF 45 * THIS CLASS, OR THE COLLECTOR REPORTS MAY BE CORRUPTED 46 * 47 * @param batch the data gathered from a Collector file 48 * @param collectorReportData the statistics generated by running the Collector 49 */ 50 public void scrubCollectorBatch(ScrubberStatus scrubberStatus, CollectorBatch batch, CollectorReportData collectorReportData); 51 52 /** 53 * Scrub all entries that need it in origin entry. Put valid scrubbed entries in a scrubber valid group, put errors in a 54 * scrubber error group, and transactions with an expired account in the scrubber expired account group. 55 * @param group the specific origin entry group to scrub 56 * @param documentNumber the number of the document with entries to scrub 57 */ 58 public void scrubEntries(boolean reportOnlyMode, String documentNumber); 59 60 /** 61 * The demerger process reads all of the documents in the error group, then moves all of the original entries for that document 62 * from the valid group to the error group. It does not move generated entries to the error group. Those are deleted. It also 63 * modifies the doc number and origin code of cost share transfers. 64 * 65 * @param errorGroup this scrubber run's error group 66 * @param validGroup this scrubber run's valid group 67 */ 68 public void performDemerger(); 69 70 /** 71 * Sets the proper cost share object code in an entry and its offset 72 * 73 * @param costShareEntry GL Entry for cost share 74 * @param originEntry Scrubbed GL Entry that this is based on 75 */ 76 public void setCostShareObjectCode(OriginEntryFull costShareEntry, OriginEntryInformation originEntry); 77 78 /** 79 * This method modifies the run date if it is before the cutoff time specified by the RunTimeService See 80 * KULRNE-70 This method is public to facilitate unit testing 81 * 82 * @param currentDate the date the scrubber should report as having run on 83 * @return the run date 84 */ 85 public Date calculateRunDate(java.util.Date currentDate); 86 87 }