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 */ 016 package org.kuali.kfs.module.cab.batch.service; 017 018 import java.util.Collection; 019 import java.util.List; 020 021 import org.kuali.kfs.gl.businessobject.Entry; 022 import org.kuali.kfs.module.cab.businessobject.GlAccountLineGroup; 023 import org.kuali.kfs.module.purap.businessobject.PurApAccountingLineBase; 024 import org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntry; 025 026 /** 027 * This class declares the service method for CAB Reconciliation service. Expected to be used by {@link BatchExtractService}. This 028 * service should be not be implemented as singleton. 029 */ 030 public interface ReconciliationService { 031 032 /** 033 * Returns the list of duplicate entries found after reconciliation 034 * 035 * @return Duplicate GL Entries 036 */ 037 List<Entry> getDuplicateEntries(); 038 039 /** 040 * Returns the list of ignored entries found after reconciliation 041 * 042 * @return Ignored GL Entries 043 */ 044 List<Entry> getIgnoredEntries(); 045 046 /** 047 * Returns the list of account groups that found match to account line history 048 * 049 * @return List of valid matched account groups 050 */ 051 Collection<GlAccountLineGroup> getMatchedGroups(); 052 053 /** 054 * Returns the list of unmatched account line groups 055 * 056 * @return List of mismatches 057 */ 058 Collection<GlAccountLineGroup> getMisMatchedGroups(); 059 060 /** 061 * Returns true is a GL entry is already available in CAB 062 * 063 * @param glEntry GL Line entry 064 * @return true if matching GL entry found in CAB 065 */ 066 boolean isDuplicateEntry(Entry glEntry); 067 068 /** 069 * Main reconciliation service which will apply the formula where PURAP transaction amounts are compared using 070 * <li>GL_ENTRY_T = (AP_PMT_RQST_ACCT_CHG_T or AP_CRDT_MEMO_ACCT_CHG_T) </li> 071 * 072 * @param glEntries Purap GL Entries 073 * @param purapAcctEntries Purap Account Entries 074 */ 075 void reconcile(Collection<Entry> glEntries, Collection<PurApAccountingLineBase> purapAcctEntries); 076 077 078 }