Produced by Araxis Merge on 9/15/2018 10:48:16 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 | MHV_2018.4.0.0.zip\2018.4.0.0\national portal\mhv_source\mhv_liferay\mhv_hooks\mhv-liferay-sso-hook\src\main\java\gov\va\med\mhv\sso\service | MhvSSOeVirtualHostLocalServiceImpl.java | Thu Aug 23 21:33:34 2018 UTC |
| 2 | MHV_2018.4.0.0.zip\2018.4.0.0\national portal\mhv_source\mhv_liferay\mhv_hooks\mhv-liferay-sso-hook\src\main\java\gov\va\med\mhv\sso\service | MhvSSOeVirtualHostLocalServiceImpl.java | Sat Sep 15 21:59:54 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 138 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| 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 | /** | |
| 2 | * | |
| 3 | */ | |
| 4 | package go v.va.med.m hv.sso.ser vice; | |
| 5 | ||
| 6 | import com .liferay.p ortal.kern el.excepti on.PortalE xception; | |
| 7 | import com .liferay.p ortal.kern el.excepti on.SystemE xception; | |
| 8 | import com .liferay.p ortal.kern el.log.Log ; | |
| 9 | import com .liferay.p ortal.kern el.log.Log FactoryUti l; | |
| 10 | import com .liferay.p ortal.kern el.util.Pr opsUtil; | |
| 11 | import com .liferay.p ortal.mode l.VirtualH ost; | |
| 12 | import com .liferay.p ortal.serv ice.Virtua lHostLocal Service; | |
| 13 | import com .liferay.p ortal.serv ice.Virtua lHostLocal ServiceWra pper; | |
| 14 | ||
| 15 | /** | |
| 16 | * @author DNS | |
| 17 | * | |
| 18 | */ | |
| 19 | public cla ss MhvSSOe VirtualHos tLocalServ iceImpl ex tends Virt ualHostLoc alServiceW rapper { | |
| 20 | ||
| 21 | pr ivate stat ic final L og LOG = L ogFactoryU til.getLog (MhvSSOeVi rtualHostL ocalServic eImpl.clas s); | |
| 22 | ||
| 23 | pr ivate stat ic final S tring SSO_ VIRTUAL_HO ST_MAP_KEY = "sso.vi rtual.host .map[%s]"; | |
| 24 | ||
| 25 | pu blic MhvSS OeVirtualH ostLocalSe rviceImpl( VirtualHos tLocalServ ice virtua lHostLocal Service) { | |
| 26 | supe r(virtualH ostLocalSe rvice); | |
| 27 | ||
| 28 | LOG. info("Init ializing M HV Custom SSOe Virtu al Host Lo cal Servic e implemen tation."); | |
| 29 | } | |
| 30 | ||
| 31 | @O verride | |
| 32 | pu blic Virtu alHost fet chVirtualH ost(String hostname) throws Sy stemExcept ion { | |
| 33 | ||
| 34 | Virt ualHost vh = super.f etchVirtua lHost(getM appedVirtu alHostName (hostname) ); | |
| 35 | ||
| 36 | if(L OG.isDebug Enabled()) { | |
| 37 | LOG.de bug(String .format("R eturning V irtual Hos t: %s", vh .toString( ))); | |
| 38 | } | |
| 39 | ||
| 40 | retu rn vh; | |
| 41 | } | |
| 42 | ||
| 43 | @O verride | |
| 44 | pu blic Virtu alHost get VirtualHos t(String h ostname) t hrows Port alExceptio n, SystemE xception { | |
| 45 | ||
| 46 | Virt ualHost vh = super.g etVirtualH ost(getMap pedVirtual HostName(h ostname)); | |
| 47 | ||
| 48 | if(L OG.isDebug Enabled()) { | |
| 49 | LOG.de bug(String .format("R eturning V irtual Hos t: %s", vh .toString( ))); | |
| 50 | } | |
| 51 | retu rn vh; | |
| 52 | } | |
| 53 | ||
| 54 | pr ivate Stri ng getMapp edVirtualH ostName(St ring reque stedHostNa me) { | |
| 55 | Stri ng ssoVirt ualHostKey = String. format(SSO _VIRTUAL_H OST_MAP_KE Y, request edHostName ); | |
| 56 | ||
| 57 | if(L OG.isDebug Enabled()) { | |
| 58 | LOG.de bug(String .format("S SO Virtual Host Map Key: '%s'" , ssoVirtu alHostKey) ); | |
| 59 | LOG.de bug(String .format("L iferay Pro perties co ntains key : %b", Pro psUtil.con tains(ssoV irtualHost Key))); | |
| 60 | } | |
| 61 | ||
| 62 | Stri ng mappedH ostName = (PropsUtil .contains( ssoVirtual HostKey)) ? PropsUti l.get(ssoV irtualHost Key) : req uestedHost Name; | |
| 63 | ||
| 64 | if(L OG.isDebug Enabled()) { | |
| 65 | LOG.de bug(String .format("H ost: '%s' maps to Li feray Virt ual Host: '%s'.", re questedHos tName, map pedHostNam e)); | |
| 66 | } | |
| 67 | ||
| 68 | retu rn mappedH ostName; | |
| 69 | } | |
| 70 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.