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.pdp.service;
017
018 import java.util.Date;
019 import java.util.List;
020
021 import org.kuali.kfs.pdp.businessobject.CustomerProfile;
022 import org.kuali.kfs.pdp.businessobject.DisbursementNumberRange;
023 import org.kuali.kfs.pdp.businessobject.FormatProcessSummary;
024 import org.kuali.kfs.pdp.businessobject.FormatSelection;
025 import org.kuali.kfs.pdp.service.impl.exception.FormatException;
026 import org.kuali.rice.kim.bo.Person;
027
028 public interface FormatService {
029
030 /**
031 * This method gets all customer profiles
032 * @return
033 */
034 public List<CustomerProfile> getAllCustomerProfiles();
035
036 /**
037 * This method gets all disbursement number ranges
038 * @return
039 */
040 public List<DisbursementNumberRange> getAllDisbursementNumberRanges();
041
042 /**
043 * This method gets the format process by campus code and returns the start date for that process.
044 * @param campus the campus code
045 * @return the format process start date if any process found for the given campus code, null otherwise
046 */
047 public Date getFormatProcessStartDate(String campus);
048
049 /**
050 * This method gets the data for the format process
051 * @param user the user that initiated the format process
052 * @return FormatSelection
053 */
054 public FormatSelection getDataForFormat(Person user);
055
056 /**
057 * This method formats the data for check printing.
058 * @param procId
059 */
060 public void performFormat(Integer procId) throws FormatException;
061
062 /**
063 * If the start format process was run and errored out,
064 * this needs to be run to allow formats to continue to function
065 * @param procId
066 */
067 public void resetFormatPayments(Integer procId);
068
069 /**
070 * This method marks the process log so a format only happens once per campus. Mark all the
071 * payments that will be formatted and return a summary. attachments will be Y, N or null for both.
072 *
073 * @param user
074 * @param campus
075 * @param customers
076 * @param paydate
077 * @param paymentTypes
078 * @return FormatProcessSummary
079 */
080 public FormatProcessSummary startFormatProcess(Person user, String campus, List<CustomerProfile> customers, Date paydate, String paymentTypes);
081
082 /**
083 * This method removes the format process from the format process table
084 * @param campus
085 */
086 public void endFormatProcess(String campus);
087
088 /**
089 * If the start format process was run and the user doesn't want to continue,
090 * this needs to be run to set all payments back to open.
091 * This method unmarks the payments and removes the format process entry.
092 * @param processId
093 */
094 public void clearUnfinishedFormat(Integer processId) ;
095 }
096