001/*
002 * Copyright 2005-2006 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/*
017 * Created on Oct 12, 2005
018 *
019 */
020package org.kuali.ole.gl.batch.service;
021
022import java.util.Date;
023
024import org.kuali.ole.gl.businessobject.Transaction;
025import org.kuali.ole.sys.service.ReportWriterService;
026
027/**
028 * An interface that delcares the methods that the Poster needs to post a transaction.
029 */
030public interface PostTransaction {
031    /**
032     * Post a single transaction to a single destination.
033     * 
034     * @param t Transaction to post
035     * @param mode PosterService.MODE_ENTRIES or PosterService.MODE_REVERSAL
036     * @param postDate post date/time
037     * @param posterReportWriterService the writer service where the poster is writing its report 
038     * @return The letter I if a row was inserted, U updated, D deleted. The string can have multiple codes.
039     */
040    public String post(Transaction t, int mode, Date postDate, ReportWriterService posterReportWriterService);
041
042    /**
043     * The name of the destination for the post (ie, the database table name where resultant records will be posted)
044     * 
045     * @return name
046     */
047    public String getDestinationName();
048}