348. EPMO Open Source Coordination Office Redaction File Detail Report

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

348.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ROICommands\main\src\java\gov\va\med\imaging\roi\commands\periodic\processor AbstractROIWorkItemsProcessor.java Mon Dec 4 21:35:28 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ROICommands\main\src\java\gov\va\med\imaging\roi\commands\periodic\processor AbstractROIWorkItemsProcessor.java Mon Dec 4 22:05:23 2017 UTC

348.2 Comparison summary

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

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

348.4 Active regular expressions

No regular expressions were active.

348.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: Mar  29, 2012
  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.roi .commands. periodic.p rocessor;
  27  
  28   import org .apache.lo gging.log4 j.LogManag er;
  29   import org .apache.lo gging.log4 j.Logger;
  30  
  31   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  32   import gov .va.med.im aging.core .interface s.exceptio ns.Invalid UserCreden tialsExcep tion;
  33   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  34   import gov .va.med.im aging.core .router.wo rklist.Wor kListConte xt;
  35   import gov .va.med.im aging.exch ange.busin ess.WorkIt em;
  36   import gov .va.med.im aging.roi. ROIWorkIte m;
  37   import gov .va.med.im aging.roi. ROIValues;
  38   import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ;
  39  
  40   /**
  41    * @author         
WERFEJ
  42    *
  43    */
  44   public abs tract clas s Abstract ROIWorkIte msProcesso r
  45   {
  46           pr ivate fina l String e xpectedSta tus;
  47           pr ivate fina l String n ewStatus;
  48           
  49           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Abst ractROIWor kItemsProc essor.clas s);
  50           pr otected Lo gger getLo gger()
  51           {
  52                    retu rn logger;
  53           }
  54           
  55           pu blic Abstr actROIWork ItemsProce ssor(Strin g expected Status, St ring newSt atus)
  56           {
  57                    supe r();
  58                    this .expectedS tatus = ex pectedStat us;
  59                    this .newStatus  = newStat us;
  60           }
  61  
  62           pu blic Strin g getExpec tedStatus( )
  63           {
  64                    retu rn expecte dStatus;
  65           }
  66  
  67           pu blic Strin g getNewSt atus()
  68           {
  69                    retu rn newStat us;
  70           }
  71  
  72           pu blic void  processWor kItems()
  73           th rows Inval idUserCred entialsExc eption
  74           {
  75                    getL ogger().in fo("Proces sing ROI w ork items  with statu s '" + get ExpectedSt atus() + " '.");
  76                    ROIW orkItem wo rkItem = g etAndTrans itionNextW orkItem(
  77                                      getExpec tedStatus( ),
  78                                      getNewSt atus());
  79                    whil e(workItem  != null)
  80                    {
  81                             try
  82                             {
  83                                      // set t he URN to  the GUID o f the work  item bein g processe d
  84                                      Transact ionContext Factory.ge t().setUrn (workItem. getGuid()) ;
  85                                      processW orkItem(wo rkItem);
  86                             } 
  87                             catch  (Connectio nException  cX)
  88                             {
  89                                      // catch  exception s to ensur e processi ng of next  work item
  90                                      getLogge r().error( "Connectio nException  processin g work ite m with gui d '" + wor kItem.getG uid() + "' , " + cX.g etMessage( ));
  91                             } 
  92                             catch( InvalidUse rCredentia lsExceptio n iucX)
  93                             {
  94                                      getLogge r().error( "InvalidUs erCredenti alsExcepti on process ing work i tem with g uid '" + w orkItem.ge tGuid() +  "', " + iu cX.getMess age());
  95                                      throw iu cX;
  96                             }
  97                             catch  (MethodExc eption mX)
  98                             {
  99                                      // catch  exception s to ensur e processi ng of next  work item
  100                                      getLogge r().error( "MethodExc eption pro cessing wo rk item wi th guid '"  + workIte m.getGuid( ) + "', "  + mX.getMe ssage());
  101                             }
  102                             catch( Exception  ex)
  103                             {
  104                                      // gener ic excepti on handler  to ensure  can proce ss next wo rk item
  105                             }
  106                             workIt em = getAn dTransitio nNextWorkI tem(
  107                                               getExpecte dStatus(),
  108                                               getNewStat us());
  109                    }
  110                    getL ogger().in fo("Done p rocessing  ROI work i tems with  status '"  + getExpec tedStatus( ) + "'.");
  111           }
  112           
  113           /* *
  114            *  This meth od calls t he command  to proces s the spec ified work  item. Thi s method m ay throw e xceptions  but they w ill be cau ght
  115            *  @param wo rkItem
  116            *  @throws C onnectionE xception
  117            *  @throws M ethodExcep tion
  118            * /
  119           pr otected ab stract voi d processW orkItem(RO IWorkItem  workItem)
  120           th rows Conne ctionExcep tion, Meth odExceptio n;
  121           
  122           pr otected RO IWorkItem  getAndTran sitionNext WorkItem(S tring expe ctedStatus
  123                             String  newStatus )
  124           th rows Inval idUserCred entialsExc eption
  125           {
  126                    try
  127                    {
  128                             // JMW  9/14/2012  P130 call ing this m ethod auto matically  only finds  work item s
  129                             // for  the local  VIX site,  not other  VIX sites
  130                             WorkIt em workIte m = WorkLi stContext. getInterna lRouter(). getAndTran sitionNext WorkItem(
  131                                               ROIValues. ROI_WORKIT EM_TYPE,
  132                                               expectedSt atus, newS tatus,
  133                                               getUserDuz (), getUpd atingAppli cation());
  134                             if(wor kItem == n ull)
  135                                      return n ull;
  136                             return  new ROIWo rkItem(wor kItem);
  137                    } 
  138                    catc h(InvalidU serCredent ialsExcept ion iucX)
  139                    {
  140                             throw  iucX;
  141                    }
  142                    catc h (MethodE xception m X)
  143                    {
  144                             getLog ger().erro r("Error t ransitioni ng work it em, " + mX .getMessag e());
  145                             return  null;
  146                    } 
  147                    catc h (Connect ionExcepti on cX)
  148                    {
  149                             getLog ger().erro r("Error t ransitioni ng work it em, " + cX .getMessag e());
  150                             return  null;
  151                    }
  152           }
  153           
  154           pr otected St ring getUs erDuz()
  155           {
  156                    retu rn Transac tionContex tFactory.g et().getDu z();
  157           }
  158           
  159           pr otected St ring getUp datingAppl ication()
  160           {
  161                    retu rn "ROIWeb App";
  162           }
  163  
  164   }