239. EPMO Open Source Coordination Office Redaction File Detail Report

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

239.1 Files compared

# Location File Last Modified
1 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\cache TriggerEventCacheManager.java Fri Dec 7 17:36:18 2018 UTC
2 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\cache TriggerEventCacheManager.java Wed Dec 12 22:26:41 2018 UTC

239.2 Comparison summary

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

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

239.4 Active regular expressions

No regular expressions were active.

239.5 Comparison detail

  1   /********* ********** ********** ********** ********** ********** *********
  2    * Copyrii ght 2005 V HA. All ri ghts reser ved
  3    ********* ********** ********** ********** ********** ********** *********/
  4  
  5   package go v.va.med.f w.cache;
  6  
  7   import jav a.util.Has hSet;
  8   import jav a.util.Ite rator;
  9   import jav a.util.Set ;
  10  
  11   import org .springfra mework.ste reotype.Co mponent;
  12  
  13   import gov .va.med.fw .security. SecurityCo ntextHelpe r;
  14   import gov .va.med.fw .service.t rigger.Tri ggerEvent;
  15  
  16   /**
  17    * Initial  javadoc f or class T riggerEven tCacheMana ger. TODO  - Add cont ent here
  18    * 
  19    * Created  Nov 3, 20 05 12:29:0 9 PM
  20    * 
  21    * DNS
  22    */
  23   @Component
  24   public cla ss Trigger EventCache Manager ex tends Abst ractCacheM anager {
  25           /* *
  26            *  An instan ce of seri alVersionU ID
  27            * /
  28           pr ivate stat ic final l ong serial VersionUID  = -437080 3641246991 293L;
  29           pu blic stati c final St ring TRIGG ER_EVENTS_ KEY = Trig gerEventCa cheManager .class.get Name()
  30                             + ".TR IGGER_EVEN TS";
  31  
  32           /* *
  33            *  A default  construct or
  34            * /
  35           pu blic Trigg erEventCac heManager( ) {
  36                    supe r();
  37           }
  38  
  39           /* *
  40            *  Stores cr eated (but  not yet r outed) Tri ggerEvents  to thread  bound sto rage
  41            * /
  42           pu blic void  storeTrigg erEvents(S et trigger Events) {
  43                    Iter ator itr =  triggerEv ents != nu ll ? trigg erEvents.i terator()  : null;
  44                    Set  cachedEven ts = null;  // ensure s no dupli cates
  45                    Trig gerEvent e vent = nul l;
  46                    whil e (itr !=  null && it r.hasNext( )) {
  47                             try {
  48                                      event =  (TriggerEv ent) itr.n ext();
  49                                      synchron ized (this ) {
  50                                               cachedEven ts = (Set)  getItem(T RIGGER_EVE NTS_KEY);
  51                                               if (cached Events ==  null) {
  52                                                       ca chedEvents  = new Has hSet();
  53                                                       ca cheItem(TR IGGER_EVEN TS_KEY, ca chedEvents );
  54                                               }
  55                                      }
  56                                      // set i nitiater o n TriggerE vent
  57                                      event.se tInitiater (SecurityC ontextHelp er.getSecu rityContex t().getUse rPrincipal ()
  58                                                       .g etUserCred entials()) ;
  59  
  60                                      cachedEv ents.add(e vent);
  61                             } catc h (ClassCa stExceptio n e) {
  62                                      throw ne w IllegalA rgumentExc eption("Ex pected obj ect of typ e TriggerE vent");
  63                             }
  64                    }
  65           }
  66  
  67           /* * Removes  any Trigge rEvent's b ound to Th read */
  68           pu blic Set r emoveTrigg erEvents()  {
  69                    retu rn (Set) r emoveItem( TRIGGER_EV ENTS_KEY);
  70           }
  71  
  72           pu blic boole an hasTrig gerEvents( ) {
  73                    retu rn contain sItem(TRIG GER_EVENTS _KEY);
  74           }
  75  
  76           pu blic Set g etTriggerE vents() {
  77                    retu rn (Set) g etItem(TRI GGER_EVENT S_KEY);
  78           }
  79   }