1 /* 2 * Copyright 2005-2006 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 Oct 12, 2005 18 * 19 */ 20 package org.kuali.ole.gl.batch.service; 21 22 import java.util.Date; 23 24 import org.kuali.ole.gl.businessobject.Transaction; 25 import org.kuali.ole.sys.service.ReportWriterService; 26 27 /** 28 * An interface that delcares the methods that the Poster needs to post a transaction. 29 */ 30 public interface PostTransaction { 31 /** 32 * Post a single transaction to a single destination. 33 * 34 * @param t Transaction to post 35 * @param mode PosterService.MODE_ENTRIES or PosterService.MODE_REVERSAL 36 * @param postDate post date/time 37 * @param posterReportWriterService the writer service where the poster is writing its report 38 * @return The letter I if a row was inserted, U updated, D deleted. The string can have multiple codes. 39 */ 40 public String post(Transaction t, int mode, Date postDate, ReportWriterService posterReportWriterService); 41 42 /** 43 * The name of the destination for the post (ie, the database table name where resultant records will be posted) 44 * 45 * @return name 46 */ 47 public String getDestinationName(); 48 }