115. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/21/2017 10:24:37 AM Central 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.

115.1 Files compared

# Location File Last Modified
1 JLV_2.5.3.0.2_cif.zip\JLV_2.5.3.0.2_src\VistaDataService\src\main\java\gov\va\med\vds\common AppConfig.java Wed Jun 7 15:11:32 2017 UTC
2 JLV_2.5.3.0.2_cif.zip\JLV_2.5.3.0.2_src\VistaDataService\src\main\java\gov\va\med\vds\common AppConfig.java Wed Jun 21 14:42:28 2017 UTC

115.2 Comparison summary

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

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

115.4 Active regular expressions

No regular expressions were active.

115.5 Comparison detail

  1   /*
  2    * Janus 4 .0 (c)
  3    * Copyrig ht (c) 201 6 Hawaii R esource Gr oup LLC. A ll Rights  Reserved.
  4    * Develop ed for the  Pacific T elehealth  & Technolo gy Hui and  the Pacif ic Joint I nformation  Technolog y Center
  5    * Contrib utors:
  6    *      Ho norable Se nator Dani el K. Inou ye
  7    *      VA  Pacific I slands Hea lth Care S ystem
  8    *      Tr ipler Army  Medical C enter
  9    */
  10    
  11    
  12   package go v.va.med.v ds.common;
  13  
  14   import gov .va.med.rp c.StringUt ils;
  15   import gov .va.med.vh ahon.commo n.Utils;
  16   import org .slf4j.Log ger;
  17   import org .slf4j.Log gerFactory ;
  18  
  19   import jav a.io.FileI nputStream ;
  20   import jav a.io.FileN otFoundExc eption;
  21   import jav a.io.IOExc eption;
  22   import jav a.io.Input Stream;
  23   import jav a.util.Pro perties;
  24  
  25   /**
  26    * User:  R E D AC TED
  27    * Date: 8 /29/11
  28    * Time: 2 :36 PM
  29    */
  30   public cla ss AppConf ig {
  31       privat e static f inal Logge r LOGGER =  LoggerFac tory.getLo gger(AppCo nfig.class );
  32  
  33       privat e static f inal Strin g AGENCY_V A = "appco nfig.agenc y.va";
  34       privat e static f inal Strin g AGENCY_D OD = "appc onfig.agen cy.dod";
  35       privat e static f inal Strin g LOG4J_PR OPS = "app config.log 4j.props";
  36       privat e static f inal Strin g APP_ENVI RONMENT =  "app.envir onment";
  37       privat e static f inal Strin g APP_VERS ION = "app .version";
  38       privat e static f inal Strin g NON_BSE_ SECURITY_P HRASE = "a ppconfig.a uthenticat ion.nonBse SecurityPh rase";
  39  
  40       privat e static f inal Strin g REQUEST_ TIMEOUT_MS  = "appcon fig.reques t.timeout. ms";
  41       privat e static f inal Strin g CONNECTI ON_TIMEOUT _MS = "app config.con nection.ti meout.ms";
  42  
  43       privat e static f inal Strin g VLER_DQ_ URL = "app config.vle r.dq.url";
  44       privat e static f inal Strin g VLER_DR_ URL = "app config.vle r.dr.url";
  45   //    priv ate static  final Str ing VLER_P D_URL = "a ppconfig.v ler.pd.url ";
  46   //    priv ate static  final Str ing VLER_P A_URL = "a ppconfig.v ler.pa.url ";
  47       privat e static f inal Strin g VLER_DAS _URL = "ap pconfig.vl er.das.url ";
  48       privat e static f inal Strin g VLER_DAS _CALLBACK  = "appconf ig.vler.da s.callback ";
  49  
  50       privat e static f inal Strin g EVIX_STU DYQUERY_UR L = "appco nfig.evix. studyquery .url";
  51       privat e static f inal Strin g EVIX_REQ UEST_TIMEO UT = "appc onfig.evix .request.t imeout.ms" ;
  52       privat e static f inal Strin g EVIX_CON NECTION_TI MEOUT = "a ppconfig.e vix.connec tion.timeo ut.ms";
  53  
  54       //cons tants
  55       privat e static f inal Strin g PROTOCOL _RPC = "RP C";
  56       privat e static f inal Strin g PROTOCOL _CACHE = " CACHE";
  57       privat e static f inal Strin g DATASOUR CE = "appc onfig.data source";
  58  
  59       privat e static f inal Strin g RPC_CONN ECTION_THR EAD_MAX_PO OL_SIZE =  "appconfig .rpc.threa d.maxPoolS ize";
  60       privat e static f inal Strin g RPC_CONN ECTION_THR EAD_TIMEOU T_SECONDS  = "appconf ig.rpc.thr ead.timeou t.seconds" ;
  61  
  62       privat e static f inal Strin g PARSER_T HREAD_MAX_ POOL_SIZE  = "appconf ig.parse.t hread.maxP oolSize";
  63       privat e static f inal Strin g PARSER_T HREAD_TIME OUT_SECOND S = "appco nfig.parse .thread.ti meout.seco nds";
  64  
  65       privat e static f inal Strin g PARSER_T HREAD_MAX_ POOL_SIZE_ ENCOUNTERS  = "appcon fig.parse. thread.max PoolSize.e ncounters" ;
  66       privat e static f inal Strin g PARSER_T HREAD_MAX_ POOL_SIZE_ LABS = "ap pconfig.pa rse.thread .maxPoolSi ze.labs";
  67       privat e static f inal Strin g PARSER_T HREAD_MAX_ POOL_SIZE_ NOTES = "a ppconfig.p arse.threa d.maxPoolS ize.notes" ;
  68       privat e static f inal Strin g PARSER_T HREAD_MAX_ POOL_SIZE_ ORDERS = " appconfig. parse.thre ad.maxPool Size.order s";
  69       privat e static f inal Strin g PARSER_T HREAD_MAX_ POOL_SIZE_ MEDS = "ap pconfig.pa rse.thread .maxPoolSi ze.meds";
  70  
  71       //rest  configs
  72       privat e static f inal Strin g REST_CON NECTION_TI MEOUT_MS =  "appconfi g.vler.das .REST_CONN ECTION_TIM EOUT_MS";
  73       privat e static f inal Strin g REST_REA D_TIMEOUT_ MS = "appc onfig.vler .das.REST_ READ_TIMEO UT_MS";
  74       privat e static f inal Strin g IS_DAS_C ACHE_ENABL ED = "appc onfig.vler .das.CACHE _ENABLED";
  75       privat e static f inal Strin g DAS_TEST _PAT = "ap pconfig.vl er.das.tes tpat";
  76       privat e static f inal Strin g DAS_ENAB LE_COMMUNI TY_SUMMARI ES = "appc onfig.vler .das.enabl eHealthSum maries";
  77  
  78       privat e static f inal Strin g USE_ENHA NCED_DEBUG  = "appcon fig.debug. enhanced";
  79  
  80       privat e static f inal Strin g ENCRYPTI ON_KEY_ARR AY = "appc onfig.encr yption.key .array";
  81       
  82       privat e static f inal AppCo nfig INSTA NCE = new  AppConfig( );
  83  
  84       privat e Properti es appProp erties;
  85  
  86       privat e AppConfi g() {
  87  
  88           ap pPropertie s = new Pr operties() ;
  89  
  90           lo adAppMetaP roperties( );
  91           lo adAppConfi gPropertie s();
  92       }
  93  
  94       privat e void loa dAppMetaPr operties()  {
  95           St ring prope rtiesFile  = "applica tion.prope rties";
  96  
  97           In putStream  inputStrea m = null;
  98  
  99           Cl assLoader  classLoade r = AppCon fig.class. getClassLo ader();
  100           if  (classLoa der != nul l) {
  101                inputStr eam = clas sLoader.ge tResourceA sStream(pr opertiesFi le);
  102           }
  103  
  104           tr y {
  105                appPrope rties.load (inputStre am);
  106           }  catch (IOE xception e ) {
  107                LOGGER.e rror("Fail ed load ap plication. properties : " + e.ge tMessage() );
  108                throw ne w RuntimeE xception(e );
  109           }  finally {
  110                try {
  111                    if ( inputStrea m != null)  {
  112                         inputStrea m.close();
  113                    }
  114                } catch  (IOExcepti on e) {
  115                    LOGG ER.error(e .getMessag e());
  116                }
  117           }
  118       }
  119  
  120       privat e void loa dAppConfig Properties () {
  121           St ring prope rtiesFile  = "vistada taservice. properties ";
  122  
  123           In putStream  inputStrea m = null;
  124  
  125           Cl assLoader  classLoade r = AppCon fig.class. getClassLo ader();
  126           if  (classLoa der != nul l) {
  127                inputStr eam = clas sLoader.ge tResourceA sStream(pr opertiesFi le);
  128           }
  129  
  130           if  (inputStr eam != nul l) {
  131                try {
  132                    appP roperties. load(input Stream);
  133                } catch  (IOExcepti on e) {
  134                    LOGG ER.error(" Failed loa d appconfi g properti es: " + e. getMessage ());
  135                    thro w new Runt imeExcepti on(e);
  136                } finall y {
  137                    try  {
  138                         inputStrea m.close();
  139                    } ca tch (IOExc eption e)  {
  140                         LOGGER.err or(e.getMe ssage());
  141                    }
  142                }
  143           }
  144  
  145           tr y {
  146  
  147                inputStr eam = new  FileInputS tream(prop ertiesFile );
  148  
  149                try {
  150                    appP roperties. load(input Stream);
  151                } catch  (IOExcepti on e) {
  152                    LOGG ER.error(" Failed loa d appconfi g properti es: " + e. getLocaliz edMessage( ));
  153                    thro w new Runt imeExcepti on(e);
  154                } finall y {
  155                    try  {
  156                         inputStrea m.close();
  157                    } ca tch (IOExc eption e)  {
  158                         LOGGER.err or(e.getMe ssage());
  159                    }
  160                }
  161  
  162           }  catch (Fil eNotFoundE xception e ) {
  163                LOGGER.i nfo("Faile d to load  appconfig  from file  (vistadata service.pr operties)  -"
  164                         + " utiliz ing defaul t appconfi g properti es.");
  165  
  166           }
  167       }
  168  
  169       public  static fi nal AppCon fig getIns tance() {
  170           re turn INSTA NCE;
  171       }
  172  
  173       public  final Str ing getPro tocolRPC()  {
  174           re turn PROTO COL_RPC;
  175       }
  176  
  177       public  final Str ing getPro tocolCache () {
  178           re turn PROTO COL_CACHE;
  179       }
  180  
  181       public  final Str ing getAge ncyVA() {
  182           re turn appPr operties.g etProperty (AGENCY_VA );
  183       }
  184  
  185       public  final Str ing getAge ncyDOD() {
  186           re turn appPr operties.g etProperty (AGENCY_DO D);
  187       }
  188  
  189       public  final Str ing getLog 4jProperti es() {
  190           re turn appPr operties.g etProperty (LOG4J_PRO PS);
  191       }
  192  
  193       public  final Str ing getApp Environmen t() {
  194           re turn appPr operties.g etProperty (APP_ENVIR ONMENT);
  195       }
  196  
  197       public  final Str ing getApp Version()  {
  198           re turn appPr operties.g etProperty (APP_VERSI ON);
  199       }
  200  
  201       public  final Str ing getNon BseSecurit yPhrase()  {
  202           re turn appPr operties.g etProperty (NON_BSE_S ECURITY_PH RASE);
  203       }
  204  
  205       public  final int  getConnec tionTimeou tMs() {
  206           re turn Integ er.parseIn t(appPrope rties.getP roperty(CO NNECTION_T IMEOUT_MS) );
  207       }
  208  
  209       public  final int  getReques tTimeoutMs () {
  210           re turn Integ er.parseIn t(appPrope rties.getP roperty(RE QUEST_TIME OUT_MS));
  211       }
  212  
  213       public  final Str ing getVLE R_DQ_URL()  {
  214           re turn appPr operties.g etProperty (VLER_DQ_U RL);
  215       }
  216  
  217       public  final Str ing getVLE R_DR_URL()  {
  218           re turn appPr operties.g etProperty (VLER_DR_U RL);
  219       }
  220  
  221       public  final Str ing getVLE R_DAS_URL( ) {
  222           re turn appPr operties.g etProperty (VLER_DAS_ URL);
  223       }
  224  
  225       public  final Str ing getVLE R_DAS_CALL BACK() {
  226           re turn appPr operties.g etProperty (VLER_DAS_ CALLBACK);
  227       }
  228  
  229       public  final Str ing getEvi xStudyquer yUrl() { r eturn appP roperties. getPropert y(EVIX_STU DYQUERY_UR L);}
  230  
  231       public  final int  getEvixRe questTimeo ut() {
  232           re turn Integ er.parseIn t(appPrope rties.getP roperty(EV IX_REQUEST _TIMEOUT)) ;
  233       }
  234  
  235       public  final int  getEvixCo nnectionTi meout() {
  236           re turn Integ er.parseIn t(appPrope rties.getP roperty(EV IX_CONNECT ION_TIMEOU T));
  237       }
  238  
  239       public  final Str ing getDat aSource()  {
  240           re turn appPr operties.g etProperty (DATASOURC E);
  241       }
  242  
  243       public  int getRe stConnecti onTimeoutM S() {
  244           re turn Integ er.parseIn t(appPrope rties.getP roperty(RE ST_CONNECT ION_TIMEOU T_MS));
  245       }
  246  
  247       public  int getRe stReadTime outMS() {
  248           re turn Integ er.parseIn t(appPrope rties.getP roperty(RE ST_READ_TI MEOUT_MS)) ;
  249       }
  250  
  251       public  Propertie s getPrope rties() {
  252           re turn appPr operties;
  253       }
  254  
  255       public  final boo lean isDAS CacheEnabl ed() {
  256           re turn Boole an.valueOf (appProper ties.getPr operty(IS_ DAS_CACHE_ ENABLED));
  257       }
  258  
  259       public  final boo lean enabl eDASCommun itySummari es(){
  260           re turn Boole an.valueOf (appProper ties.getPr operty(DAS _ENABLE_CO MMUNITY_SU MMARIES));
  261       }
  262  
  263       public  final Str ing getDas TestPat()  {return ap pPropertie s.getPrope rty(DAS_TE ST_PAT, "" ); }
  264  
  265   //    publ ic final S tring getV LER_PD_URL ()
  266   //    {
  267   //         return app Properties .getProper ty(VLER_PD _URL);
  268   //    }
  269   //
  270   //    publ ic final S tring getV LER_PA_URL ()
  271   //    {
  272   //         return app Properties .getProper ty(VLER_PA _URL);
  273   //    }
  274  
  275  
  276       public  final int  getRPCCon nectionMax ThreadPool Size() {
  277           re turn Integ er.parseIn t(appPrope rties.getP roperty(RP C_CONNECTI ON_THREAD_ MAX_POOL_S IZE));
  278       }
  279  
  280       public  final int  getRPCCon nectionThr eadTimeout Seconds()  {
  281           re turn Integ er.parseIn t(appPrope rties.getP roperty(RP C_CONNECTI ON_THREAD_ TIMEOUT_SE CONDS));
  282       }
  283  
  284       public  final int  getParser MaxThreadP oolSize()  {
  285           re turn Integ er.parseIn t(appPrope rties.getP roperty(PA RSER_THREA D_MAX_POOL _SIZE));
  286       }
  287  
  288       public  final int  getParser ThreadTime outSeconds () {
  289           re turn Integ er.parseIn t(appPrope rties.getP roperty(PA RSER_THREA D_TIMEOUT_ SECONDS));
  290       }
  291  
  292       privat e final st atic int P ARSER_THRE AD_MAX_POO L_SIZE_LAR GE = 30;
  293       
  294       public  final int  getParser MaxThreadP oolSizeEnc ounters()  {
  295           in t rtn;
  296           tr y {
  297                rtn = In teger.pars eInt(appPr operties.g etProperty (PARSER_TH READ_MAX_P OOL_SIZE_E NCOUNTERS) );
  298           }  catch (Num berFormatE xception n fe) {
  299                try {
  300                    rtn  = Integer. parseInt(a ppProperti es.getProp erty(PARSE R_THREAD_M AX_POOL_SI ZE));
  301                } catch  (NumberFor matExcepti on nfe2) {
  302                    rtn  = PARSER_T HREAD_MAX_ POOL_SIZE_ LARGE;
  303                }
  304           }
  305           
  306           re turn rtn;
  307       }
  308  
  309       public  final int  getParser MaxThreadP oolSizeLab s() {
  310           in t rtn;
  311           tr y {
  312                rtn = In teger.pars eInt(appPr operties.g etProperty (PARSER_TH READ_MAX_P OOL_SIZE_L ABS));
  313           }  catch (Num berFormatE xception n fe) {
  314                try {
  315                    rtn  = Integer. parseInt(a ppProperti es.getProp erty(PARSE R_THREAD_M AX_POOL_SI ZE));
  316                } catch  (NumberFor matExcepti on nfe2) {
  317                    rtn  = PARSER_T HREAD_MAX_ POOL_SIZE_ LARGE;
  318                }
  319           }
  320           re turn rtn;
  321       }
  322  
  323       public  final int  getParser MaxThreadP oolSizeNot es() {
  324           in t rtn;
  325           tr y {
  326                rtn = In teger.pars eInt(appPr operties.g etProperty (PARSER_TH READ_MAX_P OOL_SIZE_N OTES));
  327           }  catch (Num berFormatE xception n fe) {
  328                try {
  329                    rtn  = Integer. parseInt(a ppProperti es.getProp erty(PARSE R_THREAD_M AX_POOL_SI ZE));
  330                } catch  (NumberFor matExcepti on nfe2) {
  331                    rtn  = PARSER_T HREAD_MAX_ POOL_SIZE_ LARGE;
  332                }
  333           }
  334           re turn rtn;
  335       }
  336  
  337       public  final int  getParser MaxThreadP oolSizeOrd ers() {
  338           in t rtn;
  339           tr y {
  340                rtn = In teger.pars eInt(appPr operties.g etProperty (PARSER_TH READ_MAX_P OOL_SIZE_O RDERS));
  341           }  catch (Num berFormatE xception n fe) {
  342                try {
  343                    rtn  = Integer. parseInt(a ppProperti es.getProp erty(PARSE R_THREAD_M AX_POOL_SI ZE));
  344                } catch  (NumberFor matExcepti on nfe2) {
  345                    rtn  = PARSER_T HREAD_MAX_ POOL_SIZE_ LARGE;
  346                }
  347           }
  348           re turn rtn;
  349       }
  350  
  351       public  final int  getParser MaxThreadP oolSizeMed s() {
  352           in t rtn;
  353           tr y {
  354                rtn = In teger.pars eInt(appPr operties.g etProperty (PARSER_TH READ_MAX_P OOL_SIZE_M EDS));
  355           }  catch (Num berFormatE xception n fe) {
  356                try {
  357                    rtn  = Integer. parseInt(a ppProperti es.getProp erty(PARSE R_THREAD_M AX_POOL_SI ZE));
  358                } catch  (NumberFor matExcepti on nfe2) {
  359                    rtn  = PARSER_T HREAD_MAX_ POOL_SIZE_ LARGE;
  360                }
  361           }
  362           re turn rtn;
  363       }
  364  
  365       // tru e for runn ing enhanc ed debug c ode
  366       public  final boo lean useEn hancedDebu g() {
  367           re turn Boole an.valueOf (appProper ties.getPr operty(USE _ENHANCED_ DEBUG));
  368       }
  369       
  370       public  static fi nal byte[]  EMPTY_BYT ES = new b yte[16];
  371       public  final byt e[] getEnc ryptionKey () {
  372           if  (!StringU tils.isEmp ty(appProp erties.get Property(E NCRYPTION_ KEY_ARRAY) )) {
  373                return U tils.parse ByteArray1 6(appPrope rties.getP roperty(EN CRYPTION_K EY_ARRAY)) ;
  374           }  else {
  375                return E MPTY_BYTES ;
  376           }
  377       }
  378   }