101. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:37 PM Central 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.

101.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreRouter\main\src\java\gov\va\med\imaging\core CommandCreator.java Mon Dec 4 21:34:32 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreRouter\main\src\java\gov\va\med\imaging\core CommandCreator.java Mon Dec 4 21:58:22 2017 UTC

101.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 242
Changed 2 4
Inserted 0 0
Removed 0 0

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

101.4 Active regular expressions

No regular expressions were active.

101.5 Comparison detail

  1   /**
  2    * 
  3     Package:  MAG - Vis tA Imaging
  4     WARNING:  Per VHA D irective 2 004-038, t his routin e should n ot be modi fied.
  5     Date Cre ated: May  4, 2011
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:          
WERFEJ
  8     Descript ion: 
  9  
  10           ;;  +-------- ---------- ---------- ---------- ---------- ---------- ---------- +
  11           ;;  Property  of the US  Government .
  12           ;;  No permis sion to co py or redi stribute t his softwa re is give n.
  13           ;;  Use of un released v ersions of  this soft ware requi res the us er
  14           ;;   to execu te a writt en test ag reement wi th the Vis tA Imaging
  15           ;;   Developm ent Office  of the De partment o f Veterans  Affairs,
  16           ;;   telephon e (301) 73 4-0100.
  17           ;;
  18           ;;  The Food  and Drug A dministrat ion classi fies this  software a s
  19           ;;  a Class I I medical  device.  A s such, it  may not b e changed
  20           ;;  in any wa y.  Modifi cations to  this soft ware may r esult in a n
  21           ;;  adulterat ed medical  device un der 21CFR8 20, the us e of which
  22           ;;  is consid ered to be  a violati on of US F ederal Sta tutes.
  23           ;;  +-------- ---------- ---------- ---------- ---------- ---------- ---------- +
  24  
  25    */
  26   package go v.va.med.i maging.cor e;
  27  
  28   import jav a.util.Ser viceLoader ;
  29  
  30   import org .apache.lo gging.log4 j.LogManag er;
  31   import org .apache.lo gging.log4 j.Logger;
  32  
  33   import gov .va.med.im aging.core .interface s.router.C ommand;
  34   import gov .va.med.im aging.core .interface s.router.C ommandCont ext;
  35  
  36   /**
  37    * Command Creator cr eates comm ands using  the Comma ndCreatorP roviders t hat are in stalled.
  38    * 
  39    * @author         
WERFEJ
  40    *
  41    */
  42   public cla ss Command Creator 
  43   {
  44           pr ivate fina l CommandC ontext bas eCommandCo ntext;
  45           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Comm andCreator .class);
  46           pu blic Logge r getLogge r()
  47           {
  48                    retu rn logger;
  49           }
  50           
  51           pu blic Comma ndCreator( CommandCon text baseC ommandCont ext)
  52           {
  53                    this .baseComma ndContext  = baseComm andContext ;
  54           }
  55  
  56           pr ivate stat ic Service Loader<Com mandCreato rProvider>  commandCr eatorLoade r = null;
  57           
  58           pr ivate sync hronized s tatic Serv iceLoader< CommandCre atorProvid er> getCom mandFactor yLoader(Co mmandConte xt command Context)
  59           {
  60                    if(c ommandCrea torLoader  == null)
  61                    {
  62                             comman dCreatorLo ader = Ser viceLoader .load(Comm andCreator Provider.c lass);
  63                             for(Co mmandCreat orProvider  commandCr eator : co mmandCreat orLoader)
  64                             {
  65                                      if(comma ndContext  != null)
  66                                               commandCre ator.setBa seCommandC ontext(com mandContex t);
  67                             }
  68                    }
  69                    retu rn command CreatorLoa der;
  70           }
  71           
  72           /* *
  73            *  Create a  command fr om any of  the availa ble comman d creator  providers  that suppo rt the com mand/
  74            *  
  75            *  @param <R >
  76            *  @param co mmandClass Semantics
  77            *  @param pa rameterTyp es
  78            *  @param in itArgs
  79            *  @return
  80            * /
  81           pu blic <R ex tends Obje ct> Comman d<R> creat eCommand(
  82                             Comman dClassSema ntics comm andClassSe mantics,
  83                             Class< ?>[] param eterTypes,  
  84                             Object [] initArg s)
  85           {
  86                    Serv iceLoader< CommandCre atorProvid er> servic eLoader = 
  87                             getCom mandFactor yLoader(ba seCommandC ontext);
  88                    for( CommandCre atorProvid er command Creator :  serviceLoa der)
  89                    {
  90                             Comman d<R> comma nd = comma ndCreator. createComm and(comman dClassSema ntics, par ameterType s, initArg s);
  91                             if(com mand != nu ll)
  92                                      return c ommand;
  93                    }
  94                    getL ogger().fa tal("Unabl e to creat e command  '" + comma ndClassSem antics.toS tring() +  "'.");
  95                    retu rn null;
  96           }
  97           
  98           /* *
  99            *  Method to  determine  if the co mmand can  be created  by any of  the provi ders insta lled
  100            *  
  101            *  @param co mmandClass Semantics
  102            *  @param pa rameterTyp es
  103            *  @param in itArgs
  104            *  @return
  105            * /
  106           pu blic boole an isComma ndSupporte d(
  107                             Comman dClassSema ntics comm andClassSe mantics,
  108                             Class< ?>[] param eterTypes,  
  109                             Object [] initArg s)
  110           {
  111                    Serv iceLoader< CommandCre atorProvid er> servic eLoader = 
  112                             getCom mandFactor yLoader(ba seCommandC ontext);
  113                    for( CommandCre atorProvid er command Creator :  serviceLoa der)
  114                    {
  115                             boolea n commandS upported =  
  116                                      commandC reator.isC ommandSupp orted(comm andClassSe mantics, 
  117                                                       pa rameterTyp es, initAr gs);
  118                             if(com mandSuppor ted)
  119                                      return t rue;
  120                    }
  121                    retu rn false;
  122           }
  123   }