001/*
002 * The Kuali Financial System, a comprehensive financial management system for higher education.
003 * 
004 * Copyright 2005-2014 The Kuali Foundation
005 * 
006 * This program is free software: you can redistribute it and/or modify
007 * it under the terms of the GNU Affero General Public License as
008 * published by the Free Software Foundation, either version 3 of the
009 * License, or (at your option) any later version.
010 * 
011 * This program is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014 * GNU Affero General Public License for more details.
015 * 
016 * You should have received a copy of the GNU Affero General Public License
017 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
018 */
019package org.kuali.kfs.module.ec.document.validation;
020
021import org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail;
022import org.kuali.kfs.module.ec.document.EffortCertificationDocument;
023import org.kuali.rice.krad.rules.rule.BusinessRule;
024
025/**
026 * Defines a rule which gets invoked immediately before a detail line is added to a effort certification document.
027 */
028public interface AddDetailLineRule<E extends EffortCertificationDocument, D extends EffortCertificationDetail> extends BusinessRule {
029
030    /**
031     * validate the given effort certification detail line before it can be added into the given document
032     * 
033     * @param effortCertificationDocument the given effort certification document
034     * @param effortCertificationDetail the given effort certification detail line
035     * @return true if all rules are valid; otherwise, false;
036     */
037    public boolean processAddDetailLineRules(E effortCertificationDocument, D effortCertificationDetail);
038}