Produced by Araxis Merge on 6/9/2017 3:50:58 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Fri Jun 9 19:50:58 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-server\src\main\java\gov\va\nvap\server\service\privacy\converter | ConsentTypeConverter.java | Fri Apr 21 20:03:28 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 55 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | package go v.va.nvap. server.ser vice.priva cy.convert er; | |||||
| 2 | ||||||
| 3 | import gov .va.nvap.s vc.consent mgmt.stub. data.Conse ntType; | |||||
| 4 | ||||||
| 5 | import org .dozer.Cus tomConvert er; | |||||
| 6 | import org .dozer.Map pingExcept ion; | |||||
| 7 | ||||||
| 8 | /** | |||||
| 9 | * A Dozer custom co nverter fo r converti ng Optout reason fro m PIP to W ebservice | |||||
| 10 | * type. | |||||
| 11 | * | |||||
| 12 | * @author Asha Amri traj | |||||
| 13 | * | |||||
| 14 | */ | |||||
| 15 | public cla ss Consent TypeConver ter implem ents Custo mConverter { | |||||
| 16 | ||||||
| 17 | // For now assig n consent type IDs a s constant s | |||||
| 18 | // Not complete list | |||||
| 19 | privat e static f inal Long NWHIN_AUTH _ID = 100L ; | |||||
| 20 | privat e static f inal Long NWHIN_REVO C_ID = 101 L; | |||||
| 21 | privat e static f inal Long SSA_AUTH_I D = 102L; | |||||
| 22 | privat e static f inal Long SSA_REVOC_ ID = 103L; | |||||
| 23 | ||||||
| 24 | @O verride | |||||
| 25 | pu blic Objec t convert( final Obje ct destina tion, fina l Object s ource, | |||||
| 26 | final Class<?> d estClass, final Clas s<?> sourc eClass) { | |||||
| 27 | if ( source == null) { | |||||
| 28 | return null; | |||||
| 29 | } | |||||
| 30 | if ( ConsentTyp e.class.is Instance(s ource)) { | |||||
| 31 | // Fro m PIP to W S Type | |||||
| 32 | final String tex t = ((Cons entType) s ource).get Name(); | |||||
| 33 | return gov.va.nv ap.privacy .ConsentTy pe.fromVal ue(text); | |||||
| 34 | } el se if (gov .va.nvap.p rivacy.Con sentType.c lass.isIns tance(sour ce)){ | |||||
| 35 | ConsentT ype newCon sentType = new Conse ntType(); | |||||
| 36 | newConse ntType.set Name(((gov .va.nvap.p rivacy.Con sentType) source).va lue()); | |||||
| 37 | ||||||
| 38 | if (newC onsentType .getName() .equalsIgn oreCase("N wHIN Autho rization") ) { | |||||
| 39 | newC onsentType .setConsen tTypeId(NW HIN_AUTH_I D); | |||||
| 40 | } else i f (newCons entType.ge tName().eq ualsIgnore Case("NwHI N Revocati on")) { | |||||
| 41 | newC onsentType .setConsen tTypeId(NW HIN_REVOC_ ID); | |||||
| 42 | } else i f (newCons entType.ge tName().eq ualsIgnore Case("SSA Authorizat ion")) { | |||||
| 43 | newC onsentType .setConsen tTypeId(SS A_AUTH_ID) ; | |||||
| 44 | } else i f (newCons entType.ge tName().eq ualsIgnore Case("SSA Revocation ")) { | |||||
| 45 | newC onsentType .setConsen tTypeId(SS A_REVOC_ID ); | |||||
| 46 | } | |||||
| 47 | ||||||
| 48 | return n ewConsentT ype; | |||||
| 49 | } else { | |||||
| 50 | throw new Mappin gException ( | |||||
| 51 | "Converter ConsentTy peConverte r used inc orrectly. Arguments passed in were:" | |||||
| 52 | + de stination + " and " + source); | |||||
| 53 | } | |||||
| 54 | } | |||||
| 55 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.