View Javadoc
1   /*
2    * Copyright 2005-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  /*
17   * Created on Mar 9, 2005
18   *
19   */
20  package org.kuali.ole.module.purap.businessobject;
21  
22  import org.kuali.ole.module.purap.document.ElectronicInvoiceRejectDocument;
23  
24  import java.io.File;
25  import java.util.ArrayList;
26  import java.util.HashMap;
27  import java.util.List;
28  import java.util.Map;
29  
30  public class ElectronicInvoiceLoad {
31  
32      private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(ElectronicInvoiceLoad.class);
33  
34      private Map invoiceLoadSummaries;
35      private Map rejectFilesToMove;
36      private List rejectDocumentList;
37  
38      public ElectronicInvoiceLoad() {
39          invoiceLoadSummaries = new HashMap();
40          rejectFilesToMove = new HashMap();
41          rejectDocumentList = new ArrayList();
42      }
43  
44      public void insertInvoiceLoadSummary(ElectronicInvoiceLoadSummary eils) {
45          invoiceLoadSummaries.put(eils.getVendorDunsNumber(), eils);
46      }
47  
48      public void addRejectFileToMove(File file, String directory) {
49          rejectFilesToMove.put(file, directory);
50      }
51  
52      public void addInvoiceReject(ElectronicInvoiceRejectDocument eir) {
53          rejectDocumentList.add(eir);
54      }
55  
56      public List getRejectDocuments() {
57          return rejectDocumentList;
58      }
59  
60      public Map getInvoiceLoadSummaries() {
61          return invoiceLoadSummaries;
62      }
63  
64      public void setInvoiceLoadSummaries(Map invoiceLoadSummaries) {
65          this.invoiceLoadSummaries = invoiceLoadSummaries;
66      }
67  
68      public Map getRejectFilesToMove() {
69          return rejectFilesToMove;
70      }
71  
72      public boolean containsRejects() {
73          return !rejectDocumentList.isEmpty();
74      }
75  
76  }