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.pdp.service;
17  
18  import java.util.Date;
19  import java.util.List;
20  
21  import org.kuali.ole.pdp.businessobject.CustomerProfile;
22  import org.kuali.ole.pdp.businessobject.DisbursementNumberRange;
23  import org.kuali.ole.pdp.businessobject.FormatProcessSummary;
24  import org.kuali.ole.pdp.businessobject.FormatSelection;
25  import org.kuali.ole.pdp.service.impl.exception.FormatException;
26  import org.kuali.rice.kim.api.identity.Person;
27  
28  public interface FormatService {
29  
30      /**
31       * This method gets all customer profiles
32       * @return
33       */
34      public List<CustomerProfile> getAllCustomerProfiles();
35  
36      /**
37       * This method gets all disbursement number ranges
38       * @return
39       */
40      public List<DisbursementNumberRange> getAllDisbursementNumberRanges();
41  
42      /**
43       * This method gets the format process by campus code and returns the start date for that process.
44       * @param campus the campus code
45       * @return the format process start date if any process found for the given campus code, null otherwise
46       */
47      public Date getFormatProcessStartDate(String campus);
48  
49      /**
50       * This method gets the data for the format process
51       * @param user the user that initiated the format process
52       * @return FormatSelection
53       */
54      public FormatSelection getDataForFormat(Person user);
55  
56      /**
57       * This method formats the data for check printing.
58       * @param procId
59       */
60      public void performFormat(Integer procId) throws FormatException;
61  
62      /**
63       *  If the start format process was run and errored out,
64       *  this needs to be run to allow formats to continue to function
65       * @param procId
66       */
67      public void resetFormatPayments(Integer procId);
68  
69      /**
70       * This method marks the process log so a format only happens once per campus. Mark all the
71       * payments that will be formatted and return a summary. attachments will be Y, N or null for both.
72       * 
73       * @param user
74       * @param campus
75       * @param customers
76       * @param paydate
77       * @param paymentTypes
78       * @return FormatProcessSummary
79       */
80      public FormatProcessSummary startFormatProcess(Person user, String campus, List<CustomerProfile> customers, Date paydate, String paymentTypes);
81  
82      /**
83       * This method removes the format process from the format process table
84       * @param campus
85       */
86      public void endFormatProcess(String campus);
87      
88      /**
89       * If the start format process was run and the user doesn't want to continue,
90       * this needs to be run to set all payments back to open.
91       * This method unmarks the payments and removes the format process entry.
92       * @param processId
93       */
94      public void clearUnfinishedFormat(Integer processId) ;
95  }
96