282. EPMO Open Source Coordination Office Redaction File Detail Report

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

282.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomRouter\main\src\java\gov\va\med\imaging\router\commands\dicom\provider DicomCommandContext.java Mon Dec 4 21:35:30 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomRouter\main\src\java\gov\va\med\imaging\router\commands\dicom\provider DicomCommandContext.java Mon Dec 4 22:02:59 2017 UTC

282.2 Comparison summary

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

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

282.4 Active regular expressions

No regular expressions were active.

282.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.rou ter.comman ds.dicom.p rovider;
  27  
  28   import jav a.lang.ref lect.Metho d;
  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.Ro utingToken ;
  34   import gov .va.med.im aging.arti factsource .ResolvedA rtifactSou rce;
  35   import gov .va.med.im aging.core .interface s.Router;
  36   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  37   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  38   import gov .va.med.im aging.core .interface s.router.C ommandCont ext;
  39   import gov .va.med.im aging.core .interface s.router.C ommandFact ory;
  40   import gov .va.med.im aging.data source.Dat aSourcePro vider;
  41   import gov .va.med.im aging.data source.Dic omApplicat ionEntityD ataSourceS pi;
  42   import gov .va.med.im aging.data source.Dic omDataSour ceSpi;
  43   import gov .va.med.im aging.data source.Dic omImporter DataSource Spi;
  44   import gov .va.med.im aging.data source.Dic omQueryRet rieveDataS ourceSpi;
  45   import gov .va.med.im aging.data source.Dic omStorageD ataSourceS pi;
  46   import gov .va.med.im aging.data source.Sit eResolutio nDataSourc eSpi;
  47   import gov .va.med.im aging.data source.Tra nsactionLo ggerDataSo urceSpi;
  48   import gov .va.med.im aging.data source.Ver sionableDa taSourceSp i;
  49   import gov .va.med.im aging.exch ange.busin ess.Resolv edSite;
  50  
  51   /**
  52    * @author         
WERFEJ
  53    *
  54    */
  55   public cla ss DicomCo mmandConte xt 
  56   implements  CommandCo ntext
  57   {
  58           pr ivate fina l CommandC ontext com mandContex t;
  59           pr ivate fina l DicomQue ryRetrieve DataSource Spi dicomQ ueryRetrie veService;
  60           pr ivate fina l DicomSto rageDataSo urceSpi di comStorage Service;
  61           pr ivate fina l DicomApp licationEn tityDataSo urceSpi di comApplica tionEntity Service;
  62           pr ivate fina l DicomDat aSourceSpi  dicomServ ice;
  63           pr ivate Dico mImporterD ataSourceS pi dicomIm porterServ ice;
  64           pr ivate Reso lvedArtifa ctSource r esolvedArt ifactSourc e;
  65           
  66           pu blic Dicom CommandCon text(Comma ndContext  commandCon text)
  67           {
  68                    LogM anager.get Logger(Dic omCommandC ontext.cla ss).info(" Creating n ew DicomCo mmandConte xt instanc e");
  69                    this .commandCo ntext = co mmandConte xt;
  70                    reso lvedArtifa ctSource =  null;
  71                    if(g etLocalSit e() != nul l)
  72                    {
  73                             try
  74                             {
  75                                      resolved ArtifactSo urce = 
  76                                               getSiteRes olver().re solveArtif actSource( getLocalSi te().getAr tifactSour ce().creat eRoutingTo ken());
  77                             }
  78                             catch  (MethodExc eption e)
  79                             {
  80                                      String m sg = "Fail ed to crea te resolve dArtifactS ource to c reate loca l services  during Di comCommand Context in itializati on, " + e. getMessage ();
  81                                      LogManag er.getLogg er(DicomCo mmandConte xt.class). error(msg,  e);
  82                                      throw ne w Exceptio nInInitial izerError( msg);
  83                             }
  84                             catch  (Connectio nException  e)
  85                             {
  86                                      String m sg = "Fail ed to crea te resolve dArtifactS ource to c reate loca l services  during Di comCommand Context in itializati on, " + e. getMessage ();
  87                                      LogManag er.getLogg er(DicomCo mmandConte xt.class). error(msg,  e);
  88                                      throw ne w Exceptio nInInitial izerError( msg);
  89                             }
  90                    }
  91                    
  92                    if(r esolvedArt ifactSourc e != null)
  93                    {
  94                             try
  95                             {
  96                                      this.dic omQueryRet rieveServi ce = getPr ovider().c reateLocal DicomQuery RetrieveDa taSource(r esolvedArt ifactSourc e);
  97                             }
  98                             catch( Connection Exception  x)
  99                             {
  100                                      String m sg = "Fail ed to get  DICOM Quer y/Retrieve  services  during Dic omCommandC ontext ini tializatio n, " + x.g etMessage( );
  101                                      LogManag er.getLogg er(DicomCo mmandConte xt.class). error(msg) ;
  102                                      throw ne w Exceptio nInInitial izerError( msg);
  103                             }
  104                             
  105                             try
  106                             {
  107                                      this.dic omStorageS ervice = g etProvider ().createL ocalDicomS torageData Source(res olvedArtif actSource) ;
  108                             }
  109                             catch( Connection Exception  x)
  110                             {
  111                                      String m sg = "Fail ed to get  DICOM Quer y/Retrieve  services  during Dic omCommandC ontext ini tializatio n, " + x.g etMessage( );
  112                                      LogManag er.getLogg er(DicomCo mmandConte xt.class). error(msg) ;
  113                                      throw ne w Exceptio nInInitial izerError( msg);
  114                             }
  115           
  116                             try
  117                             {                
  118                                      this.dic omApplicat ionEntityS ervice = g etProvider ().createL ocalDicomA pplication EntityData Source(res olvedArtif actSource) ;
  119                             }
  120                             catch( Connection Exception  x)
  121                             {
  122                                      String m sg = "Fail ed to get  DICOM Appl ication En tity servi ces during  DicomComm andContext  initializ ation, " +  x.getMess age();
  123                                      LogManag er.getLogg er(DicomCo mmandConte xt.class). error(msg) ;
  124                                      throw ne w Exceptio nInInitial izerError( msg);
  125                             }
  126                             
  127                             try
  128                             {
  129                                      this.dic omService  = getProvi der().crea teLocalDic omDataSour ce(resolve dArtifactS ource);
  130                             }
  131                             catch( Connection Exception  x)
  132                             {
  133                                      String m sg = "Fail ed to get  DICOM serv ices durin g DicomCom mandContex t initiali zation, "  + x.getMes sage();
  134                                      LogManag er.getLogg er(DicomCo mmandConte xt.class). error(msg) ;
  135                                      throw ne w Exceptio nInInitial izerError( msg);
  136                             }
  137                             
  138                             try
  139                             {
  140                                      this.dic omImporter Service =  getProvide r().create LocalDicom ImporterDa taSource(r esolvedArt ifactSourc e);
  141                             }
  142                             catch( Connection Exception  x)
  143                             {
  144                                      String m sg = "Fail ed to get  DICOM Impo rter servi ces during  DicomComm andContext  initializ ation, " +  x.getMess age();
  145                                      LogManag er.getLogg er(DicomCo mmandConte xt.class). error(msg) ;
  146                                      throw ne w Exceptio nInInitial izerError( msg);
  147                             }
  148                    }
  149                    else
  150                    {
  151                             // if  everything  is config ured prope rly this s hould not  happen. If  this does  happen ve rify VixCo nfig.xml i s availabl e - this i s
  152                             // the  site numb er used to  get the l ocal site
  153                             LogMan ager.getLo gger(Dicom CommandCon text.class ).error("C ould not i nitialize  local serv ices in Di comCommand Context, l ikely cann ot find lo cal site") ;
  154                             dicomA pplication EntityServ ice = null ;
  155                             dicomI mporterSer vice = nul l;
  156                             dicomQ ueryRetrie veService  = null;
  157                             dicomS ervice = n ull;
  158                             dicomS torageServ ice = null ;
  159                    }
  160           }
  161  
  162           @O verride
  163           pu blic Route r getRoute r() 
  164           {
  165                    retu rn command Context.ge tRouter();
  166           }
  167  
  168           @O verride
  169           pu blic DataS ourceProvi der getPro vider() 
  170           {
  171                    retu rn command Context.ge tProvider( );
  172           }
  173  
  174           @O verride
  175           pu blic SiteR esolutionD ataSourceS pi getSite Resolver()  
  176           {
  177                    retu rn command Context.ge tSiteResol ver();
  178           }
  179  
  180           @O verride
  181           pu blic Comma ndFactory  getCommand Factory() 
  182           {
  183                    retu rn command Context.ge tCommandFa ctory();
  184           }
  185  
  186           @O verride
  187           pu blic Trans actionLogg erDataSour ceSpi getT ransaction LoggerServ ice() 
  188           {
  189                    retu rn command Context.ge tTransacti onLoggerSe rvice();
  190           }
  191  
  192           @O verride
  193           pu blic boole an isCachi ngEnabled(
  194           {
  195                    retu rn command Context.is CachingEna bled();
  196           }
  197  
  198           @O verride
  199           pu blic Resol vedSite ge tLocalSite () 
  200           {
  201                    retu rn command Context.ge tLocalSite ();
  202           }
  203  
  204           @O verride
  205           pu blic Resol vedArtifac tSource ge tResolvedA rtifactSou rce(
  206                             Routin gToken rou tingToken)  
  207           th rows Metho dException  
  208           {
  209                    retu rn command Context.ge tResolvedA rtifactSou rce(routin gToken);
  210           }
  211  
  212           @O verride
  213           pu blic Resol vedArtifac tSource ge tResolvedA rtifactSou rce(
  214                             Routin gToken rou tingToken,
  215                             Class< ? extends  Versionabl eDataSourc eSpi> spi,  Method me thod,
  216                             Object [] paramet ers) 
  217           th rows Metho dException  
  218           {
  219                    retu rn command Context.ge tResolvedA rtifactSou rce(routin gToken, sp i, method,  parameter s);
  220           }
  221  
  222           pu blic Dicom QueryRetri eveDataSou rceSpi get DicomQuery RetrieveSe rvice() 
  223           {
  224                    retu rn dicomQu eryRetriev eService;
  225           }
  226  
  227           pu blic Dicom StorageDat aSourceSpi  getDicomS torageServ ice() {
  228                    retu rn dicomSt orageServi ce;
  229           }
  230  
  231           pu blic Dicom Applicatio nEntityDat aSourceSpi  getDicomA pplication EntityServ ice() {
  232                    retu rn dicomAp plicationE ntityServi ce;
  233           }
  234  
  235           pu blic Dicom DataSource Spi getDic omService( ) {
  236                    retu rn dicomSe rvice;
  237           }
  238  
  239           pu blic Dicom ImporterDa taSourceSp i getDicom ImporterSe rvice() {
  240                    if ( dicomImpor terService  == null)
  241                    {
  242                             try
  243                             {
  244                                      this.dic omImporter Service =  getProvide r().create LocalDicom ImporterDa taSource(r esolvedArt ifactSourc e);
  245                             }
  246                             catch( Connection Exception  x)
  247                             {
  248                                      String m sg = "Fail ed to get  DICOM Impo rter servi ces during  DicomComm andContext  initializ ation, " +  x.getMess age();
  249                                      LogManag er.getLogg er(DicomCo mmandConte xt.class). error(msg) ;
  250                                      throw ne w Exceptio nInInitial izerError( msg);
  251                             }
  252                    }
  253                    retu rn dicomIm porterServ ice;
  254           }
  255  
  256   }