362. EPMO Open Source Coordination Office Redaction File Detail Report

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

362.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\SiteServiceDataSourceProvider\main\src\java\gov\va\med\siteservice SiteResolutionProvider.java Mon Dec 4 21:34:18 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\SiteServiceDataSourceProvider\main\src\java\gov\va\med\siteservice SiteResolutionProvider.java Mon Dec 4 22:05:38 2017 UTC

362.2 Comparison summary

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

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

362.4 Active regular expressions

No regular expressions were active.

362.5 Comparison detail

  1   package go v.va.med.s iteservice ;
  2  
  3   import gov .va.med.Pr otocolHand lerUtility ;
  4   import gov .va.med.im aging.data source.Pro vider;
  5   import gov .va.med.im aging.data source.Pro viderConfi guration;
  6   import gov .va.med.im aging.data source.Pro viderServi ce;
  7   import gov .va.med.im aging.data source.Sit eResolutio nDataSourc eSpi;
  8   import gov .va.med.in teractive. CommandCon troller;
  9   import gov .va.med.in teractive. CommandFac tory;
  10   import gov .va.med.si teservice. interactiv e.SiteServ iceConfigu rationComm andFactory ;
  11   import jav a.io.IOExc eption;
  12   import jav a.util.Col lections;
  13   import jav a.util.Sor tedSet;
  14   import jav a.util.Tre eSet;
  15  
  16   import org .apache.lo gging.log4 j.Level;
  17   import org .apache.lo gging.log4 j.LogManag er;
  18   import org .apache.lo gging.log4 j.Logger;
  19   import org .apache.lo gging.log4 j.core.con fig.Config urator;
  20  
  21   /**
  22    * The Pro vider impl ementation  that prov ides infor mation on  the Servic es in this
  23    * package .
  24    * 
  25    * @author         
BECKEC
  26    * 
  27    */
  28   public cla ss SiteRes olutionPro vider 
  29   extends Pr ovider
  30   {
  31           pu blic stati c final St ring PROVI DER_NAME;
  32           pu blic stati c final fl oat PROVID ER_VERSION ;
  33           pr ivate stat ic final S tring PROV IDER_INFO;
  34           pr ivate stat ic final S tring SITE _SERVICE_P ROTOCOL;
  35           pr ivate stat ic final f loat SITE_ SERVICE_PR OTOCOL_VER SION;
  36  
  37           pr ivate stat ic final l ong serial VersionUID  = 1L;
  38           
  39           pr ivate stat ic Logger  logger = L ogManager. getLogger( SiteResolu tionProvid er.class);
  40           
  41           //  static co nstructor  to load co nstants an d configur ation
  42           st atic
  43           {
  44                    PROV IDER_NAME 
  45                             Messag es.getStri ng("SiteRe solutionPr ovider.pro viderName" ); //$NON- NLS-1$
  46                    PROV IDER_VERSI ON = Float .parseFloa t(
  47                             Messag es.getStri ng("SiteRe solutionPr ovider.pro viderVersi on") );
  48                    PROV IDER_INFO 
  49                             Messag es.getStri ng("SiteRe solutionPr ovider.pro viderDescr iption");  //$NON-NLS -1$
  50                    
  51                    SITE _SERVICE_P ROTOCOL =  Messages.g etString(" SiteResolu tionProvid er.siteSer viceProtoc ol");
  52                    SITE _SERVICE_P ROTOCOL_VE RSION = Fl oat.parseF loat(
  53                                      Messages .getString ("SiteReso lutionProv ider.siteS erviceProt ocolVersio n") );
  54           }
  55  
  56           pr ivate stat ic final P roviderCon figuration <SiteResol utionProvi derConfigu ration> pr oviderConf iguration  =
  57                    new  ProviderCo nfiguratio n<SiteReso lutionProv iderConfig uration>(
  58                             PROVID ER_NAME, 
  59                             PROVID ER_VERSION );
  60           pu blic stati c Provider Configurat ion<SiteRe solutionPr oviderConf iguration>  getProvid erConfigur ation()
  61           {
  62                    retu rn provide rConfigura tion;
  63           }
  64           
  65           //  ========= ========== ========== ========== ========== ========== ========== ========== =========
  66           //  Instance  Members
  67           //  ========= ========== ========== ========== ========== ========== ========== ========== =========
  68           
  69           pr ivate fina l SortedSe t<Provider Service> s ervices;
  70           pr ivate Site Resolution ProviderCo nfiguratio n configur ation;
  71           
  72           /* *
  73            *  The publi c no-arg c onstructor  that is u sed by the  ServiceLo ader class
  74            *  to create  instances .
  75            * /
  76           pu blic SiteR esolutionP rovider()
  77           {
  78                    this (PROVIDER_ NAME, PROV IDER_VERSI ON, PROVID ER_INFO);
  79           }
  80           
  81           /* *
  82            *  @param na me
  83            *  @param ve rsion
  84            *  @param in fo
  85            * /
  86           pr ivate Site Resolution Provider(S tring name , double v ersion, St ring info)
  87           {
  88                    supe r(name, ve rsion, inf o);
  89  
  90                    serv ices = new  TreeSet<P roviderSer vice>();
  91                    
  92                    logg er.info(
  93                                      "SiteRes olutionPro vider addi ng service  [" + Site Resolution DataSource Spi.class. getSimpleN ame() + 
  94                                      "] " + S ITE_SERVIC E_PROTOCOL  + " V" +  SITE_SERVI CE_PROTOCO L_VERSION 
  95                                      " implem ented by ' " + SiteRe solver.cla ss.getName () + "'.") ;              
  96                    serv ices.add(
  97                             new Pr oviderServ ice(
  98                                      this, 
  99                                      SiteReso lutionData SourceSpi. class, 
  100                                      (byte)0,
  101                                      SiteReso lver.class )
  102                    );
  103  
  104                    try
  105                    {
  106                             config uration =  providerCo nfiguratio n.loadConf iguration( );
  107                             if(con figuration  != null)
  108                             {
  109                                      logger.i nfo("SiteR esolutionP rovider co nfiguratio n successf ully loade d.");
  110                                      //logger .info(getC onfigurati on().toStr ing());
  111                             }
  112                             else
  113                                      logger.i nfo("SiteR esolutionP rovider co nfiguratio n not load ed.");
  114                    }
  115                    catc h (IOExcep tion x)
  116                    {
  117                             logger .warn("Sit eResolutio nProvider  configurat ion NOT lo aded.", x) ;
  118                    }
  119           }
  120  
  121           /* *
  122            *  
  123            *  @return
  124            * /
  125           @O verride
  126           pu blic SiteR esolutionP roviderCon figuration  getInstan ceConfigur ation()
  127       {
  128                    retu rn this.co nfiguratio n;
  129       }
  130           
  131           /* *
  132            *  This sett er is only  used for  developmen t testing  and should  not be us ed in prod uction.
  133            *  @param co nfiguratio n
  134            * /
  135           vo id setConf iguration( SiteResolu tionProvid erConfigur ation conf iguration)
  136           {
  137                    logg er.info("A ttempting  to set Sit eResolutio nProvider  configurat ion throug h accessor , this sho uld only b e done for  testing." );
  138                    if(t his.config uration ==  null)
  139                             this.c onfigurati on = confi guration;
  140                    else
  141                             logger .error("At tempt to s et SiteRes olutionPro vider conf iguration  after it h as already  been set  is being i gnored.");
  142           }
  143  
  144           @O verride
  145           pu blic Sorte dSet<Provi derService > getServi ces()
  146           {
  147                    retu rn Collect ions.unmod ifiableSor tedSet(ser vices);
  148           }
  149  
  150           //  ========= ========== ========== ========== ========== ========== ========== ========== =======
  151           //  Configura tion
  152           //  ========= ========== ========== ========== ========== ========== ========== ========== =======
  153  
  154           /* *
  155            * /
  156           pu blic stati c void mai n(String[]  argv)
  157           {
  158                    Conf igurator.s etRootLeve l(Level.AL L);
  159                    
  160                    Prot ocolHandle rUtility.i nitialize( true);
  161                    
  162                    Site Resolution Provider p rovider =  new SiteRe solutionPr ovider();
  163                    try
  164                    {
  165                             Comman dFactory<S iteResolut ionProvide rConfigura tion> fact ory = 
  166                                      new Site ServiceCon figuration CommandFac tory(provi der);
  167                             SiteRe solutionPr oviderConf iguration  config = p rovider.ge tInstanceC onfigurati on();
  168                             if(con fig == nul l)
  169                             {
  170                                      logger.w arn("Unabl e to load  configurat ion, creat ing defaul t (blank)  configurat ion.");
  171                                      config =  new SiteR esolutionP roviderCon figuration ();
  172                                      provider .setConfig uration(co nfig);
  173                             }
  174                             
  175                             gov.va .med.inter active.Com mandContro ller<SiteR esolutionP roviderCon figuration > commandC ontroller 
  176                                      new Comm andControl ler<SiteRe solutionPr oviderConf iguration> (
  177                                               config, 
  178                                               factory,
  179                                               argv
  180                                      );
  181                             comman dControlle r.getComma ndSource() .pushComma nds(argv);
  182                             comman dControlle r.run();
  183                    }
  184                    catc h (Excepti on x)
  185                    {
  186                             x.prin tStackTrac e();
  187                    }
  188  
  189                    Syst em.exit(0) ;
  190           }
  191   }