1 /*
2 * Copyright 2006 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.service;
17
18 import java.util.List;
19
20 import org.kuali.ole.coa.businessobject.Account;
21 import org.kuali.ole.gl.batch.service.AccountingCycleCachingService;
22 import org.kuali.ole.gl.businessobject.OriginEntryInformation;
23 import org.kuali.ole.sys.Message;
24 import org.kuali.ole.sys.businessobject.GeneralLedgerPendingEntry;
25 import org.kuali.ole.sys.businessobject.UniversityDate;
26
27 /**
28 * An interface that declares methods that would be needed to validate origin entries and transactions run through the scrubber
29 */
30 public interface ScrubberValidator {
31 /**
32 * Validate a transaction in the scrubber
33 *
34 * @param originEntry Input transaction (never changed)
35 * @param scrubbedEntry Output transaction (scrubbed version of input transaction)
36 * @param universityRunDate Date of scrubber run
37 * @return List of Message objects based for warnings or errors that happened when validating the transaction
38 */
39 public List<Message> validateTransaction(OriginEntryInformation originEntry, OriginEntryInformation scrubbedEntry, UniversityDate universityRunDate, boolean laborIndicator, AccountingCycleCachingService accountingCycleCachingService);
40
41 /**
42 * Validate a transaction for use in balance inquiry
43 *
44 * @param entry Input transaction
45 */
46 public void validateForInquiry(GeneralLedgerPendingEntry entry);
47
48 /**
49 * Performs logic to determine whether an account is expired
50 *
51 * @param account Account to validate
52 * @param universityRunDate Run date of process
53 * @return true if account is expired, false if not
54 */
55 public boolean isAccountExpired(Account account, UniversityDate universityRunDate);
56 }