33. Araxis Merge File Comparison Report

Produced by Araxis Merge on Fri Jun 13 14:30:55 2008 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

33.1 Files compared

# Location File Last Modified
1 Fri Jun 13 14:30:55 2008 UTC
2 C:\devel_jahia\corp_V2TemplatesSP4\src\jsp\box savedsearch.inc Fri Jun 13 14:30:10 2008 UTC

33.2 Comparison summary

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

33.3 Comparison options

Whitespace All differences in whitespace within lines are ignored
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

33.4 Active regular expressions

No regular expressions were active.

33.5 Comparison detail

        1   <%--
        2   Copyright  2002-2006  Jahia Ltd
        3  
        4   Licensed u nder the J AHIA COMMO N DEVELOPM ENT AND DI STRIBUTION  LICENSE ( JCDDL), 
        5   Version 1. 0 (the "Li cense"), o r (at your  option) a ny later v ersion; yo u may 
        6   not use th is file ex cept in co mpliance w ith the Li cense. You  should ha ve 
        7   received a  copy of t he License  along wit h this pro gram; if n ot, you ma y obtain 
        8   a copy of  the Licens e at 
        9  
        10    http://ww w.jahia.or g/license/
        11  
        12   Unless req uired by a pplicable  law or agr eed to in  writing, s oftware 
        13   distribute d under th e License  is distrib uted on an  "AS IS" B ASIS, 
        14   WITHOUT WA RRANTIES O R CONDITIO NS OF ANY  KIND, eith er express  or implie d. 
        15   See the Li cense for  the specif ic languag e governin g permissi ons and 
        16   limitation s under th e License.
        17   --%><bean: parameter  id="displa yDetails"  name="disp layDetails " value="f alse"/>
        18   <content:c ontainerLi st name='< %="savedSe arch" + id %>' id="sa vedSearch"  parentCon tainerName ="boxConta iner">
        19       <conte nt:contain er id="sav edSearchCo ntainer" c ache="off" >
        20           <j ahiaHtml:a ctionMenu  name="save dSearchCon tainer" na mePostFix= ".savedSea rch"
        21                resource Bundle="ja hiatemplat es.Corpora te_portal_ templates_ v2"
        22                useField Set="true" >
        23           <%
        24           Co ntainerBea n savedSea rchContain erBean = ( ContainerB ean) pageC ontext.fin dAttribute ("savedSea rchContain er");
        25           Ja hiaContain er savedSe archContai ner = save dSearchCon tainerBean .getJahiaC ontainer() ;
        26           St ring fullS avedSearch  = savedSe archContai ner.getFie ldValue("s earch");
        27           //  parse the  fullSaved Search to  get the id
        28           in t startInd ex = fullS avedSearch .lastIndex Of("(");
        29           in t lastInde x = fullSa vedSearch. lastIndexO f(")");
        30           in t savedSea rchId = -1 ;
        31           in t maxPageI tems = 10;
        32           St ring  maxP ageItemsSt r = savedS earchConta iner.getFi eldValue(" maxFiles", "10");
        33           St ring saved SearchIdSt r = "-1";
        34           tr y {
        35                maxPageI tems = Int eger.parse Int(maxPag eItemsStr) ;
        36           }  catch (Num berFormatE xception n fe) {
        37                logger.d ebug("Coul d not get  maxPageIte ms: " + nf e);
        38           }
        39           lo gger.debug ("maxPageI tems is "  + maxPageI tems);
        40           if  (startInd ex != -1 & & lastInde x != -1) {
        41                savedSea rchIdStr =  fullSaved Search.sub string(sta rtIndex+1, lastIndex) ;
        42                try {
        43                    save dSearchId  = Integer. parseInt(s avedSearch IdStr);
        44                } catch  (NumberFor matExcepti on nfe) {
        45                    logg er.debug(" Could not  get savedS earchId: "  + nfe);
        46                }
        47           }
        48           if  (savedSea rchId != - 1) {
        49                JahiaSav edSearch j ahiaSavedS earch = Se rvicesRegi stry.getIn stance().g etJahiaSea rchService ()
        50                    .get SavedSearc hManager() .getSavedS earch(save dSearchId) ;
        51                if (jahi aSavedSear ch != null ) {
        52                    logg er.debug(" jahiaSaved Search tit le is " +  jahiaSaved Search.get Title());
        53                    Stri ng session AttributeN ame = "sav edSearch_"  + savedSe archIdStr;
        54                    if ( sessionAtt ributeName .equals(re quest.getP arameter(" flushsessi on"))) {
        55                         request.ge tSession() .removeAtt ribute(ses sionAttrib uteName);
        56                    }
        57                    // t ry to get  JahiaSearc hResult fr om session
        58                    if ( jahiaSaved Search.get SearchMode () == Sear chViewHand ler.SEARCH _MODE_WEBD AV) {
        59                         logger.deb ug("Search  mode is W EBDAV");
        60                         %><a href= "<%=bypass Url%>?flus hsession=< %=sessionA ttributeNa me%>"
        61                             title= '<content: resourceBu ndle resou rceBundle= "jahiatemp lates.Corp orate_port al_templat es_v2"
        62                             resour ceName="re fresh"/>'>
        63                         <img src=" <content:c ontextURL/ >/img/refr esh.gif" b order="0"  width="16"  height="1 6" alt="re fresh"/>
        64                         </a><%
        65  
        66                         JahiaSearc hResult se archResult s =
        67                             (Jahia SearchResu lt) reques t.getSessi on().getAt tribute(se ssionAttri buteName);
        68                         if (search Results ==  null) {
        69                             search Results =  ServicesRe gistry.get Instance() .getJahiaS earchServi ce()
        70                                      .webdavD ASLSearch( jahiaSaved Search.get Query(),jP arams,
        71                                          new  WebDavSear chResultBu ilderImpl( ));
        72                             if (se archResult s != null)  {
        73                                 re quest.getS ession().s etAttribut e(sessionA ttributeNa me,searchR esults);
        74                             }
        75                         }
        76                         if (search Results !=  null) {
        77                                 re quest.setA ttribute(  "searchRes ultList",  new Search ResultList (searchRes ults) );
        78                             org.ja hia.utils. displaytag .CaseInsen sitiveComp arator com parator =
        79                                 ne w org.jahi a.utils.di splaytag.C aseInsensi tiveCompar ator(reque st.getLoca le());
        80  
        81                                 St ring rowId  = "saved_ " + (new I nteger(sav edSearchCo ntainer.ge tID())).to String();
        82                                 %>
        83                                 <d isplay:tab le name="s earchResul tList" cla ss="search ResultList ing" pages ize="<%=ma xPageItems %>"
        84                                      requestU RI='<%=byp assUrl + " ?screen=na viguate_re sult"%>' i d="<%=rowI d%>"
        85                                      decorato r="org.jah ia.service s.search.s lide.decor ator.Searc hResultLis tItemWrapp er"
        86                                      defaults ort="1">
        87                                      <%
        88                                      if (page Context.ge tAttribute (rowId) !=  null) {
        89                                          %>
        90                                      <bean:de fine id="d avFile" na me="<%=row Id%>" prop erty="davF ile"/>
        91                                      <%
        92                                      DAVFileA ccess dfa  = (DAVFile Access) pa geContext. getAttribu te("davFil e");
        93                                      JahiaFil eField jff  = dfa.get JahiaFileF ield();
        94                                      String c urrentName  = dfa.get Name();
        95                                      String e xtention =  "file";
        96                                      if (curr entName !=  null) {
        97                                          exte ntion = cu rrentName. substring( currentNam e.lastInde xOf(".")+1 ,
        98                                               currentNam e.length() );
        99                                      }
        100                                      %>
        101  
        102                                      <!--disp lay:column  property= "ranking"  title='<%= getResourc eBundle("s earch.rank ","Ranking ",jData)%> ' sortable ="true"/-- >
        103                                      <display :column ti tle='<%=ge tResourceB undle("sea rch.file", "File",jDa ta)%>' sor table="tru e" sortPro perty="fil eName" com parator="< %= compara tor %>">
        104                                          <!-- <%=current Name%>-->< a href='<% =jff.getDo wnloadUrl( )%>' class ="<%=exten tion%>"
        105                                               target="_b lank"><%=c urrentName %></a>
        106                                      </displa y:column>
        107                                      <logic:e qual name= "displayDe tails" val ue="true">
        108                                          <dis play:colum n property ="author"  title='<%= getResourc eBundle("s earch.auth or","Autho r",jData)% >' sortabl e="true" c omparator= "<%= compa rator %>"  />
        109                                          <!-- display:co lumn prope rty="lastC ontributor " title='< %=getResou rceBundle( "search.la stAuthor", "Last auth or",jData) %>' sortab le="true"  comparator ="<%= comp arator %>"  /-->
        110                                          <dis play:colum n property ="shortCre ationDate"
        111                                               title='<%= getResourc eBundle("s earch.crea tionDate", "Creation  date",jDat a)%>' sort able="true "/>
        112                                          <!-- display:co lumn prope rty="short Modificati onDate"
        113                                               title='<%= getResourc eBundle("s earch.last Modificati onDate","L ast modifi cation dat e",jData)% >'
        114                                               sortable=" true"/-->
        115                                          <!-- display:co lumn prope rty="mimeT ype" title ='<%=getRe sourceBund le("search .mimeType" ,"Mime typ e",jData)% >' sortabl e="true" c omparator= "<%= compa rator %>"  /-->
        116                                          <dis play:colum n property ="fileSize " title='< %=getResou rceBundle( "search.si ze","Size" ,jData)%>'  sortable= "true"  so rtProperty ="size"/>
        117                                               <display:c olumn sort able="fals e">
        118                                                   <a hre f="javascr ipt:OpenJa hiaWindow( '<%=contex tUrl%>/doc info.jsp?d faId=<%=en code(dfa.g etFileId() )%>&amp;cu rrentPageI d=<%=curre ntPageId%> &amp;siteI d=<%=siteI d%>','Prop erties', 4 09, 600)"  title="Inf o"><img sr c="<%=cont extUrl%>/i mg/about.g if" width= "16" heigh t="16" bor der="0"/>< /a>
        119                                               </display: column>
        120                                          <dis play:setPr operty nam e="basic.e mpty.showt able" valu e="true" / >
        121                                      </logic: equal>
        122                                      <%
        123                                 }
        124                                 %>
        125                                 </ display:ta ble>
        126                                 <%
        127                         }
        128                    } el se if (jah iaSavedSea rch.getSea rchMode()  == SearchV iewHandler .SEARCH_MO DE_WEBSITE ) {
        129                         logger.deb ug("Search  mode is W EBSITE");
        130                         HashMap se archMap =  new HashMa p() ;
        131                         searchMap. put("scree n","execut e");
        132                         request.se tAttribute ("engineMa p",searchM ap) ;
        133  
        134                         AdvSearchV iewHandler  searchHan dler = new   AdvSearc hViewHandl er();
        135                         searchHand ler.change Mode(Searc hViewHandl er.SEARCH_ MODE_WEBSI TE);
        136                         searchHand ler.useSav edSearch(j Params,jah iaSavedSea rch);
        137                         searchHand ler.update (jParams,e ngineMap);
        138                         JahiaSearc hResult se archResult s = search Handler.se arch(jPara ms);
        139                         /*
        140                         searchResu lts = Serv icesRegist ry.getInst ance().get JahiaSearc hService()
        141                                 .s earch(site Id,jahiaSa vedSearch. getQuery() ,jParams,
        142                                           jPa rams.getLo cales(),
        143                                           Jah iaSearchRe sultBuilde r searchRe sultBuilde r);
        144                         */
        145                         if (search Results !=  null) {
        146                             reques t.getSessi on().setAt tribute(se ssionAttri buteName,s earchResul ts);
        147                         }
        148  
        149                         %><ul><%
        150                         int toIdx  = java.lan g.Math.min (searchRes ults.resul ts().size( ),maxPageI tems);
        151                         boolean ha sMore = to Idx < sear chResults. results(). size();
        152                         for (int i  = 0;i<toI dx;i++){
        153                             %><li> <%
        154                             JahiaS earchHit t hisHit = ( JahiaSearc hHit)searc hResults.r esults().g et(i);
        155                             String  highlight edText = t hisHit.get Teaser();
        156                             Compas sHighlight er highlig hter = thi sHit.highl ighter();
        157                             if ( h ighlighter  != null ) {
        158                                 hi ghlighter. setMaxNumF ragments(2 );
        159                                 if  ( thisHit .getType() !=JahiaSea rchHitInte rface.WEBD AVFILE_TYP E ){
        160                                      highligh tedText =  highlighte r.fragment sWithSepar ator(Jahia SearchCons tant.CONTE NT_FULLTEX T_SEARCH_F IELD);
        161                                 }  else {
        162                                      highligh tedText =  highlighte r.fragment sWithSepar ator("JAHI A:filecont ent");
        163                                 }
        164                             }
        165                             if ( ( thisHit.ge tType()!=J ahiaSearch HitInterfa ce.WEBDAVF ILE_TYPE
        166                                 &&  thisHit.g etPage() ! = null)
        167                                 ||  thisHit.g etType()== JahiaSearc hHitInterf ace.WEBDAV FILE_TYPE  ){
        168                                 if  ( thisHit .getPage()  != null )  {
        169                                      %>
        170                                      <a class ="leftlink on" href=" <%=thisHit .getURL()% >"><strong ><%=thisHi t.getPage( ).getTitle ()%></stro ng></a>
        171                                      <%
        172                                 }
        173                                 if  ( thisHit .getType() ==JahiaSea rchHitInte rface.WEBD AVFILE_TYP E){
        174                                      SearchHi t searchHi t = thisHi t.getParse dObject(). getSearchH it();
        175                                      if ( sea rchHit ins tanceof Sl ideSearchH it ){
        176                                          Slid eSearchRes ult slideS earchResul t = (Slide SearchResu lt)searchH it.getSear chResult() ;
        177                                          high lighter =  slideSearc hResult.hi ghlighter( searchHit,  jahiaSave dSearch.ge tQuery(),  org.apache .slide.ind ex.lucene. Index.CONT ENT_FIELD_ NAME);
        178                                          //hi ghlighter  = slideSea rchResult. highlighte r(searchHi t, searchS tring, org .apache.sl ide.index. lucene.Ind ex.CONTENT _FIELD_NAM E);
        179                                          if (  highlight er != null  ){
        180                                               highlighte r.setMaxNu mFragments (2);
        181                                               highlighte dText = hi ghlighter. fragmentsW ithSeparat or(org.apa che.slide. index.luce ne.Index.C ONTENT_FIE LD_NAME);
        182                                          }
        183                                      }
        184                                      DAVFileA ccess davO bject = (D AVFileAcce ss)thisHit .getObject ();
        185                                      String t hisPicto =  getPicto( davObject. getName()) ;
        186                                      %>
        187                                      <br/><a  href="<%=t hisHit.get URL()%>">< img
        188                                      src="<%= contextUrl %>/img/fil es/<%=this Picto%>.gi f" alt="[< %=thisPict o%>]"
        189                                      width="1 6" height= "16" borde r="0"/> <% =davObject .getPath() %></a><br/ ><br/><%=h ighlighted Text%>...
        190                                      <%
        191                                 }  else if (  thisHit.ge tType() !=  JahiaSear chHitInter face.FILE_ TYPE ){
        192                                      %><br/>< %=highligh tedText%>. ..<%
        193                                 }  else {
        194                                      String t hisPicto =  getPicto( thisHit.ge tURL());
        195                                      String f ilePath =  java.net.U RLDecoder. decode(thi sHit.getUR L(),"UTF-8 ");
        196                                      %>
        197                                      <br/><a  href="<%=t hisHit.get URL()%>">< img
        198                                      src="<%= contextUrl %>/img/fil es/<%=this Picto%>.gi f" alt="[< %=thisPict o%>]"
        199                                      width="1 6" height= "16" borde r="0"/>&nb sp;<%=file Path%></a> <br/><br/>
        200                                      <%=highl ightedText %>...
        201                                      <%
        202                                 }
        203                             }
        204                             %></li ><%
        205                             if (ha sMore) {
        206                                 St ring searc hUrl = jDa ta.gui().h tml().draw SearchLaun cher() +
        207                                      "?screen =execute&a mp;operati on=selectS aveSearch& amp;search Mode=1&amp ;savedSear ches=" +
        208                                      savedSea rchId + "& amp;maxPag eItems=50" ;
        209                                 %> <li><a hre f="<%=sear chUrl%>">< strong><co ntent:reso urceBundle
        210                                      resource Bundle="ja hiatemplat es.Corpora te_portal_ templates_ v2"
        211                                      resource Name="ldap .results.n ext"/>...< /strong></ a></li><%
        212                             }
        213                         }
        214  
        215                    } el se {
        216                         logger.deb ug("unknow  search mo de");
        217                    }
        218                } else {
        219                    logg er.debug(" Could not  get jahiaS avedSearch ");
        220                    %>Co uld not ge t this sea rch<%
        221                }
        222           }
        223           lo gger.debug ("savedSea rchId is "  + savedSe archId);
        224  
        225           %>
        226           </ jahiaHtml: actionMenu >
        227  
        228       </cont ent:contai ner>
        229       <jahia Html:actio nMenu name ="savedSea rch" nameP ostFix=".s avedSearch " resource Bundle="ja hiatemplat es.Corpora te_portal_ templates_ v2"
        230           us eFieldSet= "false" ac tionIcon=' <%=context URL + "/im g/actions/ add.gif"%> ' labelKey ="add.save dSearch">
        231       </jahi aHtml:acti onMenu>
        232   </content: containerL ist>
        233