400. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/13/2018 10:35:31 AM Eastern 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.

400.1 Files compared

# Location File Last Modified
1 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\service\jms JMSMetaData.java Fri Dec 7 17:36:38 2018 UTC
2 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\service\jms JMSMetaData.java Wed Dec 12 19:46:45 2018 UTC

400.2 Comparison summary

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

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

400.4 Active regular expressions

No regular expressions were active.

400.5 Comparison detail

  1   /********* ********** ********** ********** ********** ********** *********
  2    * Copyrii ght 2004 V HA. All ri ghts reser ved
  3    ********* ********** ********** ********** ********** ********** *********/
  4   package go v.va.med.f w.service. jms;
  5  
  6   // Java cl asses
  7   import jav ax.jms.JMS Exception;
  8   import jav ax.jms.Mes sage;
  9  
  10   import org .springfra mework.jms .support.c onverter.M essageConv ersionExce ption;
  11   import org .springfra mework.jms .support.c onverter.M essageConv erter;
  12   import org .springfra mework.jms .support.c onverter.S impleMessa geConverte r;
  13  
  14   import gov .va.med.fw .hl7.build er.Abstrac tMetaData;
  15  
  16   /**
  17    * Provide s convenie nt methods  to access  a JMS mes sage and i ts body
  18    * 
  19    * @author   DN S
  20    * @versio n 1.0
  21    */
  22   public cla ss JMSMeta Data exten ds Abstrac tMetaData  {
  23  
  24           /* *
  25            *  An instan ce of seri alVersionU ID
  26            * /
  27           pr ivate stat ic final l ong serial VersionUID  = 6239636 4100426288 97L;
  28  
  29           /* *
  30            *  An instan ce of conv erter
  31            * /
  32           pr ivate Mess ageConvert er convert er = null;
  33  
  34           /* *
  35            *  A default  construct or
  36            *  
  37            *  @param da ta
  38            * /
  39           pu blic JMSMe taData(Mes sage data)  {
  40                    this (data, new  SimpleMes sageConver ter());
  41           }
  42  
  43           /* *
  44            *  A default  construct or
  45            *  
  46            *  @param da ta
  47            *  @param co nverter
  48            * /
  49           pu blic JMSMe taData(Mes sage data,  MessageCo nverter co nverter) {
  50                    supe r(data);
  51                    this .converter  = convert er;
  52           }
  53  
  54           /* *
  55            *  This impl ementation  converts  a TextMess age back t o a String , a
  56            *  ByteMessa ge back to  a byte ar ray, a Map Message ba ck to a Ma p, and an
  57            *  ObjectMes sage back  to a Seria lizable ob ject.
  58            *  
  59            *  @return A  converted  object
  60            *  @throws J MSExceptio n
  61            *               If fail ed to get  a message  body
  62            * /
  63           pu blic Objec t getJMSMe ssageBody( ) throws J MSExceptio n {
  64                    retu rn convert er.fromMes sage(this. getJMSMess age());
  65           }
  66  
  67           /* *
  68            *  Returns a  JMS messa ge as a ge neric mess age
  69            *  
  70            *  @return J MS message
  71            * /
  72           pu blic Messa ge getJMSM essage() {
  73                    retu rn (Messag e) getData ();
  74           }
  75  
  76           /* *
  77            *  Returns a  wrapped t ext messag e in a JMS  Text Mess age or a B ytesArray.
  78            *  This meth od is impl emented to  provide s upport for  Vitria. V itria uses  a
  79            *  message.g etBytes to  convert f rom a stri ng into an  array of  bytes so w e
  80            *  need to d o the same  to conver t from arr ay of byte s to a str ing
  81            *  
  82            *  @return A  text mess age
  83            *  @throws J MSExceptio n
  84            *               Thrown  in case of  errors
  85            * /
  86           pu blic Strin g getTextM essage() t hrows JMSE xception {
  87                    retu rn getMess ageBody(ge tJMSMessag e());
  88           }
  89  
  90           /* *
  91            *  Returns a  message b ody as a s tring.
  92            *  
  93            *  @param me ssage
  94            *              A JMS me ssage to u nwrapp
  95            *  @return A  text mess age
  96            *  @throws J MSExceptio n
  97            *               Thrown  in case of  invalid t ype to con vert to a  string
  98            * /
  99           pr otected St ring getMe ssageBody( Message me ssage) thr ows JMSExc eption {
  100  
  101                    Stri ng text =  null;
  102  
  103                    Obje ct body =  this.getJM SMessageBo dy();
  104                    if ( body insta nceof byte []) {
  105                             text =  new Strin g((byte[])  body);
  106                    } el se if (bod y instance of String)  {
  107                             text =  (String)  body;
  108                    } el se {
  109                             throw  new Messag eConversio nException ("Invalid  message bo dy to conv ert to a s tring");
  110                    }
  111                    retu rn text;
  112           }
  113   }