Coverage Report - org.kuali.rice.kns.rule.event.KualiDocumentEvent
 
Classes in this File Line Coverage Branch Coverage Complexity
KualiDocumentEvent
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2005-2008 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 java.util.List;
 19  
 
 20  
 import org.kuali.rice.kns.document.Document;
 21  
 import org.kuali.rice.kns.rule.BusinessRule;
 22  
 
 23  
 /**
 24  
  * Parent interface of all document-related events, which are used to drive the business rules evaluation process.
 25  
  * 
 26  
  * 
 27  
  */
 28  
 public interface KualiDocumentEvent {
 29  
     /**
 30  
      * @return Document The document associated with this event
 31  
      */
 32  
     public Document getDocument();
 33  
 
 34  
     /**
 35  
      * The name of the event.
 36  
      * 
 37  
      * @return String
 38  
      */
 39  
     public String getName();
 40  
 
 41  
     /**
 42  
      * A description of the event.
 43  
      * 
 44  
      * @return String
 45  
      */
 46  
     public String getDescription();
 47  
 
 48  
 
 49  
     /**
 50  
      * @return errorPathPrefix for this event
 51  
      */
 52  
     public String getErrorPathPrefix();
 53  
 
 54  
     /**
 55  
      * Returns the interface that classes must implement to receive this event.
 56  
      * 
 57  
      * @return
 58  
      */
 59  
     public Class<? extends BusinessRule> getRuleInterfaceClass();
 60  
 
 61  
     /**
 62  
      * Validates the event has all the necessary properties.
 63  
      */
 64  
     public void validate();
 65  
 
 66  
     /**
 67  
      * Invokes the event handling method on the rule object.
 68  
      * 
 69  
      * @param rule
 70  
      * @return
 71  
      */
 72  
     public boolean invokeRuleMethod(BusinessRule rule);
 73  
 
 74  
     /**
 75  
      * This will return a list of events that are spawned from this event.
 76  
      * 
 77  
      * @return
 78  
      */
 79  
     public List<KualiDocumentEvent> generateEvents();
 80  
 }