Coverage Report - org.kuali.student.r2.core.process.infc.Instruction
 
Classes in this File Line Coverage Branch Coverage Complexity
Instruction
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2011 The Kuali Foundation Licensed under the Educational
 3  
  * Community License, Version 2.0 (the "License"); you may not use
 4  
  * this file except in compliance with the License. You may obtain a
 5  
  * copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing, software
 10  
  * distributed under the License is distributed on an "AS IS" BASIS,
 11  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 12  
  * implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.r2.core.process.infc;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 import org.kuali.student.r2.common.infc.Relationship;
 21  
 import org.kuali.student.r2.common.infc.RichText;
 22  
 
 23  
 
 24  
 /**
 25  
  * Information about an Instruction. An Instruction is a Relationship
 26  
  * between a Process and a Check. Instructions contain a set of
 27  
  * applied data that determines if the Check applies to a Process.
 28  
  *
 29  
  * To determine if a Check applies to a Process:
 30  
  *      1. the person is a member of any applied Populations
 31  
  *      2. and the current ATP type is any of the applied ATP Types
 32  
  *
 33  
  * If any of the above applied elements is empty, then the applied
 34  
  * element evaluates to true. If all applied elements are empty, then
 35  
  * the Check is globally applied.
 36  
  *
 37  
  * @author tom
 38  
  * @since Thu Nov 21 14:22:34 EDT 2011
 39  
  */ 
 40  
 
 41  
 public interface Instruction 
 42  
     extends Relationship {
 43  
 
 44  
     /**
 45  
      * The process key.
 46  
      *
 47  
      * @name Process Key
 48  
      * @required
 49  
      * @readOnly
 50  
      */
 51  
     public String getProcessKey();
 52  
 
 53  
     /**
 54  
      * The Check Id.
 55  
      *
 56  
      * @name Check Id
 57  
      * @required
 58  
      * @readOnly
 59  
      */
 60  
     public String getCheckKey();
 61  
 
 62  
     /**
 63  
      * The Population Ids to which the Check applies.
 64  
      *
 65  
      * @name Applied Population Ids
 66  
      */
 67  
     public List<String> getAppliedPopulationKeys();
 68  
 
 69  
     /**
 70  
      * The ATP Type keys to which the Check applies.
 71  
      * TODO: revisit rules that evaluate to ATPs.
 72  
      *
 73  
      * @name Applied Atp Type Keys
 74  
      */
 75  
     public List<String> getAppliedAtpTypeKeys();
 76  
 
 77  
     /**
 78  
      * The text of a message to display to a user on fail or warning
 79  
      * for this Instruction. (todo: substituting variables to create
 80  
      * contextual message and handling internationalization)
 81  
      *
 82  
      * @name Message
 83  
      */
 84  
     public RichText getMessage();
 85  
 
 86  
     /**
 87  
      * The position in the Process.
 88  
      *
 89  
      * @name Position
 90  
      * @readOnly
 91  
      */
 92  
     public Integer getPosition();
 93  
 
 94  
     /**
 95  
      * Tests if a failure in this Check results in warning or failure
 96  
      * for this step. If true, the Check failure is interpreted as a
 97  
      * warning. If false, the Check failure is interpreted as an
 98  
      * error.
 99  
      *
 100  
      * @name Is Warning 
 101  
      */
 102  
     public Boolean getIsWarning();
 103  
 
 104  
     /**
 105  
      * Tests if processing should continue if this Check fails.
 106  
      *
 107  
      * @name Continue On Fail
 108  
      */
 109  
     public Boolean getContinueOnFail();
 110  
 
 111  
     /**
 112  
      * Tests an Exemption can be requested to this Instruction.
 113  
      *
 114  
      * @name Is Exemptable
 115  
      */
 116  
     public Boolean getIsExemptable();
 117  
 }