354. 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.

354.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 SimpleRuleState.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 SimpleRuleState.java Wed Dec 12 19:46:45 2018 UTC

354.2 Comparison summary

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

354.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

354.4 Active regular expressions

No regular expressions were active.

354.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   //Framewor k classes
  7   import gov .va.med.fw .model.loo kup.Severi tyType;
  8   import gov .va.med.fw .rule.Rule Exception;
  9   import gov .va.med.fw .rule.Rule FlowNameAw are;
  10   import gov .va.med.fw .rule.Rule Parameter;
  11   import gov .va.med.fw .rule.Rule State;
  12   import gov .va.med.fw .rule.Rule Validation Exception;
  13   import gov .va.med.fw .validatio n.Validati onFieldMes sage;
  14   import gov .va.med.fw .validatio n.Validati onMessages ;
  15  
  16   /**
  17    * Project : Framewor k
  18    * 
  19    * @author   DN S
  20    * @versio n 1.0
  21    */
  22   public cla ss SimpleR uleState i mplements  RuleState  {
  23  
  24           /* *
  25            *  An instan ce of seri alVersionU ID
  26            * /
  27           pr ivate stat ic final l ong serial VersionUID  = -497351 8623152819 174L;
  28  
  29           /* *
  30            *  An instan ce of rule FlowNameAw are
  31            * /
  32           pr ivate Rule FlowNameAw are ruleFl owNameAwar e = null;
  33  
  34           /* *
  35            *  An instan ce of rule Parameter
  36            * /
  37           pr ivate Rule Parameter  ruleParame ter = null ;
  38  
  39           /* *
  40            *  Flag to i ndicate wh ether a ru le is exec uted
  41            * /
  42           pr ivate bool ean execut ed = false ;
  43  
  44           /* *
  45            *  A variabl e name of  a rule sta te in a ru le engine' s agenda
  46            * /
  47           pr ivate Stri ng name =  DEFAULT_PA RAM_NAME;
  48  
  49           /* *
  50            *  flag to i ndicate wh ether a BO M data ele ments is m odified
  51            * /
  52           pr ivate bool ean inSess ion = fals e;
  53  
  54           /* *
  55            *  An instan ce of exha ustiveMode
  56            * /
  57           pr ivate bool ean exhaus tiveMode =  false;
  58  
  59           /* *
  60            *  An instan ce of vali dationMess ages
  61            * /
  62           pr ivate Vali dationMess ages valid ationMessa ges = new  Validation Messages() ;
  63  
  64           /* *
  65            *  A default  construct or
  66            * /
  67           pu blic Simpl eRuleState () {
  68                    supe r();
  69           }
  70  
  71           /* *
  72            *  Sets a fl ag to indi cate a rul e is execu ted succes sfully. Th is method  is
  73            *  for a der ived rule  wrapper cl ass to cal l when a r ule partic ipates in  a
  74            *  complex r ule flow.
  75            * /
  76           pu blic void  setRuleExe cuted(bool ean flag)  {
  77                    exec uted = fla g;
  78           }
  79  
  80           /* *
  81            *  sets a fl ag to indi cate if th e rules ar e in the s ame sessio n
  82            *  
  83            *  @param fl ag
  84            *              true if  in the sam e session.  false oth erwise.
  85            * /
  86           pu blic void  setInSessi on(boolean  flag) {
  87                    inSe ssion = fl ag;
  88           }
  89  
  90           /* *
  91            *  Returns t rue if a r ule is exe cuted succ essfully o therwise r eturns fal se.
  92            *  This meth od should  be called  by an acti on method  if a rule  participat es
  93            *  in a comp lex rule f low.
  94            *  
  95            *  @return T rue if a r ule is exe cuted succ essfully.  false othe rwise
  96            * /
  97           pu blic boole an isRuleE xecuted()  {
  98                    retu rn execute d;
  99           }
  100  
  101           /* *
  102            *  Returns t rue if rul es are in  the same s ession </b r> otherwi se returns
  103            *  false.
  104            *  
  105            *  @return
  106            * /
  107           pu blic boole an isInSes sion() {
  108                    retu rn inSessi on;
  109           }
  110  
  111           /* *
  112            *  @return R eturns the  name.
  113            * /
  114           pu blic Strin g getName( ) {
  115                    retu rn name;
  116           }
  117  
  118           /* *
  119            *  @param na me
  120            *              The name  to set.
  121            * /
  122           pu blic void  setName(St ring name)  {
  123                    this .name = na me;
  124           }
  125  
  126           pu blic void  generateRu leExceptio n(String i d, String  originator ) throws R uleExcepti on {
  127                    gene rateRuleEx ception(id , originat or, Severi tyType.ERR OR, null);
  128           }
  129  
  130           pu blic void  generateRu leExceptio n(String i d, String  originator , Severity Type sever ity)
  131                             throws  RuleExcep tion {
  132                    gene rateRuleEx ception(id , originat or, severi ty, null);
  133           }
  134  
  135           /* *
  136            *  Throws a  rule valid ation exce ptioin if  a validati on mode is  not
  137            *  exhaustiv e and if S erverityTy pe is ERRO R
  138            *  
  139            *  @param id
  140            *              A messag e id to al low a clie nt to look  up for a  message
  141            *  @param or iginator
  142            *              An origi nator
  143            *  @param se verity
  144            *              Severity  level of  the rule v alidation
  145            *  @param co ntextInfo
  146            *              Context  info
  147            *  @throws R uleExcepti on
  148            *               A RuleV alidationE xception i s thrown i n case of  error
  149            * /
  150           pu blic void  generateRu leExceptio n(String i d, String  originator , Severity Type sever ity,
  151                             Object  contextIn fo) throws  RuleExcep tion {
  152  
  153                    if ( !this.isEx haustiveMo de() && Se verityType .ERROR.get Code().equ als(severi ty.getCode ())) {
  154                             RuleVa lidationEx ception e  = new Rule Validation Exception( id, origin ator, this
  155                                               .getRuleFl owNameAwar e().getRul eFlowName( ), this.ge tRuleParam eter());
  156                             e.setS everityTyp e(severity );
  157                             e.setC ontextInfo (contextIn fo);
  158                             throw  e;
  159                    }
  160  
  161                    // C reate a va lidation f ield messa ge with da ta extract ed from a  rule
  162                    // e xception
  163                    Vali dationFiel dMessage m sg = new V alidationF ieldMessag e(originat or, id, se verity);
  164                    msg. setContext Info(conte xtInfo);
  165                    vali dationMess ages.add(m sg);
  166           }
  167  
  168           /* *
  169            *  @see gov. va.med.fw. rule.RuleS ession#get RuleFlowNa meAware()
  170            * /
  171           pu blic RuleF lowNameAwa re getRule FlowNameAw are() {
  172                    retu rn this.ru leFlowName Aware;
  173           }
  174  
  175           /* *
  176            *  @see gov. va.med.fw. rule.RuleS ession#get RuleParame ter()
  177            * /
  178           pu blic RuleP arameter g etRulePara meter() {
  179                    retu rn this.ru leParamete r;
  180           }
  181  
  182           /* *
  183            *  @see gov. va.med.fw. rule.RuleS ession#set RuleFlowNa meAware(go v.va.med.f w.rule.Rul eFlowNameA ware)
  184            * /
  185           pu blic void  setRuleFlo wNameAware (RuleFlowN ameAware r uleFlow) {
  186                    this .ruleFlowN ameAware =  ruleFlow;
  187           }
  188  
  189           /* *
  190            *  @see gov. va.med.fw. rule.RuleS ession#set RuleParame ter(gov.va .med.fw.ru le.RulePar ameter)
  191            * /
  192           pu blic void  setRulePar ameter(Rul eParameter  ruleParam ) {
  193                    this .ruleParam eter = rul eParam;
  194           }
  195  
  196           /* *
  197            *  @return R eturns the  exhaustiv eMode.
  198            * /
  199           pu blic boole an isExhau stiveMode( ) {
  200                    retu rn exhaust iveMode;
  201           }
  202  
  203           /* *
  204            *  @param ex haustiveMo de
  205            *              The exha ustiveMode  to set.
  206            * /
  207           pu blic void  setExhaust iveMode(bo olean exha ustiveMode ) {
  208                    this .exhaustiv eMode = ex haustiveMo de;
  209           }
  210  
  211           /* *
  212            *  @return R eturns the  validatio nMessages.
  213            * /
  214           pu blic Valid ationMessa ges getVal idationMes sages() {
  215                    retu rn validat ionMessage s;
  216           }
  217   }