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.gl.batch.service;
017    
018    import org.kuali.kfs.coa.businessobject.Account;
019    import org.kuali.kfs.coa.businessobject.ObjectCode;
020    import org.kuali.kfs.coa.businessobject.ObjectType;
021    import org.kuali.kfs.gl.businessobject.Transaction;
022    import org.kuali.kfs.sys.service.ReportWriterService;
023    
024    /**
025     * An interface with a predicate that tells if a transaction with the given fields would be an ICR transaction or not
026     */
027    public interface IndirectCostRecoveryService {
028        /**
029         * This will determine if this transaction is an ICR eligible transaction
030         * 
031         * @param transaction the transaction which is being determined to be ICR or not
032         * @param objectType the object type of the transaction
033         * @param account the account of the transaction
034         * @param objectCode the object code of the transaction
035         * @return true if the transaction is an ICR transaction and therefore should have an expenditure transaction created for it; false if otherwise
036         */
037        public abstract boolean isIcrTransaction(Transaction transaction, ReportWriterService reportWriterService);
038    }