001 /** 002 * Copyright 2005-2014 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.rice.kns.rule; 017 018 import org.apache.struts.action.ActionForm; 019 import org.kuali.rice.kns.rule.event.PromptBeforeValidationEvent; 020 import org.kuali.rice.krad.rules.rule.BusinessRule; 021 022 import 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 public interface PromptBeforeValidation extends BusinessRule { 032 033 /** 034 * Callback method from Maintenance action that allows checks to be done and response redirected via the PreRulesCheckEvent 035 * 036 * @param form 037 * @param request 038 * @param event stores various information necessary to render the question prompt 039 * @return boolean indicating whether the validation (and if validation successful, the action) should continue. If false, the 040 * values within the event parameter will determine how the struts action handler should proceed 041 */ 042 public boolean processPrompts(ActionForm form, HttpServletRequest request, PromptBeforeValidationEvent event); 043 }