Coverage Report - org.kuali.rice.kns.rule.event.PromptBeforeValidationEvent
 
Classes in this File Line Coverage Branch Coverage Complexity
PromptBeforeValidationEvent
0%
0/29
N/A
1
 
 1  
 /*
 2  
  * Copyright 2005-2007 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.event;
 17  
 
 18  
 import org.apache.log4j.Logger;
 19  
 import org.kuali.rice.kns.rule.PromptBeforeValidation;
 20  
 import org.kuali.rice.krad.document.Document;
 21  
 import org.kuali.rice.krad.rule.BusinessRule;
 22  
 import org.kuali.rice.krad.rule.event.KualiDocumentEventBase;
 23  
 
 24  
 /**
 25  
  * Event for handling warnings/questions before rules are called.
 26  
  * 
 27  
  * 
 28  
  */
 29  
 public class PromptBeforeValidationEvent extends KualiDocumentEventBase {
 30  0
     private static final Logger LOG = Logger.getLogger(PromptBeforeValidationEvent.class);
 31  
 
 32  
     boolean performQuestion;
 33  
     String actionForwardName;
 34  
     String questionId;
 35  
     String questionText;
 36  
     String questionType;
 37  
     String questionCaller;
 38  
     String questionContext;
 39  
 
 40  
 
 41  
     /**
 42  
      * @param description
 43  
      * @param errorPathPrefix
 44  
      * @param document
 45  
      */
 46  
     public PromptBeforeValidationEvent(String description, String errorPathPrefix, Document document) {
 47  
 
 48  0
         super(description, errorPathPrefix);
 49  0
         this.document = document;
 50  
 
 51  0
         LOG.debug(description);
 52  
 
 53  0
         performQuestion = false;
 54  0
     }
 55  
 
 56  
 
 57  
     /**
 58  
      * @return Returns the actionForwardName.
 59  
      */
 60  
     public String getActionForwardName() {
 61  0
         return actionForwardName;
 62  
     }
 63  
 
 64  
     /**
 65  
      * @param actionForwardName The actionForwardName to set.
 66  
      */
 67  
     public void setActionForwardName(String actionForwardName) {
 68  0
         this.actionForwardName = actionForwardName;
 69  0
     }
 70  
 
 71  
     /**
 72  
      * @return Returns the performQuestion.
 73  
      */
 74  
     public boolean isPerformQuestion() {
 75  0
         return performQuestion;
 76  
     }
 77  
 
 78  
     /**
 79  
      * @param performQuestion The performQuestion to set.
 80  
      */
 81  
     public void setPerformQuestion(boolean performQuestion) {
 82  0
         this.performQuestion = performQuestion;
 83  0
     }
 84  
 
 85  
     /**
 86  
      * @return Returns the questionCaller.
 87  
      */
 88  
     public String getQuestionCaller() {
 89  0
         return questionCaller;
 90  
     }
 91  
 
 92  
     /**
 93  
      * @param questionCaller The questionCaller to set.
 94  
      */
 95  
     public void setQuestionCaller(String questionCaller) {
 96  0
         this.questionCaller = questionCaller;
 97  0
     }
 98  
 
 99  
     /**
 100  
      * @return Returns the questionContext.
 101  
      */
 102  
     public String getQuestionContext() {
 103  0
         return questionContext;
 104  
     }
 105  
 
 106  
     /**
 107  
      * @param questionContext The questionContext to set.
 108  
      */
 109  
     public void setQuestionContext(String questionContext) {
 110  0
         this.questionContext = questionContext;
 111  0
     }
 112  
 
 113  
     /**
 114  
      * @return Returns the questionId.
 115  
      */
 116  
     public String getQuestionId() {
 117  0
         return questionId;
 118  
     }
 119  
 
 120  
     /**
 121  
      * @param questionId The questionId to set.
 122  
      */
 123  
     public void setQuestionId(String questionId) {
 124  0
         this.questionId = questionId;
 125  0
     }
 126  
 
 127  
     /**
 128  
      * @return Returns the questionText.
 129  
      */
 130  
     public String getQuestionText() {
 131  0
         return questionText;
 132  
     }
 133  
 
 134  
     /**
 135  
      * @param questionText The questionText to set.
 136  
      */
 137  
     public void setQuestionText(String questionText) {
 138  0
         this.questionText = questionText;
 139  0
     }
 140  
 
 141  
     /**
 142  
      * @return Returns the questionType.
 143  
      */
 144  
     public String getQuestionType() {
 145  0
         return questionType;
 146  
     }
 147  
 
 148  
     /**
 149  
      * @param questionType The questionType to set.
 150  
      */
 151  
     public void setQuestionType(String questionType) {
 152  0
         this.questionType = questionType;
 153  0
     }
 154  
 
 155  
     /**
 156  
      * @see org.kuali.rice.krad.rule.event.KualiDocumentEvent#getRuleInterfaceClass()
 157  
      */
 158  
     public Class<? extends BusinessRule> getRuleInterfaceClass() {
 159  0
         return PromptBeforeValidation.class;
 160  
     }
 161  
 
 162  
 
 163  
     /**
 164  
      * @see org.kuali.rice.krad.rule.event.KualiDocumentEvent#invokeRuleMethod(org.kuali.rice.krad.rule.BusinessRule)
 165  
      */
 166  
     public boolean invokeRuleMethod(BusinessRule rule) {
 167  0
         return true;
 168  
     }
 169  
 }