26. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/24/2017 5:17:18 PM Eastern Daylight 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.

26.1 Files compared

# Location File Last Modified
1 MHV_2017.2.0.0 Code In Flight.zip\National Portal\mhv_rxrefill\mhv-rx-refill-portal-main\src\main\java\gov\va\med\domain\service\config MhvConfigService.java Fri Sep 16 15:30:42 2016 UTC
2 MHV_2017.2.0.0 Code In Flight.zip\National Portal\mhv_rxrefill\mhv-rx-refill-portal-main\src\main\java\gov\va\med\domain\service\config MhvConfigService.java Fri Mar 24 20:32:18 2017 UTC

26.2 Comparison summary

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

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

26.4 Active regular expressions

No regular expressions were active.

26.5 Comparison detail

  1   package go v.va.med.d omain.serv ice.config ;
  2  
  3   import jav a.io.FileN otFoundExc eption;
  4   import jav a.sql.SQLE xception;
  5  
  6   import jav ax.sql.Dat aSource;
  7  
  8   import org .springfra mework.uti l.Assert;
  9  
  10   import gov .va.med.do main.Domai nConstants ;
  11   import gov .va.med.do main.servi ce.MhvBase Service;
  12   import gov .va.med.fr amework.IA pplication ;
  13   import gov .va.med.fr amework.lo gging.Logg erFactory;
  14   import gov .va.med.fr amework.lo okup.Missi ngServiceE xception;
  15   import gov .va.med.fr amework.lo okup.Servi ceLocator;
  16   import gov .va.med.se rvice.conf ig.ConfigM anager;
  17   import gov .va.med.se rvice.conf ig.ConfigM anagerExce ption;
  18  
  19   /**
  20    * Provide s configur ation serv ices for M HV applica tion in te rms of ret rieving va lues for 
  21    * MHV spe cific para meters in  the predef ined data  types. It  is an appl ication st ub for MHV  and uses
  22    * ConfigM anager cla ss for bas ic operati ons.
  23    * 
  24    * @author   PII
  25    * @versio n $Id: Mhv ConfigServ ice.java,v  1.2 2005/ 07/18 14:3 7:39 jon.c rater Exp  $
  26    * @since  MHV V2.0
  27    * @see Co nfigManage r
  28    */
  29   public cla ss MhvConf igService  extends Co nfigManage r {
  30           pr ivate stat ic MhvConf igService  instance =  null;
  31           pr ivate stat ic IApplic ation app  = null;
  32           pr ivate Stri ng loggerN ame;
  33  
  34           /* *
  35            *  Gets an i nstance of  the class . It creat es a new o ne only if  one does 
  36            *  not alrea dy exists
  37            * /
  38           pu blic stati c MhvConfi gService g etInstance () {
  39                    //Lo gger for b ootstrappi ng
  40                    MhvB aseService  service =  new MhvBa seService( );
  41                    sync hronized ( ConfigMana ger.class)  {
  42                             if(ins tance == n ull) {
  43                                      try {
  44                                               Class appC lass = Cla ss.forName ("gov.va.m ed.framewo rk.Applica tion");
  45                                               app = (IAp plication) appClass.n ewInstance ();
  46                                               instance =  new MhvCo nfigServic e();
  47                                               instance.s etApplicat ionName(ap p.getAppli cationName ());
  48                                               instance.s etLoggerNa me(app.get Applicatio nLoggerNam e());
  49                                      }
  50                                      catch (F ileNotFoun dException  e) {
  51                                               // supress  exception  and log t he error m essage
  52                                               throw new  Error("Con fig file w as not fou nd.", e);
  53                                      }
  54                                      catch (C onfigManag erExceptio n e) {
  55                                               // suppres s the exce ption and  log the er ror messag e here 
  56                                               throw new  Error("Err or initial izing the  configurat ion parame ters.", e) ;
  57                                      }
  58                                      catch (C lassNotFou ndExceptio n e) {
  59                                               throw new  Error(
  60                                                                "The  applicati on must pr ovide an i mplementat ion of the  gov.va.me d.framewor k.Applicat ion class. ");
  61                                      }
  62                                      catch (I nstantiati onExceptio n e) {
  63                                               throw new  Error(
  64                                                                "The  applicati on must pr ovide an i mplementat ion of the  gov.va.me d.framewor k.Applicat ion class. ");
  65                                      }
  66                                      catch (I llegalAcce ssExceptio n e) {
  67                                               throw new  Error(
  68                                                                "The  applicati on must pr ovide an i mplementat ion of the  gov.va.me d.framewor k.Applicat ion class. ");
  69                                      }
  70                             }
  71                    }
  72                    retu rn instanc e;
  73           }
  74  
  75           /* *
  76            *  supplies  the name o f the Appl ication
  77            * /
  78           pu blic void  setApplica tionName()  {
  79                    this .appName =  app.getAp plicationN ame();
  80                    this .setApplic ation();
  81           }
  82  
  83           /* *
  84            *  supplies  the name o f the IApp lication
  85            * /
  86           pr ivate void  setApplic ationName( String app Name) {
  87                    this .appName =  appName;
  88           }
  89  
  90           pr ivate void  setLogger Name(Strin g loggerNa me) {
  91                    this .loggerNam e = logger Name;
  92           }
  93  
  94           /* *
  95            *  creates a  new insta nce of the  class and  sets the  env and ap p names.
  96            * /
  97           pr otected Mh vConfigSer vice() thr ows FileNo tFoundExce ption, Con figManager Exception  {
  98                    supe r();
  99                    this .setApplic ationName( );
  100                    this .setEnviro nmentName( );
  101           }
  102  
  103           pu blic Strin g getLogge rName() {
  104                    retu rn loggerN ame;
  105           }
  106  
  107           pu blic int g etLoggerTy pe() {
  108                    retu rn LoggerF actory.WL_ NONCATALOG _LOGGER;
  109           }
  110  
  111           
  112  
  113           pu blic DataS ource getD ataSource( String dat aSourceNam e) {
  114                    Data Source dat aSource =  null;
  115  
  116                    if(d ataSourceN ame != nul l) {
  117                             try {
  118                                      dataSour ce = (Data Source)Ser viceLocato r.getInsta nce().getS ervice(dat aSourceNam e);
  119                             }
  120                             catch  (MissingSe rviceExcep tion e) {
  121                                      MhvBaseS ervice.get MhvLogger( ).error("C ould not c reate Data Source wit h " + data SourceName , e);
  122                             }
  123                    }
  124                    retu rn dataSou rce;
  125           }
  126  
  127           pu blic Strin g getRequi redValueSt ring(Strin g key) {
  128                    Stri ng value =  getParamV alueString (key);
  129                    Asse rt.notNull (value, "R equired co nfiguratio n value no t mapped t o key " +  key);
  130                    retu rn value;
  131           }
  132   }