Produced by Araxis Merge on 6/11/2019 10:54:14 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\rule\impl | AbstractRuleParameters.java | Wed May 29 15:26:14 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\rule\impl | AbstractRuleParameters.java | Mon Jun 10 19:27:47 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 212 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /********* ********** ********** ********** ********** ********** ********** ********** | |
| 2 | * Copyrii ght 2004 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** ********** *********/ | |
| 4 | package go v.va.med.f w.rule.imp l; | |
| 5 | ||
| 6 | // Java cl asses | |
| 7 | import jav a.util.Col lection; | |
| 8 | import jav a.util.Ite rator; | |
| 9 | import jav a.util.Map ; | |
| 10 | ||
| 11 | import org .apache.co mmons.lang .Validate; | |
| 12 | import org .apache.co mmons.lang .builder.T oStringBui lder; | |
| 13 | import org .apache.co mmons.lang .builder.T oStringSty le; | |
| 14 | ||
| 15 | import gov .va.med.fw .rule.Rule Parameter; | |
| 16 | import gov .va.med.fw .rule.Rule Parameters ; | |
| 17 | ||
| 18 | // EDB cla sses | |
| 19 | ||
| 20 | /** | |
| 21 | * Provide s a wrappe r to conta in a list of rule pa rameters. Each rule parameter | |
| 22 | * must ha ve a uniqu e input an d output n ame so tha t ILOG can bind each rule | |
| 23 | * paramte r to a uni que parame ter name i n ILOG rul e engine a genda. Pro ject: | |
| 24 | * Framewo rk | |
| 25 | * | |
| 26 | * @author DN S
|
|
| 27 | * @versio n 1.0 | |
| 28 | */ | |
| 29 | public abs tract clas s Abstract RuleParame ters exten ds Abstrac tRuleParam eter imple ments | |
| 30 | Rule Parameters { | |
| 31 | ||
| 32 | pr ivate stat ic final l ong serial VersionUID = -137034 6746640850 300L; | |
| 33 | pr ivate Map< String, Ru leParamete r> rulePar ameters = null; | |
| 34 | ||
| 35 | /* * | |
| 36 | * A default construct or | |
| 37 | * / | |
| 38 | pr otected Ab stractRule Parameters () { | |
| 39 | supe r(); | |
| 40 | } | |
| 41 | ||
| 42 | /* * | |
| 43 | * Check if the rule p arameter m ap is prop erly set | |
| 44 | * | |
| 45 | * @see org. springfram ework.bean s.factory. Initializi ngBean#aft erProperti esSet() | |
| 46 | * / | |
| 47 | pu blic void afterPrope rtiesSet() throws Ex ception { | |
| 48 | supe r.afterPro pertiesSet (); | |
| 49 | Vali date.notNu ll(rulePar ameters, " Parameter Factory mu st be set" ); | |
| 50 | } | |
| 51 | ||
| 52 | /* * | |
| 53 | * Returns a map conta ining rule parameter s | |
| 54 | * | |
| 55 | * @return R eturns the parameter s. | |
| 56 | * / | |
| 57 | pu blic Map<S tring, Rul eParameter > getRuleP arameters( ) { | |
| 58 | retu rn rulePar ameters; | |
| 59 | } | |
| 60 | ||
| 61 | /* * | |
| 62 | * Returns a map conta ining rule parameter s | |
| 63 | * | |
| 64 | * @return R eturns the parameter s. | |
| 65 | * / | |
| 66 | pu blic void setRulePar ameters(Ma p<String, RuleParame ter> param eters) { | |
| 67 | rule Parameters = paramet ers; | |
| 68 | } | |
| 69 | ||
| 70 | /* * | |
| 71 | * Returns a rule para meter clas s by its n ame | |
| 72 | * | |
| 73 | * @see gov. va.med.fw. rule.RuleP arameters# getRulePar ameter(jav a.lang.Str ing) | |
| 74 | * / | |
| 75 | pu blic RuleP arameter g etRulePara meter(Stri ng name) { | |
| 76 | ||
| 77 | Map ruleParame ters = thi s.getRuleP arameters( ); | |
| 78 | Vali date.notEm pty(rulePa rameters, "A rule pa rameter ma p must not be null") ; | |
| 79 | ||
| 80 | Obje ct param = ruleParam eters.get( name); | |
| 81 | retu rn (param instanceof RuleParam eter) ? (R uleParamet er) param : null; | |
| 82 | } | |
| 83 | ||
| 84 | /* * | |
| 85 | * Returns a string re presentati on of the object in multiple l ine. | |
| 86 | * | |
| 87 | * @return A contextua l string r epresentat ion of the object | |
| 88 | * / | |
| 89 | pu blic Strin g toString () { | |
| 90 | ToSt ringBuilde r builder = new ToSt ringBuilde r(this, To StringStyl e.MULTI_LI NE_STYLE); | |
| 91 | Coll ection par ams = getR uleParamet ers().valu es(); | |
| 92 | for (Iterator i = params .iterator( ); i.hasNe xt();) { | |
| 93 | Object param = i .next(); | |
| 94 | builde r.append(p aram.getCl ass().getN ame(), par am); | |
| 95 | } | |
| 96 | retu rn builder .toString( ); | |
| 97 | } | |
| 98 | ||
| 99 | /* * | |
| 100 | * @see java .lang.Obje ct#finaliz e() | |
| 101 | * / | |
| 102 | pr otected vo id finaliz e() throws Throwable { | |
| 103 | supe r.finalize (); | |
| 104 | this .ruleParam eters.clea r(); | |
| 105 | this .ruleParam eters = nu ll; | |
| 106 | } | |
| 107 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.