Produced by Araxis Merge on 12/5/2017 12:06:33 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\client\ui\widgets\dialogs | AuthenticateUserDialog.java | Mon Dec 4 21:35:34 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\client\ui\widgets\dialogs | AuthenticateUserDialog.java | Mon Dec 4 21:56:55 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 976 |
| Changed | 2 | 4 |
| 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 | 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: Feb 21, 2012 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 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.awi v.client.u i.widgets. dialogs; | |
| 27 | ||
| 28 | import jav a.util.Has hMap; | |
| 29 | import jav a.util.Lin kedHashMap ; | |
| 30 | import jav a.util.Map ; | |
| 31 | import org .apache.lo gging.log4 j.LogManag er; | |
| 32 | import org .apache.lo gging.log4 j.Logger; | |
| 33 | ||
| 34 | import gov .va.med.im aging.awiv .business. AwivAuthen ticationSi tesInforma tion; | |
| 35 | import gov .va.med.im aging.awiv .business. AwivSite; | |
| 36 | import gov .va.med.im aging.awiv .business. AwivWelcom eMessage; | |
| 37 | import gov .va.med.im aging.awiv .business. UUID; | |
| 38 | import gov .va.med.im aging.awiv .client.Aw ivHelper; | |
| 39 | import gov .va.med.im aging.awiv .client.da o.UserAuth entication Dao; | |
| 40 | import gov .va.med.im aging.awiv .client.ev ents.UserA uthenticat edEvent; | |
| 41 | import gov .va.med.im aging.awiv .client.ui .widgets.A wivConstan ts; | |
| 42 | import gov .va.med.im aging.awiv .client.ui .widgets.A wivExcepti onHandler; | |
| 43 | import gov .va.med.im aging.awiv .exception s.AwivCred entialsExp iredExcept ion; | |
| 44 | import gov .va.med.im aging.awiv .exception s.AwivInva lidUserCre dentialsEx ception; | |
| 45 | ||
| 46 | import com .google.gw t.core.cli ent.Schedu ler; | |
| 47 | import com .google.gw t.user.cli ent.Window .Location; | |
| 48 | import com .google.gw t.user.cli ent.rpc.As yncCallbac k; | |
| 49 | import com .smartgwt. client.typ es.Alignme nt; | |
| 50 | import com .smartgwt. client.typ es.Overflo w; | |
| 51 | import com .smartgwt. client.typ es.TitleOr ientation; | |
| 52 | import com .smartgwt. client.typ es.Vertica lAlignment ; | |
| 53 | import com .smartgwt. client.uti l.BooleanC allback; | |
| 54 | import com .smartgwt. client.uti l.SC; | |
| 55 | import com .smartgwt. client.wid gets.IButt on; | |
| 56 | import com .smartgwt. client.wid gets.Label ; | |
| 57 | import com .smartgwt. client.wid gets.Windo w; | |
| 58 | import com .smartgwt. client.wid gets.event s.ClickEve nt; | |
| 59 | import com .smartgwt. client.wid gets.event s.ClickHan dler; | |
| 60 | import com .smartgwt. client.wid gets.form. DynamicFor m; | |
| 61 | import com .smartgwt. client.wid gets.form. fields.Pas swordItem; | |
| 62 | import com .smartgwt. client.wid gets.form. fields.Sel ectItem; | |
| 63 | import com .smartgwt. client.wid gets.form. fields.eve nts.Change dEvent; | |
| 64 | import com .smartgwt. client.wid gets.form. fields.eve nts.Change dHandler; | |
| 65 | import com .smartgwt. client.wid gets.form. fields.eve nts.KeyPre ssEvent; | |
| 66 | import com .smartgwt. client.wid gets.form. fields.eve nts.KeyPre ssHandler; | |
| 67 | import com .smartgwt. client.wid gets.layou t.HLayout; | |
| 68 | import com .smartgwt. client.wid gets.layou t.VLayout; | |
| 69 | ||
| 70 | /** | |
| 71 | * This is the user authentica tion dialo g. It cap tures the site the u ser is aut henticatin g against and their | |
| 72 | * access and verify codes. W hen this d ialog is c ompleted t he user ha s been aut henticated | |
| 73 | * | |
| 74 | * @author
|
|
| 75 | * | |
| 76 | */ | |
| 77 | public cla ss Authent icateUserD ialog | |
| 78 | extends Wi ndow | |
| 79 | { | |
| 80 | pr ivate stat ic Logger logger = L ogManager. getLogger( ""); | |
| 81 | pr ivate Sele ctItem sel ectSites = new Selec tItem(); | |
| 82 | pr ivate fina l Label we lcomeMessa geLabel = new Label( ); | |
| 83 | pr ivate fina l Map<Stri ng, AwivSi te> sitesB yId = new HashMap<St ring, Awiv Site>(); | |
| 84 | pr ivate fina l Map<Stri ng, AwivSi te> sitesB yName = ne w HashMap< String, Aw ivSite>(); | |
| 85 | pr ivate fina l HLayout loginLayou t = new HL ayout(); | |
| 86 | pr ivate Awiv Site selec tedSite = null; | |
| 87 | pr ivate fina l UserAuth enticatedE vent userA uthenticat edEvent; | |
| 88 | pr ivate fina l String s pecifiedSi teNumber; | |
| 89 | pr ivate fina l Password Item acces sCode = ne w Password Item(); | |
| 90 | pr ivate fina l Password Item verif yCode = ne w Password Item(); | |
| 91 | pr ivate fina l DynamicF orm loginF orm = new DynamicFor m(); | |
| 92 | pr ivate fina l IButton loginButto n = new IB utton("OK" ); | |
| 93 | pr ivate fina l Label br owserWarni ng = new L abel(); | |
| 94 | ||
| 95 | pu blic Authe nticateUse rDialog(Us erAuthenti catedEvent userAuthe nticatedEv ent, Strin g specifie dSiteNumbe r) | |
| 96 | { | |
| 97 | supe r(); | |
| 98 | this .userAuthe nticatedEv ent = user Authentica tedEvent; | |
| 99 | this .specified SiteNumber = specifi edSiteNumb er; | |
| 100 | setW idth(550); | |
| 101 | setH eight(500) ; | |
| 102 | setA utoSize(tr ue); | |
| 103 | setT itle("Vist A Imaging AWIV - Log in"); | |
| 104 | setH eaderIcon( Location.g etProtocol () + "//" + Location .getHost() + "/Awiv/ images/cco w_broken16 .gif"); | |
| 105 | setS howMinimiz eButton(fa lse); | |
| 106 | setS howCloseBu tton(false ); | |
| 107 | setI sModal(tru e); | |
| 108 | setS howModalMa sk(true); | |
| 109 | cent erInPage() ; | |
| 110 | ||
| 111 | Labe l introLab el = new L abel(); | |
| 112 | intr oLabel.set Margin(2); | |
| 113 | intr oLabel.set Width100() ; | |
| 114 | intr oLabel.set Height(20) ; | |
| 115 | intr oLabel.set Align(Alig nment.CENT ER); | |
| 116 | intr oLabel.set Contents(" Welcome to the VistA Imaging A dvanced We b Image Vi ewer (AWIV ). This pr ovides acc ess to ima ges stored at VA sit es in Vist A Imaging and images stored in the DoD." + | |
| 117 | "<br><br >To begin select an authentica tion site from the l ist below. This must be a site at which you have a n account (access an d verify c odes)."); | |
| 118 | ||
| 119 | fina l DynamicF orm form = new Dynam icForm(); | |
| 120 | form .setTitleO rientation (TitleOrie ntation.LE FT); | |
| 121 | form .setNumCol s(2); | |
| 122 | sele ctSites.se tTitle("Se lect Authe ntication Site"); | |
| 123 | sele ctSites.se tAddUnknow nValues(fa lse); | |
| 124 | sele ctSites.se tTitleAlig n(Alignmen t.RIGHT); | |
| 125 | sele ctSites.se tWrapTitle (false); | |
| 126 | ||
| 127 | form .setFields (selectSit es); | |
| 128 | ||
| 129 | welc omeMessage Label.setC ontents("" ); | |
| 130 | welc omeMessage Label.setW idth100(); | |
| 131 | welc omeMessage Label.setH eight(280) ; | |
| 132 | welc omeMessage Label.setA lign(Align ment.CENTE R); | |
| 133 | welc omeMessage Label.setV align(Vert icalAlignm ent.CENTER ); | |
| 134 | welc omeMessage Label.setO verflow(Ov erflow.AUT O); | |
| 135 | welc omeMessage Label.setB order("2px solid dim gray"); | |
| 136 | ||
| 137 | fina l IButton selectSite Button = n ew IButton ("OK"); | |
| 138 | sele ctSiteButt on.setDisa bled(true) ; | |
| 139 | sele ctSites.ad dChangedHa ndler(new ChangedHan dler() | |
| 140 | { | |
| 141 | @Overr ide | |
| 142 | public void onCh anged(Chan gedEvent e vent) | |
| 143 | { | |
| 144 | selectSi teButton.s etDisabled (false); | |
| 145 | clearWel comeMessag e(); | |
| 146 | } | |
| 147 | }); | |
| 148 | // a dd handler for the e nter key i f the user presses i t when on the select site combo box to se lect that site | |
| 149 | sele ctSites.ad dKeyPressH andler(new KeyPressH andler() | |
| 150 | { | |
| 151 | @Overr ide | |
| 152 | public void onKe yPress(Key PressEvent event) | |
| 153 | { | |
| 154 | if(AwivC onstants.e nterButton KeyName.eq uals(event .getKeyNam e())) | |
| 155 | { | |
| 156 | selectSite (); | |
| 157 | } | |
| 158 | } | |
| 159 | }); | |
| 160 | ||
| 161 | logi nForm.setW rapItemTit les(false) ; | |
| 162 | logi nForm.setM argin(2); | |
| 163 | logi nForm.setT itleOrient ation(Titl eOrientati on.LEFT); | |
| 164 | ||
| 165 | acce ssCode.set Title("Acc ess Code") ; | |
| 166 | acce ssCode.set Required(t rue); | |
| 167 | acce ssCode.set Type("pass word"); | |
| 168 | ||
| 169 | // i f the user puts the access cod e and veri fy code in to the acc ess code f ield separ ated by a semicolon | |
| 170 | // t hen captur e the ente r key pres s made fro m this fie ld | |
| 171 | acce ssCode.add KeyPressHa ndler(new KeyPressHa ndler() | |
| 172 | { | |
| 173 | @Overr ide | |
| 174 | public void onKe yPress(Key PressEvent event) | |
| 175 | { | |
| 176 | if(AwivC onstants.e nterButton KeyName.eq uals(event .getKeyNam e())) | |
| 177 | { | |
| 178 | loginUser( ); | |
| 179 | } | |
| 180 | } | |
| 181 | }); | |
| 182 | ||
| 183 | veri fyCode.set Title("Ver ify Code") ; | |
| 184 | veri fyCode.set Required(t rue); | |
| 185 | veri fyCode.set Type("pass word"); | |
| 186 | ||
| 187 | veri fyCode.add KeyPressHa ndler(new KeyPressHa ndler() | |
| 188 | { | |
| 189 | @Overr ide | |
| 190 | public void onKe yPress(Key PressEvent event) | |
| 191 | { | |
| 192 | if(AwivC onstants.e nterButton KeyName.eq uals(event .getKeyNam e())) | |
| 193 | { | |
| 194 | loginUser( ); | |
| 195 | } | |
| 196 | } | |
| 197 | }); | |
| 198 | ||
| 199 | logi nForm.setF ields(acce ssCode, ve rifyCode); | |
| 200 | ||
| 201 | sele ctSiteButt on.addClic kHandler(n ew ClickHa ndler() | |
| 202 | { | |
| 203 | ||
| 204 | @Overr ide | |
| 205 | public void onCl ick(ClickE vent event ) | |
| 206 | { | |
| 207 | /* | |
| 208 | Object v alue = sel ectSites.g etValue(); | |
| 209 | if(value != null) | |
| 210 | { | |
| 211 | String sit eNumber = value.toSt ring(); | |
| 212 | logger.inf o("User se lected sit e '" + sit eNumber + "'."); | |
| 213 | AwivSite a wivSite = sites.get( siteNumber ); | |
| 214 | if(awivSit e != null) | |
| 215 | { | |
| 216 | lo adWelcomeM essage(awi vSite); | |
| 217 | se tAccessCod eFocus(); | |
| 218 | } | |
| 219 | else | |
| 220 | cl earWelcome Message(); | |
| 221 | } | |
| 222 | else | |
| 223 | { | |
| 224 | clearWelco meMessage( ); | |
| 225 | } | |
| 226 | */ | |
| 227 | selectSi te(); | |
| 228 | } | |
| 229 | }); | |
| 230 | ||
| 231 | logi nButton.ad dClickHand ler(new Cl ickHandler () | |
| 232 | { | |
| 233 | ||
| 234 | @Overr ide | |
| 235 | public void onCl ick(ClickE vent event ) | |
| 236 | { | |
| 237 | loginUse r(); | |
| 238 | } | |
| 239 | }); | |
| 240 | ||
| 241 | brow serWarning .setWidth1 00(); | |
| 242 | brow serWarning .setHeight (22); | |
| 243 | brow serWarning .setStyleN ame("Brows er-Warning "); | |
| 244 | brow serWarning .setConten ts("WARNIN G: Your br owser is n ot support ed for vie wing image s. You can continue to view pa tient stud ies howeve r you will not be ab le to view images us ing the AW IV unless you are us ing Intern et Explore r"); | |
| 245 | ||
| 246 | brow serWarning .setVisibl e(false);/ /!AwivHelp er.isBrows erIE()); | |
| 247 | ||
| 248 | HLay out select SiteLayout = new HLa yout(); | |
| 249 | sele ctSiteLayo ut.setMarg in(2); | |
| 250 | sele ctSiteLayo ut.setWidt h100(); | |
| 251 | sele ctSiteLayo ut.setHeig ht(20); | |
| 252 | sele ctSiteLayo ut.addMemb er(form); | |
| 253 | sele ctSiteLayo ut.addMemb er(selectS iteButton) ; | |
| 254 | //se lectSiteLa yout.setBa ckgroundCo lor("orang e"); | |
| 255 | ||
| 256 | logi nLayout.se tWidth100( ); | |
| 257 | logi nLayout.ad dMember(lo ginForm); | |
| 258 | logi nLayout.ad dMember(lo ginButton) ; | |
| 259 | logi nLayout.se tMargin(2) ; | |
| 260 | //lo ginLayout. setBackgro undColor(" green"); | |
| 261 | ||
| 262 | VL ayout layo ut = new V Layout(); | |
| 263 | la yout.setHe ight100(); | |
| 264 | la yout.setWi dth100(); | |
| 265 | ||
| 266 | la yout.addMe mber(intro Label); | |
| 267 | la yout.addMe mber(selec tSiteLayou t); | |
| 268 | la yout.addMe mber(welco meMessageL abel); | |
| 269 | la yout.addMe mber(login Layout); | |
| 270 | la yout.addMe mber(brows erWarning) ; | |
| 271 | ||
| 272 | lo ginLayout. setVisible (false); | |
| 273 | ||
| 274 | th is.addItem (layout); | |
| 275 | Sc heduler.ge t().schedu leDeferred (new Sched uler.Sched uledComman d () { | |
| 276 | publ ic void ex ecute () | |
| 277 | { | |
| 278 | loadAu thenticati onSites(); | |
| 279 | if(Aut henticateU serDialog. this.speci fiedSiteNu mber == nu ll) | |
| 280 | form.foc usInItem(s electSites ); | |
| 281 | } | |
| 282 | }); | |
| 283 | } | |
| 284 | ||
| 285 | pr ivate void selectSit e() | |
| 286 | { | |
| 287 | Obje ct value = selectSit es.getValu e(); | |
| 288 | if(v alue != nu ll) | |
| 289 | { | |
| 290 | String siteName = value.to String(); | |
| 291 | logger .info("Use r selected site '" + siteName + "'."); | |
| 292 | AwivSi te awivSit e = sitesB yName.get( siteName); | |
| 293 | if(awi vSite != n ull) | |
| 294 | { | |
| 295 | loadWelc omeMessage (awivSite) ; | |
| 296 | setAcces sCodeFocus (); | |
| 297 | } | |
| 298 | else | |
| 299 | clearWel comeMessag e(); | |
| 300 | } | |
| 301 | else | |
| 302 | { | |
| 303 | clearW elcomeMess age(); | |
| 304 | } | |
| 305 | } | |
| 306 | ||
| 307 | pr ivate void setAccess CodeFocus( ) | |
| 308 | { | |
| 309 | Sche duler.get( ).schedule Deferred(n ew Schedul er.Schedul edCommand () { | |
| 310 | publ ic void ex ecute () | |
| 311 | { | |
| 312 | loginF orm.focusI nItem(acce ssCode); | |
| 313 | } | |
| 314 | }); | |
| 315 | } | |
| 316 | ||
| 317 | pr ivate void loginUser () | |
| 318 | { | |
| 319 | logi nButton.se tDisabled( true); | |
| 320 | Stri ng transac tionId = U UID.uuid() ; | |
| 321 | logg er.info("A uthenticat ing user t o site '" + selected Site.getSi teNumber() + "' with transacti on Id '" + transacti onId + "'. "); | |
| 322 | User Authentica tionDao.us erAuthenti cationDao. authentica teUser(tra nsactionId , selected Site.getSi teNumber() , | |
| 323 | accessCo de.getValu eAsString( ), verifyC ode.getVal ueAsString (), new As yncCallbac k<Boolean> () | |
| 324 | { | |
| 325 | ||
| 326 | @Override | |
| 327 | public voi d onSucces s(Boolean arg0) | |
| 328 | { | |
| 329 | Au thenticate UserDialog .this.user Authentica tedEvent.o nUserAuthe nticated() ; | |
| 330 | } | |
| 331 | ||
| 332 | @Override | |
| 333 | public voi d onFailur e(Throwabl e arg0) | |
| 334 | { | |
| 335 | lo ginButton. setDisable d(false); | |
| 336 | lo gger.error ("Error au thenticati ng user, " + arg0.ge tMessage() ); | |
| 337 | if (!AwivExce ptionHandl er.handleS erviceExce ption(arg0 )) | |
| 338 | { | |
| 339 | if(a rg0 instan ceof AwivI nvalidUser Credential sException ) | |
| 340 | { | |
| 341 | SC.war n("There w as an erro r authenti cating you r access a nd verify codes with the speci fied site. <br>This might have been caus ed by ente ring incor rect acces s and veri fy codes o r selectin g a site y ou do not have crede ntials at. ", | |
| 342 | new Boolea nCallback( ) | |
| 343 | { | |
| 344 | @Overrid e | |
| 345 | public v oid execut e(Boolean value) | |
| 346 | { | |
| 347 | accessCode .setValue( ""); | |
| 348 | verifyCode .setValue( ""); | |
| 349 | setAccessC odeFocus() ; | |
| 350 | } | |
| 351 | }); | |
| 352 | } | |
| 353 | else if(arg0 i nstanceof AwivCreden tialsExpir edExceptio n) | |
| 354 | { | |
| 355 | SC.war n("Your ve rify code has expire d. Please use anothe r applicat ion (such as CPRS or VistA Ima ging Clini cal Displa y) to chan ge your Ve rify code and then l ogin again .", | |
| 356 | new Boolea nCallback( ) | |
| 357 | { | |
| 358 | @Overrid e | |
| 359 | public v oid execut e(Boolean value) | |
| 360 | { | |
| 361 | accessCode .setValue( ""); | |
| 362 | verifyCode .setValue( ""); | |
| 363 | setAccessC odeFocus() ; | |
| 364 | } | |
| 365 | }); | |
| 366 | } | |
| 367 | else | |
| 368 | { | |
| 369 | // som e other er ror | |
| 370 | SC.war n("There w as an erro r authenti cating you r access a nd verify codes with the speci fied site. <br>Pleas e try agai n, if the error pers ists conta ct your ad ministrato r.<br><br> " + arg0.g etMessage( ), | |
| 371 | new Boolea nCallback( ) | |
| 372 | { | |
| 373 | @Overrid e | |
| 374 | public v oid execut e(Boolean value) | |
| 375 | { | |
| 376 | accessCode .setValue( ""); | |
| 377 | verifyCode .setValue( ""); | |
| 378 | setAccessC odeFocus() ; | |
| 379 | } | |
| 380 | }); | |
| 381 | } | |
| 382 | } | |
| 383 | } | |
| 384 | }); | |
| 385 | } | |
| 386 | ||
| 387 | pr ivate void clearWelc omeMessage () | |
| 388 | { | |
| 389 | acce ssCode.set Value(""); | |
| 390 | veri fyCode.set Value(""); | |
| 391 | welc omeMessage Label.setC ontents(" "); | |
| 392 | logi nLayout.se tVisible(f alse); | |
| 393 | } | |
| 394 | ||
| 395 | /* * | |
| 396 | * Load and display th e welcome message fo r the spec ified site | |
| 397 | * @param aw ivSite | |
| 398 | * / | |
| 399 | pr ivate void loadWelco meMessage( final Awiv Site awivS ite) | |
| 400 | { | |
| 401 | sele ctedSite = awivSite; | |
| 402 | clea rWelcomeMe ssage(); | |
| 403 | welc omeMessage Label.setC ontents("L oading wel come messa ge from si te"); | |
| 404 | //Wa itDialog.d isplayWait Dialog("Lo ading Welc ome Messag e", "Pleas e wait whi le loading welcome m essage"); | |
| 405 | St ring trans actionId = UUID.uuid (); | |
| 406 | lo gger.info( "Retrievin g welcome message fr om site '" + awivSit e.getSiteN umber() + "' with tr ansaction Id '" + tr ansactionI d + "'."); | |
| 407 | ||
| 408 | Us erAuthenti cationDao. userAuthen ticationDa o.getWelco meMessage( transactio nId, awivS ite.getSit eNumber(), | |
| 409 | new As yncCallbac k<AwivWelc omeMessage >() | |
| 410 | { | |
| 411 | ||
| 412 | @Overr ide | |
| 413 | public void onSu ccess(Awiv WelcomeMes sage welco meMessage) | |
| 414 | { | |
| 415 | loginLay out.setVis ible(true) ; | |
| 416 | //WaitDi alog.hideW aitDialog( ); | |
| 417 | welcomeM essageLabe l.setConte nts(welcom eMessage.g etWelcomeM essage()); | |
| 418 | selectSi tes.setVal ue(awivSit e.toString ()); // th is is to e nsure the displayed site match es the wel come messa ge | |
| 419 | setAcces sCodeFocus (); | |
| 420 | } | |
| 421 | ||
| 422 | @Overr ide | |
| 423 | public void onFa ilure(Thro wable arg0 ) | |
| 424 | { | |
| 425 | //WaitDi alog.hideW aitDialog( ); | |
| 426 | logger.e rror("Erro r loading welcome me ssage, " + arg0.getM essage()); | |
| 427 | if(!Awiv ExceptionH andler.han dleService Exception( arg0)) | |
| 428 | { | |
| 429 | welcomeMes sageLabel. setContent s("There w as an erro r retrievi ng the wel come messa ge from Vi stA, pleas e try agai n. If the error per sists plea se contact your syst em adminis trator.<hr />Error De tails:<br />" + arg0 .getMessag e()); | |
| 430 | } | |
| 431 | } | |
| 432 | }); | |
| 433 | } | |
| 434 | ||
| 435 | /* * | |
| 436 | * Load and display th e list of authentica tion sites | |
| 437 | * / | |
| 438 | pr ivate void loadAuthe nticationS ites() | |
| 439 | { | |
| 440 | Wa itDialog.d isplayWait Dialog("Lo ading Auth entication Sites", " Please wai t while lo ading auth entication sites"); | |
| 441 | St ring trans actionId = UUID.uuid (); | |
| 442 | lo gger.info( "Retrievin g list of user authe ntication lookup sit es with tr ansaction Id '" + tr ansactionI d + "'."); | |
| 443 | Us erAuthenti cationDao. userAuthen ticationDa o.getUserA uthenticat ionSites(t ransaction Id, new As yncCallbac k<AwivAuth entication SitesInfor mation>() | |
| 444 | { | |
| 445 | ||
| 446 | @Overr ide | |
| 447 | public void onSu ccess(Awiv Authentica tionSitesI nformation awivAuthe nticationS itesInform ation) | |
| 448 | { | |
| 449 | WaitDial og.hideWai tDialog(); | |
| 450 | // make the browse r warning visible if not IE an d if IE is required | |
| 451 | browserW arning.set Visible(aw ivAuthenti cationSite sInformati on.getAwiv ServerInfo rmation(). isIeOnly() && !AwivH elper.isBr owserIE()) ; | |
| 452 | ||
| 453 | sitesByI d.clear(); | |
| 454 | sitesByN ame.clear( ); | |
| 455 | LinkedHa shMap<Stri ng, String > linkedSi tes = new LinkedHash Map<String , String>( ); | |
| 456 | for(Awiv Site awivS ite : awiv Authentica tionSitesI nformation .getAwivSi tes()) | |
| 457 | { | |
| 458 | sitesById. put(awivSi te.getSite Number(), awivSite); | |
| 459 | sitesByNam e.put(awiv Site.toStr ing(), awi vSite); | |
| 460 | //linkedSi tes.put(aw ivSite.get SiteNumber (), awivSi te.toStrin g()); | |
| 461 | // JMW 7/2 5/2012 P12 4, IE 9 do es the sor ting based on the ke y, not the value. Pu tting the value into the key t o get the right sort ing | |
| 462 | linkedSite s.put(awiv Site.toStr ing(), awi vSite.toSt ring()); | |
| 463 | } | |
| 464 | ||
| 465 | selectSi tes.setVal ueMap(link edSites); | |
| 466 | ||
| 467 | if(speci fiedSiteNu mber != nu ll) | |
| 468 | { | |
| 469 | AwivSite s ite = site sById.get( specifiedS iteNumber) ; | |
| 470 | if(site != null) | |
| 471 | { | |
| 472 | se lectSites. setValue(s ite.toStri ng()); | |
| 473 | lo adWelcomeM essage(sit e); | |
| 474 | } | |
| 475 | } | |
| 476 | } | |
| 477 | ||
| 478 | @Overr ide | |
| 479 | public void onFa ilure(Thro wable arg0 ) | |
| 480 | { | |
| 481 | WaitDial og.hideWai tDialog(); | |
| 482 | logger.e rror("Erro r loading user authe ntication lookup sit es, " + ar g0.getMess age()); | |
| 483 | if(!Awiv ExceptionH andler.han dleService Exception( arg0)) | |
| 484 | { | |
| 485 | AwivHelper .displayEr rorMessage ("Error lo ading auth entication sites", a rg0); | |
| 486 | } | |
| 487 | } | |
| 488 | }); | |
| 489 | } | |
| 490 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.