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.sys.document.service;
017    
018    import org.kuali.kfs.coa.businessobject.Account;
019    import org.kuali.kfs.coa.businessobject.ObjectCode;
020    
021    /**
022     * This service interface defines methods that an AccountPresenceService implementation must provide.
023     * 
024     */
025    public interface AccountPresenceService {
026    
027        /**
028         * Checks the given account for presence control turned on. If turned on, the object code must have a budget record in the gl
029         * balance table, otherwise this method returns false. If presence control is turned off, method returns true.
030         * 
031         * @param account The account to be checked for presense control.
032         * @param objectCode The object code to be looked up in the gl balance table.
033         * @return True if presence control is turned on and obj code is in gl balance table, false otherwise.
034         */
035        public boolean isObjectCodeBudgetedForAccountPresence(Account account, ObjectCode objectCode);
036    }