View Javadoc

1   /**
2    * Copyright 2005-2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kns.rule;
17  
18  import org.apache.struts.action.ActionForm;
19  import org.kuali.rice.kns.rule.event.PromptBeforeValidationEvent;
20  import org.kuali.rice.krad.rule.BusinessRule;
21  
22  import javax.servlet.http.HttpServletRequest;
23  
24  /**
25   * An interface for a class that provides the ability to prompt the user with a question prior to running a document action.
26   * An implementation class of this interface may be specified in the document data dictionary file.
27   * 
28   * By default, unless KualiDocumentActionBase is overridden, the sole method will be invoked upon using the "approve", "blanketApprove",
29   * "performRouteReport", and "route" methodToCalls.
30   */
31  public interface PromptBeforeValidation extends BusinessRule {
32  
33      /**
34       * Callback method from Maintenance action that allows checks to be done and response redirected via the PreRulesCheckEvent
35       * 
36       * @param form
37       * @param request
38       * @param event stores various information necessary to render the question prompt
39       * @return boolean indicating whether the validation (and if validation successful, the action) should continue.  If false, the
40       * values within the event parameter will determine how the struts action handler should proceed
41       */
42      public boolean processPrompts(ActionForm form, HttpServletRequest request, PromptBeforeValidationEvent event);
43  }