23517. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/28/2019 3:18:24 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.

23517.1 Files compared

# Location File Last Modified
1 CV_src.zip\CV-VAS\grails-app\services\jlv VixService.groovy Wed May 1 18:46:26 2019 UTC
2 CV_src.zip\CV-VAS\grails-app\services\jlv VixService.groovy Tue May 28 17:32:43 2019 UTC

23517.2 Comparison summary

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

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

23517.4 Active regular expressions

No regular expressions were active.

23517.5 Comparison detail

  1   package jl v
  2  
  3   import gov .va.med.co mmon.VixSe rviceExcep tion
  4   import gro ovyx.net.h ttp.Conten tType
  5   import gro ovyx.net.h ttp.HTTPBu ilder
  6   import gro ovyx.net.h ttp.Method
  7   import org .apache.co mmons.coll ections4.C ollectionU tils
  8   import org .apache.co mmons.lang 3.StringUt ils
  9  
  10   import jav a.util.con current.Co ncurrentHa shMap
  11  
  12   class VixS ervice {
  13  
  14       def ap pConfig
  15  
  16       privat e static C oncurrentH ashMap<Str ing, Strin g> vixEndp ointCache  = new Conc urrentHash Map<>();
  17  
  18       def is Valid(Stri ng endpoin t){
  19  
  20           // endpoint =  "https:// 52.1.53.59 /blah/blah /blah";
  21   //          endpoint =  "https:// DNS . URL /vix/viewe r/loader?C ontextId=R PT%5eCPRS% 5e7178910% 5eRA%5e682 8886.8261- 1%5e49%5eC HYSQA260%5 e%5e%5e%5e %5e%5e1&Si teNumber=9 94&Patient ICN=100868 9559V85913 4&Security Token=MjAx Ny0xMi0wOF QwNjowMDow MC4wMDAwMD AwWnx6V3JL dmJCSGo1OX pDVHhoNWY3 aEh2aW9rUm dLSnFNMEZs QWtXQXRtUW N6blZZSllP VWxiMGxLdF hmTEhtX0Vu Q2RQcjItV1 hsY0xDbTY1 UmdkbWN6dX JGbVdlU29j Z1FBQkRlSm xjTG9MSnBG N3NfX1ROSn EzdWlLcDU0 NVhJMGl3b1 lULXk0cjl0 VW1qRmlSZn g5ZkE9PXw1 MjA3MzY1Mz N8MzhmOTk4 NDYtMDJkOS 00ZWE5LWE0 OWMtYjZjMm I1ZGRkYWI0 fFkwVGtVOC 8xOWVieXhO UXd4TklqcG JVZHY2cG5L S1hMNm9XS2 82UmJzR1lv VlZFbXp2M3 JFL0p4Q0gv Y2VXUXUrak Zkb01CNHp6 c0I0MW9oQV FMRkpqNW5Q UWNOYktTST BaaHZMRVJs SVpjPQ%3d% 3d&AuthSit eNumber=99 4&Flags=PS TATE^ESIGN ATURE"
  22  
  23           tr y {
  24  
  25                endpoint  = endpoin t.replace( "^","%5E")
  26  
  27                URI uri  = new URI( endpoint)
  28                String d omain = ""
  29  
  30                if(uri ! = null){
  31                    doma in = uri.g etHost()
  32                }
  33  
  34                if(Strin gUtils.isN otEmpty(do main)){
  35                    if(v ixEndpoint Cache.cont ainsKey(do main)){
  36                         return tru e
  37                    } el se {
  38                         populateVi xEndpointC ache()
  39                         return vix EndpointCa che.contai nsKey(doma in)
  40                    }
  41                } else {
  42                    //no  domain in cluded...s o this is  a relative  link
  43                    retu rn true
  44                }
  45           }  catch (URI SyntaxExce ption e) {
  46                log.erro r("Invalid  URL detec ted. ", e)
  47                return f alse
  48           }
  49  
  50  
  51  
  52       }
  53  
  54       def po pulateVixE ndpointCac he() {
  55           de f http = n ew HTTPBui lder(appCo nfig.getVi xEndpoint( ))
  56           de f servers
  57  
  58           ht tp.request (Method.GE T, Content Type.XML)  { req ->
  59                response .'200' = {  resp, rea der ->
  60                    serv ers = read er.'**'.fi ndAll{it.n ame() == ' server' }* .text()
  61  
  62                    if(s ervers !=  null && Co llectionUt ils.isNotE mpty(serve rs)) {
  63                         for (Strin g server :  servers)  {
  64                             vixEnd pointCache .putIfAbse nt(server,  server)
  65                         }
  66                    }
  67                }
  68  
  69                response .failure =  { resp ->
  70                    thro w new VixS erviceExce ption("The re was an  error retr ieving Vix  endpoints ")
  71                }
  72           }
  73  
  74           ht tp.shutdow n()
  75  
  76       }
  77   }