55. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/24/2017 5:17:19 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.

55.1 Files compared

# Location File Last Modified
1 MHV_2017.2.0.0 Code In Flight.zip\National Portal\mhv_user\mhv-usermgmt-portal-portlet\src\main\java\gov\va\med\mhv\usermgmt\web\controller ChangeTemporayPasswordController.java Fri Sep 16 15:30:26 2016 UTC
2 MHV_2017.2.0.0 Code In Flight.zip\National Portal\mhv_user\mhv-usermgmt-portal-portlet\src\main\java\gov\va\med\mhv\usermgmt\web\controller ChangeTemporayPasswordController.java Fri Mar 24 20:45:55 2017 UTC

55.2 Comparison summary

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

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

55.4 Active regular expressions

No regular expressions were active.

55.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.m hv.usermgm t.web.cont roller;
  5  
  6   import gov .va.med.mh v.common.a pi.dto.Use rProfileDT O;
  7   import gov .va.med.mh v.common.a pi.excepti on.MHVExce ption;
  8   import gov .va.med.mh v.usermgmt .web.formb ean.Change Password;
  9  
  10   import jav a.io.IOExc eption;
  11   import jav a.io.Seria lizable;
  12  
  13   import jav ax.faces.b ean.Manage dBean;
  14   import jav ax.faces.c ontext.Fac esContext;
  15   import jav ax.faces.e vent.Compo nentSystem Event;
  16   import jav ax.portlet .PortletRe quest;
  17  
  18   import org .springfra mework.con text.annot ation.Scop e;
  19   import org .springfra mework.ste reotype.Co mponent;
  20  
  21   import com .liferay.p ortal.kern el.log.Log ;
  22   import com .liferay.p ortal.kern el.log.Log FactoryUti l;
  23   /**
  24    * @author  
P II
  25    * 
  26    */
  27   @ManagedBe an
  28   @Component
  29   @Scope("se ssion")
  30   public cla ss ChangeT emporayPas swordContr oller exte nds Abstra ctControll er impleme nts
  31                    Seri alizable {
  32  
  33           pr ivate stat ic final l ong serial VersionUID  = -919187 5686222494 443L;
  34  
  35           st atic Log l ogger = Lo gFactoryUt il
  36                             .getLo g(ChangeTe mporayPass wordContro ller.class );
  37  
  38           
  39           pr ivate Chan gePassword  changePas sword = ne w ChangePa ssword();
  40  
  41           pr ivate Stri ng success Message =  null;
  42           
  43           
  44           pr ivate Stri ng changeM essage="sh ow";
  45  
  46  
  47  
  48  
  49           
  50           pu blic void  viewContro l(Componen tSystemEve nt event)  {
  51                    
  52                    Port letRequest  request =  (PortletR equest) Fa cesContext
  53                                      .getCurr entInstanc e().getExt ernalConte xt().getRe quest();
  54           
  55                    if ( request.ge tUserPrinc ipal() ==  null) {
  56                             FacesC ontext con text = Fac esContext. getCurrent Instance() ;
  57                             contex t.getAppli cation().g etNavigati onHandler( )
  58                                               .handleNav igation(co ntext, nul l, "uanuth orized.xht ml");
  59                    } 
  60                    if ( FacesConte xt.getCurr entInstanc e().isPost back()) {
  61                             change Message=nu ll;
  62                    }
  63           }
  64  
  65           pu blic Strin g updatePa ssword() {
  66                    Face sContext c ontext = F acesContex t.getCurre ntInstance ();
  67  
  68                    logg er.info("= =======ins ide update  Temporary  Password( )========= === " + ge tUserScree nName());
  69  
  70                    
  71                    User ProfileDTO  userProfi le = getUs erProfile( getUserScr eenName()) ;
  72                    user Profile.se tPassword( this.chang ePassword. getNewPass word());
  73                    user Profile.se tConfPassw ord(this.c hangePassw ord.getCon firmNewPas sword());
  74                    user Profile.se tOldPasswo rd(this.ch angePasswo rd.getCurr entPasswor d());
  75                    vali datePasswo rd(userPro file,true) ;
  76                    
  77                    if(  FacesConte xt.getCurr entInstanc e().getMes sageList() .size() >  0 ) {
  78                             return  null;
  79                    }
  80  
  81                    try  {
  82                             logger .debug("Ch angeTempPa sswordCont roller - s avePasswor d start");
  83                             
  84                             this.u serMgmtSer vice.chang eTemporary Password(u serProfile ,Boolean.F ALSE);
  85                             
  86                             logger .debug("Ch angeTempPa sswordCont roller - s avePasswor d -success ");
  87                             
  88                             this.s uccessMess age = "suc cess";
  89                             
  90                    } ca tch (MHVEx ception e)  {
  91                             super. processErr orMessages (e);
  92                             return  null;
  93                    } ca tch (Excep tion e) {
  94                             this.s uccessMess age = "fai lure";
  95                             logger .debug("Ch angeTempPa sswordCont roller - s avePasswor d - fail") ;
  96                             logger .debug("Ch angeTempPa sswordCont roller - e xception "
  97                                               + e.getMes sage());
  98                             
  99                             logger .error(e);
  100                             
  101                    }
  102  
  103                    logg er.info("s uccessMess age : " +  successMes sage);
  104  
  105                    try  {
  106                             contex t.getExter nalContext ().redirec t(getHomeU RL());
  107                    } ca tch (IOExc eption e)  {
  108                             
  109                             
  110                    }
  111                    
  112                    retu rn null;
  113           }
  114  
  115  
  116           pu blic Chang ePassword  getChangeP assword()  {
  117                    retu rn changeP assword;
  118           }
  119  
  120           pu blic void  setChangeP assword(Ch angePasswo rd changeP assword) {
  121                    this .changePas sword = ch angePasswo rd;
  122           }
  123           
  124  
  125           pu blic Strin g getSucce ssMessage( ) {
  126                    retu rn success Message;
  127           }
  128  
  129           pu blic Strin g getChang eMessage()  {
  130                    retu rn changeM essage;
  131           }
  132  
  133           pu blic void  setChangeM essage(Str ing change Message) {
  134                    this .changeMes sage = cha ngeMessage ;
  135           }
  136  
  137   }