001/** 002 * Copyright 2005-2018 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 */ 016package org.kuali.rice.kns.rule; 017 018import org.apache.struts.action.ActionForm; 019import org.kuali.rice.kns.rule.event.PromptBeforeValidationEvent; 020import org.kuali.rice.krad.rules.rule.BusinessRule; 021 022import javax.servlet.http.HttpServletRequest; 023 024/** 025 * An interface for a class that provides the ability to prompt the user with a question prior to running a document action. 026 * An implementation class of this interface may be specified in the document data dictionary file. 027 * 028 * By default, unless KualiDocumentActionBase is overridden, the sole method will be invoked upon using the "approve", "blanketApprove", 029 * "performRouteReport", and "route" methodToCalls. 030 * 031 * @deprecated Only used in KNS classes, use KRAD. 032 */ 033@Deprecated 034public interface PromptBeforeValidation extends BusinessRule { 035 036 /** 037 * Callback method from Maintenance action that allows checks to be done and response redirected via the PreRulesCheckEvent 038 * 039 * @param form 040 * @param request 041 * @param event stores various information necessary to render the question prompt 042 * @return boolean indicating whether the validation (and if validation successful, the action) should continue. If false, the 043 * values within the event parameter will determine how the struts action handler should proceed 044 */ 045 public boolean processPrompts(ActionForm form, HttpServletRequest request, PromptBeforeValidationEvent event); 046}