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 org.kuali.kfs.pdp.businessobject.LoadPaymentStatus;
019 import org.kuali.kfs.pdp.businessobject.PaymentFileLoad;
020 import org.kuali.kfs.sys.batch.BatchInputFileType;
021 import org.kuali.rice.kns.util.MessageMap;
022
023 /**
024 * Handles processing (validation, loading, and reporting) of incoming payment files.
025 */
026 public interface PaymentFileService {
027
028 /**
029 * Process all incoming payment files
030 *
031 * @param paymentInputFileType <code>BatchInputFileType</code> for payment files
032 */
033 public void processPaymentFiles(BatchInputFileType paymentInputFileType);
034
035 /**
036 * Performs hard edits on payment file
037 *
038 * @param paymentFile <code>PaymentFileLoad</code> containing parsed file contents
039 * @param errorMap <code>Map</code> that will hold errors encountered
040 */
041 public void doPaymentFileValidation(PaymentFileLoad paymentFile, MessageMap errorMap);
042
043 /**
044 * Performs soft edits of payment file data and loads records into database
045 *
046 * @param paymentFile <code>PaymentFileLoad</code> containing parsed file contents
047 * @param status <code>LoadPaymentStatus</code> containing status information for load
048 * @param incomingFileName string file name
049 */
050 public void loadPayments(PaymentFileLoad paymentFile, LoadPaymentStatus status, String incomingFileName);
051
052 /**
053 * Creates the PDP XML output which can be parsed to obtain load status information
054 *
055 * @param status <code>LoadPaymentStatus</code> containing status information for load
056 * @param inputFileName incomingFileName string file name
057 * @return true if output file was successfully created, false otherwise
058 */
059 public boolean createOutputFile(LoadPaymentStatus status, String inputFileName);
060
061 }
062