353. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/13/2018 10:35:29 AM Eastern Standard 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.

353.1 Files compared

# Location File Last Modified
1 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\rule\impl SimpleRuleSession.java Fri Dec 7 17:36:36 2018 UTC
2 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\rule\impl SimpleRuleSession.java Wed Dec 12 19:46:45 2018 UTC

353.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 304
Changed 1 2
Inserted 0 0
Removed 0 0

353.3 Comparison options

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

353.4 Active regular expressions

No regular expressions were active.

353.5 Comparison detail

  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  
  8   // Library  classes
  9   import org .apache.co mmons.logg ing.Log;
  10   import org .apache.co mmons.logg ing.LogFac tory;
  11  
  12   import gov .va.med.fw .rule.Rule ExceptionH andler;
  13   import gov .va.med.fw .rule.Rule Session;
  14   import gov .va.med.fw .rule.Rule State;
  15  
  16   /**
  17    * Project : Framewor k
  18    * 
  19    * @author   DN S
  20    * @versio n 1.0
  21    */
  22   public cla ss SimpleR uleSession  implement s RuleSess ion {
  23  
  24           /* *
  25            *  An instan ce of seri alVersionU ID
  26            * /
  27           pr ivate stat ic final l ong serial VersionUID  = 7376346 6364423453 09L;
  28  
  29           /* *
  30            *  An except ion handle r
  31            * /
  32           pr ivate Rule ExceptionH andler han dler = nul l;
  33  
  34           /* *
  35            *  A system  proerty na me to set  a debug mo de
  36            * /
  37           pu blic stati c final St ring DEBUG _MODE = "r ule.engine .debug.mod e";
  38  
  39           /* *
  40            *  A logger  to log inf ormation
  41            * /
  42           pr otected Lo g logger =  LogFactor y.getLog(g etClass()) ;
  43  
  44           /* *
  45            *  A rule's  state obje ct
  46            * /
  47           pr ivate Rule State stat e = null;
  48  
  49           /* *
  50            *  A flag to  indicate  whether to  continue  to execute  a next ru le
  51            * /
  52           pr ivate bool ean contin ueOnFail =  false;
  53  
  54           /* *
  55            *  A default  construct or
  56            * /
  57           pu blic Simpl eRuleSessi on() {
  58                    supe r();
  59                    stat e = new Si mpleRuleSt ate();
  60                    setE xceptionHa ndler(new  SimpleRule ExceptionH andler());
  61           }
  62  
  63           /* *
  64            *  Returns t rue to con nect to a  rule engin e to debug  a fule. O therwise,
  65            *  return fa lse. A con crete clas s returns  a default  value of f alse.
  66            *  
  67            *  @return T rue if con nected to  a rule eng ine to deb ug false o therwise
  68            * /
  69           pu blic boole an isDebug Enabled()  {
  70  
  71                    bool ean enable d = false;
  72  
  73                    // G eta debug  flag as an  environme nt propert y passed i nto a JVM  in -D
  74                    // o ption
  75                    Stri ng flag =  System.get Property(D EBUG_MODE) ;
  76  
  77                    if ( flag != nu ll) {
  78                             try {
  79                                      enabled  = Boolean. valueOf(fl ag).boolea nValue();
  80                             } catc h (Excepti on e) {
  81                                      if (logg er.isDebug Enabled())  {
  82                                               logger.deb ug("Failed  to parse  a " + DEBU G_MODE + "  flag = "  + flag, e) ;
  83                                      }
  84                             }
  85                    }
  86                    retu rn enabled ;
  87           }
  88  
  89           /* *
  90            *  Returns a  state obj ect encaps ulates inf ormation a bout the c urrent sta te
  91            *  of a rule
  92            *  
  93            *  @return R uleState A  rule's st ate
  94            * /
  95           pu blic RuleS tate getSt ate() {
  96                    retu rn state;
  97           }
  98  
  99           /* *
  100            *  Sets a st ate object  encapsula tes inform ation abou t the curr ent state  of a
  101            *  rule
  102            *  
  103            *  @param st ate
  104            *              A rule's  state
  105            * /
  106           pu blic void  setState(R uleState s tate) {
  107                    this .state = s tate;
  108           }
  109  
  110           /* *
  111            *  Check if  a next rul e in a rul e flow sho uld be exe cuted in c ase of an
  112            *  exception  or error
  113            *  
  114            *  @return T rue to con tinue to a  next rule . False ot herwise
  115            * /
  116           pu blic boole an isConti nueOnFail( ) {
  117                    retu rn this.co ntinueOnFa il;
  118           }
  119  
  120           /* *
  121            *  Sets a fl ag to indi cate wheth er a next  rule in a  rule flow  should be
  122            *  executed  in case of  error or  exception
  123            *  
  124            *  @param fl ag
  125            *              A flag t o indicate  whether t o continue  execution
  126            * /
  127           pu blic void  setContinu eOnFail(bo olean flag ) {
  128                    this .continueO nFail = fl ag;
  129           }
  130  
  131           /* *
  132            *  Returns a n exceptio n handler  that is ca lled by a  rule engin e to handl e
  133            *  internal  rule engin e exceptio ns or exce ptions tri ggered eit her in an
  134            *  evaluatio n or an ac tion part  of a rule.
  135            *  
  136            *  @return R uleExcepti onHandler  A handler  to handle  exceptions
  137            * /
  138           pu blic RuleE xceptionHa ndler getE xceptionHa ndler() {
  139                    retu rn handler ;
  140           }
  141  
  142           /* *
  143            *  Sets exce ption hand ler that i s called b y a rule e ngine to h andle inte rnal
  144            *  rule engi ne excepti ons or exc eptions tr iggered ei ther in an  evaluatio n or
  145            *  an action  part of a  rule.
  146            *  
  147            *  @param ha ndler
  148            *              A RuleEx ceptionHan dler to ha ndle excep tions
  149            * /
  150           pu blic void  setExcepti onHandler( RuleExcept ionHandler  handler)  {
  151                    this .handler =  handler;
  152           }
  153   }