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.ar.report.util;
017    
018    import java.util.ArrayList;
019    import java.util.HashMap;
020    import java.util.List;
021    import java.util.Map;
022    
023    import org.kuali.kfs.sys.businessobject.FinancialSystemDocumentHeader;
024    
025    /**
026     * To group and hold the data presented to working reports of extract process
027     */
028    public class CustomerStatementReportDataHolder {
029      //  private CustomerCreditMemoReportDefinition reportDefinition;
030        private Map<String, String> invoice;
031        private Map<String, String> customer;
032        private Map<String, String> sysinfo;
033        private List<CustomerStatementDetailReportDataHolder> details;
034        
035        private Map<String, Object> reportData;
036        
037        public final static String KEY_OF_INVOICE_ENTRY = "invoice";
038        public final static String KEY_OF_CUSTOMER_ENTRY = "customer";
039        public final static String KEY_OF_SYSINFO_ENTRY = "sysinfo";
040        public final static String KEY_OF_DETAILS_ENTRY = "details";
041        
042        /**
043         * Constructs a ExtractProcessReportDataHolder.java.
044         */
045        public CustomerStatementReportDataHolder() {
046          //this(null);
047            
048            this.invoice = new HashMap<String, String>();
049            this.customer = new HashMap<String, String>();
050            this.sysinfo = new HashMap<String, String>();
051            this.details = new ArrayList<CustomerStatementDetailReportDataHolder>();
052     
053            this.reportData = new HashMap<String, Object>();
054        }
055    
056        /**
057         * Constructs a ExtractProcessReportDataHolder.java.
058         * 
059         * @param reportDefinition
060         */
061    //    public CustomerCreditMemoReportDataHolder(CustomerCreditMemoReportDefinition reportDefinition) {
062    //        super();
063    //        this.reportDefinition = reportDefinition;
064    //        this.creditmemo = new HashMap<String, String>();
065    //        this.invoice = new HashMap<String, String>();
066    //        this.customer = new HashMap<String, String>();
067    //        this.sysinfo = new HashMap<String, String>();       
068    // 
069    //        this.reportData = new HashMap<String, Object>();
070    //    }
071       
072    
073        /**
074         * Gets the invoice attribute. 
075         * @return Returns the invoice.
076         */
077        public Map<String, String> getInvoice() {
078            return invoice;
079        }
080    
081        /**
082         * Sets the invoice attribute value.
083         * @param invoice The invoice to set.
084         */
085        public void setInvoice(Map<String, String> invoice) {
086            this.invoice = invoice;
087        }
088    
089        /**
090         * Gets the customer attribute. 
091         * @return Returns the customer.
092         */
093        public Map<String, String> getCustomer() {
094            return customer;
095        }
096    
097        /**
098         * Sets the customer attribute value.
099         * @param customer The customer to set.
100         */
101        public void setCustomer(Map<String, String> customer) {
102            this.customer = customer;
103        }
104    
105        /**
106         * Gets the sysinfo attribute. 
107         * @return Returns the sysinfo.
108         */
109        public Map<String, String> getSysinfo() {
110            return sysinfo;
111        }
112    
113        /**
114         * Sets the sysinfo attribute value.
115         * @param sysinfo The sysinfo to set.
116         */
117        public void setSysinfo(Map<String, String> sysinfo) {
118            this.sysinfo = sysinfo;
119        }
120    
121        /**
122         * Gets the reportData attribute. 
123         * @return Returns the reportData.
124         */
125        public Map<String, Object> getReportData() {        
126            
127            reportData.put(KEY_OF_INVOICE_ENTRY, invoice);
128            reportData.put(KEY_OF_CUSTOMER_ENTRY, customer);
129            reportData.put(KEY_OF_SYSINFO_ENTRY, sysinfo);
130            reportData.put(KEY_OF_DETAILS_ENTRY, details);
131          //  reportData.put(arg0, arg1);
132            
133            return reportData;
134        }
135        
136       
137        /**
138         * Sets the reportData attribute value.
139         * @param reportData The reportData to set.
140         */
141        public void setReportData(Map<String, Object> reportData) {
142            this.reportData = reportData;
143        }
144    
145        /**
146         * @see java.lang.Object#toString()
147         */
148        @Override
149        public String toString() {
150            return this.getReportData().toString();
151        }
152    
153        /**
154         * Gets the details attribute. 
155         * @return Returns the details.
156         */
157        public List<CustomerStatementDetailReportDataHolder> getDetails() {
158            return details;
159        }
160    
161        /**
162         * Sets the details attribute value.
163         * @param details The details to set.
164         */
165        public void setDetails(List<CustomerStatementDetailReportDataHolder> details) {
166            this.details = details;
167        }
168    
169        
170    }