001/* 002 * Copyright 2006 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.gl.service; 017 018import java.util.List; 019 020import org.kuali.ole.coa.businessobject.Account; 021import org.kuali.ole.gl.batch.service.AccountingCycleCachingService; 022import org.kuali.ole.gl.businessobject.OriginEntryInformation; 023import org.kuali.ole.sys.Message; 024import org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntry; 025import org.kuali.ole.sys.businessobject.UniversityDate; 026 027/** 028 * An interface that declares methods that would be needed to validate origin entries and transactions run through the scrubber 029 */ 030public interface ScrubberValidator { 031 /** 032 * Validate a transaction in the scrubber 033 * 034 * @param originEntry Input transaction (never changed) 035 * @param scrubbedEntry Output transaction (scrubbed version of input transaction) 036 * @param universityRunDate Date of scrubber run 037 * @return List of Message objects based for warnings or errors that happened when validating the transaction 038 */ 039 public List<Message> validateTransaction(OriginEntryInformation originEntry, OriginEntryInformation scrubbedEntry, UniversityDate universityRunDate, boolean laborIndicator, AccountingCycleCachingService accountingCycleCachingService); 040 041 /** 042 * Validate a transaction for use in balance inquiry 043 * 044 * @param entry Input transaction 045 */ 046 public void validateForInquiry(GeneralLedgerPendingEntry entry); 047 048 /** 049 * Performs logic to determine whether an account is expired 050 * 051 * @param account Account to validate 052 * @param universityRunDate Run date of process 053 * @return true if account is expired, false if not 054 */ 055 public boolean isAccountExpired(Account account, UniversityDate universityRunDate); 056}