View Javadoc
1   /*
2    * Copyright 2007 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.util.Iterator;
19  import java.util.List;
20  
21  import org.kuali.ole.gl.batch.service.impl.ReconciliationBlock;
22  import org.kuali.ole.gl.businessobject.OriginEntryFull;
23  import org.kuali.ole.sys.Message;
24  
25  /**
26   * An object to reconcile origin entries. Since the {@link #reconcile(Iterator, ReconciliationBlock, List)} method below takes in an
27   * iterator (which may load entries from the DB as the {@link Iterator#next()} method is called), it is probably desirable for
28   * implementations to annotate the class as Transactional.
29   */
30  public interface ReconciliationService {
31  
32      /**
33       * Performs the reconciliation on origin entries using the data from the {@link ReconciliationBlock} parameter
34       * 
35       * @param entries origin entries
36       * @param reconBlock reconciliation data
37       * @param errorMessages a non-null list onto which error messages will be appended. This list will be modified by reference.
38       */
39      public void reconcile(Iterator<OriginEntryFull> entries, ReconciliationBlock reconBlock, List<Message> errorMessages);
40  }