| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PropositionDefinitionContract | 
  | 
  | 1.0;1 | 
| 1 |  package org.kuali.rice.krms.api.repository.proposition; | |
| 2 | ||
| 3 |  import java.util.List; | |
| 4 | ||
| 5 |  import org.kuali.rice.core.api.mo.common.Identifiable; | |
| 6 |  import org.kuali.rice.core.api.mo.common.Versioned; | |
| 7 | ||
| 8 | public interface PropositionDefinitionContract extends Identifiable, Versioned {  | |
| 9 |          /** | |
| 10 |           * This is the description text for the KRMS proposition | |
| 11 |           * @return description for KRMS type. | |
| 12 |           */ | |
| 13 |          public String getDescription(); | |
| 14 | ||
| 15 |          /** | |
| 16 |           * This is the id of Proposition KrmsType of the proposition. | |
| 17 |           * It provides some context to what type of object of the KRMS type. | |
| 18 |           * @return the id of the KRMS type. | |
| 19 |           */ | |
| 20 |          public String getTypeId(); | |
| 21 | ||
| 22 |          /** | |
| 23 |           * This returns the ID of the rule this proposition belongs to.  May be null if this proposition has  | |
| 24 |           * not yet been persisted. | |
| 25 |           *  | |
| 26 |           * @return the ID of the Rule this proposition belongs to. | |
| 27 |           */ | |
| 28 |          public String getRuleId(); | |
| 29 | ||
| 30 |          /** | |
| 31 |           * <p> | |
| 32 |           * There are three main types of Propositions: | |
| 33 |           *   Compound Propositions - a proposition consisting of other propositions  | |
| 34 |           *           and a boolean algebra operator (AND, OR) defining how to evaluate  | |
| 35 |           *           those propositions. | |
| 36 |       *   Parameterized Propositions - a proposition which is parameterized by  | |
| 37 |       *      some set of values, evaluation logic is implemented by hand and  | |
| 38 |       *      returns true or false | |
| 39 |       *   Simple Propositions - a proposition of the form lhs op rhs where  | |
| 40 |       *           lhs=left-hand side, rhs=right-hand side, and op=operator | |
| 41 |           * </p> | |
| 42 |           * @return the proposition type code of the proposition | |
| 43 |           * <p> | |
| 44 |           *      Valid values are C = compound, P = parameterized, S = simple | |
| 45 |           * </p> | |
| 46 |           */ | |
| 47 |          public String getPropositionTypeCode(); | |
| 48 | ||
| 49 |          /** | |
| 50 |           * This is the parameter list of the proposition. | |
| 51 |           * Parameters are listed in Reverse Polish Notation. | |
| 52 |           * Parameters may be constants, terms, or functions. | |
| 53 |           * <p> | |
| 54 |           * Compound Propositions will have an empty parameter list. | |
| 55 |           * </p> | |
| 56 |           * @see PropositionParameter | |
| 57 |           * @return the Parameters related to the proposition | |
| 58 |           */ | |
| 59 | public List<? extends PropositionParameterContract> getParameters();  | |
| 60 | ||
| 61 |          /** | |
| 62 |           * This method returns the op code to be used when evaluating compound | |
| 63 |           * propositions.  | |
| 64 |           *  | |
| 65 |           * @return the compound op code.  | |
| 66 |           *    valid values are A = and, O = or | |
| 67 |           */ | |
| 68 |          public String getCompoundOpCode(); | |
| 69 | ||
| 70 |          /** | |
| 71 |           *  | |
| 72 |           * This method returns the propositions which are contained in a | |
| 73 |           * compound proposition. | |
| 74 |           *  | |
| 75 |           * @return an ordered list of the Propositions which make up the compound | |
| 76 |           * proposition. | |
| 77 |           */ | |
| 78 | public List<? extends PropositionDefinitionContract> getCompoundComponents();  | |
| 79 | }  |